/* Sonavie website. Same palette as the app (CLAUDE.md), light/dark follows the device.
   Contrast (WCAG AA): text #1E5752 on #BFE8E3 = 6.25:1, links #276E68 on #BFE8E3 = 4.51:1,
   dark text #E6F4F2 on #0F2A2B = 13.4:1, links #4FB8AE on #0F2A2B = 6.35:1. */

:root {
  --bg: #BFE8E3;
  --surface: #EAF7F5;
  --accent: #4FB8AE;
  --on-accent: #0F2A2B;
  --text: #1E5752;
  --text-2: #276E68;
  --link: #276E68;
  --coral: #F6C3A8;
  --ring: rgba(79, 184, 174, 0.55);
  --shadow: 0 10px 30px rgba(15, 42, 43, 0.12);
  --radius: 20px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F2A2B;
    --surface: #163B3C;
    --text: #E6F4F2;
    --text-2: #A8CEC9;
    --link: #4FB8AE;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 7vw, 3rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 650; }

p { margin: 0 0 1em; }

.container {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
}

.narrow {
  width: min(100% - 32px, 680px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}

.skip-link:focus {
  top: 16px;
}

/* Header */

.site-header {
  padding: 16px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* Logo: its pastel circle matches the light background, so a thin ring keeps it visible. */

.logo {
  position: relative;
  width: 140px;
  margin: 0 auto 20px;
}

.logo::after {
  content: "";
  position: absolute;
  inset: 8.3%;
  border-radius: 50%;
  border: 2px solid var(--ring);
}

/* Hero */

.hero {
  text-align: center;
  padding: 32px 0 24px;
}

.hero .lead {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  color: var(--text-2);
  max-width: 34ch;
  margin: 0 auto 20px;
}

.badge {
  display: inline-block;
  background: var(--coral);
  color: var(--on-accent);
  font-weight: 650;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 999px;
}

/* Screenshots */

.screens {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 24px 16px 32px;
  margin: 0 -16px;
}

.screens figure {
  flex: 0 0 min(70%, 260px);
  scroll-snap-align: center;
  margin: 0;
}

.screens img {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.screens figcaption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-2);
  margin-top: 10px;
}

@media (min-width: 820px) {
  .screens {
    justify-content: center;
    overflow: visible;
    margin: 0;
    padding-inline: 0;
  }
}

/* Features */

.features {
  display: grid;
  gap: 16px;
  padding: 8px 0 32px;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.card .icon svg {
  width: 24px;
  height: 24px;
}

.card p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--text-2);
}

/* Notify form */

.notify {
  text-align: center;
  padding: 28px 22px;
  margin: 8px auto 32px;
  max-width: 560px;
}

.notify form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.notify label.field {
  flex: 1 1 240px;
  text-align: left;
}

.notify input[type="email"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--text-2);
  border-radius: 999px;
  padding: 12px 18px;
}

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.05);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Honeypot: hidden from people and screen readers, bots fill it in. */
.honeypot {
  display: none;
}

.small {
  font-size: 0.9rem;
}

/* Notice */

.notice {
  border-left: 6px solid var(--coral);
}

/* Text pages */

.prose {
  padding: 16px 0 40px;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.4rem;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.faq details {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.faq summary {
  font-weight: 650;
  cursor: pointer;
}

.faq details[open] summary {
  margin-bottom: 8px;
}

/* Footer */

.site-footer {
  padding: 28px 0 40px;
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}

.site-footer p {
  color: var(--text-2);
  margin: 0;
}

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

.form-note {
  margin: 14px 0 0;
}

/* Screenshots share the light background colour: a thin ring separates them. */
.screens img {
  outline: 1px solid var(--ring);
  outline-offset: -1px;
}

.notify input[type="email"]::placeholder {
  color: var(--text-2);
  opacity: 0.85;
}

/* Small logo in the header gets the same thin ring as the large one. */
.brand img {
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--ring) inset;
}
