/* Hypnofy website. Colors follow the app's palette (ios/Hypnofy/Theme/Theme.swift):
   a night sky over deep water in dark mode, icy blues on a pale ground in light mode. */

:root {
  --bg: #04090f;
  --deep: #0b2133;
  --surface: rgba(150, 205, 240, 0.07);
  --surface-strong: rgba(150, 205, 240, 0.13);
  --ink: #eaf3f9;
  --muted: #a6bccb;
  --faint: #7d96a7;
  --line: rgba(190, 225, 245, 0.16);
  --accent: #8dcaeb;
  --on-accent: #04111b;
  --soft: rgba(141, 202, 235, 0.16);
  --warn: #f2c48d;
  --ice: #8dcaeb;
  --stars: 1;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f8fb;
    --deep: #d6e6f0;
    --surface: rgba(255, 255, 255, 0.66);
    --surface-strong: #fff;
    --ink: #12212c;
    --muted: #465f6f;
    --faint: #5f7888;
    --line: rgba(20, 60, 90, 0.15);
    --accent: #245b82;
    --on-accent: #fff;
    --soft: rgba(36, 91, 130, 0.11);
    --warn: #8a4f0c;
    --ice: #6fa3c8;
    --stars: 0;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg) 0, var(--deep) 900px, var(--deep) 100%) var(--deep);
  color: var(--ink);
  font: 400 17px/1.6 "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Faint stars near the top, dark mode only. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  opacity: calc(var(--stars) * 0.7);
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 42%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent),
    radial-gradient(1px 1px at 63% 30%, #fff, transparent),
    radial-gradient(1px 1px at 78% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 36%, #fff, transparent),
    radial-gradient(1px 1px at 7% 60%, #fff, transparent),
    radial-gradient(1px 1px at 52% 58%, #fff, transparent),
    radial-gradient(1px 1px at 94% 64%, #fff, transparent);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { position: relative; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Header and footer */

.site-header { position: relative; z-index: 1; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 20px; letter-spacing: 0.01em; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .fine { margin-top: 32px; color: var(--faint); font-size: 13px; }

/* Type */

.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
h1, h2, h3 { font-weight: 300; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 64px); letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4vw, 40px); }
h3 { font-size: 20px; font-weight: 500; }
.lede { font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 34em; margin: 20px 0 0; }
.muted { color: var(--muted); }

/* Buttons */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.small { font-size: 14px; color: var(--faint); margin-top: 14px; }

/* Hero */

.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 440px; justify-self: center; width: 100%; }
.hero-art::before { content: ""; position: absolute; inset: 6% 4% 30% 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 203, 245, 0.45), rgba(60, 149, 204, 0.14) 55%, transparent); }
.berg { position: relative; width: 100%; height: 100%; overflow: visible; }
.berg .float { animation: float 7s ease-in-out infinite alternate; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .berg .float { animation: none; } }

/* Sections */

section { padding: 72px 0 0; }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin: 14px 0 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }
.card.strong { background: var(--surface-strong); }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 64px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 22px; left: 26px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-weight: 500; font-size: 15px; }

.arc { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
.arc li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.arc strong { display: block; font-weight: 500; margin-bottom: 4px; }
.arc span { color: var(--muted); font-size: 15px; }

.check { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.check li { padding-left: 28px; position: relative; color: var(--muted); }
.check li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.plan .price-note { font-size: 14px; color: var(--faint); margin-top: 16px; }
.badge { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--soft); border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }

.person { display: flex; gap: 18px; align-items: flex-start; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-weight: 500; font-size: 18px; }
.person .role { color: var(--accent); font-size: 14px; margin: 2px 0 10px; }

.note { border-left: 3px solid var(--warn); background: var(--surface); border-radius: 0 16px 16px 0; padding: 18px 22px; color: var(--muted); }
.note strong { color: var(--ink); font-weight: 500; }

/* Long-form pages (terms, privacy, legal, support) */

.page-head { padding: 40px 0 8px; }
.page-head .updated { color: var(--faint); font-size: 14px; margin-top: 14px; }
.prose { margin-top: 32px; }
.prose h2 { font-size: 26px; font-weight: 400; margin: 44px 0 12px; scroll-margin-top: 24px; }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.toc { margin-top: 28px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; margin: 10px 0; }
summary { cursor: pointer; padding: 18px 0; font-weight: 500; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 0 18px; color: var(--muted); }
details > div p { margin: 0 0 10px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
th { color: var(--ink); font-weight: 500; }
.table-scroll { overflow-x: auto; }

/* Phone widths */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 16px; }
  .hero-art { max-width: 300px; grid-row: 1; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .arc { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .cols > :first-child { grid-column: 1 / -1; }
  .toc ol { columns: 1; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav { gap: 16px; }
  section { padding-top: 56px; }
  .card { padding: 22px; }
  .steps .card::before { left: 22px; }
}

/* Details still to be filled in before launch. */
.todo { color: var(--warn); font-weight: 500; }

/* Pre-launch banner above the header. */
.announce { position: relative; z-index: 1; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.announce .wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; padding-top: 10px; padding-bottom: 10px; text-align: center; }
.announce .badge { margin: 0; }
