/* ============================================================================
   Orinda Labs — corporate site layout
   Sits on top of brand/raplo-theme.css (tokens, type, buttons, cards).
   Only layout, page structure, and motion live here.
   ============================================================================ */

/* Orinda accents alongside the shared clay brand token. */
:root{
  --orinda-blue:#1B4FA0;
  --orinda-blue-2:#4A9BE8;
  --orinda-orange:#E8703A;
  --wrap:1140px;
  --gut:24px;
}
@media (prefers-color-scheme:dark){ :root{ --orinda-blue:#5f93da; --orinda-blue-2:#7fb4ef; } }
:root[data-theme="dark"]{ --orinda-blue:#5f93da; --orinda-blue-2:#7fb4ef; }

body{ display:flex; flex-direction:column; min-height:100vh; }
main{ flex:1 0 auto; }
.wrap{ width:min(100% - (var(--gut) * 2), var(--wrap)); margin-inline:auto; }
.narrow{ max-width:74ch; }

.skip{ position:fixed; top:-100px; left:16px; z-index:200; background:var(--brand);
  color:var(--brand-ink); padding:10px 16px; border-radius:var(--r-sm); transition:top .2s; }
.skip:focus{ top:16px; }

/* ---- Header --------------------------------------------------------------- */
.site-head{
  position:sticky; top:0; z-index:100;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom:1px solid transparent;
  transition:border-color .3s var(--ease), background .3s var(--ease);
}
.site-head.stuck{ border-bottom-color:var(--line); background:color-mix(in srgb,var(--bg) 96%,transparent); }
.site-head .wrap{ display:flex; align-items:center; gap:20px; height:68px; }
.site-head .logo{ height:30px; width:auto; margin-right:auto; }
:root[data-theme="dark"] .logo-light,
:root:not([data-theme="light"]) .logo-light{ display:none; }
:root[data-theme="dark"] .logo-dark,
:root:not([data-theme="light"]) .logo-dark{ display:block; }
:root[data-theme="light"] .logo-light{ display:block; }
:root[data-theme="light"] .logo-dark{ display:none; }
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .logo-light{ display:block; }
  :root:not([data-theme="dark"]) .logo-dark{ display:none; }
}

.site-nav{ display:flex; gap:22px; }
.site-nav a{ color:var(--ink-2); font-size:14px; font-weight:500; text-decoration:none;
  padding:4px 0; border-bottom:2px solid transparent; transition:color .2s, border-color .2s; }
.site-nav a:hover{ color:var(--ink); border-bottom-color:var(--brand); }
.site-nav a[aria-current="page"]{ color:var(--ink); border-bottom-color:var(--brand); }

.theme-btn{ width:34px; height:34px; display:grid; place-items:center; cursor:pointer;
  background:var(--surface-2); border:1px solid var(--line); border-radius:var(--pill);
  color:var(--muted); transition:color .2s, border-color .2s; }
.theme-btn:hover{ color:var(--ink); border-color:var(--brand); }
.theme-btn .sun{ display:none; }
:root[data-theme="light"] .theme-btn .sun{ display:block; }
:root[data-theme="light"] .theme-btn .moon{ display:none; }

.nav-toggle{ display:none; width:34px; height:34px; background:var(--surface-2);
  border:1px solid var(--line); border-radius:var(--r-xs); cursor:pointer;
  flex-direction:column; align-items:center; justify-content:center; gap:4px; }
.nav-toggle span{ width:15px; height:2px; background:var(--ink); border-radius:2px; }

@media (max-width:820px){
  .site-nav{ display:none; position:absolute; top:68px; left:0; right:0; flex-direction:column;
    gap:0; padding:8px var(--gut) 16px; background:var(--bg); border-bottom:1px solid var(--line); }
  .site-head.open .site-nav{ display:flex; }
  .site-nav a{ padding:12px 0; border-bottom:1px solid var(--line); }
  .nav-toggle{ display:flex; }
}

/* ---- Hero ----------------------------------------------------------------- */
.hero{ position:relative; overflow:hidden; padding:clamp(56px,9vw,104px) 0 clamp(48px,7vw,88px); }
.hero-canvas{ position:absolute; inset:0; width:100%; height:100%; z-index:0; }
.hero .wrap{ position:relative; z-index:1; }
.hero::after{ /* keeps type legible over the motion graphic */
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(760px 420px at 22% 45%, var(--bg) 30%, transparent 78%);
}
@media (max-width:760px){ .hero::after{ background:linear-gradient(180deg,
  color-mix(in srgb,var(--bg) 82%,transparent), color-mix(in srgb,var(--bg) 94%,transparent)); } }

.hero h1{ font-size:clamp(2.1rem,5.4vw,3.5rem); max-width:17ch; margin:14px 0 18px; line-height:1.08; }
.hero .lede{ font-size:clamp(1rem,1.7vw,1.16rem); color:var(--ink-2); max-width:60ch; margin-bottom:12px; }
.hero .sub{ color:var(--muted); max-width:58ch; margin-bottom:26px; font-size:.97rem; }
.hero-cta{ display:flex; flex-wrap:wrap; gap:10px; }
a.btn{ text-decoration:none; }

.sheen{
  background:linear-gradient(100deg, var(--orinda-blue) 0%, var(--brand) 52%, var(--orinda-orange) 100%);
  background-size:220% 100%;
  -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:sheen 9s var(--ease-io) infinite;
}
@keyframes sheen{ 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

/* ---- Sections ------------------------------------------------------------- */
.sec{ padding:clamp(48px,7vw,84px) 0; }
.sec.alt{ background:var(--surface-2); border-block:1px solid var(--line); }
.sec-head{ margin-bottom:clamp(28px,4vw,44px); max-width:64ch; }
.sec-head h2{ font-size:clamp(1.5rem,3.2vw,2.1rem); margin:10px 0 12px; }
.sec-head p{ color:var(--ink-2); }

.grid{ display:grid; gap:16px; }
.grid.two{ grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); }
.grid.three{ grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.split{ display:grid; gap:clamp(28px,5vw,56px); grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:center; }
@media (max-width:900px){ .split{ grid-template-columns:1fr; } }

/* ---- Product cards -------------------------------------------------------- */
.pcard{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:20px; box-shadow:var(--sh-1); display:flex; flex-direction:column; gap:10px;
  transition:transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.pcard:hover{ transform:translateY(-3px); box-shadow:var(--sh-3); border-color:color-mix(in srgb,var(--brand) 35%,var(--line)); }
.pcard h3{ font-size:1.02rem; display:flex; align-items:center; gap:9px; }
.pcard .avail{ display:block; margin:-2px 0 2px; }
.pcard p{ color:var(--ink-2); font-size:.92rem; margin:0; }
.pcard .go{ margin-top:auto; padding-top:6px; font-size:.88rem; font-weight:600; }
.pcard.live{ border-color:color-mix(in srgb,var(--brand) 45%,var(--line)); box-shadow:var(--sh-2); }

/* Availability pills — the "in development" label is load-bearing, never subtle */
.pill{ font-size:11px; font-weight:700; letter-spacing:.02em; border-radius:var(--pill);
  padding:3px 9px; white-space:nowrap; }
.pill.now{ background:color-mix(in srgb,var(--ok) 16%,transparent); color:var(--ok);
  border:1px solid color-mix(in srgb,var(--ok) 34%,transparent); }
.pill.dev{ background:color-mix(in srgb,var(--muted) 14%,transparent); color:var(--muted);
  border:1px dashed color-mix(in srgb,var(--muted) 45%,transparent); }

/* ---- Fact tables (KYC surface — must read fast) --------------------------- */
.facts{ display:grid; gap:0; margin:0; border:1px solid var(--line); border-radius:var(--r-lg);
  overflow:hidden; background:var(--surface); }
.facts > div{ display:grid; grid-template-columns:minmax(150px,.42fr) 1fr; gap:16px;
  padding:14px 18px; border-bottom:1px solid var(--line); }
.facts > div:last-child{ border-bottom:none; }
.facts dt{ font-size:12px; font-weight:700; letter-spacing:.02em; text-transform:uppercase;
  color:var(--muted); margin:0; }
.facts dd{ margin:0; font-size:.94rem; color:var(--ink); }
.facts dd a{ font-weight:500; }
@media (max-width:620px){ .facts > div{ grid-template-columns:1fr; gap:4px; } }

.owner-fill{ color:var(--hot); border-bottom:1px dashed currentColor; font-size:.94em; }

/* One quiet line so a reviewer can find the entity without it dominating the page. */
.entity-line{ color:var(--muted); font-size:.85rem; max-width:78ch;
  padding-top:22px; border-top:1px solid var(--line); }
.entity-line a{ color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
.entity-line a:hover{ color:var(--brand); }

/* ---- Prose (legal + vision) ----------------------------------------------- */
.prose{ max-width:74ch; }
.prose h2{ font-size:1.28rem; margin:36px 0 12px; }
.prose h3{ font-size:1.04rem; margin:26px 0 8px; }
.prose p, .prose li{ color:var(--ink-2); margin:0 0 14px; }
.prose ul{ padding-left:20px; }
.prose ul li{ list-style:disc; margin-bottom:8px; }
.prose .updated{ color:var(--muted); font-size:.85rem; }
.pull{ border-left:3px solid var(--brand); padding:4px 0 4px 20px; margin:24px 0;
  font-family:'Fraunces',Georgia,serif; font-size:1.12rem; line-height:1.5; color:var(--ink); }

/* ---- Consent note --------------------------------------------------------- */
.consent{ background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--ok);
  border-radius:var(--r); padding:18px 20px; }
.consent h3{ font-size:1rem; margin-bottom:8px; }
.consent p{ color:var(--ink-2); font-size:.93rem; margin:0 0 10px; }
.consent p:last-child{ margin-bottom:0; }

/* ---- Footer --------------------------------------------------------------- */
.site-foot{ flex-shrink:0; border-top:1px solid var(--line); background:var(--surface-2);
  padding:36px 0 24px; margin-top:auto; }
.foot-grid{ display:grid; gap:24px; grid-template-columns:minmax(0,1.7fr) repeat(2,minmax(0,1fr)); }
@media (max-width:760px){ .foot-grid{ grid-template-columns:1fr 1fr; } }
.foot-grid .logo{ height:26px; margin-bottom:10px; }
.foot-grid p{ color:var(--muted); font-size:.86rem; margin:0; max-width:44ch; }
.foot-col h4{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted);
  margin-bottom:10px; }
.foot-col{ display:grid; gap:7px; align-content:start; }
.foot-col a{ font-size:.88rem; color:var(--ink-2); text-decoration:none; }
.foot-col a:hover{ color:var(--brand); }
.foot-legal{ margin-top:28px; padding-top:16px; border-top:1px solid var(--line);
  font-size:.82rem; color:var(--muted); display:flex; flex-wrap:wrap; gap:6px 18px;
  justify-content:space-between; }
.foot-legal a{ color:var(--muted); }

/* ---- Motion --------------------------------------------------------------- */
.js .rise{ opacity:0; transform:translateY(18px);
  transition:opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay:calc(var(--i,0) * 80ms); }
.js .rise.in{ opacity:1; transform:none; }

/* Animated two-sided loop diagram */
.loop-svg{ width:100%; height:auto; overflow:visible; }
.loop-svg .flow{ stroke-dasharray:6 8; animation:flow 2.2s linear infinite; }
.loop-svg .flow.rev{ animation-direction:reverse; }
@keyframes flow{ to{ stroke-dashoffset:-28; } }
.loop-svg .beat{ transform-origin:center; animation:beat 3s var(--ease-io) infinite; }
@keyframes beat{ 0%,100%{ opacity:.45; r:5 } 50%{ opacity:1; r:7.5 } }
.loop-svg .halo{ animation:halo 3s var(--ease-io) infinite; }
@keyframes halo{ 0%,100%{ opacity:.5; r:34 } 50%{ opacity:0; r:46 } }
.loop-svg .spin{ transform-box:fill-box; transform-origin:center; animation:spin 14s linear infinite; }
.loop-svg .spin.rev{ animation-direction:reverse; animation-duration:18s; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.loop-svg .lbl{ font-family:'Inter',system-ui,sans-serif; font-size:11px; font-weight:600;
  fill:var(--ink-2); }
.loop-svg .lbl.sm{ font-size:9.5px; font-weight:500; fill:var(--muted); }

@media (prefers-reduced-motion:reduce){
  .js .rise{ opacity:1; transform:none; }
  .hero-canvas{ display:none; }
  .sheen{ animation:none; }
  .loop-svg .flow, .loop-svg .beat, .loop-svg .spin, .loop-svg .halo{ animation:none; }
}

@media print{
  .site-head, .hero-canvas, .theme-btn, .nav-toggle{ display:none; }
  body{ background:#fff; color:#000; }
}
