/* Twolight site. Colors match the app's Linen (light) and Midnight (dark) themes. */
@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-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --bg: #F5EFE7; --card: #FFFFFF; --ink: #221C18; --muted: #6B5F57;
  --line: #E6DCD0; --accent: #B5482F; --partner: #2F6F73;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171C; --card: #242833; --ink: #F2EEE8; --muted: #A8A39C;
    --line: #2E333F; --accent: #E8866B; --partner: #6FB3B8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "DM Sans", -apple-system, system-ui, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { padding: 20px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 600 22px "Fraunces", Georgia, serif; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover, nav a[aria-current] { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 7vw, 52px); letter-spacing: -0.01em; }
h2 { font-size: 26px; margin-top: 1.6em; }
h3 { font-size: 19px; margin-top: 1.4em; }
p, ul { margin: 0 0 1em; }
.muted { color: var(--muted); }
.lede { font-size: 20px; color: var(--muted); max-width: 34em; }

/* Home */
.hero { padding: 48px 0 24px; text-align: center; }
.hero img.icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.15); margin-bottom: 24px; }
.hero .lede { margin: 0 auto 28px; }
.pill { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-weight: 600; text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 28px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
.dot.p { background: var(--partner); }
.price { display: flex; gap: 14px; flex-wrap: wrap; }
.price .card { flex: 1 1 200px; }
.price strong { font: 600 28px "Fraunces", Georgia, serif; display: block; }

/* Legal pages */
.doc { padding: 24px 24px 56px; overflow-wrap: anywhere; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; }
.doc .caps { font-size: 14.5px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }


/* Website polish: shared readability and keyboard navigation. */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px 18px; background: #f5efe7; color: #221c18; z-index: 10; }
.skip-link:focus { top: 10px; }
html { scroll-padding-top: 24px; }
.home { --bg: #f5efe7; --card: #fffaf5; --ink: #28201b; --muted: #65594f; --line: #d9cbbb; --accent: #9e422a; --partner: #2f6f73; --section-bg: #eee5da; --featured-bg: #fff8f0; --button-bg: #a8412c; --button-ink: #fffaf5; --button-hover: #8d3523; color-scheme: light; }
@media (prefers-color-scheme: dark) {
 .home { --bg: #15171c; --card: #202229; --ink: #f5efe7; --muted: #beb8b0; --line: #36373c; --accent: #f0ac8c; --partner: #8abbb4; --section-bg: #1c1e24; --featured-bg: #24242a; --button-bg: #f0ac8c; --button-ink: #221c18; --button-hover: #ffc5a7; color-scheme: dark; }
}
.home .wrap { max-width: 1140px; padding-inline: 32px; }
.home header { border-bottom: 1px solid var(--line); padding: 14px 0; }
.home h2 { font-size: clamp(32px, 4.2vw, 48px); margin: 0 0 20px; letter-spacing: -.025em; }
.home h3 { font-size: clamp(29px, 3.2vw, 40px); margin: 0 0 20px; letter-spacing: -.02em; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--accent); margin-bottom: 20px; }
.home .hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 40px; text-align: left; padding-block: 56px; }
.home h1 { font-size: clamp(42px, 5vw, 66px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 24px; }
.home h1 em { font-style: normal; color: var(--accent); }
.home .hero .lede { font-size: 19px; line-height: 1.65; margin: 0 0 28px; max-width: 26em; }
.button { display: inline-flex; gap: 28px; align-items: center; justify-content: center; background: var(--button-bg, #a8412c); color: var(--button-ink, #fffaf5); padding: 14px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; min-height: 48px; }
.button:hover { background: var(--button-hover, #8d3523); }
.availability { color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.availability span { color: var(--partner); padding-right: 6px; font-size: 10px; }
.availability a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.availability a:hover { color: var(--accent); }
.film { margin: 0; }
.hero-product { position: relative; isolation: isolate; }
.hero-product::before { content: ""; position: absolute; inset: -5% -5% 10%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, #e8a68128, transparent 70%); pointer-events: none; }
.hero-product video { box-shadow: 0 24px 64px #0003; border: 1px solid #ffffff24; }
.film video { display: block; width: 100%; aspect-ratio: 1; border-radius: 22px; background: #f5efe7; color-scheme: dark; }
.film figcaption { font-size: 13px; line-height: 1.5; margin-top: 14px; color: var(--muted); }
.film figcaption span { display: block; margin-top: 4px; }
.intro-strip { border-block: 1px solid var(--line); }
.intro-strip .wrap { display: flex; justify-content: space-between; gap: 20px; padding-block: 21px; font-size: 13px; color: var(--muted); }
.section { padding-block: 80px; }
.section-heading { max-width: 620px; margin-bottom: 48px; }
.section-heading > p:last-child { color: var(--muted); }
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; margin-bottom: 56px; }
.feature-copy > p:not(.eyebrow) { color: var(--muted); }
.feature.reverse .feature-copy { order: 2; }
.product-still { margin: 0; background: #f5efe7; color: #6b5f57; border-radius: 24px; overflow: hidden; }
.product-still img { display: block; width: 100%; height: auto; }
.still-window { position: relative; aspect-ratio: 1; overflow: hidden; }
.still-window img { position: absolute; width: 130%; max-width: none; left: -15%; top: -22%; }
.product-still figcaption { text-align: center; padding: 0 16px 18px; font-size: 13px; }
.plain-list { list-style: none; padding: 0; margin: 24px 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.badge { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.memory-panel { --line: #d9cbbb; --muted: #65594f; --accent: #9e422a; background: #f5efe7; color: #221c18; padding: 48px; border-radius: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.memory-panel .feature-copy > p:not(.eyebrow) { color: var(--muted); }
.memory-figure { margin: 0; }
.memory-figure figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }
.memory-list > div { display: flex; gap: 20px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.memory-list > div:first-child { padding-top: 0; }
.memory-list > div > span { color: #9e422a; font-size: 12px; margin-top: 5px; }
.memory-list p { color: var(--muted); font-size: 15px; margin: 0; }
.memory-list strong { display: block; color: #221c18; margin-bottom: 3px; }
.plus-section { background: var(--section-bg); border-block: 1px solid var(--line); padding-block: 72px; }
.plans { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; }
.plan { padding: 32px; border: 1px solid var(--line); border-radius: 20px; }
.home .plan h3 { font-size: 27px; }
.plan.featured { border-color: #aa7b64; background: var(--featured-bg); }
.plan ul { padding-left: 20px; color: var(--muted); font-size: 15px; margin-bottom: 0; }
.plan li { padding: 7px 0; }
.plan li::marker { color: var(--accent); }
.plan-price { font: 600 38px "Fraunces", Georgia, serif; margin: 28px 0; }
.home .price { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 18px; }
.home .price strong { font-size: 38px; }
.price span, .price small { display: block; font-size: 13px; color: var(--muted); }
.price small { font-size: 12px; margin-top: 5px; }
.trial { color: var(--accent); font-size: 13px; }
.billing { color: var(--muted); font-size: 13px; max-width: 780px; margin: 24px 0 0; }
.privacy-note { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding-block: 80px; }
.privacy-note img { display: block; border-radius: 18px; margin-bottom: 24px; }
.privacy-copy { max-width: 640px; padding-top: 136px; }
.privacy-note p:not(.eyebrow) { color: var(--muted); }
.text-link { text-decoration-thickness: 1px; text-underline-offset: 5px; font-size: 15px; }
.faq-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding-block: 32px 72px; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 20px 0; font-weight: 600; }
details p { color: var(--muted); line-height: 1.7; }
.closing { padding-block: 64px 80px; text-align: center; border-top: 1px solid var(--line); }
.closing .button { margin-top: 24px; }
.home footer .wrap { align-items: center; }
.home footer p { margin: 0; }
.home footer small { font-size: 12px; }
.support-faq { margin-top: 36px; }
.support-faq details { scroll-margin-top: 24px; }
.support-faq summary { font-family: "Fraunces", Georgia, serif; font-size: 20px; line-height: 1.4; }
.support-faq details p { color: var(--ink); }
@media (max-width: 760px) {
 .home .wrap { padding-inline: 24px; }
 .home .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 34px 36px; }
 .home h1 { font-size: clamp(40px, 9vw, 60px); }
 .home .hero .lede { font-size: 17px; margin-bottom: 20px; }
 .hero-copy .eyebrow { font-size: 11px; margin-bottom: 14px; }
 .hero-product { max-width: 500px; width: 100%; margin-inline: auto; }
 .intro-strip .wrap { flex-wrap: wrap; gap: 8px 20px; justify-content: center; text-align: center; font-size: 12px; }
 .section { padding-block: 48px; }
 .feature, .memory-panel, .plans, .faq-section { grid-template-columns: 1fr; gap: 28px; }
 .feature { margin-bottom: 48px; }
 .feature.reverse .feature-copy { order: 0; }
 .product-still { max-width: 500px; width: 100%; margin-inline: auto; }
 .memory-panel { padding: 28px; }
 .plan { padding: 26px; }
 .plus-section { padding-block: 36px; }
 .privacy-note { grid-template-columns: 1fr; gap: 20px; padding-block: 48px; }
 .privacy-copy { padding-top: 0; }
 .privacy-note img { margin-bottom: 16px; }
 .privacy-note img { width: 54px; height: 54px; }
 .faq-section { padding-block: 12px 48px; }
 .section-heading { margin-bottom: 32px; }
 .home nav { gap: 16px; }
 .home nav a { font-size: 14px; }
 header .wrap { flex-wrap: wrap; gap: 6px 14px; }
 .doc { padding-inline: 24px; }
 .closing { padding-block: 48px; }
}
@media (max-width: 370px) {
 .home .wrap { padding-inline: 20px; }
 .home nav { gap: 14px; }
 .home h1 { font-size: 38px; }
 .home .price { grid-template-columns: 1fr; }
}
/* A quiet signature: warm/cool light meeting behind the real app. No content depends on motion. */
.hero-product::before { background: radial-gradient(ellipse at 28% 42%, #e8a68140, transparent 62%), radial-gradient(ellipse at 78% 58%, #8abbb42b, transparent 58%); }
.home h1 em { position: relative; display: inline-block; }
.home h1 em::after { content: ""; position: absolute; left: 2%; right: 0; bottom: -.1em; height: .12em; border-bottom: 1px solid currentColor; border-radius: 50%; opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
 @keyframes light-meets-light { from { transform: scale(.88) rotate(-5deg); opacity: .35; } to { transform: scale(1) rotate(0); opacity: 1; } }
 .hero-product::before { animation: light-meets-light 1.8s ease-out both; }
 @supports (animation-timeline: view()) {
  .intro-strip { position: relative; }
  .intro-strip::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 100%; height: 1px; background: var(--accent); transform-origin: left; animation: shared-line linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  @keyframes shared-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
 }
 @media (hover: hover) and (pointer: fine) {
  .button { transition: transform .2s ease, background-color .2s ease; }
  .button:hover { transform: translateY(-2px); }
 }
}

/* Feature stories: a swipeable row on phones (CSS only, no script); unchanged on wider screens. */
.story-nav { display: none; }
@media (max-width: 760px) {
 .story-nav { display: flex; align-items: center; gap: 8px; margin: -12px 0 8px; font-size: 12px; color: var(--muted); }
 .home .story-nav { gap: 8px; }
 .home .story-nav a { gap: 5px; font-size: 12px; min-height: 44px; padding: 4px 8px; border-bottom: 1px solid var(--line); color: var(--accent); }
 .story-nav a span { color: var(--ink); }
 .story-nav > span { margin-left: auto; }
 .feature-track > article { scroll-margin-top: 24px; }
 .feature-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
   margin-inline: -24px; padding: 4px 24px 12px; scroll-padding-inline: 24px; scrollbar-width: none; }
 .feature-track::-webkit-scrollbar { display: none; }
 .feature-track > article { flex: 0 0 86%; scroll-snap-align: start; margin: 0; }
 .feature-track > .feature { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; gap: 18px; }
 .feature-track .feature-copy h3 { font-size: 26px; }
 .feature-track .product-still { max-width: none; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) { .feature-track { scroll-behavior: smooth; } }

/* Every feature, collapsed by default (native <details>, no script). */
.all-features { margin-top: 28px; border: 1px solid var(--line); border-radius: 20px; }
.all-features summary { cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.all-features summary::-webkit-details-marker { display: none; }
.all-features summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 20px; line-height: 1; }
.all-features[open] summary::after { content: "–"; }
.all-features summary span { font-weight: 400; font-size: 14px; color: var(--muted); }
.feature-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 28px; padding: 4px 24px 24px; }
.feature-groups h4 { margin: 14px 0 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.feature-groups ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.feature-groups li { padding: 4px 0; }
.feature-groups li::marker { color: var(--accent); }
.plus-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border: 1px solid #aa7b64; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--accent); vertical-align: 1px; }
@media (max-width: 1000px) { .feature-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .feature-groups { grid-template-columns: 1fr; } .all-features summary { padding: 18px 20px; } .feature-groups { padding: 0 20px 20px; } }
@media print { .all-features > *:not(summary) { display: block; } }
@media print {
 body, .home { background: white; color: black; }
 .home { --ink: black; --muted: #444; --accent: #7e321f; }
 .film video { display: none; }
 .feature, .plan { break-inside: avoid; }
}

/* A small, useful dead-end recovery page. */
.not-found { min-height: 85svh; padding-block: clamp(48px, 12vh, 120px); text-align: center; }
.not-found .brand { justify-content: center; margin-bottom: 48px; }
.not-found .lede { margin: 24px auto; max-width: 26em; }
.not-found-help { margin: 28px 0 0; color: var(--muted); font-size: 15px; }

@media (max-width: 370px) {
 .feature-track { margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; }
}

/* ---------- Things you can try (app.js). Every state is readable without motion. ---------- */
.home { --glow: #E9B930; --partner-ink: #fffaf5; --spring: cubic-bezier(.3, 1.35, .5, 1); }
@media (prefers-color-scheme: dark) { .home { --partner-ink: #15171c; } }
@supports (transition-timing-function: linear(0, 1)) {
 .home { --spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001); }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The Overlap: right under the film. Watch, then try it with your own shifts. */
.try { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; padding-block: 24px 80px; }
.try-copy p:not(.eyebrow) { color: var(--muted); max-width: 26em; }
.overlap { margin: 0; display: grid; gap: 18px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 64px #0000001f; }
.overlap fieldset, .td-pick fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.overlap legend { padding: 0; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.overlap .them legend { color: var(--partner); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; }
.seg input, .lvl input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 15px; }
.seg input:checked + span { border-color: transparent; font-weight: 600; background: var(--button-bg); color: var(--button-ink); }
.them .seg input:checked + span { background: var(--partner); color: var(--partner-ink); }
.seg input:focus-visible + span, .lvl input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.strip { display: grid; grid-template-columns: 38px 1fr; column-gap: 8px; }
.whos, .tracks { display: grid; grid-template-rows: 32px 32px; row-gap: 10px; padding-top: 22px; }
.whos span { align-self: center; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.whos span + span { color: var(--partner); }
.tracks { position: relative; grid-template-rows: 32px 32px auto; }
.track { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.bar, .band { left: calc(var(--l) * 1%); width: calc(var(--w) * 1%); }
.bar { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.bar.work.me { background: var(--button-bg); color: var(--button-ink); font-weight: 600; }
.bar.work.them { background: var(--partner); color: var(--partner-ink); font-weight: 600; }
.bar.sleep { background: var(--line); color: var(--ink); }
.band { position: absolute; z-index: 1; top: 16px; height: 86px; border: 1.5px solid var(--glow); border-radius: 12px; background: color-mix(in srgb, var(--glow) 28%, transparent); pointer-events: none; }
.band i { position: absolute; top: -19px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; font-weight: 600; white-space: nowrap; }
.band.none { opacity: 0; }
.ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.answer { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.answer i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 6px color-mix(in srgb, var(--glow) 25%, transparent); }
.answer p { margin: 0; min-width: 0; }
.answer small, .answer span { display: block; font-size: 13px; color: var(--muted); }
.answer strong { display: block; font: 600 clamp(22px, 2.4vw, 27px)/1.25 "Fraunces", Georgia, serif; }
.overlap-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* The talk light: your phone on one side, Sam's Lock Screen on the other. */
.talk-figure { margin: 0; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.talk-figure figcaption { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.talk-demo { --lv: #E9B930; --lv-ink: #221c18; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.talk-demo[data-level="green"] { --lv: #3E9A62; --lv-ink: #14231a; }
.talk-demo[data-level="red"] { --lv: #C8372D; --lv-ink: #fff; }
.talk-demo [hidden] { display: none; }
.td-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.td-cap { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.td-pick, .td-pick fieldset { display: grid; gap: 8px; }
.td-pick legend { padding: 0; margin-bottom: 4px; font: 600 20px "Fraunces", Georgia, serif; }
.lvl { position: relative; }
.lvl span { display: grid; grid-template-columns: 14px 1fr; gap: 2px 10px; align-items: center; min-height: 52px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); }
.lvl i { grid-row: span 2; width: 14px; height: 14px; border-radius: 50%; background: var(--dot); }
.lvl b { font-size: 14px; }
.lvl small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.lvl input:checked + span { border-color: var(--dot); }
.td-btn { display: block; width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 14px; background: var(--ink); color: var(--bg); font: 600 15px "DM Sans", system-ui, sans-serif; cursor: pointer; }
.td-btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.td-on { display: grid; gap: 12px; justify-items: center; text-align: center; padding-top: 8px; }
.td-on > i { width: 60px; height: 60px; border-radius: 50%; background: var(--lv); box-shadow: 0 0 30px color-mix(in srgb, var(--lv) 75%, transparent); }
.td-state { margin: 0; }
.td-state strong { display: block; font-size: 16px; }
.td-state span, .td-thanks { font-size: 14px; color: var(--muted); }
.td-thanks { margin: 0; color: var(--ink); font-weight: 600; }
.lock { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 250px; padding: 18px 12px 12px; border-radius: 22px; background: #1b2130; color: #fff; text-align: center; transition: box-shadow .4s ease; }
.talk-demo[data-state="on"] .lock { box-shadow: 0 0 0 2px var(--lv), 0 0 44px -6px var(--lv); }
.lock p { margin: 0; }
.lock-date { font-size: 13px; opacity: .85; }
.lock-time { font: 600 52px/1.1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif; }
.lock-empty { margin-top: auto !important; padding: 14px; font-size: 13px; opacity: .7; }
.la { margin-top: auto; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px; border-radius: 18px; background: #fffaf5; color: #221c18; text-align: left; }
.la > i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--lv); box-shadow: 0 0 10px color-mix(in srgb, var(--lv) 70%, transparent); }
.la p { flex: 1 1 110px; min-width: 0; }
.la strong, .la span { display: block; }
.la strong { font-size: 15px; line-height: 1.3; }
.la span { font-size: 12.5px; color: #6b5f57; }
.la-here { flex: 1 0 auto; min-height: 44px; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--lv); color: var(--lv-ink); font: 600 14px "DM Sans", system-ui, sans-serif; cursor: pointer; }
.la-here:focus-visible { outline-color: #221c18; outline-offset: 3px; }

/* The film now closes the page: the maker's story, after the couple's. */
@media (max-width: 760px) { .try { grid-template-columns: 1fr; gap: 20px; padding-block: 8px 48px; } }

@media (max-width: 1000px) { .talk-demo { grid-template-columns: 1fr; } .lock { min-height: 220px; } }
@media (max-width: 760px) {
 .overlap { padding: 18px; gap: 16px; }
 .talk-figure { padding: 0; border: 0; background: none; }
}
@media (max-width: 370px) { .seg span { font-size: 14px; } .bar { font-size: 10px; } .strip { grid-template-columns: 32px 1fr; } }
@media (prefers-reduced-motion: no-preference) {
 .bar, .band { transition: left .75s var(--spring), width .75s var(--spring), opacity .3s ease; }
 .seg span, .lvl span { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
 @keyframes found { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
 .answer.lit i { animation: found .7s var(--spring) both; }
 @keyframes arrives { from { opacity: 0; transform: translateY(22px) scale(.94); } to { opacity: 1; transform: none; } }
 .la { animation: arrives .7s var(--spring) both; }
 @keyframes glows { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
 .td-on > i { animation: glows .6s var(--spring) both; }
}
@media print { .overlap fieldset, .talk-demo .td-btn { display: none; } }

/* Phones: each story card is as tall as its own content (the row no longer stretches to the tallest),
   and the talk light demo is compact so it doesn't set the pace for the others. */
@media (max-width: 760px) {
 .feature-track { align-items: flex-start; }
 .talk-demo { gap: 12px; }
 .lock { min-height: 0; padding: 12px 10px 10px; border-radius: 18px; }
 .lock-time { font-size: 40px; }
 .lock-empty { padding: 10px 6px 4px; }
 .td-pick legend { font-size: 18px; }
 .lvl span { min-height: 46px; padding: 7px 10px; }
 .lvl small { display: none; }
 .lvl span { grid-template-columns: 14px 1fr; }
 .td-on { padding-top: 0; gap: 10px; }
 .td-on > i { width: 44px; height: 44px; }
}

/* Phones: the three story cards share one shape. Copy (eyebrow, two-line title, one paragraph, badge),
   then a visual in a frame of the same height, then a one-line caption. Frames sit at the bottom so
   they line up from card to card while you swipe. */
@media (max-width: 760px) {
 .feature-track { align-items: stretch; --frame: 340px; }
 .feature-track > article { display: flex; flex-direction: column; align-items: stretch; gap: 18px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
 .feature-track > .memory-panel { --line: inherit; --muted: inherit; --accent: inherit; }
 .feature-track .feature-copy h3 { font-size: 26px; }
 .feature-track .feature-copy > p:not(.eyebrow) { margin-bottom: 14px; }
 .feature-track .plain-list { display: none; }
 .feature-track > article > figure { margin: auto 0 0; padding: 0; border: 0; background: none; max-width: none; }
 .feature-track > article > figure > figcaption { margin: 10px 0 0; padding: 0; text-align: center; font-size: 13px; color: var(--muted); }

 /* one frame size for all three */
 .feature-track .still-window, .feature-track .talk-demo, .feature-track .memory-list {
   height: var(--frame); border-radius: 18px; border: 1px solid var(--line); overflow: hidden; }
 .feature-track .still-window { aspect-ratio: auto; background: #f5efe7; }
 .feature-track .still-window img { width: 186%; left: -43%; top: -21%; }

 /* the talk light, one screen at a time: your phone, then Sam's Lock Screen, then yours again */
 .feature-track .talk-demo { display: block; padding: 14px; background: var(--bg); }
 .feature-track .talk-demo .td-side { height: 100%; justify-content: center; }
 .feature-track .talk-demo[data-state="idle"] .td-side + .td-side,
 .feature-track .talk-demo[data-state="answered"] .td-side + .td-side,
 .feature-track .talk-demo[data-state="on"] .td-side:first-child { display: none; }
 .feature-track .lock { flex: 0 0 auto; }

 /* the memories list as a framed visual */
 .feature-track .memory-list { display: flex; flex-direction: column; justify-content: center; padding: 6px 18px; background: var(--bg); }
 .feature-track .memory-list > div { padding: 14px 0; }
 .feature-track .memory-list > div:first-child { padding-top: 14px; }
 .feature-track .memory-list > div:last-child { border-bottom: 0; }
 .feature-track .memory-list > div > span { color: var(--accent); }
 .feature-track .memory-list strong { color: var(--ink); }
}

/* Page-to-page transitions (cross-document view transitions). The header holds still while the page
   fades. Browsers without support, and anyone with reduced motion on, just navigate as usual. */
@media (prefers-reduced-motion: no-preference) {
 @view-transition { navigation: auto; }
 header { view-transition-name: site-header; }
 ::view-transition-group(root) { animation-duration: .32s; }
 ::view-transition-old(root), ::view-transition-new(root) { animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
}

/* Hero entrance: the headline and its lines arrive one after another, like a light coming on. */
@media (prefers-reduced-motion: no-preference) {
 @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
 .home .hero-copy > *, .not-found > * { animation: rise .7s cubic-bezier(.22, 1, .36, 1) backwards; }
 .home .hero-copy > :nth-child(2), .not-found > :nth-child(2) { animation-delay: .06s; }
 .home .hero-copy > :nth-child(3), .not-found > :nth-child(3) { animation-delay: .14s; }
 .home .hero-copy > :nth-child(4), .not-found > :nth-child(4) { animation-delay: .22s; }
 .home .hero-copy > :nth-child(5), .not-found > :nth-child(5) { animation-delay: .3s; }
 .not-found > :nth-child(6) { animation-delay: .36s; }
}

/* Scroll reveals: sections ease up as they enter. Pure CSS; without support, or with reduced motion,
   everything simply shows. Phone story cards live in a sideways scroller, so they are left alone. */
@media (prefers-reduced-motion: no-preference) {
 @supports (animation-timeline: view()) {
  @keyframes reveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  .section-heading, .plan, .all-features, .privacy-note > div, .faq-section > div, .closing > * {
   animation: reveal linear backwards; animation-timeline: view(); animation-range: entry 0% entry 50%;
  }
  .plan.featured { animation-range: entry 8% entry 60%; }
  @media (min-width: 761px) {
   .feature, .memory-panel { animation: reveal linear backwards; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
 }
}

/* Small touches: press feedback, a quiet underline on nav links, and a smooth FAQ. */
@media (prefers-reduced-motion: no-preference) {
 .button, .td-btn, .la-here { transition: transform .15s ease, background-color .2s ease; }
 .button:active, .td-btn:active, .la-here:active { transform: scale(.97); }
 nav:not(.story-nav) a { position: relative; }
 nav:not(.story-nav) a::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% + .8em); height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
 nav:not(.story-nav) a:hover::after, nav:not(.story-nav) a:focus-visible::after, nav a[aria-current]::after { transform: scaleX(1); }
}
.faq-list summary, .support-faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.faq-list summary::-webkit-details-marker, .support-faq summary::-webkit-details-marker { display: none; }
.faq-list summary::after, .support-faq summary::after { content: "+"; flex: none; color: var(--accent); font-size: 22px; line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
 .faq-list summary::after, .support-faq summary::after { transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
 .faq-list details[open] > summary::after, .support-faq details[open] > summary::after { transform: rotate(45deg); }
 @supports (interpolate-size: allow-keywords) {
  details { interpolate-size: allow-keywords; }
  details::details-content { block-size: 0; overflow: clip; transition: block-size .3s cubic-bezier(.22, 1, .36, 1), content-visibility .3s allow-discrete; }
  details[open]::details-content { block-size: auto; }
 }
}
@media (prefers-reduced-motion: reduce) { .faq-list details[open] > summary::after, .support-faq details[open] > summary::after { content: "–"; } }

/* A last bit of warm light under the closing line and the 404, echoing the hero. */
.closing, .not-found { position: relative; isolation: isolate; }
.closing::before, .not-found::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 36% 62% at 34% 55%, #e8a68138, transparent), radial-gradient(ellipse 32% 56% at 68% 50%, #8abbb426, transparent); }
