/* ArcSmith "Daybreak": the shared layer for the homepage and the beta sign in (with home.css and beta/beta.css).
   One look (owner decision): Inter, one blue, a #F5F5F7 ground, white surfaces. Warmth only from the
   mark's palette, in art and light. CSP clean: no inline style anywhere; everything lives here. */

:root {
  /* ArcSmith tokens (same values as the live tokens.css) */
  --as-ground: #F5F5F7;
  --as-surface: #FFFFFF;
  --as-topbar-ground: #FBFBFD;
  --as-raised: #F0F0F3;
  --as-line: #E6E6EB;
  --as-line-firm: #D2D2D7;
  --as-ink: #1D1D1F;
  --as-body: #424245;
  --as-muted: #6B6B70;
  --as-accent: #0071E3;
  --as-accent-hover: #0062C4;
  --as-link: #0066CC;
  --as-link-hover: #004F9F;
  --as-good: #1E7F38;
  --as-info: #0066CC;
  --as-warning: #905F18;
  --as-alert: #C9001A;
  --as-brand-ink: #1C1A17;
  --as-brand-moss: #46593F;
  --as-brand-brass: #B07A35;
  --as-brand-glow: #E2B061;
  --as-brand-stone: #F4EFE6;
  --as-radius-card: 18px;
  --as-radius-button: 7px;
  --as-radius-field: 10px;
  --as-radius-stage: 28px;
  --as-shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.05);
  --as-shadow-lift: 0 1px 2px rgba(0,0,0,.04), 0 12px 28px rgba(0,0,0,.08);
  --as-shadow-stage: 0 1px 2px rgba(28,26,23,.04), 0 24px 64px -16px rgba(28,26,23,.16);

  /* Daybreak light: the paper the drawing starts on, and the morning it develops into */
  --paper: #F4F2EE;
  --paper-grid: rgba(28,26,23,.045);
  --sky-high: #F3F1EE;
  --sky-mid: #E7E1DA;
  --sky-low: #D8D1C9;

  /* motion: the app's curves and durations, nothing new */
  --ease-settle: cubic-bezier(.2,.8,.2,1);
  --ease-standard: cubic-bezier(.22,.61,.2,1);
  --ease-draw: cubic-bezier(.6,0,.3,1);
  --ease-exit: cubic-bezier(.4,0,1,1);
  --ease-flight: cubic-bezier(.7,0,.2,1);
  --dur-quick: 120ms;
  --dur-small: 200ms;
  --dur-medium: 320ms;
  --dur-large: 560ms;
  --dur-scene: 900ms;

  /* type: one face, Inter Variable with its Display cut from 32 px up */
  --font-ui: Inter, 'Inter Fallback', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --t-display: clamp(44px, 5.4vw, 88px);
  --t-chapter: clamp(34px, 3.7vw, 60px);
  --t-h3: clamp(24px, 2vw, 32px);
  --t-lede: clamp(17px, 1.3vw, 21px);

  --bar-h: 72px;
  --gutter: 16px;
}
@media (min-width: 901px) { :root { --gutter: 32px; } }
@media (max-width: 640px) { :root { --bar-h: 64px; } }

/* Metric matched stand in while Inter loads, so nothing moves when it swaps */
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); ascent-override: 90.49%; descent-override: 22.56%; line-gap-override: 0%; size-adjust: 107.06%; }
/* Inter Variable 4.1 (OFL), the app's own cut: wght 400 to 700, opsz 14 to 32 */
@font-face { font-family: Inter; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-variable.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  background: var(--as-ground);
  color: var(--as-body);
  font: 400 16px/1.55 var(--font-ui);
  font-optical-sizing: auto;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--as-ink); font-weight: 600; text-wrap: balance; }
p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: var(--as-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--as-link-hover); }
:focus-visible { outline: 3px solid var(--as-accent); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(100% - var(--gutter) * 2, 1360px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 12px; z-index: 30; padding: 10px 14px; border-radius: var(--as-radius-button); background: var(--as-surface); color: var(--as-ink); box-shadow: var(--as-shadow-card); }
.skip:focus { left: 16px; }

/* ---------- type ---------- */
.display { font-size: var(--t-display); line-height: .98; letter-spacing: -.024em; }
.chapter { font-size: var(--t-chapter); line-height: 1.04; letter-spacing: -.02em; }
.h3 { font-size: var(--t-h3); line-height: 1.12; letter-spacing: -.012em; }
.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--as-body); text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.45; color: var(--as-muted); }
/* drawing labels, set the way the app sets them on a sheet */
.label { font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; font-feature-settings: 'case' 1; color: var(--as-muted); }
.kicker { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--as-brand-moss); }
.credit { font-size: 12px; font-weight: 600; letter-spacing: .32em; color: var(--as-brand-moss); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- top bar (72 px, 64 on phones) ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar-h);
  background: color-mix(in srgb, var(--as-topbar-ground) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(28,26,23,.07);
  view-transition-name: as-bar;
}
.bar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; min-height: 44px; color: var(--as-ink); text-decoration: none; border-radius: 10px; }
.brand .tile { width: 36px; height: 36px; flex: none; overflow: visible; }
.brand .word { height: 15px; width: auto; flex: none; }
.brand .credit { padding-left: 14px; border-left: 1px solid var(--as-line-firm); }
/* the tile's one moment: its round window warms and the door lights (replaces the old sun climb) */
.tile-halo { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(1); transition: opacity var(--dur-small) var(--ease-standard), transform var(--dur-small) var(--ease-standard); }
.tile-door { opacity: 0; transition: opacity var(--dur-small) var(--ease-standard); }
@media (hover: hover) and (pointer: fine) {
  .brand:hover .tile-halo { opacity: .35; transform: scale(1.4); }
  .brand:hover .tile-door { opacity: 1; }
}
.brand:focus-visible .tile-halo { opacity: .35; transform: scale(1.4); }
.brand:focus-visible .tile-door { opacity: 1; }

.nav { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--as-ink); text-decoration: none; border-radius: 8px; white-space: nowrap; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--dur-small) var(--ease-exit); }
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { color: var(--as-link); }
  .nav a:not(.btn):hover::after { transform: scaleX(1); transition-timing-function: var(--ease-settle); }
}
.nav a[aria-current="page"] { color: var(--as-link); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { margin-left: 10px; }
.nav a.show-sm, .lbl-short { display: none; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: var(--as-radius-button); border: 1px solid transparent;
  font: 500 16px/1 var(--font-ui); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-quick) var(--ease-standard), border-color var(--dur-quick) var(--ease-standard), transform var(--dur-small) var(--ease-settle);
}
.btn:active { transform: scale(.98); transition-duration: var(--dur-quick); }
.btn-primary { background: var(--as-accent); color: #fff; }
.btn-primary:hover { background: var(--as-accent-hover); color: #fff; }
.btn-quiet { background: var(--as-surface); color: var(--as-ink); border-color: var(--as-line-firm); }
.btn-quiet:hover { color: var(--as-ink); border-color: #86868B; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: default; }
.chev { width: 7px; height: 12px; flex: none; transition: transform var(--dur-small) var(--ease-settle); }
@media (hover: hover) and (pointer: fine) { a:hover > .chev { transform: translateX(3px); } }

/* ---------- footer ---------- */
.foot { padding: 56px 0 44px; border-top: 1px solid var(--as-line); }
.foot .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.foot .tag { font-size: 15px; font-weight: 500; color: var(--as-body); letter-spacing: -.005em; }
.foot .legal { font-size: 14px; line-height: 2; color: var(--as-muted); max-width: 64em; }
.foot .legal a { color: var(--as-body); padding: 6px 2px; }

/* ---------- one shot reveals (never scroll scrubbed text) ----------
   Content is visible by default. Only once home.js has set .reveals-on (screens, motion allowed) does a block
   wait below the fold for its moment; home.js adds .is-in once and never takes it away. */
@media screen and (prefers-reduced-motion: no-preference) {
  .reveals-on .rv:not(.is-in) { opacity: 0; transform: translateY(16px); }
  .reveals-on .rv { transition: opacity 640ms var(--ease-settle), transform 640ms var(--ease-settle); transition-delay: calc(var(--i, 0) * 70ms); }
}
.i0 { --i: 0; } .i1 { --i: 1; } .i2 { --i: 2; } .i3 { --i: 3; } .i4 { --i: 4; } .i5 { --i: 5; }
/* the drawing's stroke order (both pages' line drawings) */
.s0{--i:0}.s1{--i:1}.s2{--i:2}.s3{--i:3}.s4{--i:4}.s5{--i:5}.s6{--i:6}.s7{--i:7}.s8{--i:8}.s9{--i:9}.s10{--i:10}.s11{--i:11}.s12{--i:12}.s13{--i:13}.s14{--i:14}.s15{--i:15}.s16{--i:16}.s17{--i:17}.s18{--i:18}.s19{--i:19}.s20{--i:20}.s21{--i:21}.s22{--i:22}.s23{--i:23}.s24{--i:24}.s25{--i:25}.s26{--i:26}.s27{--i:27}.s28{--i:28}.s29{--i:29}.s30{--i:30}.s31{--i:31}.s32{--i:32}.s33{--i:33}.s34{--i:34}.s35{--i:35}.s36{--i:36}.s37{--i:37}.s38{--i:38}.s39{--i:39}.s40{--i:40}.s41{--i:41}.s42{--i:42}

/* ---------- page to page: the bar holds, the house travels, the rest cross fades ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 220ms var(--ease-exit) both; }
::view-transition-new(root) { animation: vt-in 460ms var(--ease-settle) 40ms both; }
::view-transition-group(house) { animation-duration: 760ms; animation-timing-function: var(--ease-settle); }
::view-transition-old(house) { animation: vt-fade-out 520ms var(--ease-standard) both; }
::view-transition-new(house) { animation: vt-fade-in 640ms var(--ease-standard) 80ms both; }
::view-transition-group(signin-panel) { animation-duration: 420ms; animation-timing-function: var(--ease-settle); }
::view-transition-old(signin-panel) { animation: vt-fade-out 160ms var(--ease-exit) both; }
::view-transition-new(signin-panel) { animation: vt-fade-in 320ms var(--ease-settle) 60ms both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .nav .hide-md { display: none; }
  /* the byline steps aside before the links can reach it (tablets held upright) */
  .brand .credit { display: none; }
}
@media (max-width: 640px) {
  .brand { gap: 10px; }
  .brand .tile { width: 30px; height: 30px; }
  .brand .word { height: 12px; }
  .nav a.hide-sm { display: none; }
  .nav a.show-sm { display: inline-flex; }
  .nav .btn { margin-left: 2px; padding: 0 14px; min-height: 44px; }
}
@media (max-width: 420px) {
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .nav a:not(.btn) { padding: 0 10px; }
}
@media (max-width: 340px) {
  .brand .word { height: 10px; }
}

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- print: every block shows, nothing waits for a scroll ---------- */
@media print {
  .bar { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .rv, .js .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .skip { display: none; }
}
