/* Style-brief skin — maps the Oliizoi brand tokens (tokens.css) onto the
   design-system's semantic token names. Load AFTER styles.css and tokens.css.
   Palette, type triad and rhythm per STYLE-BRIEF.md; no new hues. */

:root {
  /* Page ground moves to Linen 50; Linen 100 becomes the warm secondary
     surface. Existing markup references --linen-cream for page grounds. */
  --linen-050: #faf8f5;
  --linen-100: #f4edde;

  --surface-page: var(--linen-50);
  --surface-raised: var(--linen-100);
  --surface-sunken: var(--linen-200);
  --surface-card: var(--linen-50);

  --text-body: var(--char-700);
  --text-heading: var(--char-700);
  --text-muted: var(--char-500);
  --text-subtle: var(--char-400);

  /* Rules, not boxes — 1px in Loam 300 */
  --border-hairline: color-mix(in srgb, var(--loam-300) 55%, transparent);
  --border-default: var(--loam-300);

  /* Client direction: pill buttons site-wide (overrides the kit's 2px control radius) */
  --radius-control: 999px;

  /* Type triad: serif display · grotesk body · mono labels */
  --font-serif: var(--ff-display);
  --font-sans: var(--ff-sans);
  --font-mono: var(--ff-mono);
}

body { background: var(--linen-50); }

/* Mobile nav: CSS-only hamburger via checkbox hack (no page-logic changes needed) */
.nav-toggle-input { display: none; }
.nav-toggle-label { display: none; cursor: pointer; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; }
.mobile-nav-panel { display: none; }

@media (max-width: 860px) {
  .desktop-nav-links { display: none !important; }
  .nav-toggle-label { display: inline-flex !important; }
  .dp-row { grid-template-columns: 1fr !important; }
  .dp-form { padding-left: 20px !important; padding-right: 20px !important; }
  .nav-toggle-input:checked ~ .mobile-nav-panel { display: flex !important; }

  /* Any inline grid layout collapses to a single column */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* Items meant to span multiple columns (e.g. a photo beside a card row) take the
     full row instead of an orphaned implicit half-column once the grid is 1-wide */
  [style*="grid-column: span"] { grid-column: 1 / -1 !important; min-height: 240px !important; }
  .offset-align { margin-top: 0 !important; }

  /* Large column gaps read as dead space once a grid stacks to one column */
  [style*="gap: 40px"], [style*="gap: 48px"], [style*="gap: 56px"],
  [style*="gap: 64px"], [style*="gap: 72px"] { gap: 24px !important; }

  /* Section content gutters shrink from 48px to 20px */
  [style*="var(--container-max)"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* 16px prevents iOS Safari's auto-zoom-on-focus, which otherwise makes the
     whole page (esp. popup forms) look zoomed in and overlapping after a tap */
  input, select, textarea { font-size: 16px !important; }

  html, body { overflow-x: clip; }
  /* Hover-bleed rows (negative side margins) sit flush once the gutter shrinks */
  [style*="margin: 0px -24px"], [style*="margin: 0 -24px"] { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
}

@media (max-width: 860px) {
  /* The hero scrim fades out to the right, which works when the copy sits in the
     left half. Once the text spans the full width, it needs an even wash instead. */
  .hero-scrim { background: linear-gradient(to bottom, rgba(244,237,222,.84) 0%, rgba(244,237,222,.80) 60%, rgba(244,237,222,.76) 100%) !important; }

  /* Hero copy sits low on mobile so the image reads first as you scroll in */
  #top:has(.hero-copy) { align-items: flex-end !important; }
  .hero-copy { padding-top: 220px !important; padding-bottom: 52px !important; }
}

@media (max-width: 520px) {
  [style*="var(--container-max)"] { padding-left: 16px !important; padding-right: 16px !important; }
  [style*="font-size: 60px"], [style*="font-size: 50px"] { font-size: 34px !important; }
}

/* Project Discovery page: the slide-over form renders inline as a page card */
.pd-page .pd-scrim, .pd-page .pd-close { display: none !important; }
.pd-page .pd-aside { position: relative !important; inset: auto !important; z-index: auto !important; width: 100% !important; height: auto !important; overflow: visible !important; border: 1px solid var(--border-default) !important; }
.pd-page .pd-aside form { overflow: visible !important; }
@media (max-width: 860px) {
  .pd-aside [style*="34px"] { padding-left: 20px !important; padding-right: 20px !important; }
  .pd-page { padding-top: 32px !important; padding-left: 12px !important; padding-right: 12px !important; }
}

/* Journey hover: the step you point at lights up on its rail */
.jt3-step:hover .jt3-dot { background: var(--rust-600) !important; border-color: var(--rust-600) !important; box-shadow: 0 0 0 7px color-mix(in srgb, var(--rust-600) 16%, transparent); }
.jt3-step:hover h4 { color: var(--rust-700) !important; }

/* Our Approach journey: horizontal rails per stage; rails turn vertical when steps stack */
@media (max-width: 860px) {
  .jt3-row { gap: 0 !important; }
  .jt3-rail { left: 6px !important; right: auto !important; top: 6px !important; bottom: 28px !important; width: 1px !important; height: auto !important; }
  .jt3-end { display: none !important; }
  .jt3-step { padding: 0 0 28px 32px; }
  .jt3-dot { position: absolute !important; left: 0; top: 3px; margin: 0 !important; }
}

/* Footer social icons: 42px tap area, same visual size and spacing */
footer a[target="_blank"][aria-label] { box-sizing: content-box; padding: 12px !important; margin: -12px -5px !important; align-items: center; justify-content: center; }

/* Home coordination diagram: shrink the orbit bubbles on phones so the outer ones stay on screen */
@media (max-width: 520px) {
  #coordination [data-reveal-mode="pop"] { width: min(92px, 22vw) !important; height: min(92px, 22vw) !important; padding: 5px !important; transform: translate(-50%, -50%) !important; }
  #coordination [data-reveal-mode="pop"] span { font-size: 9px !important; line-height: 12px !important; letter-spacing: 0.08em !important; }
  #coordination [style*="width: 132px; height: 132px; border-radius: 50%; background: var(--deep-loam)"] { width: min(96px, 20vw) !important; height: min(96px, 20vw) !important; }
}
@media (max-width: 360px) {
  #coordination [data-reveal-mode="pop"] span { font-size: 8px !important; line-height: 11px !important; letter-spacing: 0.06em !important; }
}
