/* JournalAI website: same palette and type as the Android app. */
:root {
  --background: #fbf4ef;
  --surface: #ffffff;
  --surface-muted: #f5e9e2;
  --text: #2b1f1a;
  --text-soft: #5a4a42;
  --text-muted: #8a776f;
  --border: #eedfd6;
  --accent: #9b4a2c;
  --accent-soft: #f4e1d8;
  --sage: #3e6b50;
  --sage-soft: #dcebdd;
  --sky: #4f6f8f;
  --sky-soft: #e1e9f1;
  --orb: #6e95be;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(91, 51, 36, 0.08);
  --display: 'Fraunces', Georgia, serif;
  --serif: 'Literata', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

img,
svg {
  max-width: 100%;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 244, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.nav a:hover {
  color: var(--accent);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: 600 16px var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.button:focus-visible,
.nav a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

/* Type */
.overline {
  margin: 0;
  font: 600 12px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 62px);
}

h2 {
  font-size: clamp(30px, 4vw, 42px);
}

h3 {
  font-size: 22px;
}

.lead {
  font-size: 19px;
  color: var(--text-soft);
  max-width: 34em;
}

/* Hero */
.hero {
  padding: 64px 0 48px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.stage {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.bubble {
  position: relative;
  min-width: 210px;
  padding: 12px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--display);
  font-size: 22px;
  text-align: center;
}

.bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: var(--surface);
  transform: translateX(-50%) rotate(45deg);
}

.bubble-text {
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bubble-text.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.orb {
  position: relative;
  display: grid;
  place-items: center;
  width: min(300px, 70vw);
  aspect-ratio: 1;
  margin: 28px 0 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 42%),
    radial-gradient(circle at 70% 78%, rgba(31, 53, 80, 0.35), transparent 55%),
    var(--orb);
  box-shadow: 0 24px 60px rgba(44, 74, 107, 0.3);
  animation: breathe 5.2s ease-in-out infinite;
}

.orb::before {
  content: '';
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: var(--orb);
  opacity: 0.12;
  z-index: -1;
  animation: halo 5.2s ease-in-out infinite;
}

.orb-face {
  display: grid;
  place-items: center;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: clamp(64px, 13vw, 104px);
  line-height: 1;
}

.stage-caption {
  font-family: var(--serif);
  font-style: italic;
  color: var(--sky);
  margin: 0;
}

@keyframes breathe {
  50% {
    transform: scale(1.035);
  }
}

@keyframes halo {
  50% {
    transform: scale(1.1);
    opacity: 0.06;
  }
}

/* Sections */
section {
  padding: 72px 0;
  scroll-margin-top: 68px;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 36px;
  max-width: 44em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  align-content: start;
}

.card p {
  margin: 0;
  color: var(--text-soft);
}

.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 22px;
}

.icon.sage {
  background: var(--sage-soft);
}

.icon.sky {
  background: var(--sky-soft);
}

.tinted {
  background: var(--surface-muted);
}

/* Letter sample */
.letter {
  max-width: 640px;
  margin-inline: auto;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 36px;
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
}

.letter h3 {
  font-size: 28px;
  margin: 6px 0 18px;
}

.letter .greeting {
  font-style: italic;
  font-size: 21px;
  margin: 0 0 12px;
}

.letter p {
  margin: 0 0 16px;
}

.quote {
  background: var(--sage-soft);
  border-radius: 14px;
  padding: 16px 20px;
  font-style: italic;
  margin: 0 0 16px;
}

.quote .overline {
  color: var(--sage);
  font-style: normal;
  margin-bottom: 4px;
}

.signature {
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  margin: 4px 0 0;
}

.sample-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 14px;
}

/* Promise list */
.promises {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.promises li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.promises li::before {
  content: '✓';
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.plan.featured {
  border: 2px solid var(--accent);
}

.price {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
}

.price small {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-muted);
}

.plan ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
}

.plan li {
  margin-bottom: 6px;
}

.fine {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-size: 15px;
  color: var(--text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.crisis {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
}

/* Consent banner */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: 560px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(43, 31, 26, 0.18);
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  font-size: 15px;
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0;
  color: var(--text-soft);
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.consent .button {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

/* Policy page */
.policy {
  padding: 56px 0 80px;
}

.policy .wrap {
  max-width: 760px;
}

.policy h1 {
  font-size: clamp(34px, 5vw, 48px);
  margin: 8px 0 6px;
}

.policy h2 {
  font-size: 26px;
  margin: 44px 0 12px;
}

.policy p,
.policy li {
  color: var(--text-soft);
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
}

.policy th,
.policy td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.policy th {
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 600;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 24px;
}

.summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.placeholder {
  background: #fff3c4;
  padding: 0 4px;
  border-radius: 4px;
}

.table-scroll {
  overflow-x: auto;
}

/* Small screens */
@media (max-width: 860px) {
  .hero .wrap,
  .cards,
  .plans {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 36px;
  }

  .stage {
    order: -1;
  }

  .promises {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .letter {
    padding: 24px;
  }

  section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .orb::before {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Account deletion page */
.account-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-top: 28px;
}

.account-panel h2 {
  margin-top: 0;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.form {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.form label {
  display: grid;
  gap: 6px;
  font: 500 15px var(--sans);
  color: var(--text);
}

.form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  color: var(--text);
  font: 400 16px var(--sans);
}

.form input:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 1px;
}

.button-danger {
  background: #b4483f;
  color: #fff;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.google {
  width: 100%;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.account-message {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f8e1de;
  color: #8a2f27;
}

.account-message[data-tone='info'] {
  background: var(--sage-soft);
  color: var(--sage);
}

.fine-print {
  font-size: 14px;
  margin-top: 12px;
}

/* Legal text still to be filled in by the owner; deliberately loud so it is not published by accident. */
.todo {
  background: #ffe08a;
  color: #2b1f1a;
  padding: 0 4px;
  border-radius: 4px;
}
