/* caseload.me: the game's desk look (UI plan colours and fonts). */
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plexmono.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plexmono-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --blotter: #2E4538;
  --blotter-raised: #3C5848;
  --blotter-deep: #24372C;
  --paper: #F6F0E2;
  --paper-light: #FBF7EE;
  --manila: #E7C98A;
  --ink: #1F2A44;
  --muted: #6B6455;
  --approve: #1F5A9E;
  --deny: #B4501A;
  --evidence: #C08A1E;
  --rule: rgba(31, 42, 68, 0.12);
  --heading: "Bricolage", "Avenir Next", system-ui, sans-serif;
  --body: "Inter", -apple-system, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--body);
  color: var(--paper);
  background: var(--blotter) url("img/blotter.webp") repeat;
  background-size: 256px;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--manila); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.caption {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--manila);
}
h1, h2, h3 { font-family: var(--heading); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 84px); }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 24px; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2vw, 21px); color: rgba(246, 240, 226, 0.85); max-width: 34em; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(36, 55, 44, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(246, 240, 226, 0.08); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 22px var(--heading); text-decoration: none; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.bar nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.bar nav a { text-decoration: none; color: rgba(246, 240, 226, 0.8); }
.bar nav a:hover { color: var(--paper); }
.bar .cta-small { background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.bar .cta-small:hover { color: var(--ink); background: #fff; }
@media (max-width: 640px) { .bar nav .hide-sm { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 110px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin: 14px 0 22px; }
.hero .lede { margin-bottom: 30px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero .phone { margin-inline: auto; }
  .signup { margin-inline: auto; }
}

/* ---------- trailer (the ad already draws its own phone) ---------- */
.trailer { position: relative; width: min(380px, 82vw); aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(246, 240, 226, 0.1); background: var(--blotter-deep); justify-self: center; }
.trailer video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero .trailer { margin-inline: auto; } }

/* ---------- phone frame ---------- */
.phone {
  width: min(340px, 78vw);
  aspect-ratio: 390 / 844;
  padding: 11px;
  border-radius: 46px;
  background: #101820;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  position: relative;
}
.phone .screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--blotter); position: relative; }
.phone .screen > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone video { object-fit: cover; }
.sound {
  position: absolute; right: 22px; bottom: 22px; z-index: 2;
  font: 600 13px var(--body); color: var(--ink); background: rgba(246, 240, 226, 0.92);
  border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer;
}

/* ---------- sign-up ---------- */
.signup { max-width: 470px; }
.signup form { display: flex; gap: 8px; background: var(--paper); padding: 6px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.signup input[type=email] {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 12px;
  font: 400 17px var(--body); color: var(--ink);
}
.signup input[type=email]::placeholder { color: #8a8373; }
.signup input[type=email]:focus { outline: none; }
.signup form:focus-within { outline: 3px solid var(--manila); outline-offset: 2px; }
.signup button {
  border: 0; border-radius: 10px; background: var(--approve); color: var(--paper);
  font: 600 16px var(--body); padding: 12px 18px; cursor: pointer; white-space: nowrap;
}
.signup button:hover { background: #1a4d88; }
.signup button[disabled] { opacity: 0.6; cursor: default; }
.signup .note { margin-top: 12px; font-size: 14px; color: rgba(246, 240, 226, 0.7); }
.signup .msg { margin-top: 12px; font-size: 15px; min-height: 1.4em; }
.signup .msg.ok { color: var(--manila); }
.signup .msg.err { color: #F4B08A; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 420px) { .signup form { flex-direction: column; } .signup button { width: 100%; } }

/* ---------- how it works: text scrolls, the phone stays ---------- */
.how { padding: 40px 0 60px; }
.how > .wrap > .caption { display: block; text-align: center; }
.how > .wrap > h2 { text-align: center; margin: 12px auto 0; max-width: 14em; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 40px; }
.steps { display: flex; flex-direction: column; }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
.step .num { font: 600 13px var(--mono); color: var(--manila); letter-spacing: 0.08em; }
.step h3 { font-size: clamp(30px, 3.4vw, 44px); margin: 10px 0 16px; }
.step p { color: rgba(246, 240, 226, 0.85); max-width: 26em; font-size: 18px; }
.step .shot { display: none; }
.stage { position: sticky; top: calc(50vh - min(360px, 41vh)); height: min(720px, 82vh); display: flex; justify-content: center; }
.stage .phone { width: auto; height: 100%; }
.stage .screen img { opacity: 0; transition: opacity 0.45s ease; }
.stage .screen img.on { opacity: 1; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .stage { display: none; }
  .step { min-height: 0; padding: 36px 0; text-align: center; align-items: center; }
  .step p { margin-inline: auto; }
  .step .shot { display: block; margin-top: 26px; }
  .step .shot .phone { width: min(300px, 72vw); }
}

/* ---------- paper sections ---------- */
.paper { background: var(--paper); color: var(--ink); }
.paper .caption { color: var(--approve); }
.paper .lede { color: var(--muted); }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section h2 { margin: 12px 0 18px; }

.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 40px; }
.day {
  background: var(--paper-light); border: 1px solid var(--rule); border-radius: 16px; padding: 22px 18px;
  box-shadow: 0 2px 0 rgba(31, 42, 68, 0.04);
}
.day .tag { display: inline-block; font: 600 12px var(--mono); color: var(--approve); border: 1.5px solid var(--approve); border-radius: 6px; padding: 2px 7px; }
.day h3 { font-size: 21px; margin: 14px 0 6px; }
.day p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.day .when { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.day .free { color: var(--approve); }
@media (max-width: 980px) { .week { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .week { grid-template-columns: 1fr; } }

/* ---------- price ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 40px; }
.plan { border-radius: 20px; padding: 32px; border: 1px solid var(--rule); background: var(--paper-light); }
.plan.unlock { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan .price { font: 800 44px var(--heading); letter-spacing: -0.02em; margin: 10px 0 2px; }
.plan .price small { font: 400 16px var(--body); opacity: 0.7; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 600; color: var(--approve); }
.plan.unlock li::before { color: var(--manila); }
.plan.unlock .caption { color: var(--manila); }
.promise { margin-top: 26px; font: 600 14px var(--mono); letter-spacing: 0.04em; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- closing ---------- */
.closing { text-align: center; padding: clamp(72px, 10vw, 120px) 0; }
.closing h2 { max-width: 13em; margin: 0 auto 18px; }
.closing .lede { margin: 0 auto 30px; }
.closing .signup { margin-inline: auto; }
.seal { width: 92px; margin: 0 auto 26px; }

footer { border-top: 1px solid rgba(246, 240, 226, 0.1); padding: 34px 0 48px; font-size: 14px; color: rgba(246, 240, 226, 0.65); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--paper); }
footer .disclaimer { flex-basis: 100%; max-width: 46em; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; } .reveal.d2 { transition-delay: 0.16s; } .reveal.d3 { transition-delay: 0.24s; } .reveal.d4 { transition-delay: 0.32s; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .stage .screen img { transition: none; }
}

/* ---------- text pages (privacy, support) ---------- */
.doc { padding: clamp(48px, 7vw, 88px) 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin: 12px 0 10px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 36px; }
.doc h2 { font-size: 26px; margin: 40px 0 12px; letter-spacing: -0.01em; }
.doc p, .doc li { color: #2b3550; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; margin: 12px 0 0; display: grid; gap: 8px; }
.doc a { color: var(--approve); }
.doc details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.doc summary { cursor: pointer; font: 700 19px var(--heading); color: var(--ink); list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; float: right; color: var(--approve); font-weight: 600; }
.doc details[open] summary::after { content: "−"; }
.doc details p { margin-top: 10px; }
.contact { margin-top: 36px; padding: 24px; border-radius: 16px; background: var(--paper-light); border: 1px solid var(--rule); }
