/* Sleep Anchor hub. One dark "night" theme on purpose: people read this at bedtime. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #0b0d1a;
  --bg-2: #10132a;
  --panel: rgb(255 255 255 / .045);
  --panel-hi: rgb(255 255 255 / .07);
  --line: rgb(255 255 255 / .1);
  --text: #ecebf5;
  --muted: #a9acc7;
  --gold: #e9c88c;
  --gold-2: #d9a868;
  --lav: #c4b8ff;
  --radius: 18px;
  --max: 70rem;
  --read: 42rem;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgb(118 92 200 / .18), transparent 60%),
    radial-gradient(50rem 30rem at -10% 30%, rgb(60 80 170 / .12), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lav); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgb(233 200 140 / .35); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.2rem); margin: 0 0 1rem; font-weight: 350; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 0 0 .75rem; }
h3 { font-size: 1.3rem; margin: 0 0 .4rem; }
p { text-wrap: pretty; }
strong { font-weight: 600; color: #fff; }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--gold); color: #1a1405; padding: .5rem 1rem; border-radius: 999px; }
.skip:focus { left: 1rem; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.read { width: min(100% - 32px, var(--read)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(11 13 26 / .72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; min-height: 4rem; flex-wrap: wrap; padding-block: .5rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.3rem; letter-spacing: .01em; }
.wordmark svg { width: 28px; height: 28px; flex: none; }
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .55rem .8rem; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--text); background: var(--panel); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--panel-hi); }
.site-nav .nav-cta { color: #1a1405; background: var(--gold); font-weight: 600; margin-left: .25rem; }
.site-nav .nav-cta:hover { background: #f3d8a6; color: #1a1405; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.35rem; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: #1a1405; font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 0; cursor: pointer; box-shadow: 0 6px 24px -8px rgb(233 200 140 / .55);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.button:hover { color: #1a1405; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgb(233 200 140 / .6); }
.button.ghost { background: rgb(255 255 255 / .06); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button.ghost:hover { background: rgb(255 255 255 / .1); color: #fff; }
.button svg { width: 1.1em; height: 1.1em; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(4rem, 12vw, 9rem) 0 clamp(3.5rem, 9vw, 7rem); }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-art img { object-position: 60% 40%; filter: brightness(1.35) saturate(1.1); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(11 13 26 / .85) 0%, rgb(11 13 26 / .35) 55%, rgb(11 13 26 / 0) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%);
}
.stars {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 64% 72%, #ffe9c4 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 90% 48%, #d9d2ff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 12%, #fff 50%, transparent 51%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .9; } }
.hero .lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: #d6d6e8; max-width: 36rem; margin: 0; }
.hero h1 { max-width: 14ch; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 1.1rem; font-weight: 600; }
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: .7; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0; margin: 2rem 0 0; color: var(--muted); font-size: .92rem; }
.trust li { display: inline-flex; align-items: center; gap: .45rem; }
.trust svg { width: 1rem; height: 1rem; color: var(--gold); flex: none; }

/* Page top for inner pages */
.page-head { position: relative; isolation: isolate; padding: clamp(3rem, 8vw, 5.5rem) 0 1.5rem; }
.page-head::before {
  content: ""; position: absolute; inset: 0 0 -4rem; z-index: -1; opacity: .5;
  background: url("/assets/img/wash-480.webp") center / cover no-repeat;
  mask-image: linear-gradient(180deg, #000 20%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent);
}
.page-head p { color: #d6d6e8; font-size: 1.15rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 1rem; }
.crumbs a { color: var(--muted); }

/* Sections */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

.prose { padding-bottom: 3rem; }
.prose h2 { margin-top: 2.75rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: .4rem 0; }
.prose li::marker { color: var(--gold); }
.small { color: var(--muted); font-size: .88rem; }
.updated { color: var(--muted); font-size: .85rem; margin-top: 2.5rem; }

/* Length picker */
.lengths { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.length {
  position: relative; display: flex; flex-direction: column; gap: .35rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.25rem; transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.length:hover { border-color: rgb(233 200 140 / .4); background: var(--panel-hi); transform: translateY(-2px); }
.length .dur { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--gold); }
.length .dur small { font-size: 1rem; color: var(--muted); font-family: var(--sans); margin-left: .25rem; }
.length h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin: .6rem 0 0; }
.length p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.length a.stretch { margin-top: .9rem; font-weight: 600; text-decoration: none; }
.length a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.length a.stretch:focus-visible { outline: none; }
.length:has(a.stretch:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: .9rem; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--lav), var(--gold)); border-radius: inherit; }
.tag { align-self: flex-start; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; background: rgb(233 200 140 / .14); color: var(--gold); }

/* Show cards */
.shows { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.show {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.show picture img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.show .body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.show h2, .show h3 { font-size: 1.4rem; margin: 0; }
.show p { margin: 0; color: var(--muted); font-size: .97rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0 .2rem; }
.meta span { font-size: .8rem; color: var(--text); background: var(--panel-hi); border-radius: 999px; padding: .2rem .65rem; }
.show .links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .9rem; }
.show .links .button { min-height: 44px; padding: .55rem 1.05rem; font-size: .95rem; }
.show-row { display: grid; gap: 1.5rem; grid-template-columns: 11rem 1fr; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 1.25rem 0; }
.show-row img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.show-row h2 { margin: .2rem 0 .5rem; font-size: 1.6rem; }
.show-row p { margin: 0 0 .5rem; color: var(--muted); }
@media (max-width: 36rem) { .show-row { grid-template-columns: 1fr; } .show-row picture { max-width: 12rem; } }

/* Feature (full night) */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; align-items: stretch;
  border: 1px solid rgb(233 200 140 / .25); border-radius: calc(var(--radius) + 6px); overflow: hidden;
  background: linear-gradient(135deg, rgb(233 200 140 / .08), rgb(118 92 200 / .08));
}
.feature picture, .feature img { height: 100%; width: 100%; object-fit: cover; }
.feature .body { padding: clamp(1.5rem, 4vw, 3rem); }
.feature .body p { color: #d6d6e8; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; margin: 1.25rem 0 0; }
.price strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; color: var(--gold); }
.price span { color: var(--muted); font-size: .92rem; }
@media (max-width: 48rem) { .feature { grid-template-columns: minmax(0, 1fr); } .feature picture { aspect-ratio: 16 / 9; } }

.checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 1.1rem; height: 1.1rem; margin-top: .3rem; border-radius: 50%; background: rgb(233 200 140 / .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23e9c88c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; }

/* Plans (deep page) */
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 1.5rem 0; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.plan h3 { margin: 0; }
.plan p { margin: 0; color: var(--muted); }
.plan .button { margin-top: auto; align-self: flex-start; }
.plan .dur { font-family: var(--serif); font-size: 2rem; color: var(--gold); line-height: 1; }

.steps { counter-reset: s; list-style: none; padding: 0 !important; display: grid; gap: .75rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.25rem 1fr; gap: .75rem; align-items: start; margin: 0 !important; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--panel-hi); border: 1px solid var(--line); color: var(--gold); font-weight: 600; }
.steps li::marker { content: none; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; background: var(--panel); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: .6rem; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; transition: background .2s ease, border-color .2s ease; }
.faq details[open] { background: var(--panel-hi); border-color: rgb(196 184 255 / .3); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--gold); transition: transform .2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 1.2rem 1.1rem; color: #cfd0e2; }
.faq .answer p { margin: 0; }

/* Signup */
.signup-panel {
  position: relative; overflow: hidden; border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.75rem, 5vw, 3.25rem); border: 1px solid var(--line);
  background: radial-gradient(40rem 20rem at 100% 0%, rgb(118 92 200 / .25), transparent 60%), var(--bg-2);
}
.signup-panel h2 { margin-top: 0; }
.signup-panel > p { color: var(--muted); max-width: 34rem; }
.signup { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: 1.25rem; max-width: 34rem; }
.signup label { width: 100%; font-size: .9rem; color: var(--muted); }
.signup input {
  flex: 1 1 15rem; min-width: 0; min-height: 48px; padding: .7rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgb(0 0 0 / .25); color: var(--text); font: inherit;
}
.signup input::placeholder { color: #6f7394; }
.signup input:focus-visible { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgb(233 200 140 / .25); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 3rem 0 2.5rem; color: var(--muted); font-size: .92rem; background: rgb(0 0 0 / .18); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(2, 1fr); }
.footer-grid h2 { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin: 0 0 .75rem; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.footer-grid a { color: var(--muted); text-decoration: none; display: inline-block; padding: .3rem 0; }
.footer-grid a:hover { color: var(--text); }
.footer-grid p { margin: .5rem 0 0; max-width: 24rem; }
.legal { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; font-size: .84rem; }
.legal p { margin: .25rem 0; }
@media (max-width: 44rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

@media (max-width: 30rem) {
  .site-header .wrap { justify-content: center; }
  .site-nav a { padding: .5rem .65rem; font-size: .9rem; }
  .hero::after { background: linear-gradient(180deg, rgb(11 13 26 / .55), rgb(11 13 26 / .85) 60%, var(--bg)); }
  .cta-row .button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

.bar .w1 { width: 10%; } .bar .w2 { width: 15%; } .bar .w3 { width: 20%; } .bar .w4 { width: 100%; }
.wrap.narrow { width: min(100% - 32px, 50rem); }
picture { display: block; }
.feature picture { min-height: 18rem; }
code { font-size: .85em; overflow-wrap: anywhere; color: #d6d6e8; }
.show-row > div { min-width: 0; }
.show-row .meta { margin-bottom: .6rem; }
