/* Valo Sleep website
   Colors, type and shapes follow the iOS app (DesignSystem/Color+Valo.swift).
   Headings use Apple's serif (New York) like the app's onboarding; body uses the system font (SF Pro on Apple devices). */

:root {
  --bg: #070A14;
  --sky-center: #1A2650;
  --sky-mid: #0D1428;
  --sky-outer: #050810;

  --card-top: rgba(30, 41, 79, 0.6);
  --card-bottom: rgba(18, 22, 40, 0.8);
  --card-border: rgba(56, 189, 248, 0.15);
  --line: rgba(255, 255, 255, 0.09);

  --accent: #38BDF8;
  --accent-light: #7DD3FC;
  --accent-pale: #BAE6FD;
  --accent-ink: #04131C;
  --orange: #FB923C;
  --indigo: #818CF8;
  --green: #5CC06B;

  --text: #F0EEF6;
  --text-2: #C8CDDE;
  --text-3: #ABB0C2;
  --text-4: #9297AA;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(72px, 10vw, 120px);
  --radius-card: 24px;
  --radius-button: 16px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent-pale); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.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; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-top: var(--section-space); }

/* Type */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, .serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 6.2vw, 80px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.08; margin-top: 14px; max-width: 18em; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.lead { margin-top: 16px; font-size: clamp(17px, 1.5vw, 20px); color: var(--text-2); max-width: 34em; }
.section-head.center { text-align: center; }
.section-head.center h2, .section-head.center .lead { margin-inline: auto; }
.accent { color: var(--accent-light); }
.muted { color: var(--text-3); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button:hover { background: var(--accent-light); color: var(--accent-ink); }
.button-outline { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.18); }
.button-outline:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.button-small { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 14px; }
.app-store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.app-store-badge img { height: 54px; width: auto; }

/* Cards */
.card {
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--card-border);
  padding: clamp(24px, 3vw, 36px);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--text-2); }
.chip { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.chip.is-on { background: rgba(56, 189, 248, 0.14); color: var(--accent-pale); }
.check-list { display: flex; flex-direction: column; gap: 12px; color: var(--text-2); font-size: 16px; }
.check-list li { display: flex; gap: 10px; }
.check-list .ic { margin-top: 2px; color: var(--green); }
.check-list.blue .ic { color: var(--accent-light); }

/* Header */
.site-header.overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.site-nav { display: flex; gap: 32px; font-size: 15px; }
.site-nav a { color: var(--text-2); }
.site-nav a:hover { color: var(--text); }
@media (max-width: 900px) { .site-nav { display: none; } }

/* Hero */
.hero {
  background-color: #060914;
  background-image:
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 10, 20, 0) 22%),
    linear-gradient(90deg, rgba(6, 9, 20, 0.94) 0%, rgba(6, 9, 20, 0.72) 34%, rgba(6, 9, 20, 0) 62%),
    url("../img/hero.jpg");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}
.hero-inner { min-height: clamp(600px, 56vw, 800px); display: flex; flex-direction: column; justify-content: center; padding-block: calc(84px + clamp(24px, 4vw, 56px)) clamp(56px, 7vw, 96px); }
.hero-copy { max-width: 600px; }
.pill { display: inline-block; padding: 7px 14px; border-radius: 999px; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.3); color: var(--accent-light); margin-bottom: 26px; }
.hero .lead { margin-top: 24px; color: #D5D9E6; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); font-weight: 500; }
.text-link:hover { color: var(--accent-light); }
.hero-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: 15px; color: var(--text-3); }
.hero-checks li { display: inline-flex; align-items: center; gap: 8px; }
.hero-checks .ic { width: 18px; height: 18px; color: var(--green); }
.hero-image-mobile { display: none; width: 100%; height: auto; margin-top: 36px; border-radius: 24px; }
@media (max-width: 820px) {
  .hero { background-image: none; }
  .hero-inner { min-height: 0; padding-bottom: 8px; }
  .hero-image-mobile { display: block; }
}

/* Why one routine */
.why-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 44px; }
.why-apps { flex: 1 1 440px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.why-apps li { padding: 20px; border-radius: 18px; border: 1px dashed rgba(255, 255, 255, 0.16); color: var(--text-3); font-size: 15px; }
.why-apps .ic { width: 22px; height: 22px; margin-bottom: 10px; }
.why-apps strong { display: block; color: var(--text-2); font-size: 16px; font-weight: 600; }
.why-arrow { flex: none; margin: 0 auto; color: var(--accent-light); }
.why-arrow .ic { width: 36px; height: 36px; }
.why-valo { flex: 1 1 340px; min-width: 0; border-color: rgba(56, 189, 248, 0.45); box-shadow: 0 20px 80px rgba(56, 189, 248, 0.12); background: linear-gradient(180deg, rgba(30, 41, 79, 0.85), rgba(18, 22, 40, 0.95)); }
.why-valo-head { display: flex; align-items: center; gap: 14px; }
.why-valo-head img { width: 56px; height: 56px; border-radius: 14px; }
.why-valo-head strong { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.why-valo p { margin: 16px 0 18px; color: var(--text-2); }
.why-valo .check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: 15px; }
@media (max-width: 820px) { .why-arrow { transform: rotate(90deg); } }

/* How it works: real app screens */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 48px; counter-reset: step; }
.step { text-align: center; }
.phone {
  margin: 0 auto;
  max-width: 290px;
  padding: 8px;
  border-radius: 50px;
  background: #161B29;
  box-shadow: 0 30px 80px rgba(2, 4, 12, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone img { width: 100%; height: auto; border-radius: 42px; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-top: 28px; border-radius: 50%; background: rgba(56, 189, 248, 0.14); color: var(--accent-light); font-weight: 600; font-size: 15px; }
.step h3 { margin-top: 12px; }
.step p { margin-top: 4px; color: var(--text-3); font-size: 16px; }
@media (max-width: 820px) {
  .steps {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(76%, 290px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { scroll-snap-align: center; }
}

/* Problems */
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 44px; }
.problem-card { overflow: hidden; padding: 0; }
.problem-media { position: relative; aspect-ratio: 4 / 3; }
.problem-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.problem-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 8, 16, 0.95) 0%, rgba(5, 8, 16, 0.35) 55%, rgba(5, 8, 16, 0) 100%); }
.problem-quote { position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 16px; font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.2; }
.problem-help { padding: 18px 22px 22px; color: var(--text-2); font-size: 16px; }

/* Inside the routine */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.span-2 { grid-column: span 2; }
.bento .card-label { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.bento h3 { margin: 10px 0 8px; font-family: var(--serif); font-size: 27px; }
.bento p { color: var(--text-2); }
.bento .chips { margin-top: 18px; }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.split > :first-child { flex: 1 1 280px; min-width: 0; }
.split > :last-child { flex: 1 1 260px; min-width: 0; }
.shield {
  max-width: 260px;
  margin: 0 auto;
  padding: 26px 22px;
  border-radius: 22px;
  background: radial-gradient(90% 70% at 50% 0%, var(--sky-center), var(--sky-mid) 60%, var(--sky-outer));
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}
.shield-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: rgba(56, 189, 248, 0.12); color: var(--accent-light); }
.shield-icon .ic { width: 24px; height: 24px; }
.shield strong { display: block; margin: 14px 0 6px; font-size: 21px; font-weight: 600; }
.shield span { display: block; font-size: 14px; line-height: 1.45; color: var(--accent-light); }
.mic-orb { position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin: 6px 0 18px; }
.mic-orb::before, .mic-orb::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(56, 189, 248, 0.2); }
.mic-orb::before { inset: 0; }
.mic-orb::after { inset: 15px; border-color: rgba(56, 189, 248, 0.34); }
.mic-orb span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 40px rgba(56, 189, 248, 0.5); }
.mic-orb .ic { width: 26px; height: 26px; }
@media (max-width: 900px) { .bento { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }

/* Habit */
.habit { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.habit > * { flex: 1 1 420px; min-width: 0; }
.habit-visual { display: flex; flex-direction: column; gap: 14px; }
.notification { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); }
.notification img { width: 40px; height: 40px; border-radius: 10px; }
.notification-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-3); }
.notification-meta span:first-child { text-transform: uppercase; letter-spacing: 0.06em; }
.notification strong { display: block; margin-top: 2px; font-size: 15px; }
.notification p { font-size: 15px; line-height: 1.4; color: var(--text-2); }
.streak-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.streak-head strong { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.streak-bars, .streak-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.streak-bars { align-items: end; height: 92px; margin-top: 18px; }
.streak-bars span { height: 20px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); }
.streak-bars span.is-on { height: 80px; background: var(--accent); }
.streak-days { margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-3); }
.streak-note { margin-top: 14px; font-size: 14px; color: var(--text-3); }

/* Privacy */
.privacy { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.privacy > :first-child { flex: 1 1 360px; min-width: 0; }
.privacy-list { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px 32px; }
.privacy-list .ic { width: 26px; height: 26px; color: var(--accent-light); }
.privacy-list h3 { margin: 12px 0 4px; font-size: 18px; }
.privacy-list p { color: var(--text-3); font-size: 16px; }

/* Pricing */
.plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 44px; }
.plan { flex: 1 1 340px; max-width: 480px; min-width: 0; display: flex; flex-direction: column; }
.plan-free { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); }
.plan-pro { background: linear-gradient(180deg, rgba(30, 41, 79, 0.85), rgba(18, 22, 40, 0.95)); border-color: rgba(56, 189, 248, 0.45); box-shadow: 0 20px 80px rgba(56, 189, 248, 0.12); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan h3 { font-family: var(--serif); font-size: 25px; }
.badge { padding: 5px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.price { margin-top: 10px; font-family: var(--serif); font-size: 48px; font-weight: 600; line-height: 1.1; }
.price small { font-family: var(--sans); font-size: 17px; font-weight: 500; color: var(--text-3); }
.price-note { margin: 6px 0 24px; color: var(--text-3); font-size: 15px; }
.plan .check-list { flex: 1; }
.plan .button { margin-top: 30px; width: 100%; }
.fine-print { max-width: 620px; margin: 20px auto 0; text-align: center; font-size: 14px; color: var(--text-4); }

/* FAQ */
.faq { max-width: 860px; margin-top: 36px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-light); }
.faq summary .ic { color: var(--text-3); transition: transform 0.2s ease; }
.faq details[open] summary .ic { transform: rotate(45deg); color: var(--accent-light); }
.faq details p { padding: 0 40px 22px 0; color: var(--text-3); }

/* Contact page */
.page { padding-top: clamp(32px, 6vw, 72px); }
.page-title { margin-top: 14px; font-size: clamp(38px, 5vw, 58px); line-height: 1.05; }
.site-nav a[aria-current="page"] { color: var(--text); }
.faq-more { margin-top: 28px; color: var(--text-3); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.contact > :first-child { flex: 1 1 340px; min-width: 0; }
.contact-card { flex: 1 1 520px; min-width: 0; }
.contact-email { margin-top: 22px; color: var(--text-3); font-size: 16px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; color: var(--text-2); }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 8, 16, 0.5);
  color: var(--text);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .button { align-self: flex-start; }
.form-status { font-size: 15px; color: var(--text-3); }
.form-status.is-error { color: var(--orange); }
.form-success { padding: 24px 0; text-align: center; }
.form-success .success-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: rgba(92, 192, 107, 0.16); color: var(--green); }
.form-success h2 { margin: 16px 0 6px; max-width: none; font-size: 24px; }
.form-success p { color: var(--text-3); }
.hidden-field { display: none; }

/* Final call to action */
.final { display: flex; flex-wrap: wrap; align-items: stretch; overflow: hidden; border-radius: 32px; background: #111833; border: 1px solid rgba(56, 189, 248, 0.18); }
.final-copy { flex: 1 1 420px; min-width: 0; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.final-copy > img { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 26px; }
.final-copy .lead { margin-bottom: 30px; }
.final-art { flex: 1 1 420px; min-width: 0; min-height: 340px; position: relative; }
.final-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.site-footer { margin-top: var(--section-space); border-top: 1px solid rgba(255, 255, 255, 0.07); }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 32px 48px; font-size: 15px; color: var(--text-4); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand strong { color: var(--text-2); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--text); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 0; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal .legal-meta { margin-top: 14px; color: var(--text-3); font-size: 15px; }
.legal h2 { margin-top: 44px; font-size: clamp(24px, 3vw, 30px); max-width: none; }
.legal h3 { margin-top: 28px; font-size: 19px; }
.legal p, .legal li { color: var(--text-2); }
.legal p { margin-top: 14px; }
.legal ul { margin-top: 12px; padding-left: 22px; list-style: disc; }
.legal li { margin-top: 8px; }
.legal li::marker { color: var(--text-4); }
.legal ul ul { margin-top: 6px; list-style: circle; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .summary { margin-top: 28px; }

/* Simple pages (thank you, 404) */
.simple-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px var(--gutter) 0; }
.simple-page .lead { margin-inline: auto; }
.simple-page .button { margin-top: 32px; }
