/* Kalo — site styles.
   Layout: centred column on a warm gradient ground; the hero is a soft
   apricot wash fading to the page colour, with three phones fanned under
   it. Everything else is a quiet single column so the phones stay the
   loudest thing on the page.
   Tokens mirror lib/core/theme/app_colors.dart. */

:root {
  /* The app's palette. `primary` is a fill and cannot legally carry text
     (2.09:1 on white); `primary-ink` is the only one that may. */
  --primary:      #FC9B68;
  --primary-ink:  #B44004;
  --primary-tint: #FDEDE4;
  --wash-top:     #FFE8D8;
  --wash-mid:     #FDF3EA;
  --bg:           #FBF8F3;
  --surface:      #FFFFFF;
  --surface-alt:  #F6F2EA;
  --ink:          #1B241B;
  --ink-soft:     #60675F;
  --line:         #ECE5D9;
  --shadow-soft:  0 2px 8px rgba(70, 44, 28, .05);
  --shadow-lift:  0 18px 50px -18px rgba(70, 44, 28, .3);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body:    'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary:      #FC9B68;
    --primary-ink:  #FFBE97;
    --primary-tint: #38231A;
    --wash-top:     #2B1A14;
    --wash-mid:     #1A1812;
    --bg:           #15170F;
    --surface:      #1E2118;
    --surface-alt:  #23261C;
    --ink:          #F2EFE5;
    --ink-soft:     #A9AFA2;
    --line:         #2F3429;
    --shadow-soft:  0 2px 8px rgba(0, 0, 0, .3);
    --shadow-lift:  0 18px 50px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --primary:      #FC9B68;
  --primary-ink:  #FFBE97;
  --primary-tint: #38231A;
  --wash-top:     #2B1A14;
  --wash-mid:     #1A1812;
  --bg:           #15170F;
  --surface:      #1E2118;
  --surface-alt:  #23261C;
  --ink:          #F2EFE5;
  --ink-soft:     #A9AFA2;
  --line:         #2F3429;
  --shadow-soft:  0 2px 8px rgba(0, 0, 0, .3);
  --shadow-lift:  0 18px 50px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

.narrow { max-width: 760px; margin-inline: auto; }

/* ------------------------------------------------------------ header --- */

header.site {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.015em;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 32px; height: 32px; border-radius: 9px; }

nav.site { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }

nav.site a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}

nav.site a:hover { color: var(--ink); background: var(--surface-alt); }
nav.site a[aria-current="page"] { color: var(--primary-ink); background: var(--primary-tint); }

/* -------------------------------------------------------------- type --- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

h1 {
  font-family: var(--display);
  font-size: clamp(40px, 7.5vw, 68px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.03em;
}

h2 {
  font-family: var(--display);
  font-size: clamp(27px, 4.2vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
}

h3 {
  font-family: var(--body);
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}

p { margin: 0; }
a { color: var(--primary-ink); }

.lede  { font-size: clamp(17px, 2.1vw, 19.5px); color: var(--ink-soft); }
.small { font-size: 14.5px; color: var(--ink-soft); }

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--primary-ink);
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  background: linear-gradient(180deg, var(--wash-top) 0%, var(--wash-mid) 52%, var(--bg) 100%);
  padding-block: clamp(36px, 6vw, 64px) 0;
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.hero-copy .lede { max-width: 54ch; }

/* Three phones, the middle one lifted — the reference's arrangement. */
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 2.4vw, 22px);
  margin-top: clamp(34px, 5vw, 56px);
  padding-bottom: 6px;
}

.phones figure { margin: 0; }

.phones img {
  display: block;
  width: 100%;
  /* The intrinsic size is 786x1703, declared on the element so the browser
     reserves the right box before the image decodes. Without `height: auto`
     the height attribute wins and each phone renders 1703px tall inside a
     238px column, which stretches the hero off the screen. */
  height: auto;
  max-width: 238px;
  min-width: 0;
  border-radius: 26px;
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: var(--shadow-lift);
  background: var(--surface);
}

.phones figure:nth-child(2) img { max-width: 262px; }
.phones figure:nth-child(1),
.phones figure:nth-child(3) { padding-bottom: clamp(16px, 3vw, 34px); }

@media (max-width: 720px) {
  .phones figure:nth-child(3) { display: none; }
}

@media (max-width: 460px) {
  .phones figure:nth-child(1) { display: none; }
  .phones figure:nth-child(2) img { max-width: 260px; }
}

/* ----------------------------------------------------------- sections --- */

section { padding-block: clamp(52px, 8vw, 92px); }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.feature {
  background: var(--surface);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.feature .ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-tint);
  color: var(--primary-ink);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.feature .ico svg { width: 21px; height: 21px; }

/* How it works — a real sequence, so the numbers mean something. */
.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-ink);
  color: #fff;
}

/* --------------------------------------------------------------- band --- */

.band {
  background: var(--surface-alt);
  border-radius: 28px;
  padding: clamp(30px, 5vw, 52px);
}

.sources {
  display: grid;
  gap: 2px;
  margin-top: 26px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--line);
}

.source {
  background: var(--surface);
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
}

.source b { font-weight: 600; min-width: 148px; }
.source span { color: var(--ink-soft); font-size: 15px; min-width: 0; flex: 1; }

.source em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary-ink);
  background: var(--primary-tint);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- faq --- */

.faq { display: flex; flex-direction: column; gap: 10px; }

details {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 19px 22px;
  font-weight: 600;
  font-size: 16.5px;
  display: flex;
  align-items: center;
  gap: 14px;
}

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

summary::after {
  content: '';
  margin-left: auto;
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--primary-ink);
  border-bottom: 2px solid var(--primary-ink);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}

details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details p { padding: 0 22px 20px; color: var(--ink-soft); font-size: 15.5px; }

/* --------------------------------------------------------------- misc --- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-ink);
  box-shadow: var(--shadow-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary { background: var(--primary-ink); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); }

.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.prices {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 620px;
  margin-inline: auto;
}

.price {
  background: var(--surface);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  border: 1.5px solid transparent;
}

.price.best { border-color: var(--primary); }

.price .amount {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.price .tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--primary-ink);
  color: #fff;
  padding: 4px 13px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ----------------------------------------------------------- legal doc -- */

.doc { max-width: 70ch; margin-inline: auto; }
.doc h2 { margin-top: 48px; font-size: clamp(23px, 3vw, 30px); }
.doc h3 { margin-top: 30px; font-size: 17px; }
.doc p, .doc ul { margin-top: 13px; }
.doc ul { padding-left: 22px; }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--primary); }

.callout {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px 24px;
  margin-top: 22px;
  box-shadow: var(--shadow-soft);
}

.table-scroll { overflow-x: auto; margin-top: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }

th, td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

tbody tr:last-child td { border-bottom: 0; }

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--primary-tint);
  color: var(--primary-ink);
  padding: 2px 7px;
  border-radius: 6px;
}

/* ------------------------------------------------------------- footer --- */

footer.site { padding-block: 40px 52px; }

footer.site .wrap {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; }
footer.site a:hover { color: var(--primary-ink); }

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
