/* northstage.io — proof-sheet system.
   Palette, type and structure are all derived from one idea: this studio shows you the work before
   you pay for it, so the site is built like a printer's proof. Paper, a plan line, and the red
   pencil a proof is marked up with — the red appears ONLY on annotations, never on furniture. */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--graphite);font-family:var(--body);
  font-size:clamp(1.06rem,1rem + .3vw,1.24rem);line-height:1.58;-webkit-font-smoothing:antialiased}
img{max-width:100%}
iframe{max-width:100%}
a{color:var(--plan)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2px solid var(--plan);outline-offset:3px}
.mono{font-family:var(--mono);font-size:.735rem;letter-spacing:.04em}

/* ── header ─────────────────────────────────────────────────────────────────────────────────── */
.site{display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:20px clamp(20px,5vw,64px);border-bottom:1px solid var(--rule)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--graphite)}
.brand svg{width:20px;height:20px;color:var(--plan)}
.brand span{font-family:var(--display);font-weight:700;font-size:1.02rem;letter-spacing:.01em}
.site nav{display:flex;gap:4px}
.site nav a{font-family:var(--mono);font-size:.72rem;text-decoration:none;color:var(--mid);
  padding:5px 8px;border:1px solid transparent;border-radius:2px}
.site nav a[aria-current]{color:var(--graphite);border-color:var(--rule);background:var(--panel);border-radius:9999px}

/* ── hero ───────────────────────────────────────────────────────────────────────────────────── */
.hero{padding:clamp(40px,6vw,76px) clamp(20px,5vw,64px) clamp(30px,4vw,48px)}
.hero-in{max-width:1180px;margin:0 auto;display:grid;gap:clamp(28px,4vw,56px);
  grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr);align-items:center}
.hero-words{min-width:0}
.hero-proof{margin:0;min-width:0}
.hero-proof .glass{aspect-ratio:4/3}
.hero-proof figcaption{margin-top:10px;color:var(--mid);font-family:var(--mono);font-size:.72rem}
.eyebrow{color:var(--accent-text);text-transform:uppercase;letter-spacing:.16em;margin:0 0 22px}
h1{font-family:var(--display);font-weight:800;letter-spacing:-.022em;line-height:1.02;
  font-size:clamp(2.1rem,1.3rem + 2.7vw,3.5rem);margin:0 0 22px;max-width:15ch}
h1 em{font-style:normal;color:var(--plan)}
.lede{font-size:clamp(1.02rem,.98rem + .3vw,1.16rem);color:var(--lede);max-width:48ch;margin:0 0 28px}
.cta{display:inline-block;font-family:var(--display);font-weight:600;font-size:1rem;
  background:var(--graphite);color:var(--paper);text-decoration:none;padding:15px 30px;border-radius:9999px}
.cta:hover{background:var(--plan)}
.cta-note{color:var(--mid);margin:14px 0 0}

/* ── the contact sheet: the signature element ───────────────────────────────────────────────── */
.sheet{padding:clamp(30px,4vw,54px) clamp(20px,5vw,64px) clamp(56px,8vw,96px);
  border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.sheet-head{max-width:1180px;margin:0 auto clamp(26px,4vw,40px);
  display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:12px}
h2{font-family:var(--display);font-weight:700;letter-spacing:-.014em;
  font-size:clamp(1.5rem,1.2rem + 1.1vw,2.15rem);margin:0;line-height:1.12}
.sheet-key{color:var(--mid);margin:0}
.frames{list-style:none;margin:0 auto;padding:0;max-width:1180px;
  display:grid;gap:clamp(20px,2.4vw,32px);
  /* auto-FILL leaves empty tracks when there are fewer items than columns — with two drafts that
     is a visible hole. auto-FIT collapses the empty tracks so the pair spans the row. */
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.frame{position:relative}
.frame-n{position:absolute;top:-9px;left:-9px;z-index:2;background:var(--paper);
  color:var(--mid);padding:0 6px}
/* the frame itself: a real page behind glass, scaled down. 1280px of site squeezed into the tile,
   which is why the transform and the fixed iframe width both have to be here. */
.glass{position:relative;aspect-ratio:4/3;overflow:hidden;background:#fff;border-radius:12px;
  border:1px solid var(--rule);box-shadow:0 1px 2px rgba(20,20,19,.05)}
/* A real page rendered at desktop width and scaled to fit its tile. The scale CANNOT be a fixed
   number: the hero frame and the sheet tiles are different widths and both change with the
   viewport, so one hard-coded factor leaves the page floating in a third of its box. --s is set
   per element by the scaler in baseof, and 1280 is the design width being scaled FROM. */
.glass iframe{position:absolute;top:0;left:0;
  /* max-width:none is LOAD-BEARING. The global img{max-width:100%}
iframe{max-width:100%} reset silently caps this
     at the tile width, so the iframe renders the site at ~370px — a MOBILE layout — and the scale
     then shrinks that to ~107px of unreadable content. The explicit width is overridden without
     any error and the frames simply come out blank. */
  max-width:none;width:1280px;height:1000px;border:0;
  transform:scale(var(--s,.2917));transform-origin:0 0;pointer-events:none;filter:saturate(.96)}
.frame-hit{position:absolute;inset:0;z-index:1}
.frame:hover .glass{border-color:var(--plan)}
.frame-what{margin:12px 0 2px;font-size:.98rem}
.frame-note{margin:0;color:var(--mid)}
/* the risk, and the reason it is worth taking: the misses are labelled. Red is reserved for it. */
.frame-note.miss{color:var(--mark)}

/* ── how it works ───────────────────────────────────────────────────────────────────────────── */
.how{padding:clamp(56px,8vw,104px) clamp(20px,5vw,64px)}
.how-in{max-width:1180px;margin:0 auto}
.how h2{margin-bottom:clamp(26px,4vw,44px)}
.steps{list-style:none;margin:0;padding:0;display:grid;gap:clamp(24px,3vw,40px);
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));counter-reset:none}
.steps li{background:var(--panel);border-radius:16px;padding:24px 24px 26px}
.step-n{color:var(--accent-text);display:block;margin-bottom:10px}
.steps h3{font-family:var(--display);font-weight:600;font-size:1.16rem;margin:0 0 8px;letter-spacing:-.008em}
.steps p{margin:0;color:var(--mid);font-size:.99rem}

/* ── services ───────────────────────────────────────────────────────────────────────────────── */
.offer{padding:clamp(46px,7vw,92px) clamp(20px,5vw,64px);border-top:1px solid var(--rule);
  background:var(--panel)}
.offer-in{max-width:1180px;margin:0 auto}
.offer h2{margin-bottom:clamp(24px,3vw,38px)}
.services{margin:0;display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(310px,1fr))}
.services div{padding:24px 26px 26px;background:var(--paper);border-radius:16px}
.services dt{font-family:var(--display);font-weight:600;font-size:1.06rem;margin-bottom:6px}
.services dd{margin:0;color:var(--mid);font-size:.97rem}

/* ── close ──────────────────────────────────────────────────────────────────────────────────── */
.close{padding:clamp(60px,9vw,112px) clamp(20px,5vw,64px);border-top:1px solid var(--rule)}
.close-in{max-width:760px;margin:0 auto;text-align:center}
.close h2{margin-bottom:18px}
.close .lede{margin-left:auto;margin-right:auto}

/* ── pages + footer ─────────────────────────────────────────────────────────────────────────── */
.page{padding:clamp(48px,7vw,92px) clamp(20px,5vw,64px)}
.page-in{max-width:660px;margin:0 auto}
.page h1{font-size:clamp(2rem,1.5rem + 2vw,3rem);max-width:none}
.page h2{margin:34px 0 12px}
.site-foot{border-top:1px solid var(--rule);padding:26px clamp(20px,5vw,64px)}
.foot-in{max-width:1180px;margin:0 auto;display:flex;justify-content:space-between;
  flex-wrap:wrap;gap:10px;color:var(--mid)}
.foot-in a{color:var(--mid)}

@media (max-width:900px){
  .hero-in{grid-template-columns:1fr}
  .hero-proof{order:-1}
}
@media (max-width:640px){
  .glass{aspect-ratio:3/2}
  .glass iframe{width:1024px;height:683px;transform:scale(.32)}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}


/* ── light / dark / auto ──────────────────────────────────────────────────────────────────────
   Three states, not two. "auto" is the ABSENCE of data-theme, so the media query below stays in
   charge and anyone who never touches the control gets whatever their operating system already
   says. The tokens themselves are injected at :root from hugo params; both selectors here are
   more specific than a bare :root, so they win without !important. */
:root{color-scheme:light;--lede:#43474D;--accent-text:#9E4629}

@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --paper:#171614; --panel:#211F1C; --graphite:#EDEAE3;
    --mid:#A5A199; --rule:#34312C; --plan:#D97757; --mark:#D97757; --lede:#C9C5BC; --accent-text:#E08A6B;
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#171614; --panel:#211F1C; --graphite:#EDEAE3;
  --mid:#A5A199; --rule:#34312C; --plan:#D97757; --mark:#D97757; --lede:#C9C5BC; --accent-text:#E08A6B;
}

/* THE ONE REAL PROBLEM WITH DARK MODE HERE. The drafts are real client sites with white
   backgrounds, and they must NOT be inverted — that would misrepresent what the client's site
   actually looks like. Left alone on a dark page they read as holes punched in the layout.
   So each frame gets a paper matte: the bright page becomes a mounted print on a dark desk
   rather than a light leak. Dimmed slightly at rest, full brightness when you look at it. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .glass{background:#EDEAE3;border-color:#3E3A34;padding:6px}
  :root:not([data-theme="light"]) .glass iframe{border-radius:6px;filter:brightness(.9) saturate(.94)}
  :root:not([data-theme="light"]) .frame:hover .glass iframe,
  :root:not([data-theme="light"]) .glass:focus-within iframe{filter:none}
}
:root[data-theme="dark"] .glass{background:#EDEAE3;border-color:#3E3A34;padding:6px}
:root[data-theme="dark"] .glass iframe{border-radius:6px;filter:brightness(.9) saturate(.94)}
:root[data-theme="dark"] .frame:hover .glass iframe,
:root[data-theme="dark"] .glass:focus-within iframe{filter:none}

/* the control */
.head-right{display:flex;align-items:center;gap:10px}
.theme-btn{display:grid;place-items:center;width:32px;height:32px;padding:0;cursor:pointer;
  background:transparent;border:1px solid transparent;border-radius:9999px;color:var(--mid)}
.theme-btn:hover{color:var(--graphite);border-color:var(--rule);background:var(--panel)}
.theme-btn svg{width:16px;height:16px;grid-area:1/1;display:none}
:root[data-mode="auto"]  .theme-btn .i-auto,
:root[data-mode="light"] .theme-btn .i-light,
:root[data-mode="dark"]  .theme-btn .i-dark{display:block}
/* before the cycler runs, show the auto glyph rather than nothing */
:root:not([data-mode]) .theme-btn .i-auto{display:block}

/* the matte offsets the iframe by its padding, so the scaler must measure the inner box */
.glass{box-sizing:border-box}
