/* Nany account pages — the landing page's palette and type, nothing more. */
:root {
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --text: #1C1C1C;
  --text-2: #5F5F5F;
  --line: rgba(28, 28, 28, .14);
  --olive: #4A5D4A;
  --olive-light: #E8EDE8;
  --olive-dark: #3A4A3A;
  --cream: #F3EDE4;
  --error: #B3261E;
  --error-bg: #FBECE9;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* Hidden until js/i18n.js has put the page in the visitor's language, so a
   page never flashes the other one; shown anyway after 2 s if scripts fail. */
html:not([data-i18n-ready]) body { visibility: hidden; animation: i18n-reveal 0s 2s forwards; }
@keyframes i18n-reveal { to { visibility: visible; } }

html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.top { max-width: 520px; margin: 0 auto; padding: 20px 16px 0; }
.brand {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 30px;
  color: var(--text);
  text-decoration: none;
}
.brand:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; border-radius: 4px; }

main { max-width: 520px; margin: 0 auto; padding: 40px 16px 72px; }

h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(38px, 10vw, 52px);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
/* Headings get focus programmatically (screen readers hear the new view). */
h1:focus { outline: none; }
h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 12px;
}
.lead { font-size: 17px; color: var(--text-2); margin-bottom: 36px; }
.lead strong { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

form, .stack { display: grid; gap: 20px; }
.actions { display: grid; gap: 12px; margin-top: 8px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 8px; }
label { font-size: 15px; font-weight: 500; }
input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  font: inherit;
  font-size: 17px; /* ≥ 16px: no zoom on iOS */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s;
}
input:hover { border-color: rgba(28, 28, 28, .3); }
input:focus-visible { outline: 2px solid var(--olive); outline-offset: 1px; border-color: var(--olive); }
input[aria-invalid="true"] { border-color: var(--error); }
.hint { font-size: 14px; color: var(--text-2); }
.field-error { font-size: 14px; color: var(--error); }
.field-error:empty { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { color: var(--text); background: transparent; border-color: var(--line); }
.btn.quiet { min-height: 48px; color: var(--text-2); background: transparent; border-color: transparent; }

a { color: var(--text); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 2px; }
.link-button {
  font: inherit; color: var(--text); background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-button:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }

.alert {
  padding: 14px 16px;
  font-size: 15px;
  color: var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
}
.alert:empty { display: none; }
/* An offer the link carries (free access, trial): the first thing to read. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 11px 22px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--olive-dark);
  background: var(--olive-light);
  border: 1px solid rgba(74, 93, 74, .28);
  border-radius: 999px;
}
.pill::before { content: "✦"; font-size: 15px; color: var(--olive); }
@media (min-width: 640px) { .pill { font-size: 19px; padding: 12px 24px; } }

/* A state worth noticing on /account/: trial (olive), action needed (red). */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 16px; /* round on one line, still neat when it wraps */
}
.badge::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}
.badge.trial { color: var(--olive-dark); background: var(--olive-light); border-color: rgba(74, 93, 74, .28); }
.badge.danger { color: var(--error); background: var(--error-bg); border-color: rgba(179, 38, 30, .3); }
.note { font-size: 14px; color: var(--text-2); text-align: center; }
.center { text-align: center; }

.section { padding: 28px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; padding-top: 8px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.kv dt { color: var(--text-2); flex-shrink: 0; }
.kv dd { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.kv dd.stacked { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.section .btn { margin-top: 16px; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.spinner.large { width: 28px; height: 28px; margin-bottom: 28px; color: var(--olive); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ── Home page (/) ─────────────────────────────────────────────────────── */
.home main { max-width: 1120px; padding: 0 16px; }
.home h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 12px;
}
.home h3 { font-size: 18px; font-weight: 500; margin-bottom: 6px; }

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px;
}
.home-nav { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 16px; font-weight: 500; text-decoration: none; }
.nav-link:hover { text-decoration: underline; }
.btn.small { width: auto; min-height: 44px; padding: 0 20px; font-size: 15px; }
@media (max-width: 479px) { .home-nav .btn.small { display: none; } }

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 40px 0 72px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--olive);
}
.hero h1 { font-size: clamp(44px, 9vw, 72px); margin-bottom: 20px; }
.hero .lead { font-size: 18px; max-width: 34em; margin-bottom: 32px; }
.hero-actions { display: grid; gap: 12px; }
@media (min-width: 560px) {
  .hero-actions { display: flex; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 1fr; gap: 64px; padding: 56px 0 96px; }
}

/* An illustration of a WhatsApp chat — labelled as an example. */
.chat { margin: 0; }
.chat-window {
  max-width: 420px;
  margin: 0 auto;
  overflow: hidden;
  background: #EFE7DD;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 48px -24px rgba(28, 28, 28, .25);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--olive);
}
.chat-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  color: var(--olive);
  background: var(--olive-light);
  border-radius: 50%;
}
.chat-body { display: grid; gap: 10px; padding: 20px 16px 24px; }
.msg {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  border-radius: 16px;
  box-shadow: 0 1px 1px rgba(28, 28, 28, .08);
}
.msg.out { justify-self: end; background: #DCF3D0; border-bottom-right-radius: 4px; }
.msg.in { justify-self: start; background: #FFFFFF; border-bottom-left-radius: 4px; }
.chat-caption { margin-top: 12px; font-size: 13px; color: var(--text-2); text-align: center; }

.home-section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-lead { font-size: 18px; color: var(--text-2); margin-bottom: 36px; }

.cards, .benefits, .steps { list-style: none; display: grid; gap: 16px; }
.card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.card p, .step p, .benefits p { color: var(--text-2); }
.icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: var(--olive-light);
  border-radius: 12px;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.steps { counter-reset: step; margin-top: 32px; }
.step { position: relative; padding: 4px 0 4px 64px; min-height: 48px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  color: var(--olive-dark);
  background: var(--cream);
  border-radius: 50%;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .step { padding: 64px 0 0; }
}

.benefits { margin-top: 32px; }
.benefits li { padding-left: 20px; border-left: 2px solid var(--olive); }
@media (min-width: 800px) { .benefits { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.final-cta {
  margin: 32px 0 72px;
  padding: 48px 24px;
  text-align: center;
  color: #FFFFFF;
  background: var(--olive);
  border-radius: 28px;
}
.home .final-cta h2 { color: #FFFFFF; }
.final-cta p { max-width: 32em; margin: 0 auto 28px; color: rgba(255, 255, 255, .85); font-size: 17px; }
.btn.light { width: auto; color: var(--text); background: #FFFFFF; border-color: #FFFFFF; }
.btn.light:focus-visible { outline-color: #FFFFFF; }

.home-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  font-size: 14px;
  color: var(--text-2);
  border-top: 1px solid var(--line);
}
.home-footer a { color: var(--text-2); }
