/* PreslerOS, the public page. Walnut, from ios/PreslerOS/Design/DesignSystem.swift: night (espresso, lit by the lamp)
   by default, linen by day when the reader's device is in light mode. */

@font-face { font-family: "Fraunces"; src: url(fonts/FrauncesDisplay-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fraunces Text"; src: url(fonts/FrauncesText-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --bg: #1B1612; --card: #251F19; --raised: #33291F; --rule: #3A3129;
  --ink: #F3EBDD; --soft: #B3A690; --faint: #998C78;
  --brass: #C9A35B; --brassink: #D9B56E; --bright: #E7C47E; --line: #5A4826;
  --glow: rgba(107, 74, 34, .85); --cloud: linear-gradient(180deg, #2C241C, #251F19);
  --shadow: 0 40px 80px rgba(0, 0, 0, .45); --bezel: #0E0B09;
  --display: "Fraunces", Georgia, serif; --text: "Fraunces Text", "Fraunces", Georgia, serif;
  --ui: "DM Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4.4vw, 56px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4EEE4; --card: #FBF8F2; --raised: #EFE5D3; --rule: #DCD0BD;
    --ink: #2A2017; --soft: #6B5C48; --faint: #76674F;
    --brassink: #7E5F24; --bright: #8A6727; --line: #D8C08F;
    --glow: rgba(240, 217, 168, .9); --cloud: linear-gradient(180deg, #FBF8F2, #F6EEDF);
    --shadow: 0 30px 60px rgba(42, 32, 23, .22); --bezel: #2A2017;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--ui); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--card); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* Type */
.eb { font: 600 12px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--brassink); }
.display { font: 500 clamp(54px, 7.4vw, 96px)/1 var(--display); letter-spacing: -.025em; }
.h2 { font: 500 clamp(34px, 4.4vw, 52px)/1.08 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.h3 { font: 500 24px/1.2 var(--text); }
.lede { font-size: clamp(18px, 1.7vw, 20px); line-height: 1.55; color: var(--soft); max-width: 38ch; }
.sub { font-size: 18px; color: var(--soft); max-width: 60ch; }
p { color: var(--soft); }

/* The lamp: a warm glow at the top that drifts down a little as you scroll (site.js sets --drift). */
.lampglow { position: absolute; left: 50%; top: -260px; width: min(1100px, 160vw); height: 760px; pointer-events: none;
  transform: translate(-50%, var(--drift, 0px)); background: radial-gradient(ellipse at 50% 40%, var(--glow), transparent 65%); }
main { position: relative; overflow-x: clip; }

/* Nav */
.nav { position: relative; z-index: 3; display: flex; align-items: center; gap: 28px; padding: 22px var(--gutter);
  max-width: 1280px; margin: 0 auto; font: 500 14px var(--ui); }
.mark { font: 500 22px var(--display); text-decoration: none; display: flex; gap: 8px; align-items: center; margin-right: auto; }
.mark span { color: var(--bright); }
.nav nav { display: flex; gap: 24px; }
.nav nav a { color: var(--soft); text-decoration: none; }
.nav nav a:hover { color: var(--ink); }
.menu { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 400 20px var(--ui); cursor: pointer; }

/* Sections */
.hero, .sec, .foot { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sec { position: relative; padding-top: 96px; padding-bottom: 96px; display: grid; gap: 40px; }
.sec::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--rule); }
.head { display: grid; gap: 14px; max-width: 760px; }
section[id] { scroll-margin-top: 16px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Hero: the pitch on the left, the agent's plan on the right, big enough to read. */
.hero { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 48px; padding-top: 40px; padding-bottom: 96px; }
.hero .copy { display: grid; gap: 26px; }
.btnrow { display: flex; gap: 12px; flex-wrap: wrap; }
.b { font: 600 15px var(--ui); padding: 14px 22px; border-radius: 999px; text-decoration: none; transition: transform .15s ease; }
.b:hover { transform: translateY(-1px); }
.b.pri { background: linear-gradient(180deg, #E7C47E, #C9A35B 55%, #A9843F); color: #1B1612; }
.b.ghost { border: 1px solid var(--rule); }
.teaser { justify-self: start; font: 500 15px var(--ui); color: var(--soft); text-decoration: none; border-top: 1px solid var(--rule); padding-top: 20px; }
.teaser span { color: var(--brassink); }
.teaser:hover { color: var(--ink); }
.stage { margin: 0; display: grid; justify-items: center; gap: 16px; }
.stage .phone { width: 330px; }
.stage figcaption { font: 500 13px var(--ui); color: var(--faint); }

/* Phones: the app's own mock-mode screenshots in a drawn frame */
.phone { position: relative; border-radius: 15.5% / 7.2%; background: var(--bezel); padding: 2.4%; box-shadow: var(--shadow); }
.phone img { border-radius: 13.6% / 6.3%; width: 100%; }

/* How it helps: moments on the left, one phone that stays put on the right. Each moment's line is always shown;
   without JS each one also has its own phone. */
.day { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; }
.stop { border-top: 1px solid var(--rule); padding-left: 0; transition: padding .2s; }
.stop:last-child { border-bottom: 1px solid var(--rule); }
.stop button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 18px 0 4px; cursor: pointer; }
.stop button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.stop .t { font: 600 12px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brassink); padding-top: 6px; }
.stop .h3 { font-size: 22px; }
.stop .more { padding: 0 0 18px 130px; display: grid; gap: 18px; }
.stop .more p { font-size: 15.5px; max-width: 54ch; }
.phone.inline { width: min(300px, 80%); }
.daystage { display: none; }

.js .day .stop .more .phone.inline { display: none; }
.js .daystage { display: grid; justify-items: center; }
.js .daystage .phone { width: 320px; }
.js .daystage img + img { position: absolute; inset: 2.4%; width: 95.2%; }
.js .daystage img { opacity: 0; transition: opacity .25s ease; }
.js .daystage img.on { opacity: 1; }
.js .stop .t, .js .stop .h3, .js .stop .more p { transition: color .2s; }
.js .stop .t { color: var(--faint); }
.js .stop .h3 { color: var(--faint); }
.js .stop .more p { color: var(--faint); }
.js .stop.on { box-shadow: inset 3px 0 0 var(--brass); padding-left: 14px; }
.js .stop.on .t { color: var(--brassink); }
.js .stop.on .h3 { color: var(--ink); }
.js .stop.on .more p { color: var(--soft); }
/* Tall enough screens: the whole block pins and scrolling walks through it (site.js maps progress to a moment). */
@media (min-width: 901px) and (min-height: 800px) {
  .js .daytrack { height: calc(100vh + 5 * 45vh); }
  .js .day { position: sticky; top: calc(50vh - 360px); }
}

/* Why it works */
.insights { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.insights > div { padding: 28px 28px 8px 0; display: grid; gap: 12px; align-content: start; }
.insights > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.promises li { font-size: 14.5px; color: var(--soft); border-top: 1px solid var(--rule); padding-top: 14px; }
.promises b { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }

/* Under the hood */
.arch { display: grid; grid-template-columns: 1fr 110px 1.2fr 110px 1fr; align-items: stretch; }
.node { background: var(--card); border: 1px solid var(--rule); border-radius: 22px; padding: 22px; display: grid; gap: 12px; align-content: start; }
.node.cloud { border-color: var(--line); background: var(--cloud); }
.label { display: flex; align-items: center; gap: 10px; }
.label svg { color: var(--brassink); }
.node li { font-size: 14px; line-height: 1.4; color: var(--soft); padding-left: 16px; position: relative; margin-top: 7px; }
.node li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); opacity: .7; }
.wire { display: grid; justify-items: center; align-self: center; gap: 8px; padding: 0 6px; text-align: center; }
.wire .ln { width: 100%; height: 2px; position: relative; background: repeating-linear-gradient(90deg, var(--brass) 0 8px, transparent 8px 14px); }
.wire .ln.solid { background: var(--brass); }
.wire .ln i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--bright); box-shadow: 0 0 12px 3px rgba(231, 196, 126, .6); opacity: 0; }
.arch.pulse .wire .ln i { animation: pulse 1.4s ease-in-out forwards; }
.arch.pulse .wire + .node + .wire .ln i { animation-delay: .9s; }
@keyframes pulse { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.wire span { font: 500 12px/1.35 var(--ui); color: var(--faint); }
.asleep { display: flex; gap: 14px; align-items: flex-start; border: 1px dashed var(--line); border-radius: 18px; padding: 18px 20px; }
.asleep svg { color: var(--brassink); margin-top: 3px; }
.asleep .strong { font-weight: 600; color: var(--ink); }
.asleep p { font-size: 14.5px; }

/* It builds itself: you, Claude, you. */
.loop { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 14px; }
.loop li { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 22px; display: grid; gap: 8px; align-content: start; }
.loop li.claude { border-color: var(--line); background: var(--cloud); }
.loop .n { font: 600 12px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brassink); }
.loop .h3 { font-size: 21px; }
.loop p { font-size: 14.5px; }

/* Footer */
.foot { position: relative; padding-top: 64px; padding-bottom: 56px; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.foot::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--rule); }
.foot .h3 { max-width: 30ch; font-size: 28px; color: var(--ink); }
.made { font-size: 14px; text-align: right; }

/* Narrower screens */
@media (max-width: 1100px) {
  .promises { grid-template-columns: repeat(2, 1fr); }
  .nav nav { gap: 18px; }
}
@media (max-width: 900px) {
  .menu { display: grid; place-items: center; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .nav nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; }
  .nav nav a { padding: 12px 0; border-top: 1px solid var(--rule); font-size: 16px; }
  .nav.open nav { display: flex; }
  html:not(.js) .nav nav { display: flex; }
  html:not(.js) .menu { display: none; }

  .hero { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 64px; gap: 40px; }
  .stage .phone { width: min(280px, 76%); }
  .insights { grid-template-columns: 1fr; }
  .insights > div, .insights > div + div { padding: 24px 0; border-left: 0; }
  .insights > div + div { border-top: 1px solid var(--rule); }

  /* On a phone each moment shows its own screen, inline. */
  .day { grid-template-columns: 1fr; }
  .js .daystage { display: none; }
  .js .day .stop .more .phone.inline { display: block; }
  .stop button { grid-template-columns: 1fr; gap: 4px; cursor: default; }
  .stop .more { padding-left: 0; }
  .js .stop.on { box-shadow: none; padding-left: 0; }
  .js .stop .t { color: var(--brassink); }
  .js .stop .h3 { color: var(--ink); }
  .js .stop .more p { color: var(--soft); }
  .phone.inline { justify-self: center; width: min(260px, 72%); margin-top: 6px; }

  .arch { grid-template-columns: 1fr; }
  .wire { grid-template-columns: 2px auto; justify-content: center; align-items: center; height: 64px; gap: 12px; text-align: left; }
  .wire .ln { width: 2px; height: 100%; background: repeating-linear-gradient(180deg, var(--brass) 0 8px, transparent 8px 14px); }
  .wire .ln i { display: none; }
  .wire span br { display: none; }
  .loop { grid-template-columns: 1fr; }
  .sec { padding-top: 72px; padding-bottom: 72px; gap: 32px; }
  .foot { flex-direction: column; align-items: start; }
  .made { text-align: left; }
}
@media (max-width: 640px) {
  .promises { grid-template-columns: 1fr; gap: 0; }
  .promises li { padding: 14px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lampglow { transform: translateX(-50%); }
  .js .daystage img, .stop { transition: none; }
  .arch.pulse .wire .ln i { animation: none; }
  .b, .b:hover { transition: none; transform: none; }
}
