/* ==========================================================================
   Trestle — Editorial / Exaggerated Minimalism
   Palette unchanged: charcoal #16181B + orange #F3823C
   Type: Bodoni Moda (display) + Jost (text)  — "Luxury Minimalist" pairing
   ========================================================================== */

:root {
  /* Brand — unchanged */
  --ink:        #16181b;
  --orange:     #f3823c;

  /* Accessible tints of the same accent (contrast-checked on paper) */
  --orange-deep: #d96b28;   /* large display accents  */
  --orange-ink:  #a8501a;   /* small text — 5.5:1 on white */

  --paper:      #ffffff;
  --paper-warm: #f7f5f2;
  --ink-soft:   #55585f;
  --line:       #e2ded7;
  --line-dark:  #2c2f34;

  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --text:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacious scale — density dial low, per Exaggerated Minimalism */
  --gap:   clamp(24px, 4vw, 48px);
  --bay:   clamp(72px, 11vw, 152px);
  --shell: 1240px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

/* --------------------------------------------------------- shared atoms */

.display {
  font-family: var(--display);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.meta,
.sec-idx,
.aside-label,
.nav-idx,
.wx-place {
  font-family: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  margin-bottom: clamp(28px, 5vw, 56px);
}

.meta-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}

.sec-idx { color: var(--orange-ink); }
.sec-idx.light { color: var(--orange); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 34px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}
.btn:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.btn-light {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}
.btn-light:hover { background: var(--paper); border-color: var(--paper); }
.btn-light:disabled { opacity: 0.55; cursor: default; }

/* Secondary action. Same box as .btn so the pair reads as one unit — the
   difference is weight, not geometry. */
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--paper-warm);
  border-color: var(--ink);
  color: var(--ink);
}

/* ------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;          /* tap target */
  text-decoration: none;
  color: var(--ink);
}
.logo-img {
  width: 38px; height: 38px;
  object-fit: cover;
  border-radius: 50%;
  flex: none;
}
.logo-word {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.logo-word.small { font-size: 20px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;          /* tap target — the text stays where it was */
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 220ms ease;
}
.nav-idx { align-self: center; }
.nav a:hover { color: var(--orange-ink); }
.nav-idx { color: var(--orange-ink); font-size: 10px; }

.nav-cta {
  border: 1px solid var(--ink);
  padding: 13px 20px;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  transition: background 220ms ease, color 220ms ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1px;
  background: var(--ink);
  transition: transform 220ms ease, opacity 220ms ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* --------------------------------------------------------------- hero */

.hero {
  padding: clamp(64px, 10vw, 130px) 0 clamp(48px, 7vw, 90px);
}

.hero .display {
  font-size: clamp(46px, 10.5vw, 148px);
  max-width: 15ch;
}
.hero .display em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-deep);
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr minmax(250px, 360px);
  gap: var(--gap);
  align-items: end;
  margin-top: clamp(40px, 6vw, 84px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line);
}

.hero-lede {
  grid-column: 2;
  display: grid;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

/* Both actions share one track width, so they stay the same size whether they
   sit side by side or fall onto separate lines. */
.hero-act {
  grid-row: 1;
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 250px));
  justify-content: start;
  align-items: center;
  gap: 16px 20px;
}

/* ------------------------------------------- capability strip (static) */

.strip { border-block: 1px solid var(--line); }

/* A list of capabilities is reference material, not a statement. It sits in
   the same quiet uppercase the rest of the site uses for meta information,
   with the dots between items rather than in front of each one. */
.strip-inner {
  list-style: none;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px clamp(18px, 3vw, 38px);
  padding-block: 17px;
  font-family: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.strip-inner li {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
}

.strip-inner li + li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}

/* ------------------------------------------------------------ sections */

.section { padding: var(--bay) 0; }
.services { background: var(--paper-warm); }

.sec-head { margin-bottom: clamp(44px, 6vw, 80px); }
.sec-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-top: 18px;
}
.sec-title.light { color: var(--paper); }

/* --------------------------------------------------------------- work */

/* An index rather than a card wall: a steady left rail of project names, each
   answered by the site itself running in a frame. The work is the picture, so
   nothing here has to stand in for it. */

.work-index { list-style: none; margin: 0; padding: 0; }

.wx {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.45fr);
  gap: var(--gap);
  align-items: center;
  padding: clamp(30px, 3.6vw, 54px) 0;
  border-top: 1px solid var(--line);
}

.wx-num {
  display: block;
  font-family: var(--display);
  font-size: 20px;
  font-style: italic;
  color: var(--orange-ink);
  margin-bottom: 14px;
}

.wx-name {
  font-family: var(--display);
  font-size: clamp(27px, 3.5vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  transition: color 220ms ease;
}
.wx-name a { color: inherit; text-decoration: none; }

/* One link per row takes focus, but the whole row is the target. */
.wx-name a::after { content: ""; position: absolute; inset: 0; }
.wx-name a:focus-visible { outline: none; }
.wx-name a:focus-visible::after { outline: 2px solid var(--orange); outline-offset: 8px; }

/* the arrow only appears on approach — nothing to see when idle */
.wx-name::after {
  content: " ↗";
  font-family: var(--text);
  font-size: 0.5em;
  opacity: 0;
  transition: opacity 220ms ease;
}
.wx:hover .wx-name,
.wx:focus-within .wx-name { color: var(--orange-ink); }
.wx:hover .wx-name::after,
.wx:focus-within .wx-name::after { opacity: 1; }

.wx-cat { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }
.wx-place { color: var(--orange-ink); margin-top: 10px; font-size: 11px; }

/* ---- the live frame, borrowed from the case pages so the two agree ---- */

.wx-frame { transition: transform 320ms cubic-bezier(.22,.61,.36,1); }
.wx:hover .wx-frame,
.wx:focus-within .wx-frame { transform: translateY(-6px); }

.wx-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-bottom: none;
}
.wx-bar i {
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.wx-bar span {
  margin-left: 10px;
  font-family: var(--text);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.wx-view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-warm);
}
/* Renders at a real desktop width, then scales down — the thumbnail shows the
   desktop layout, not the site's own mobile breakpoint. */
.wx-view iframe {
  position: absolute;
  top: 0; left: 0;
  width: 1440px; height: 900px;
  border: 0;
  transform-origin: 0 0;
  transform: scale(var(--fit, 1));
  pointer-events: none;          /* it is a preview — the row opens the case */
}

.work-note {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ----------------------------------------------------------- services */

.svc-list { list-style: none; margin: 0; padding: 0; }

.svc {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) minmax(280px, 1.5fr);
  gap: var(--gap);
  align-items: start;
  padding: clamp(26px, 3.4vw, 42px) 0;
  border-top: 1px solid var(--line);
  transition: background 260ms ease;
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc:hover { background: rgba(243,130,60,0.05); }

.svc-num {
  font-family: var(--display);
  font-size: 20px;
  font-style: italic;
  color: var(--orange-ink);
}
.svc-name {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.svc-desc { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }

/* ------------------------------------------------------------- studio */

.studio { border-top: 1px solid var(--line); }
.studio-inner { max-width: 760px; }

/* Sized to be read, not announced. The orange rule and the italic carry the
   emphasis, so the type itself does not have to. */
.pull {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.36;
  letter-spacing: -0.014em;
  margin: 20px 0 clamp(26px, 3vw, 38px);
  padding-left: clamp(16px, 2.4vw, 26px);
  border-left: 2px solid var(--orange);
}
.pull em { font-style: italic; color: var(--orange-deep); }

.studio-line {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  max-width: 56ch;
}

/* ------------------------------------------------------------ contact */

.contact { background: var(--ink); color: var(--paper); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(36px, 6vw, 90px);
}

.contact-aside { display: grid; align-content: start; gap: 6px; }
.aside-label { color: var(--orange); margin-top: 26px; }
.contact-aside .aside-label:first-child { margin-top: 0; }
.aside-text { color: #b9bcc2; font-size: 16px; }
.aside-mail {
  display: inline-flex;
  align-items: flex-end;
  min-height: 44px;
  font-family: var(--display);
  font-size: clamp(18px, 2vw, 23px);
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.28);
  padding-bottom: 3px;
  word-break: break-word;
  transition: color 220ms ease, border-color 220ms ease;
}
.aside-mail:hover { color: var(--orange); border-color: var(--orange); }

.field { margin-bottom: 30px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b9bcc2;
  margin-bottom: 10px;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  padding: 10px 0 14px;
  color: var(--paper);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 220ms ease;
}
.field input:hover,
.field textarea:hover { border-color: #4a4e55; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--orange); }

.field-help {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #85888f;
}

.form-status {
  margin-top: 18px;
  font-size: 15px;
  color: var(--orange);
  min-height: 1.4em;
}

/* ------------------------------------------------------------- footer */

.site-footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-tag, .footer-copy { font-size: 14px; color: var(--ink-soft); }

/* --------------------------------------------------------- reveal fx */

.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  /* expo-out: fast start, long soft settle — reads as one continuous motion */
  transition: opacity 880ms cubic-bezier(.16, 1, .3, 1),
              transform 880ms cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* release the compositor layer once the element has settled */
.reveal.is-settled { will-change: auto; }

/* ------------------------------------------------------------ tablet */

@media (max-width: 1000px) {
  .wx { grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.2fr); }

  .svc { grid-template-columns: 60px 1fr; }
  .svc-desc { grid-column: 2; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    inset: 80px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px clamp(20px, 5vw, 56px) 28px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease, transform 240ms ease;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a {
    width: 100%;
    padding: 18px 0;
    font-size: 19px;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta {
    border: none;
    margin-top: 6px;
    padding: 18px 0;
    font-size: 19px !important;
    letter-spacing: 0.02em !important;
    text-transform: none;
    color: var(--orange-ink);
  }
  .nav-cta:hover { background: none; color: var(--orange-ink); }
  .nav-toggle { display: flex; }

  .hero-foot { grid-template-columns: 1fr; gap: 32px; }
  .hero-lede, .hero-act { grid-column: 1; }
  .hero-lede { grid-row: 1; }
  .hero-act  { grid-row: 2; }

  .wx { grid-template-columns: 1fr; gap: 26px; align-items: start; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { order: 2; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .svc { grid-template-columns: 1fr; gap: 12px; }
  .svc-num { font-size: 16px; }
  .hero-act { grid-template-columns: 1fr; gap: 14px; }
}

/* --------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
