/* Cairn home page only. Spec: docs/design/LANDING-PAGE.md ("Home page, November 2026").
   The page reads top to bottom without JavaScript or motion; .js and .motion (set in the head) switch on the
   three scroll scenes: the door, the mess gathering into one file, and the story window. */

:root {
  --dawn: #fff7ea;
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

html.home { overflow-x: clip; background: linear-gradient(to bottom, var(--night) 0 50%, var(--footer) 50% 100%); }
.home body { overflow-x: clip; }
.home [data-theme="dark"] ::selection { background: #3a4290; color: var(--white); }
.home main { display: block; }
.home section[id] { scroll-margin-top: 80px; }

/* ---------- Header: floats over the page, light on the night bands and paper elsewhere ---------- */
.home .site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color 300ms; }
.home .site-header::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line); opacity: 0; transition: opacity 300ms; }
html.home:not([data-header="dark"]) .site-header { background: var(--paper); }
html.home:not([data-header="dark"]) .site-header::after { opacity: 1; }
html.home[data-header="dark"] .site-header .logo { color: var(--white); }
html.home[data-header="dark"] .site-header .mark-door { fill: #3a4290; }
html.home[data-header="dark"] .site-header .mark-line { stroke: #8e9af6; }
html.home[data-header="dark"] .site-header .mark-knob { fill: #8e9af6; }
html.home[data-header="dark"] .site-header .nav-trigger,
html.home[data-header="dark"] .site-header .nav-link,
html.home[data-header="dark"] .site-header .text-link { color: rgba(255, 255, 255, 0.78); }
html.home[data-header="dark"] .site-header .nav-trigger:hover,
html.home[data-header="dark"] .site-header .nav-link:hover,
html.home[data-header="dark"] .site-header .nav-item:focus-within .nav-trigger,
html.home[data-header="dark"] .site-header .text-link:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
html.home[data-header="dark"] .site-header .menu-icon,
html.home[data-header="dark"] .site-header .menu-icon::before,
html.home[data-header="dark"] .site-header .menu-icon::after { background: var(--white); }
html.home[data-header="dark"] .site-header .mobile-menu[open] .menu-icon { background: transparent; }
html.home[data-header="dark"] .site-header .button-small { background: var(--white); border-color: var(--white); color: var(--indigo-deep); }
html.home[data-header="dark"] .site-header :focus-visible { outline-color: #8e9af6; }
.home .nav-trigger, .home .nav-link, .home .text-link, .home .site-header .logo { transition: color 300ms, background-color 150ms; }

/* ---------- Shared pieces ---------- */
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.section-head.center { align-items: center; text-align: center; }
.section-head h2 { max-width: 860px; font-size: clamp(34px, 4.2vw, 60px); letter-spacing: -0.03em; line-height: 1.05; }
.section-lead { max-width: 640px; color: var(--muted); font-size: clamp(18px, 1.4vw, 20px); line-height: 1.55; }
.section-lead strong { color: var(--ink); }

.window { position: relative; overflow: hidden; border-radius: 12px; background: var(--white); box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.08), 0 40px 80px -40px rgba(11, 13, 34, 0.45); }
.window img { width: 100%; }
.window-bar { position: relative; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #f7f6f3; }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: #e2ded6; }
.window-bar b { position: absolute; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* ---------- 1. Hero: the door ---------- */
.dh { position: relative; background: var(--night); color: var(--white); }
.dh-stage { --open: 1; --push: 0; --show: 1; --copy: 0; position: relative; overflow: hidden; min-height: 100vh; padding: 150px var(--gutter) 80px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(to bottom, #090b1d, var(--night) 45%, #141842); }
.dh-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.dh-copy { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 980px; text-align: center; }
.dh h1 { max-width: 980px; color: var(--white); font-size: clamp(44px, 6.6vw, 96px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; text-wrap: balance; }
.dh-lead { max-width: 660px; color: var(--night-text); font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; }
.dh .actions { margin-top: 8px; }
.dh :focus-visible { outline-color: #8e9af6; }

/* The door. Without motion it sits below the copy, open, with the light on. */
.dh-scene { position: relative; z-index: 2; width: clamp(200px, 22vw, 300px); aspect-ratio: 0.6; margin-top: 64px; perspective: 1400px; }
.dh-halo { position: absolute; left: 50%; top: 45%; width: 340%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(calc(0.4 + var(--open) * 0.6)); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 215, 154, 0.5), rgba(233, 168, 62, 0.16) 45%, transparent 72%); opacity: calc(0.1 + var(--open) * 0.9); pointer-events: none; }
.dh-beam { position: absolute; left: 50%; top: 100%; width: 420%; height: 120%; transform: translateX(-50%) scaleY(var(--open)); transform-origin: 50% 0; clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom, rgba(255, 215, 154, 0.5), rgba(255, 215, 154, 0) 80%); opacity: var(--open); pointer-events: none; }
.dh-frame { position: absolute; inset: 0; border-radius: 16px 16px 6px 6px; background: var(--night-2); box-shadow: 0 0 0 10px #1c2150, 0 0 0 11px rgba(142, 154, 246, 0.3); transform-style: preserve-3d; }
.dh-inside { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(70% 55% at 50% 45%, var(--glow-hot), var(--glow) 55%, #f0b45c 100%); }
.dh-door { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1.25fr; gap: 10%; padding: 14% 14% 16%; border-radius: inherit; background: linear-gradient(105deg, #4a58d0, var(--indigo) 40%, #3442a8); box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.25); transform-origin: 0 50%; transform: rotateY(calc(var(--open) * -112deg)); }
.dh-panel { border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(199, 205, 246, 0.22); }
.dh-knob { position: absolute; right: 12%; top: 52%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--saffron); }
/* The light that leaks round a shut door */
.dh-frame::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 16px 1px rgba(255, 215, 154, calc(0.5 - var(--open) * 0.5)); pointer-events: none; }
.dh-step { position: absolute; left: -18%; right: -18%; top: 100%; height: 6px; margin-top: 10px; border-radius: 3px; background: linear-gradient(90deg, transparent, rgba(255, 215, 154, calc(0.2 + var(--open) * 0.45)), transparent); }

.dh-product { position: relative; z-index: 3; width: min(1100px, 100%); margin-top: 72px; }
.dh-caption { margin-bottom: 18px; color: var(--night-text); font-size: clamp(17px, 1.4vw, 20px); font-weight: 600; text-align: center; }
.dh-caption span { color: var(--white); font-weight: 800; }
.dh-chips { position: absolute; inset: 0; pointer-events: none; }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 12px; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.08), 0 18px 36px -18px rgba(11, 13, 34, 0.45); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip-a { left: -4%; top: 22%; }
.chip-b { right: -5%; top: 44%; }
.chip-c { left: 6%; bottom: -3%; }

/* With motion the hero is a tall track: the stage sticks and scroll drives --open, --copy, --push and --show */
.motion .dh { height: 320vh; }
.motion .dh-stage { --open: 0; --show: 0; position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; padding: 0; display: block; }
.motion .dh-copy { position: absolute; left: 50%; top: 13vh; width: min(980px, calc(100% - 2 * var(--gutter))); transform: translate(-50%, calc(var(--copy) * -80px)); opacity: calc(1 - var(--copy) * 1.4); }
.motion .dh-copy.is-gone { visibility: hidden; }
.motion .dh-scene { position: absolute; left: 50%; bottom: 7vh; margin: 0; width: auto; height: min(36vh, 380px); transform: translateX(-50%) translateY(calc((1 - var(--open)) * 24vh - var(--push) * 20vh)) scale(calc(1 + var(--push) * var(--push) * 16)); transform-origin: 50% 45%; will-change: transform; }
.motion .dh-product { position: absolute; left: 50%; top: 50%; width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 0; transform: translate(-50%, -44%) translateY(calc((1 - var(--show)) * 12vh)) scale(calc(0.9 + var(--show) * 0.1)); opacity: var(--show); pointer-events: none; }
.motion .dh-product.is-live { pointer-events: auto; }
.motion .dh-product .dh-caption { color: var(--muted); }
.motion .dh-product .dh-caption span { color: var(--ink); }
.motion .dh-product .window { max-height: 70vh; }
.motion .chip { opacity: clamp(0, calc((var(--show) - 0.75) * 4), 1); transform: translateY(calc((1 - var(--show)) * 24px)); }
/* The warm paper you step into */
.dh-dawn { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(80% 70% at 50% 45%, var(--dawn), var(--paper) 70%); opacity: 0; }
.motion .dh-dawn { opacity: clamp(0, calc((var(--push) - 0.45) * 2.5), 1); }

/* ---------- 2. Languages ---------- */
.langs { position: relative; padding-top: 140px; overflow: hidden; background: var(--paper); }
.langs-stage { position: relative; margin-top: 56px; padding-block: 24px 120px; }
.langs-rows { display: flex; flex-direction: column; gap: 6px; }
.lang-row { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.lang-track { display: flex; flex-wrap: wrap; justify-content: center; padding-inline: var(--gutter); }
.js.motion .lang-track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; padding: 0; will-change: transform; }
.lang-track span { flex: none; display: inline-flex; align-items: center; color: var(--ink); font-size: clamp(30px, 4.4vw, 64px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.3; }
.lang-track span::after { content: ""; width: 0.16em; height: 0.16em; margin-inline: 0.55em; border-radius: 50%; background: #d5d0c7; }
.lang-row:nth-child(2) span { color: var(--muted); }
.langs-phone { position: relative; z-index: 2; width: clamp(220px, 22vw, 300px); margin: -230px auto 0; }
.langs-phone .phone { position: relative; }

/* ---------- 3. The mess becomes one file ---------- */
.mess { position: relative; overflow-x: clip; background: var(--paper); }
.mess-stage { position: relative; padding-block: 120px; }
.mess-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; }
.mess-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.mess-copy h2 { font-size: clamp(34px, 3.8vw, 54px); letter-spacing: -0.03em; line-height: 1.05; }
.mess-lists { display: grid; gap: 28px; margin-top: 12px; }
.compare-label { margin-bottom: 10px; font-size: 15px; font-weight: 800; }
.mess-before .compare-label { color: #a2523e; }
.mess-after .compare-label { color: #1f6a57; }
.mess-lists ul { display: grid; gap: 10px; }
.mess-lists li { position: relative; padding-left: 30px; font-size: 18px; line-height: 1.5; }
.mess-lists li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; -webkit-mask: var(--tick) center / 100% no-repeat; mask: var(--tick) center / 100% no-repeat; background: var(--spruce); }
.mess-before li { color: var(--muted); }
.mess-before li::before { -webkit-mask-image: var(--cross); mask-image: var(--cross); background: #c26a52; }
.mess-field { position: relative; min-height: 560px; }
.frag { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 12px 14px; border-radius: 8px; background: var(--white); box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.08), 0 12px 24px -16px rgba(23, 24, 31, 0.35); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.frag table { border-collapse: collapse; font-size: 11px; }
.frag th, .frag td { padding: 4px 8px; border: 1px solid #dcd8d0; text-align: left; font-weight: 600; }
.frag th { background: #eef4ec; color: #3c6b40; }
.frag td.err { color: #c2412d; }
.frag-note { width: 160px; padding: 14px; border-radius: 4px; background: #fbe7a6; white-space: normal; font-size: 14px; font-weight: 700; line-height: 1.35; }
.frag-note.coral { width: 140px; background: #f7c9bb; }
.frag-mail { width: 230px; white-space: normal; }
.m-from { font-size: 13px; font-weight: 800; }
.m-body { margin-top: 4px; color: var(--muted); font-size: 12px; }
.frag-chip { display: flex; align-items: center; gap: 8px; }
.frag-chip .x { width: 16px; height: 20px; border-radius: 3px; background: #2f8a54; }
.frag-chip .x.g { background: #3a7bd5; }
.frag-form { width: 170px; display: grid; gap: 6px; padding: 14px; white-space: normal; }
.frag-form p { color: var(--muted); font-size: 11px; font-weight: 800; }
.frag-form span { padding-bottom: 4px; border-bottom: 1px dashed #c9c4ba; font-size: 12px; }
.frag-chat { padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: #e9ebfb; color: var(--indigo-deep); }
.frag-cal { display: grid; justify-items: center; width: 116px; padding: 0 0 10px; overflow: hidden; }
.frag-cal p { width: 100%; padding: 4px; background: var(--coral); color: var(--white); font-size: 11px; font-weight: 800; text-align: center; }
.frag-cal b { font-size: 32px; line-height: 1.2; }
.frag-cal span { color: #c2412d; font-size: 11px; }
.frag-folder { display: flex; align-items: center; gap: 8px; }
.frag-folder i { width: 20px; height: 15px; border-radius: 3px; background: var(--saffron); }
.frag-badge { background: #fde7e1; color: #a2523e; }
.filecard { position: relative; z-index: 2; width: min(440px, 100%); margin: 0 auto; padding: 24px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 1px rgba(64, 80, 196, 0.14), 0 40px 80px -40px rgba(43, 53, 143, 0.45); }
.mess-field .filecard { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.fc-head { display: flex; align-items: center; gap: 14px; }
.fc-avatar, .av { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: hsl(var(--h, 18) 70% 88%); color: hsl(var(--h, 18) 55% 30%); font-size: 16px; font-weight: 800; }
.fc-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.fc-sub { color: var(--muted); font-size: 14px; }
.fc-progs { display: flex; gap: 8px; margin-top: 18px; }
.fc-progs li { padding: 4px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, white); color: color-mix(in srgb, var(--accent) 70%, black); font-size: 13px; font-weight: 800; }
.fc-rows { display: grid; margin-top: 16px; }
.fc-rows li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.fc-rows span { color: var(--muted); }
.fc-rows b { font-weight: 700; text-align: right; }
.fc-rows b.ok { color: #1f6a57; }

.motion .mess { height: 280vh; }
.motion .mess-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-block: 72px 24px; }
.motion .mess-grid { width: 100%; }
.motion .mess-before { transition: opacity 400ms; }
.motion .mess.is-sorted .mess-before { opacity: 0.4; }
.motion .mess-after { opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out); }
.motion .mess.is-sorted .mess-after { opacity: 1; transform: none; }
.motion .frag { will-change: transform, opacity; }
.motion .mess-field .filecard { opacity: var(--card, 0); transform: scale(calc(0.9 + var(--card, 0) * 0.1)); }
html:not(.motion) .frag { display: none; }
html:not(.motion) .mess-field { min-height: 0; }
html:not(.motion) .mess-field .filecard { position: relative; left: auto; top: auto; translate: none; }

/* ---------- 4. Programs around one file ---------- */
.orbit { position: relative; padding-top: 140px; background: var(--paper); }
.orbit-stage { position: relative; height: 640px; margin-top: 24px; }
.orbit-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit-core { position: absolute; left: 50%; top: 50%; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 280px; height: 280px; padding: 40px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--white); text-align: center; box-shadow: 0 0 0 1px rgba(64, 80, 196, 0.16); }
.orbit-core-code { color: var(--accent-now, var(--indigo)); font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; transition: color 200ms; }
.orbit-core-name { font-size: 18px; font-weight: 800; }
.orbit-core-line { color: var(--muted); font-size: 15px; line-height: 1.45; }
.orbit-nodes li { position: absolute; left: 50%; top: 50%; z-index: 3; }
.orbit-nodes a { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 160px; padding: 18px 12px; transform: translate(-50%, -50%); border-radius: 14px; background: var(--white); color: var(--ink); text-align: center; text-decoration: none; box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.1); transition: box-shadow 200ms, background-color 200ms; }
.orbit-nodes a:hover, .orbit-nodes a:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, white); box-shadow: 0 0 0 2px var(--accent); }
.orbit-nodes b { color: color-mix(in srgb, var(--accent) 80%, black); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.orbit-nodes span { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.3; }
/* Without the layout script, and on narrow screens: a grid under the core */
html:not(.js) .orbit-stage, .orbit-stage.is-grid { height: auto; display: grid; justify-items: center; gap: 24px; padding-bottom: 40px; }
html:not(.js) .orbit-core, .orbit-stage.is-grid .orbit-core { position: relative; left: auto; top: auto; transform: none; }
html:not(.js) .orbit-nodes, .orbit-stage.is-grid .orbit-nodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(720px, 100% - 2 * var(--gutter)); }
html:not(.js) .orbit-nodes li, .orbit-stage.is-grid .orbit-nodes li { position: static; }
html:not(.js) .orbit-nodes a, .orbit-stage.is-grid .orbit-nodes a { width: auto; height: 100%; transform: none; }
.orbit-stage.is-grid .orbit-lines, html:not(.js) .orbit-lines { display: none; }

/* ---------- 5. Story ---------- */
.story { position: relative; padding-top: 140px; background: var(--stone); }
.story-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; margin-top: 40px; }
.story-step { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; min-height: 82vh; padding-block: 40px; }
.story-step h3 { font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -0.025em; line-height: 1.1; }
.story-step > p { max-width: 460px; color: var(--muted); font-size: 18px; }
.ticks { display: grid; gap: 10px; }
.ticks li { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.ticks li::before { content: ""; flex: none; width: 20px; height: 20px; -webkit-mask: var(--tick) center / 100% no-repeat; mask: var(--tick) center / 100% no-repeat; background: color-mix(in srgb, var(--accent) 80%, black); }
.story-inline { display: none; margin-top: 12px; width: 100%; }
.story-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.story-window { position: relative; width: 100%; }
.story-screens { position: relative; aspect-ratio: 1280 / 800; }
.story-screens img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity 400ms var(--ease-out); }
.story-screens img.is-on { opacity: 1; z-index: 1; }
.motion .story-screens img { clip-path: inset(100% 0 0 0); opacity: 1; transition: clip-path 700ms var(--ease-io); }
.motion .story-screens img.is-on { clip-path: inset(0 0 0 0); }
.motion .story-screens img.was-on { clip-path: inset(0 0 0 0); z-index: 0; }
.story-sat { position: absolute; left: -6%; bottom: 18%; z-index: 2; }
.sat { position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 12px; background: var(--white); font-size: 15px; font-weight: 800; white-space: nowrap; box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.08), 0 18px 36px -18px rgba(23, 24, 31, 0.4); opacity: 0; transform: translateY(10px); transition: opacity 300ms, transform 400ms var(--ease-out); }
.sat i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sat.is-on { opacity: 1; transform: none; transition-delay: 250ms; }
.story-rail { position: absolute; right: -28px; top: 50%; display: grid; gap: 8px; transform: translateY(-50%); }
.story-rail li { width: 4px; height: 24px; border-radius: 2px; background: rgba(23, 24, 31, 0.12); transition: background-color 300ms, height 300ms var(--ease-out); }
.story-rail li.is-on { height: 44px; background: var(--accent-now, var(--indigo)); }
html:not(.js) .story-sticky { display: none; }
html:not(.js) .story-inline { display: block; }
html:not(.js) .story-step { min-height: 0; }
html:not(.js) .story-grid { grid-template-columns: minmax(0, 820px); }

/* ---------- 6. Working tiles ---------- */
.play { padding-top: 140px; background: linear-gradient(to bottom, var(--stone), var(--paper) 320px); }
.bento2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "att msg msg" "att icare search" "follow follow day"; gap: 16px; margin-top: 48px; }
.tile2 { display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: 16px; background: var(--white); box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.08); }
.tile2-head h3 { font-size: 21px; letter-spacing: -0.015em; }
.tile2-head p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.tile2-head kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; font: 700 13px "Manrope", sans-serif; color: var(--ink); }
.t-att { grid-area: att; }
.t-msg { grid-area: msg; }
.t-icare { grid-area: icare; }
.t-search { grid-area: search; }
.t-follow { grid-area: follow; }
.t-day { grid-area: day; }

.att { display: flex; flex-direction: column; gap: 14px; }
.att-top p:first-child { display: flex; flex-direction: column; font-size: 15px; }
.att-top p:first-child span { color: var(--muted); font-size: 13px; }
.att-sum { margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.att-sum span { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.att-bar { display: flex; gap: 3px; height: 6px; }
.att-bar i { border-radius: 3px; transition: flex-grow 300ms var(--ease-out); }
.b-present { flex: 4; background: var(--spruce); }
.b-late { flex: 1; background: var(--saffron); }
.b-absent { flex: 1; background: var(--coral); }
.att-list { display: grid; }
.att-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.att-list .av { width: 36px; height: 36px; font-size: 13px; }
.att-list .nm { flex: 1; font-size: 15px; font-weight: 700; }
.st { min-width: 84px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; font: 800 13px "Manrope", sans-serif; cursor: pointer; transition: background-color 150ms, color 150ms, transform 120ms var(--ease-out); }
.st:active { transform: scale(0.96); }
.st[data-s="present"] { background: #d4ece5; color: #1f6a57; }
.st[data-s="late"] { background: #fbecd0; color: #8a5a12; }
.st[data-s="absent"] { background: #f9ddd5; color: #9b4632; }

.msg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.msg-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-tabs button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font: 700 14px "Manrope", system-ui, sans-serif; cursor: pointer; transition: background-color 150ms, color 150ms, border-color 150ms; }
.msg-tabs button:hover { color: var(--ink); border-color: #cfcac1; }
.msg-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.msg-phone { padding: 18px; border-radius: 12px; background: #f7f1e6; }
.msg-to { color: var(--muted); font-size: 13px; font-weight: 700; }
.msg-bubble { margin-top: 10px; max-width: 520px; padding: 14px 18px; border-radius: 16px 16px 16px 4px; background: var(--white); font-size: 17px; font-weight: 600; line-height: 1.5; }
.msg-bubble[dir="rtl"] { border-radius: 16px 16px 4px 16px; font-size: 19px; }
.msg-note { margin-top: 10px; color: var(--muted); font-size: 13px; }

.ic-sum { color: var(--muted); font-size: 15px; font-weight: 600; }
.ic-sum b { color: var(--ink); font-weight: 800; }
.ic-rows { display: grid; }
.ic-rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line); }
.ic-rows .nm { display: flex; flex-direction: column; font-size: 15px; font-weight: 700; }
.ic-rows em { color: #9b4632; font-size: 13px; font-style: normal; font-weight: 600; }
.ic-ok { display: inline-flex; align-items: center; gap: 6px; color: #1f6a57; font-size: 13px; font-weight: 800; }
.ic-ok::before { content: ""; width: 16px; height: 16px; -webkit-mask: var(--tick) center / 100% no-repeat; mask: var(--tick) center / 100% no-repeat; background: currentColor; }
.ic-fix { min-height: 34px; padding: 0 14px; border: 1px solid var(--indigo); border-radius: 8px; background: var(--white); color: var(--indigo); font: 800 13px "Manrope", sans-serif; cursor: pointer; transition: background-color 150ms, color 150ms; }
.ic-fix:hover { background: var(--indigo); color: var(--white); }

.pal { overflow: hidden; border-radius: 12px; background: var(--white); box-shadow: 0 0 0 1px rgba(23, 24, 31, 0.1); }
.pal-input { display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 0 18px 0 46px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%235f5a52' stroke-width='2'/%3E%3Cpath d='M16 16l4 4' stroke='%235f5a52' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 16px center / 20px no-repeat; }
.pal-q:empty::before { content: "Search Cairn"; color: #8a857c; }
.caret { width: 2px; height: 22px; background: var(--indigo); }
.motion .caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pal-res { display: grid; padding: 6px; }
.pal-res li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 700; transition: opacity 200ms; }
.pal-res li:first-child { background: #eef0fc; }
.pal-res em { margin-left: auto; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 600; }
.pal-res .av { width: 30px; height: 30px; font-size: 11px; }
.pal-res .av-case { border-radius: 8px; background: #eef0fc; }
.pal-res .av-case::before { content: ""; width: 14px; height: 16px; border: 2px solid var(--indigo); border-radius: 3px; }
.motion .pal-res li { opacity: 0; }
.motion .pal.has-res .pal-res li { opacity: 1; }

.todo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.todo label { position: relative; display: flex; align-items: flex-start; gap: 14px; height: 100%; padding: 14px 16px; border-radius: 12px; background: var(--paper); cursor: pointer; transition: background-color 150ms; }
.todo label:hover { background: #f4f1ec; }
.todo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { position: relative; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid #b9b3a9; transition: background-color 150ms, border-color 150ms; }
.box::after { content: ""; position: absolute; inset: 1px; -webkit-mask: var(--tick) center / 100% no-repeat; mask: var(--tick) center / 100% no-repeat; background: var(--white); opacity: 0; transition: opacity 150ms; }
.todo input:checked + .box { border-color: var(--spruce); background: var(--spruce); }
.todo input:checked + .box::after { opacity: 1; }
.todo input:focus-visible + .box { outline: 3px solid var(--indigo); outline-offset: 3px; }
.tx { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 700; line-height: 1.4; transition: color 200ms; }
.todo input:checked ~ .tx { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(95, 90, 82, 0.5); }
.due { color: var(--muted); font-size: 13px; font-style: normal; font-weight: 600; }
.due.over { color: #b4432c; }
.todo-done { min-height: 22px; color: #1f6a57; font-size: 15px; font-weight: 800; }

.day-wrap { position: relative; }
.day { position: relative; display: grid; gap: 10px; padding-left: 22px; }
.day::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--line); }
.day li { position: relative; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; }
.day li::before { content: ""; position: absolute; left: -22px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid #c9c4ba; }
.day li.done { color: var(--muted); }
.day li.done::before { background: #c9c4ba; }
.day li.next { padding: 8px 10px; margin-left: -10px; border-radius: 8px; background: #eef0fc; }
.day li.next::before { left: -12px; border-color: var(--indigo); background: var(--indigo); }
.day time { width: 44px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.day em { margin-left: auto; color: var(--indigo); font-size: 12px; font-style: normal; }
.day-now { position: absolute; left: 0; right: 0; top: 20%; height: 2px; background: var(--coral); }
.day-now::before { content: ""; position: absolute; left: 1px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }

/* ---------- 7. People ---------- */
.people2 { padding-top: 140px; }
.people2-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.people2-list li { display: flex; flex-direction: column; gap: 12px; }
.people2-list li:nth-child(even) { margin-top: 56px; }
.people2-list img { width: 100%; border-radius: 16px; background: var(--stone); }
.people2-list p { font-size: 18px; font-weight: 800; }

/* ---------- 8. Trust ---------- */
.trust2 { position: relative; margin-top: 140px; padding-block: 140px; overflow: hidden; background: var(--night); color: var(--white); }
.trust2-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 72px; }
.trust2 h2 { color: var(--white); font-size: clamp(34px, 3.8vw, 54px); letter-spacing: -0.03em; line-height: 1.05; }
.trust2-list { display: grid; margin-top: 32px; }
.trust2-list div { padding-block: 18px; border-top: 1px solid var(--night-line); }
.trust2-list dt { color: var(--white); font-size: 19px; font-weight: 800; }
.trust2-list dd { margin: 4px 0 0; color: var(--night-text); font-size: 16px; }
.trust2-copy .more-link { margin-top: 16px; }
.trust2 :focus-visible { outline-color: #8e9af6; }
.trust2-shot { box-shadow: 0 0 0 1px rgba(199, 205, 246, 0.2), 0 40px 80px -40px rgba(0, 0, 0, 0.6); }

/* ---------- 9. Apps ---------- */
.apps2 { padding-top: 140px; overflow: hidden; }
.apps2-stage { position: relative; width: min(1000px, calc(100% - 2 * var(--gutter))); margin: 56px auto 0; padding: 40px 0; }
.dev-window { position: relative; z-index: 2; width: 78%; margin-inline: auto; }
.dev-phone { position: absolute; z-index: 3; top: 18%; width: 19%; padding: 7px; border-radius: 30px; background: #15161d; box-shadow: 0 30px 60px -28px rgba(11, 13, 34, 0.55); }
.dev-phone img { border-radius: 24px; }
.dev-left { left: 0; }
.dev-right { right: 0; }
.apps2-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.apps2-list div { padding-top: 16px; border-top: 1px solid var(--line); }
.apps2-list dt { font-size: 18px; font-weight: 800; }
.apps2-list dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.apps2-more { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- 10. Getting started ---------- */
.path { padding-top: 140px; }
.path-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.path-steps li { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 2px solid var(--accent); }
.path-n { color: color-mix(in srgb, var(--accent) 75%, black); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.path-steps h3 { font-size: 22px; letter-spacing: -0.015em; }
.path-steps p { max-width: 320px; color: var(--muted); font-size: 17px; }

.faq2 { margin-top: 140px; }

/* ---------- 12. Closing: shared with every page (styles.css), plus the sky ---------- */
.finale-sky { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .mess-grid { gap: 32px; }
  .mess-lists li { font-size: 16px; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-sticky { display: none; }
  .story-inline { display: block; }
  .story-step { min-height: 0; padding-block: 36px; }
  .bento2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "msg msg" "att icare" "follow follow" "search day"; }
  .trust2-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 860px) {
  .mess-grid { grid-template-columns: minmax(0, 1fr); }
  .motion .mess-stage { align-items: flex-start; padding-top: 88px; }
  .motion .mess-copy h2 { font-size: clamp(28px, 4.4vw, 40px); }
  .mess-field { min-height: min(400px, 44vh); }
}
@media (max-width: 760px) {
  .orbit-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .people2-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people2-list li:nth-child(even) { margin-top: 32px; }
  .apps2-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path-steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .mess-lists { grid-template-columns: minmax(0, 1fr); }
  .motion .mess-lists { margin-top: 0; }
  .motion .mess-before, .motion .mess-after { grid-area: 1 / 1; }
  .motion .mess.is-sorted .mess-before { opacity: 0; }
}
@media (max-width: 600px) {
  .dh-stage { padding-top: 120px; }
  .motion .dh { height: 280vh; }
  .motion .dh-copy { top: 96px; gap: 18px; }
  .dh h1 { font-size: clamp(40px, 11vw, 54px); }
  .dh-lead { font-size: 17px; }
  .dh .actions { width: 100%; }
  .dh .actions .button { flex: 1; }
  .motion .dh-scene { height: 27vh; bottom: 5vh; }
  .motion .dh-product { width: calc(100% - 32px); transform: translate(-50%, -50%) translateY(calc((1 - var(--show)) * 12vh)) scale(calc(0.9 + var(--show) * 0.1)); }
  .chip { font-size: 12px; padding: 8px 12px 8px 10px; }
  .chip-a { left: 0; top: -14%; }
  .chip-b { right: 0; top: auto; bottom: -16%; }
  .chip-c { display: none; }
  .dh-caption { font-size: 15px; padding-inline: 8px; }
  .section-head h2 { font-size: clamp(32px, 9vw, 42px); }
  .langs, .orbit, .story, .play, .people2, .apps2, .path { padding-top: 96px; }
  .lang-track span { font-size: 30px; }
  .langs-phone { width: 200px; margin-top: -150px; }
  .motion .mess { height: 300vh; }
  .motion .mess-stage { padding-top: 76px; }
  .motion .mess-copy { gap: 12px; }
  .motion .mess-copy h2 { font-size: 26px; }
  .mess-field { min-height: 340px; }
  .frag { font-size: 11px; padding: 8px 10px; }
  .frag-note { width: 120px; padding: 10px; font-size: 12px; }
  .frag-mail { width: 170px; }
  .frag-form { width: 140px; }
  .frag table { font-size: 9px; }
  .filecard { padding: 18px; }
  .fc-rows li { font-size: 13px; padding: 9px 0; }
  .orbit-stage.is-grid .orbit-core { width: 100%; max-width: 340px; height: auto; border-radius: 16px; padding: 28px; }
  .bento2 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "att" "msg" "icare" "search" "follow" "day"; }
  .todo { grid-template-columns: minmax(0, 1fr); }
  .tile2 { padding: 22px; }
  .people2-list { gap: 14px; }
  .trust2 { margin-top: 96px; padding-block: 96px; }
  .apps2-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .apps2-list div { padding-block: 14px; }
  .dev-phone { width: 26%; top: 30%; }
  .dev-window { width: 86%; }
  .faq2 { margin-top: 96px; }
}
