/* ============================================================
   A2Z OPS — Layout & components (static multi-page build)
   Builds on the design-system tokens/utilities in site.css.
   No new colours, no gradients — same visual language.
   ============================================================ */

/* ---- Skip link (a11y) ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--graphite); color: var(--chalk);
  padding: 10px 16px; font-family: var(--font-mono); font-size: 13px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---- In-content links (header/footer set their own colours) ---- */
main p a:not(.btn) { color: var(--pine); text-decoration: underline; text-underline-offset: 2px; }
main p a:not(.btn):hover { color: var(--pine-hover); }
.readout p a:not(.btn) { color: var(--status); }

/* ---- Section heading / intro helpers (replaces repeated inline styles) ---- */
.section-h { margin-top: 14px; }
.section-intro { color: var(--slate); margin-top: 12px; }
.section-intro--dark { color: var(--text-muted-on-dark); }

/* ---- Containers ---- */
.container { max-width: var(--container-wide); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--tight { padding: clamp(32px, 5vw, 56px) 0; }

/* ---- Focus visibility (a11y) ---- */
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242,240,235,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  letter-spacing: 0.14em; color: var(--graphite); white-space: nowrap;
  display: inline-flex; align-items: baseline; gap: 2px;
}
.wordmark .cur { color: var(--status); font-family: var(--font-mono); }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); flex-wrap: wrap; }
.nav-link {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--slate); padding: 6px 0;
  border-bottom: 1px solid transparent; transition: color var(--duration) var(--ease);
}
.nav-link:hover { color: var(--graphite); }
.nav-link[aria-current="page"] { color: var(--graphite); border-bottom-color: var(--pine); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  background: var(--graphite); color: var(--chalk); border: none;
  border-radius: var(--radius-pill); padding: 11px 20px; white-space: nowrap;
  min-height: 44px;
}
.nav-cta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status); }
.nav-toggle { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  border-radius: var(--radius-pill); padding: 12px 22px; min-height: 44px;
  border: 1px solid transparent; transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status); }
.btn .arrow { font-family: var(--font-mono); }
.btn--primary { background: var(--graphite); color: var(--chalk); }
.btn--primary:hover { background: #000; }
.btn--secondary { background: transparent; color: var(--graphite); border-color: var(--graphite); }
.btn--secondary:hover { background: var(--graphite); color: var(--chalk); }
.btn--pine { background: var(--pine); color: var(--chalk); }
.btn--pine:hover { background: var(--pine-hover); }
.btn--ghost { background: transparent; color: var(--slate); padding-left: 0; }
.btn--ghost:hover { color: var(--graphite); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ---- Hero ---- */
.hero { padding-top: clamp(64px, 12vw, 120px); padding-bottom: clamp(32px, 5vw, 56px); }
.hero h1 { font-size: clamp(40px, 9vw, 76px); line-height: 1.0; margin-top: 24px; max-width: 16ch; }
.hero h1 .cur { color: var(--status); font-weight: 500; }
.hero .lead { margin-top: 28px; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; max-width: 60ch; }

/* ---- Grids ---- */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---- Practice doors ---- */
.door {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 26px; background: var(--surface-card);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
  color: var(--graphite); height: 100%; cursor: default;
}
.door:hover { border-color: var(--graphite); }
.door .door-index { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--slate); text-transform: uppercase; }
.door h3 { font-size: 25px; }
.door p { color: var(--slate); font-size: 15.5px; margin: 0; }
.door .door-go { margin-top: auto; font-family: var(--font-mono); font-size: 13px; color: var(--pine); }

/* ---- Operator cards ---- */
.op-card { color: var(--graphite); }
.op-tile {
  aspect-ratio: 3 / 4; border-radius: var(--radius-sm); margin-bottom: 16px;
  background: var(--graphite); display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.op-tile .initials { font-family: var(--font-mono); font-size: 52px; font-weight: 500; letter-spacing: 0.04em; color: var(--chalk); }
.op-tile .op-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.op-tile .op-photo--zoom { transform: scale(1.18); transform-origin: center top; }
.op-tile .initials .cur { color: var(--status); }
.op-card .op-name { font-family: var(--font-display); font-weight: 500; font-size: 25px; line-height: 1.1; }
.op-card .op-role { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin-top: 8px; }

/* ---- Tags (client roster) ---- */
.tag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px 28px; }
.tag .tag-name { font-family: var(--font-display); font-weight: 500; font-size: 20px; color: var(--graphite); }
.tag .tag-cap { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-top: 4px; }
.tag .tag-note { font-size: 14px; color: var(--slate); margin-top: 8px; max-width: 34ch; }

/* ---- Proof bar (homepage) ---- */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; }
.proof-num { font-family: var(--font-mono); font-size: clamp(28px, 5vw, 39px); font-weight: 500; color: var(--status); line-height: 1.05; }
.proof-cap { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-muted-on-dark); margin-top: 8px; text-transform: uppercase; }
.proof-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--status); text-transform: uppercase; }

/* ---- Receipts (Wall 2) ---- */
.receipts { list-style: none; padding: 0; margin: 24px 0 0; }
.receipt {
  display: grid; grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.6fr); gap: 8px 28px;
  align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--border);
}
.receipt .r-what { font-size: 16px; color: var(--graphite); }
.receipt .r-num { font-family: var(--font-mono); font-weight: 500; color: var(--pine); text-align: right; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .receipt { grid-template-columns: 1fr; gap: 6px; }
  .receipt .r-num { text-align: left; }
}
.receipt .r-who { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.readout .receipt { border-bottom-color: var(--rule-on-dark); }
.readout .receipt .r-what { color: var(--chalk); }
.readout .receipt .r-num { color: var(--status); }

/* ---- Scope list ---- */
.scope { list-style: none; padding: 0; margin: 18px 0 0; }
.scope li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 1.35; }
.scope li::before { content: '→'; font-family: var(--font-mono); color: var(--pine); flex: none; }
@media (max-width: 760px) {
  .scope li { padding: 6px 0; font-size: 14.5px; line-height: 1.3; }
}

/* ---- Card (proof callout) ---- */
.card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; background: var(--surface-card); }

/* ---- Media/reel slots (Production) ---- */
.reel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 28px; }
.reel {
  display: flex; flex-direction: column; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; background: var(--surface-card);
}
.reel { margin: 0; }
.reel > a { display: block; }
.reel .reel-poster, .reel .reel-media {
  aspect-ratio: 9 / 16; width: 100%; display: block; background: var(--graphite); object-fit: cover;
}
/* Instagram inline embed — plays in-page.
   The iframe is taller than the visible window and the caption is pulled up
   over the bottom of it, masking Instagram's like/comment footer. */
.reel { overflow: hidden; }
.reel .reel-embed {
  width: 100%; height: 720px; border: 0; display: block; background: var(--graphite);
  margin-bottom: -150px;
}
.reel .reel-meta {
  position: relative; z-index: 1; background: var(--surface-card);
  border-top: 1px solid var(--border);
}
@media (max-width: 760px) {
  .reel .reel-embed { height: 760px; margin-bottom: -150px; }
  /* Phone: keep only the best four reels, then send people to Instagram. */
  .reel--mobile-hide { display: none; }
}
.reel .reel-poster {
  color: var(--text-muted-on-dark);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; padding: 16px;
}
.reel .reel-meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.reel .reel-vertical { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); }
.reel .reel-title { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--graphite); }
.reel .reel-stat { font-family: var(--font-mono); font-size: 13px; color: var(--pine); }
.reel .reel-link { font-family: var(--font-mono); font-size: 12px; color: var(--pine); margin-top: 6px; display: inline-block; }

/* ---- FAQ ---- */
.faq { margin-top: 24px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 500; font-size: 19px; color: var(--graphite); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); color: var(--pine); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 12px; color: var(--slate); }

/* ---- Pine band (CTA strip) ---- */
.pine-band { background: var(--pine); color: var(--chalk); padding: clamp(48px, 7vw, 76px) 0; }
.pine-band .container { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.pine-band h2 { color: var(--chalk); max-width: 18ch; }
.pine-band a.band-link { font-family: var(--font-mono); font-size: 15px; color: var(--chalk); display: inline-flex; gap: 10px; align-items: center; }

/* ---- Footer ---- */
.site-footer { background: var(--graphite); color: var(--chalk); padding: 56px 0 40px; }
.site-footer .wordmark { color: var(--chalk); font-size: 26px; }
.footer-rule { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.footer-rule .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status); }
.footer-rule .line { height: 1px; flex: 1; background: var(--rule-on-dark); }
.footer-cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-family: var(--font-mono); font-size: 12.5px; color: var(--chalk); opacity: 0.82; }
.footer-nav a:hover { opacity: 1; }
.footer-note { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted-on-dark); }
.footer-legal { margin-top: 28px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted-on-dark); text-transform: uppercase; }

/* ---- Contact modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,29,33,0.42); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; z-index: 100;
  background: var(--chalk); border-left: 1px solid var(--border-strong);
  transform: translateX(100%); transition: transform var(--duration-slow) var(--ease-out);
  padding: 40px 36px; overflow-y: auto;
}
.modal.open { transform: translateX(0); }
.modal-close { background: none; border: none; cursor: pointer; font-family: var(--font-mono); font-size: 18px; color: var(--slate); min-width: 44px; min-height: 44px; }
.modal h2 { font-size: 28px; margin-top: 16px; }
.op-line { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: 12.5px; padding: 4px 0; }
.op-line .n { color: var(--graphite); } .op-line .r { color: var(--slate); }

/* ---- 404 ---- */
.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.notfound .code { font-family: var(--font-mono); font-size: clamp(72px, 18vw, 160px); color: var(--graphite); line-height: 1; }
.notfound .code .cur { color: var(--status); }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-family: var(--font-mono); cursor: pointer; color: var(--graphite);
  }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--chalk); border-bottom: 1px solid var(--border);
    padding: 12px clamp(20px, 5vw, 40px) 20px;
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px 0; width: 100%; }
  .nav-cta { width: 100%; justify-content: center; margin-top: 8px; }
  .site-header .container { position: relative; flex-wrap: nowrap; }
}

/* ============================================================
   Mobile polish — scale the type system down and tighten spacing
   so phones don't render at desktop sizes. The whole site reads
   off these tokens, so redefining them here cascades everywhere.
   ============================================================ */
@media (max-width: 760px) {
  :root {
    --text-xs:   11.5px;
    --text-sm:   13px;
    --text-base: 15.5px;
    --text-lg:   17px;
    --text-xl:   20px;
    --text-2xl:  24px;
    --text-3xl:  28px;
    --text-4xl:  33px;
    --text-5xl:  38px;
    --text-6xl:  44px;
    --text-mega: 56px;
  }

  body { line-height: 1.5; }

  /* A touch more breathing room at the screen edge. Only touch the
     horizontal padding — using the `padding` shorthand here would wipe
     out the vertical section padding set by .section / .section--tight. */
  .container { padding-left: 18px; padding-right: 18px; }

  /* Keep clear vertical separation between sections on phones. Use
     longhand padding so we don't clobber the horizontal container
     padding on sections that are also .container elements. */
  .section { padding-top: 48px; padding-bottom: 48px; }
  .section--tight { padding-top: 36px; padding-bottom: 36px; }
  .hero { padding-top: 40px; padding-bottom: 32px; }

  /* Section heads and intros sized down a notch. */
  .section-h { margin-top: 10px; }
  .section-intro { font-size: 15px; }

  /* Hero — keep it bold but in proportion with the phone. */
  .hero h1 { font-size: clamp(30px, 9vw, 40px); margin-top: 16px; }
  .hero .lead { margin-top: 18px; font-size: 16px; }
  .btn-row { gap: 10px; margin-top: 24px; }
  .btn { font-size: 14px; padding: 11px 18px; }

  /* Practice doors — less heavy padding, smaller headings. */
  .door { padding: 20px; }
  .door h3 { font-size: 20px; }
  .door p { font-size: 14.5px; }

  /* Operator + client cards. The portrait tiles go full-width and
     huge in a single column, so pair them two-up and shrink them. */
  #operators .grid--3 { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .op-tile { aspect-ratio: 1 / 1; margin-bottom: 12px; }
  .op-tile .initials { font-size: 34px; }
  .op-card .op-name { font-size: 17px; }
  .op-card .op-role { font-size: 10.5px; }
  .tag-grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .tag .tag-name { font-size: 18px; }

  /* Proof bar / receipts. */
  .proof-grid { gap: 20px; }
  .receipt { padding: 14px 0; }
  .receipt .r-what { font-size: 15px; }

  /* Reel cards. */
  .reel .reel-title { font-size: 16px; }

  /* Contact modal. */
  .modal { padding: 28px 22px; }
  .modal h2 { font-size: 24px; }

  /* Footer. */
  .site-footer { padding: 44px 0 32px; }
  .site-footer .wordmark { font-size: 22px; }
  .footer-nav { gap: 16px 20px; }
}
