/* hushday.app – the "Dusk" palette of the app (apps/hushday/src/theme/palette.ts), no web fonts. */

:root {
  --bg: #f3f4f6;
  --surface: #fbfbfa;
  --surface-2: #e9ecf0;
  --border: #d5dae1;
  --text: #1f2733;
  --muted: #5a6474;
  --primary: #3a5578;
  --on-primary: #f7f5f0;
  --primary-soft: #e3e9f1;
  --positive: #3f6b55;
  --shadow: 0 18px 50px rgba(31, 39, 51, 0.16);
  --rounded: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #12161c;
  --surface: #1b2129;
  --surface-2: #232a34;
  --border: #354050;
  --text: #e4e8ee;
  --muted: #a3adbb;
  --primary: #a8bdd6;
  --on-primary: #16202c;
  --primary-soft: #25303d;
  --positive: #9ccbb2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #12161c;
    --surface: #1b2129;
    --surface-2: #232a34;
    --border: #354050;
    --text: #e4e8ee;
    --muted: #a3adbb;
    --primary: #a8bdd6;
    --on-primary: #16202c;
    --primary-soft: #25303d;
    --positive: #9ccbb2;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

/* Without JavaScript the picker still works on the page it is on. */
:root:has(#theme-light:checked) {
  --bg: #f3f4f6;
  --surface: #fbfbfa;
  --surface-2: #e9ecf0;
  --border: #d5dae1;
  --text: #1f2733;
  --muted: #5a6474;
  --primary: #3a5578;
  --on-primary: #f7f5f0;
  --primary-soft: #e3e9f1;
  --positive: #3f6b55;
  --shadow: 0 18px 50px rgba(31, 39, 51, 0.16);
  color-scheme: light;
}

:root:has(#theme-dark:checked) {
  --bg: #12161c;
  --surface: #1b2129;
  --surface-2: #232a34;
  --border: #354050;
  --text: #e4e8ee;
  --muted: #a3adbb;
  --primary: #a8bdd6;
  --on-primary: #16202c;
  --primary-soft: #25303d;
  --positive: #9ccbb2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--sans);
}

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

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

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

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

h1,
h2,
h3 {
  font-family: var(--rounded);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 700 1.25rem/1 var(--rounded);
}

.brand svg {
  width: 36px;
  height: 36px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav > a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav > a:hover,
.site-nav > a[aria-current='page'] {
  color: var(--text);
}

.theme-picker {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin: 0;
  background: var(--surface);
}

.theme-picker legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.theme-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-picker label {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.theme-picker input:checked + label {
  background: var(--primary-soft);
  color: var(--text);
}

.theme-picker input:focus-visible + label {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 72px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 36em;
}

.availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
}

.phone {
  margin: 0;
  justify-self: center;
  max-width: 330px;
}

.phone img,
.screen img {
  border-radius: 34px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.phone figcaption,
.screen figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 14px;
  text-align: center;
}

/* Sections */

section {
  padding: 56px 0;
}

.section-intro {
  max-width: 44em;
  margin-bottom: 32px;
}

.section-intro p {
  color: var(--muted);
}

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

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

.card p {
  color: var(--muted);
  margin: 0;
}

.screens {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: start;
}

.screen {
  margin: 0;
}

.screens-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 18px;
}

.privacy-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px;
}

.promise-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.promise-list li {
  padding-left: 30px;
  position: relative;
}

.promise-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--positive);
  border-bottom: 2.5px solid var(--positive);
  transform: rotate(-45deg);
}

.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.price {
  font: 700 1.5rem/1.25 var(--rounded);
  color: var(--text);
  margin: 12px 0 8px;
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font: 700 1.1rem/1.35 var(--rounded);
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* The open/closed sign, since a flex summary loses the browser's own marker. */
.faq summary::after {
  content: '+';
  flex: none;
  font: 400 1.6rem/1 var(--sans);
  color: var(--muted);
}

.faq details[open] > summary::after {
  content: '–';
}

.faq details p {
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 48em;
}

/* Legal and support pages */

.doc {
  max-width: 740px;
  padding: 24px 0 72px;
}

.doc h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.doc h2 {
  font-size: 1.35rem;
  margin-top: 2em;
}

.doc .updated {
  color: var(--muted);
}

.doc .summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

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

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

.table-scroll {
  overflow-x: auto;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px 10px 0;
}

.doc th {
  color: var(--muted);
  font-weight: 600;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.site-footer nav a {
  color: var(--muted);
}

/* Narrow screens */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .screens {
    grid-template-columns: repeat(4, minmax(210px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .screen {
    scroll-snap-align: start;
  }

  .privacy-panel,
  .pricing {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .privacy-panel {
    padding: 24px;
  }

  .site-nav {
    gap: 12px;
  }
}

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