/*
 * GentleLibra website. Warm, calm and easy to read: large type, strong
 * contrast, generous spacing. Brand tones from the app (violet, coral,
 * amber, teal), softened over a warm cream page.
 */
:root {
  --page: #fbf7f1;
  --page-2: #f4ede4;
  --card: #ffffff;
  --ink: #241b33;
  --ink-soft: #4d4459;
  --line: #e6dccf;
  --violet: #5a3bd9;
  --violet-soft: #ece6ff;
  --coral: #d9434b;
  --coral-soft: #fde6e4;
  --amber: #b45f06;
  --amber-soft: #fcefd9;
  --teal: #0b7c72;
  --teal-soft: #dcf2ee;
  --plum: #2e2143;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(36, 27, 51, 0.05), 0 12px 32px rgba(36, 27, 51, 0.08);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #16121d;
    --page-2: #1d1826;
    --card: #231d2e;
    --ink: #f5f0fa;
    --ink-soft: #c9c0d4;
    --line: #362e43;
    --violet: #b3a1ff;
    --violet-soft: #2e2550;
    --coral: #ff8a8f;
    --coral-soft: #3d2228;
    --amber: #f5b454;
    --amber-soft: #3a2b16;
    --teal: #5fd6c6;
    --teal-soft: #15332f;
    --plum: #0f0b15;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem; /* 19px: comfortable without reading glasses */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--violet);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--card);
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 10;
}

.skip:focus {
  left: 16px;
}

.wrap {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 40px);
  margin-inline: auto;
}

section {
  padding: clamp(64px, 9vw, 112px) 0;
}

section[id] {
  scroll-margin-top: 72px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 14px;
}

.lede {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 36em;
}

.center {
  text-align: center;
}

.center .lede {
  margin-inline: auto;
}

/* Brand mark: the app icon's conic gradient with its white ring. */
.mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background:
    radial-gradient(circle, transparent 0 27%, #fff 29% 36%, transparent 38%),
    conic-gradient(from 210deg, #6d4aff, #f2545b, #d97706, #0d9488, #6d4aff);
  box-shadow: 0 6px 18px rgba(109, 74, 255, 0.3);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.top nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.top nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}

.top nav a:hover {
  color: var(--ink);
}

.top nav a.btn-primary {
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .top nav a.btn-primary {
    color: #16121d;
  }
}

@media (max-width: 820px) {
  .top nav a:not(.btn) {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font: 600 1.05rem/1 var(--sans);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--violet) 35%, transparent);
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    color: #16121d;
  }
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--card);
}

.top .btn {
  min-height: 46px;
  padding: 0 20px;
  font-size: 0.98rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(48px, 7vw, 88px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #6d4aff, #f2545b, #d97706, #0d9488, #6d4aff);
  filter: blur(120px);
  opacity: 0.16;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.hero h1 em {
  font-style: italic;
  color: var(--violet);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0 20px;
}

.soon {
  font-size: 1rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.soon::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px var(--teal-soft);
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* Phone mock-up of the Today screen, drawn in HTML so it stays sharp. */
.phone {
  justify-self: center;
  width: min(360px, 100%);
  padding: 14px;
  border-radius: 48px;
  background: #1b1622;
  box-shadow: 0 40px 80px rgba(36, 27, 51, 0.28), inset 0 0 0 2px #3a3245;
  transform: rotate(2deg);
}

.screen {
  border-radius: 36px;
  background: #f4f2fa;
  color: #16141f;
  padding: 22px 16px 24px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.screen-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 6px 14px;
}

.screen-head strong {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.screen-head span {
  color: #6b6880;
  font-size: 0.85rem;
}

.tile {
  background: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(22, 20, 31, 0.06);
}

.tile small {
  display: block;
  color: #6b6880;
  font-size: 0.8rem;
}

.tile.missed {
  border: 2px solid #e5484d;
}

.tile .tag {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tile.missed .tag {
  color: #c8363b;
}

.tile.refill .tag {
  color: #a35405;
}

.chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chips span {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.82rem;
  background: #efecf7;
}

.chips span:first-child {
  background: #6d4aff;
  color: #fff;
}

.dose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tick {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1f9d55;
  color: #fff;
  font-weight: 700;
}

.tick.todo {
  background: none;
  border: 2px solid #c9c3dc;
}

/* Sound familiar? */
.familiar {
  background: var(--page-2);
}

.quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.quotes blockquote {
  margin: 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 30px;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.45;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--accent, var(--violet));
}

.quotes blockquote:nth-child(2) {
  --accent: var(--coral);
}

.quotes blockquote:nth-child(3) {
  --accent: var(--amber);
}

.quotes blockquote:nth-child(4) {
  --accent: var(--teal);
}

.familiar .after {
  margin-top: 48px;
  font-size: 1.3rem;
}

@media (max-width: 720px) {
  .quotes {
    grid-template-columns: 1fr;
  }
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 56px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}

.feature p {
  color: var(--ink-soft);
  margin: 0;
}

.icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: var(--soft, var(--violet-soft));
  color: var(--tone, var(--violet));
}

.icon svg {
  width: 28px;
  height: 28px;
}

.coral {
  --soft: var(--coral-soft);
  --tone: var(--coral);
}

.amber {
  --soft: var(--amber-soft);
  --tone: var(--amber);
}

.teal {
  --soft: var(--teal-soft);
  --tone: var(--teal);
}

@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* Bad days */
.gentle .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 18px;
}

.checks li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: start;
}

.checks li::before {
  content: '';
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat,
    var(--teal);
}

.checks strong {
  display: block;
}

.checks span {
  color: var(--ink-soft);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}

.step::before {
  content: counter(step);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 1.8rem/1 var(--serif);
  background: var(--violet-soft);
  color: var(--violet);
}

.step h3 {
  margin-bottom: 0.25em;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .gentle .wrap {
    grid-template-columns: 1fr;
  }
}

/* Privacy */
.privacy {
  background: var(--plum);
  color: #f5f0fa;
}

.privacy .eyebrow {
  color: #c4b5ff;
}

.privacy .lede {
  color: #d6cde2;
}

.promises {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 52px;
}

.promise {
  border-top: 2px solid rgba(255, 255, 255, 0.18);
  padding-top: 22px;
}

.promise h3 {
  font-size: 1.3rem;
}

.promise p {
  color: #d6cde2;
  margin: 0;
}

@media (max-width: 960px) {
  .promises {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .promises {
    grid-template-columns: 1fr;
  }
}

/* What it isn't */
.honest {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
}

.honest p:last-child {
  margin: 0;
}

/* Story */
.story {
  background: var(--page-2);
}

.story blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  line-height: 1.4;
}

.story .by {
  margin-top: 24px;
  color: var(--ink-soft);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 400 1.6rem/1 var(--sans);
  background: var(--violet-soft);
  color: var(--violet);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  color: var(--ink-soft);
  padding-right: 56px;
}

/* Closing call to action */
.closing {
  text-align: center;
}

.closing .card {
  background: linear-gradient(135deg, var(--violet-soft), var(--coral-soft) 55%, var(--amber-soft));
  border-radius: 32px;
  padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 64px);
}

.closing .cta-row {
  justify-content: center;
  margin-bottom: 0;
}

/* Footer */
footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink-soft);
}

footer .wrap {
  display: grid;
  gap: 18px;
}

footer .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

footer .small {
  font-size: 0.92rem;
  max-width: 60em;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .faq summary::after {
    transition: none;
  }
}

.mark-lg {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin: 0 auto 24px;
}

/* Legal pages: privacy policy and terms */
.legal {
  padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 112px);
}

.legal h1 {
  font-size: clamp(2.3rem, 5vw, 3.2rem);
}

.legal h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-top: 2em;
}

.legal h3 {
  font-size: 1.2rem;
  margin-top: 1.5em;
}

.legal .updated {
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.legal li {
  margin-bottom: 0.5em;
}

.legal .summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}

.legal .summary h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.legal .summary ul {
  margin: 0;
}

.legal .callout {
  background: var(--coral-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 24px 0;
}

.legal .callout p:last-child {
  margin: 0;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

footer .links a {
  color: var(--ink-soft);
}

a.on-dark {
  color: #c4b5ff;
}
