/* Sleepr AI. Geist type, original Sleepr blues, a night-to-morning page. */
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Brand colors, taken from the Sleepr logo and the previous site */
  --blue: #004AAD;        /* Sleepr wordmark blue */
  --blue-deep: #003A8C;   /* hover state for blue, keeps white text at AA */
  --bubble: #5271FF;      /* the "AI" speech bubble */
  --night: #061634;
  --night-2: #0C2452;
  --moon: #C9D6FF;
  --dawn: #FFD48A;
  --ink: #0F172A;
  --muted: #475569;
  --mist: #F4F7FF;
  --line: #DCE4F7;
  --white: #FFFFFF;
  --danger: #B42318;
  --ok: #0B6B3A;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--white);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; color: inherit; }

h1, h2, h3 { font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7.6vw, 5.75rem); letter-spacing: -0.05em; line-height: .98; }
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.015em; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--bubble); outline-offset: 3px; border-radius: 6px; }
.night :focus-visible, .foot :focus-visible { outline-color: var(--moon); }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; }
.skip:focus { left: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section.tight { padding-block: clamp(56px, 7vw, 96px); }
.mist { background: var(--mist); }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--muted); max-width: 58ch; }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.fine { font-size: .9375rem; color: var(--muted); }

/* ---------- Header ---------- */
.head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.head.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px -22px rgba(6,22,52,.45); }
.head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.logo { display: block; flex: none; line-height: 0; border-radius: 8px; }
.logo img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(8px, 2.4vw, 30px); }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; padding: 12px 6px; position: relative; }
.nav-link::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 7px; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--blue); }
.nav .wide { display: none; }
.nav .hide-xs { display: none; }
@media (min-width: 560px) { .nav .wide { display: inline; } .nav .narrow { display: none; } }
@media (min-width: 760px) { .nav .hide-xs { display: inline-block; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer; background: var(--blue); color: #fff; font-weight: 600; font-size: 1.0625rem; line-height: 1.2; text-decoration: none; text-align: center; transition: background .2s, transform .2s var(--ease), box-shadow .2s; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 10px 24px -14px rgba(0,74,173,.9); }
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.small { min-height: 44px; padding: 10px 20px; font-size: .9688rem; }
.btn.light { background: #fff; color: var(--blue); box-shadow: 0 14px 34px -16px rgba(82,113,255,.9); }
.btn.light:hover { background: var(--moon); color: var(--night); }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; font-weight: 600; color: var(--blue); text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.quiet:hover { text-decoration-color: currentColor; }
.night .quiet { color: #fff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }

/* ---------- Night (dark) surfaces ---------- */
.night { background: var(--night); color: #fff; }
.night h1, .night h2, .night h3 { color: #fff; }
.night .lead, .night .fine { color: var(--moon); }
.night a { color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(64px, 9vw, 120px);
  background:
    radial-gradient(900px 520px at 92% 0%, rgba(82,113,255,.34), rgba(82,113,255,0) 62%),
    radial-gradient(700px 420px at 0% 100%, rgba(0,74,173,.42), rgba(0,74,173,0) 65%),
    var(--night); }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-top: 28px; max-width: 54ch; }
.hero.sub { padding-bottom: clamp(64px, 8vw, 104px); }
.hero.sub h1 { font-size: clamp(2.5rem, 6.2vw, 4.5rem); max-width: 17ch; }

.nightrun { position: relative; margin-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 5vw, 64px); }
.arc { width: 100%; height: auto; overflow: visible; }
.arc .base { stroke: rgba(201,214,255,.28); stroke-width: 1.5; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; }
.arc .lit { stroke: url(#arcGrad); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.arc .horizon { stroke: rgba(201,214,255,.22); stroke-width: 1; }
.arc .star { fill: #fff; opacity: .5; }
.arc .node { fill: var(--night); stroke: rgba(201,214,255,.5); stroke-width: 2; transition: fill .5s, stroke .5s; }
.arc .node.on { fill: var(--moon); stroke: #fff; }
.arc .node.last.on { fill: var(--dawn); stroke: #fff; }
.arc .halo { fill: var(--bubble); opacity: 0; transition: opacity .6s; }
.arc .node.on + .halo, .arc .halo.on { opacity: .28; }
.arc .dawnglow { opacity: 1; transition: opacity 1.4s ease; }
.arc .traveller { fill: #fff; filter: drop-shadow(0 0 10px rgba(201,214,255,.95)); }
.js-run .arc .dawnglow { opacity: 0; }
.js-run.done .arc .dawnglow { opacity: 1; }

.runlog { display: grid; gap: 0; margin-top: 8px; }
.runlog li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid rgba(201,214,255,.16); transition: opacity .6s ease; }
.runlog time { font-weight: 600; font-variant-numeric: tabular-nums; color: #fff; }
.runlog p { color: var(--moon); font-size: 1rem; line-height: 1.5; }
.runlog li.dawn time { color: var(--dawn); }
.js-run .runlog li { opacity: .38; }
.js-run .runlog li.on { opacity: 1; }
.nightrun figcaption { margin-top: 22px; font-size: .875rem; color: rgba(201,214,255,.86); }
@media (min-width: 860px) {
  .runlog { grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 20px; }
  .runlog li { grid-template-columns: 1fr; gap: 8px; padding: 18px 0 0; }
}

/* ---------- Statement ---------- */
.statement { font-size: clamp(1.625rem, 3.5vw, 2.625rem); line-height: 1.2; letter-spacing: -0.03em; font-weight: 500; max-width: 24ch; text-wrap: balance; }
.statement-grid { display: grid; gap: clamp(36px, 6vw, 80px); }
.trio { display: grid; gap: 28px; }
.trio h3 { margin-bottom: 8px; }
.trio p { color: var(--muted); }
.trio > div { padding-top: 22px; border-top: 2px solid var(--ink); }
@media (min-width: 720px) { .trio { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
@media (min-width: 1000px) { .statement-grid { grid-template-columns: 1fr; } .statement { max-width: 26ch; } }

/* ---------- Offer rows ---------- */
.rows { border-bottom: 1px solid var(--line); }
.row { position: relative; display: grid; gap: 10px; padding: 30px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.row h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -0.03em; line-height: 1.1; transition: color .25s, transform .35s var(--ease); }
.row p { color: var(--muted); max-width: 56ch; }
.row .more { font-weight: 600; color: var(--blue); font-size: 1rem; }
.row::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
a.row:hover::before, a.row:focus-visible::before { transform: scaleX(1); }
a.row:hover h3 { color: var(--blue); transform: translateX(6px); }
a.row:hover .more { text-decoration: underline; }
@media (min-width: 860px) {
  .row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 40px; align-items: baseline; padding: 38px 0; }
}

/* ---------- Examples ---------- */
.examples { display: grid; gap: 0; border-top: 1px solid var(--line); }
.example { padding: 28px 0; border-bottom: 1px solid var(--line); }
.example .dept { font-size: .9375rem; font-weight: 600; color: var(--blue); margin-bottom: 10px; }
.example h3 { margin-bottom: 10px; }
.example p { color: var(--muted); }
@media (min-width: 720px) {
  .examples { grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
}
@media (min-width: 1060px) {
  .examples { grid-template-columns: repeat(3, 1fr); }
}
.disclaimer { margin-top: 28px; font-size: .9375rem; color: var(--muted); }

/* ---------- Steps (a real sequence) ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 36px 64px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--white); color: var(--blue); border: 1.5px solid var(--blue); }
.steps li::after { content: ""; position: absolute; left: 19.5px; top: 44px; bottom: 4px; width: 1px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); max-width: 46ch; }
.night .steps li::before { background: var(--night); color: #fff; border-color: var(--moon); }
.night .steps li::after { background: rgba(201,214,255,.22); }
.night .steps p { color: var(--moon); }
@media (min-width: 900px) {
  .steps.across { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 36px; }
  .steps.across li { padding: 64px 0 0; }
  .steps.across li::before { top: 0; }
  .steps.across li::after { left: 52px; right: -24px; top: 20px; bottom: auto; width: auto; height: 1px; }
}

/* ---------- Two-column blocks ---------- */
.split { display: grid; gap: clamp(32px, 5vw, 72px); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } .split .stick { position: sticky; top: 112px; } }
.pairs { display: grid; gap: 36px 56px; }
.pairs h3 { margin-bottom: 8px; }
.pairs p { color: var(--muted); }
@media (min-width: 640px) { .pairs { grid-template-columns: repeat(2, 1fr); } }
.night .pairs p { color: var(--moon); }

.ticks { display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 14px; height: 8px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.night .ticks li::before { border-color: var(--moon); }

/* ---------- Services page ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(201,214,255,.4); color: #fff; text-decoration: none; font-weight: 500; font-size: .9688rem; transition: background .2s, border-color .2s; }
.jump a:hover { background: rgba(201,214,255,.14); border-color: var(--moon); }
.offer { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.offer:first-of-type { border-top: 0; }
.offer h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); margin-bottom: 18px; }
.offer .lead { font-size: 1.125rem; }
.offer h3 { font-size: 1rem; letter-spacing: 0; color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.offer .eg { margin-top: 32px; padding: 24px 26px; background: var(--mist); border-radius: 16px; border: 1px solid var(--line); }
.offer .eg b { display: block; font-weight: 600; color: var(--blue); margin-bottom: 6px; font-size: .9375rem; }
.offer .eg p { color: var(--ink); }

/* ---------- Contact / form ---------- */
.contact { background:
    radial-gradient(800px 480px at 100% 0%, rgba(82,113,255,.3), rgba(82,113,255,0) 60%),
    var(--night); }
.contact .split { align-items: start; }
.contact h2 { margin-bottom: 20px; }
.contact-meta { margin-top: 36px; display: grid; gap: 18px; font-size: 1rem; color: var(--moon); }
.contact-meta b { display: block; color: #fff; font-weight: 600; }
.contact-meta address { font-style: normal; }

.form { background: #fff; color: var(--ink); border-radius: 24px; padding: clamp(24px, 4vw, 44px); box-shadow: 0 40px 100px -40px rgba(0,0,0,.7), 0 0 0 1px rgba(201,214,255,.25); }
.form a { color: var(--blue); }
.form .grid { display: grid; gap: 20px; }
@media (min-width: 620px) { .form .grid.two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.grid .field { margin-bottom: 0; }
.grid { margin-bottom: 20px; }
.field label { font-weight: 600; font-size: .9688rem; }
.field label small { font-weight: 400; color: var(--muted); font-size: inherit; }
.field input, .field textarea { width: 100%; min-height: 52px; padding: 13px 16px; font-size: 1rem; line-height: 1.4; background: #fff; border: 1.5px solid #8A97B4; border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 136px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--blue); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(82,113,255,.3); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: .9375rem; font-weight: 500; }
.field .err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; padding: 18px; margin: 4px 0 24px; background: var(--mist); border: 1px solid var(--line); border-radius: 14px; font-size: .9375rem; line-height: 1.5; color: var(--ink); cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid #6B7A9C; border-radius: 6px; background: #fff; display: grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.consent input::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--ease); }
.consent input:checked { background: var(--blue); border-color: var(--blue); }
.consent input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.consent input:focus-visible { outline: 3px solid var(--bubble); outline-offset: 3px; }
.form-foot { display: grid; gap: 16px; }
.form-foot .btn { width: 100%; }
.form-foot .fine, .night .form-foot .fine { font-size: .875rem; color: #475569; }
.status { font-weight: 500; border-radius: 12px; }
.status:empty { display: none; }
.status.ok { padding: 14px 16px; background: #ECFDF3; color: var(--ok); }
.status.bad { padding: 14px 16px; background: #FEF2F2; color: var(--danger); }
.status.bad a { color: var(--danger); }
@media (min-width: 620px) { .form-foot .btn { width: auto; justify-self: start; } }

/* ---------- Closing band on sub pages ---------- */
.note-band { border-radius: 20px; background: var(--mist); border: 1px solid var(--line); padding: clamp(24px, 4vw, 40px); }

/* ---------- Legal ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 14px; }
.legal h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 44px 0 12px; }
.legal p, .legal ul { margin-bottom: 16px; color: #334155; }
.legal ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; }
.legal address { font-style: normal; color: #334155; }
.review { margin: 28px 0 8px; padding: 16px 18px; border-radius: 12px; background: #FFF7E6; border: 1px solid #F0C36A; color: #5C3D00; font-size: .9688rem; }

/* ---------- Footer ---------- */
.foot { background: var(--night); color: var(--moon); padding: clamp(48px, 6vw, 72px) 0 36px; font-size: .9688rem; }
.foot .top { display: grid; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(201,214,255,.16); }
.foot .chip { display: inline-block; background: #fff; border-radius: 14px; padding: 10px 16px; line-height: 0; }
.foot .chip img { height: 40px; width: auto; }
.foot .tag { margin-top: 18px; max-width: 34ch; }
.foot h2 { font-size: .9688rem; letter-spacing: 0; font-weight: 600; color: #fff; margin-bottom: 12px; line-height: 1.4; }
.foot ul { display: grid; gap: 2px; }
.foot a { color: var(--moon); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot address { font-style: normal; line-height: 1.7; }
.foot .base { padding-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: rgba(201,214,255,.86); font-size: .875rem; }
@media (min-width: 760px) { .foot .top { grid-template-columns: 2fr 1fr 1fr; gap: 56px; } }

/* ---------- Scroll reveal (only when JS is on and motion is welcome) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
  a.row:hover h3 { transform: none; }
}

@media print {
  .head, .foot, .contact, .skip { display: none; }
  .night { background: #fff; color: #000; }
}
