/* =========================================================================================================
   WR-UI.CSS — THE SHARED PARTS (Dan 10/20). Every page links this file BEFORE its own <style>, and the shared
   scripts (nav.js, footer.js, the cookie bar) use these classes. RULE: use these parts; don't restyle them per page.
   A page may only add CONTEXT (e.g. ".visit .btn{flex:1}" to share a row) — never a second definition.
   Documented in _Claude Cowork/White Rhino Design System/DESIGN.md → "Components".
   ========================================================================================================= */

/* ---- TOKENS ---- */
:root{
  --ink:#1c1b20; --ink-2:#26252b; --paper:#f4f3f0; --paper-2:#e9e8e4; --white:#fff;
  --acc:#4dff9e;          /* green on dark surfaces */
  --acc-deep:#12b568;     /* green on light surfaces */
  --acc-soft:#b9ffdb;
  --acc-display:#0fa35d;  /* green HEADLINES on white, 24px+: 3.3:1 (Dan 10/30). Not for paper, where it is 2.95:1 */
  --acc-text:#0a7d46;     /* green TEXT on light, under 24px: 5.2:1 on white (Dan 10/30). --acc-deep is 2.7:1, shapes only */
  --mute-text:#6f6e6a;    /* quiet TEXT on light: 5.1:1 on white. --mute is for dark surfaces */
  --mute:#8a8a86; --mute-2:#bdbdb8;
  --line:rgba(0,0,0,.09); --line-dark:rgba(255,255,255,.13);
  --display:'Tektur',system-ui,sans-serif; --body:'Figtree',system-ui,sans-serif; --mono:'Fragment Mono',ui-monospace,monospace;
  --gutter:36px; --nav-h:76px; --ease:cubic-bezier(.16,1,.3,1);
  /* THE GRIDS (Dan 10/20) — see DESIGN.md 3.0. Thirds on every page; quarters only for the home process steps. */
  --r1:33.333vw; --r2:66.667vw;            /* thirds: the two column lines */
  --inset:24px;                             /* text inside a box / column with a line on its left */
  --q:calc((100vw - var(--gutter)) / 4);   /* quarters: line n at var(--gutter) + n·var(--q) */
  --cut:polygon(0 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%);        /* THE cut corner, bottom-right */
  --cut-lg:polygon(0 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%);
}

/* ---- LETTER SWAP (hover on every button): each glyph slides up, replaced by its twin. A page script wraps the letters;
   nav.js wraps any .btn label a page left unwrapped (Insights, articles, 404; Dan 11/14). ---- */
.lswap-c{display:inline-block;overflow:hidden;vertical-align:top;height:1.15em;line-height:1.15em}
.lswap-in{display:inline-flex;flex-direction:column;transition:transform .32s var(--ease);transition-delay:calc(var(--i) * 20ms)}
.lswap-in span{display:block;height:1.15em;line-height:1.15em}
.btn:hover .lswap-in,.btn2:hover .lswap-in{transform:translateY(-50%)}
.btn,.btn2{white-space:nowrap}   /* every glyph is its own box, so without this a label can break mid-word (Dan 10/31) */

/* ---- SMALL BUTTON (.btn2) — 52px, chevron, cut corner. --pri green / --ghost translucent (on dark) /
   --light translucent ink (on light surfaces, e.g. the home hero card; Dan 11/14). ---- */
.btn2{
  display:inline-flex;align-items:center;justify-content:flex-start;
  /* no flex gap: the letter swap makes every glyph a flex child; the chevron carries its own margin */
  min-height:52px;padding:0 18px;border:0;cursor:pointer;
  font-family:var(--display);font-weight:600;font-size:15px;letter-spacing:.02em;text-transform:uppercase;
  clip-path:var(--cut);transition:background .3s,color .3s;white-space:nowrap;text-decoration:none;
}
.btn2::before{content:'\203A';font-size:1.1em;line-height:1;transform:translateY(-1px);margin-right:10px}
.btn2--pri{background:var(--acc);color:var(--ink)}
.btn2--pri:hover{background:#fff}
.btn2--ghost{background:rgba(255,255,255,.09);color:#fff}
.btn2--ghost:hover{background:rgba(77,255,158,.14);color:var(--acc)}
.btn2--light{background:rgba(28,27,32,.07);color:var(--ink)}
.btn2--light:hover{background:rgba(18,181,104,.12);color:var(--acc-deep)}

/* ---- BIG BUTTON (.btn) — the section CTA. Green, chevron, cut corner; hover = ink slides up, text turns green.
   ONE SIZE: 72px tall, 24px type, everywhere (Dan 11/14). The one exception is a form's submit button: 64px, 20px type
   (".form .btn" below). --ghost = paper (on light). --wide = fills its column. (--lg is retired: it was the 72px size.) ---- */
.btn{
  position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:flex-start;gap:14px;
  min-height:72px;padding:0 26px;border:0;cursor:pointer;text-decoration:none;
  font-family:var(--display);font-weight:600;font-size:24px;letter-spacing:.01em;text-transform:uppercase;
  background:var(--acc);color:var(--ink);transition:color .3s,background .3s;clip-path:var(--cut-lg);
}
.btn::before{content:'\203A';position:relative;z-index:1;font-size:.9em;transform:translateY(-1px)}
.btn::after{content:'';position:absolute;inset:0;background:var(--ink);transform:translateY(101%);transition:transform .45s var(--ease)}
.btn > *{position:relative;z-index:1}
.btn:hover{color:var(--acc)}
.btn:hover::after{transform:none}
.btn--wide{width:100%}
.btn--ghost{background:var(--paper);color:var(--ink)}
.btn--ghost::after{display:none}
.btn--ghost:hover{background:var(--paper-2);color:var(--ink)}
@media (prefers-reduced-motion:reduce){.btn::after,.lswap-in{transition:none}}

/* ---- FILM PLAY (.vplay__big) + FULL-SCREEN FILM (.qfilm) — the round Play film button and the overlay it opens; case pages + home quote ---- */
.qfilm{position:fixed;inset:0;z-index:300;background:rgba(18,17,22,.96);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:calc(var(--nav-h) + 10px) var(--gutter) 30px;opacity:0;transition:opacity .4s ease}
.qfilm.on{opacity:1}
.qfilm video{max-width:min(100%,1400px);max-height:calc(100% - 80px);background:#000}
.qfilm .btn2{color:#fff}
.vplay__big{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:rgba(20,19,24,.28);border:0;cursor:pointer;color:#fff;transition:background .4s,opacity .5s}
.vplay__big i{width:96px;height:96px;border-radius:50%;border:1px solid rgba(255,255,255,.75);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:background .35s,border-color .35s,transform .5s var(--ease)}
.vplay__big i::after{content:'';margin-left:5px;border-style:solid;border-width:11px 0 11px 18px;border-color:transparent transparent transparent #fff;transition:border-color .35s}
.vplay__big b{font-family:var(--mono);font-weight:400;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.vplay__big:hover{background:rgba(20,19,24,.12)}
.vplay__big:hover i{background:var(--acc);border-color:var(--acc);transform:scale(1.06)}
.vplay__big:hover i::after{border-left-color:var(--ink)}

/* ---- EYEBROW / CRUMB (pips + label / section) — top of every page hero ---- */
.crumb{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.crumb .pips{display:flex;gap:3px}
.crumb .pips i{width:7px;height:11px;background:var(--acc-deep);border-radius:50% 60% 60% 50%/50%}
.crumb b{font-weight:400;color:var(--ink)}
.crumb span{color:var(--mute-text)}

/* CTA PAIR (.visit) — Dan 10/15, shared 10/20: the closing pair hangs straight off the dark band above, on the thirds:
   one button fills the middle third, the other the right third (8px apart). The buttons are the shared .btn, cut corner
   and all (Dan 10/31: no overrides). On phones the pair sits centred in its white band (Dan 10/31). Markup:
   <div class="visit"><div><a class="btn">…</a><a class="btn btn--ghost">…</a></div></div> */
.visit{position:relative;isolation:isolate;padding:0 0 110px 33.333vw;background:var(--white)}
.visit > div:last-child{position:relative;z-index:1;display:flex;gap:8px;width:100%}
.visit .btn{flex:1}
@media (max-width:1100px){.visit{padding-left:var(--gutter);padding-right:var(--gutter)}}
@media (max-width:899px){.visit{padding-top:110px}}
@media (max-width:700px){.visit > div:last-child{flex-direction:column}}

/* COLUMN LINES (.cols3) — Dan 10/22: the ONE way to draw the thirds hairlines in a band (pages used to roll their own,
   so some bands lost them). Put it first inside the band; the band needs position:relative and its other children
   sit above it automatically (give the band class="hascols"). Light bands: .cols3 · dark bands: .cols3 .cols3--dk. Lines sit BEHIND text, never over it.
   <div class="cols3" aria-hidden="true"><i></i><i></i><i></i></div>   (band: class="… hascols") */
.cols3{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr 1fr;pointer-events:none;z-index:-1}
.cols3 i{border-left:1px solid var(--cols3-line,rgba(0,0,0,.081))}
.cols3 i:first-child{border-left:0}
.cols3--dk{--cols3-line:var(--line-dark,rgba(255,255,255,.13))}
.hascols{position:relative;isolation:isolate}   /* the band: z-index:-1 keeps the lines above its background and below all its content */
@media (max-width:1100px){.cols3{display:none}}   /* the thirds collapse below 1100 — so do the lines */

/* CONTACT CLOSER (.contact + .form) — shared 10/30: "You bring the problem. We bring the plan." with the form.
   The form starts ON the first rule and its paired fields split ON the second rule. index.html and project.html
   still carry their own copies until the Next.js port. Band needs hascols + a .cols3. */
.t-kicker{font-weight:500;font-size:14px;color:var(--mute-text);text-transform:uppercase}
.contact{display:grid;grid-template-columns:1fr 1fr;gap:60px;padding:150px var(--gutter) 60px;background:var(--white)}
.contact__l{display:flex;flex-direction:column}
.contact__l .t-kicker{margin-bottom:34px}
.contact__h2{font-family:var(--display);font-weight:600;text-transform:uppercase;line-height:1.02;letter-spacing:-.005em;font-size:clamp(34px,3.6vw,60px)}
.contact__h2 em{font-style:normal;color:var(--acc-display)}
.contact__l .t-caps{margin-top:auto;padding-top:100px;max-width:560px;font-weight:600;font-size:14px;line-height:1.35;text-transform:uppercase;color:#555}
.form{display:grid;grid-template-columns:1fr 1fr;gap:16px 28px}
.form input,.form textarea,.form select{width:100%;background:var(--paper);border:0;padding:20px 16px;font-family:var(--display);font-size:19px;text-transform:uppercase;color:var(--ink);outline:0;appearance:none;-webkit-appearance:none}
.form input::placeholder,.form textarea::placeholder{color:var(--mute-text);opacity:1}
.form select{color:var(--mute-text)}
.form textarea{grid-column:1/-1;min-height:150px;resize:vertical}
.form .sel{position:relative}
.form input,.form .sel,.form select{height:68px;line-height:1.2}
.form .sel select{display:block;height:100%}
.form .sel::after{content:'⌄';position:absolute;right:18px;top:12px;font-size:28px;color:#666;pointer-events:none}
.form .btn{grid-column:1/-1;min-height:64px;font-size:20px}   /* form submits: 64px, 20px type (Dan 11/14) */
.form__fine{grid-column:1/-1;font-size:13px;font-weight:600;text-transform:uppercase;color:var(--mute-text);margin-top:20px;line-height:1.4}
/* what a form says after it posts (wr-forms.js adds these) */
.form__ok{display:none;grid-column:1/-1;padding:40px 0 10px}
.form__ok h3{font-family:var(--display);font-weight:600;font-size:clamp(28px,2.6vw,40px);text-transform:uppercase;line-height:1}
.form.sent > :not(.form__ok){display:none}
.form.sent .form__ok{display:block}
.form__err{display:none;grid-column:1/-1;margin-top:12px;font-family:var(--mono);font-size:13px;text-transform:uppercase;color:var(--ink)}
.form__err a{text-decoration:underline}
.failed .form__err{display:block}
.form select.set{color:var(--ink)}
@media (max-width:1100px){.contact{grid-template-columns:1fr;gap:40px;padding-top:100px}}
@media (min-width:1101px){
  .contact{grid-template-columns:calc(33.333vw - var(--gutter)) 1fr;column-gap:0}
  .contact__l{padding-right:48px}
  .contact__h2{font-size:clamp(34px,3.3vw,60px)}
  .contact .form{grid-template-columns:calc(33.333vw - 28px) 1fr;column-gap:28px}
}
@media (max-width:700px){.form{grid-template-columns:1fr}}
