/* ==========================================================================
   Undertone: shared styles (home + guides)
   Warm editorial paper: cream ground, ink type, deep green actions,
   coral only as an accent stroke. Space Grotesk display / Inter body.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --bg: #F6F3EF;
  --surface: #FFFFFF;
  --board: #EFEBE4;
  --ink: #211D2B;
  --ink-soft: #635C72;
  --brand: #2E6B4A;
  --brand-dark: #1F4A32;
  --coral: #E8724F;
  --tint-green: #DFF3E7;
  --tint-peach: #FBE4D8;
  --tint-blue: #E1EBF7;
  --tint-amber: #FAF0E2;
  --hairline: #E4DFEA;

  --font-display: "Space Grotesk", "Avenir Next", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
  --step-1: clamp(1.13rem, 1.06rem + 0.35vw, 1.32rem);
  --step-2: clamp(1.35rem, 1.22rem + 0.65vw, 1.72rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.6rem);
  --step-4: clamp(2.5rem, 1.9rem + 3vw, 4.1rem);

  --container: 1120px;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --shadow-card: 0 1px 2px rgba(33, 29, 43, 0.05), 0 12px 32px -16px rgba(33, 29, 43, 0.18);
  --shadow-phone: 0 2px 4px rgba(33, 29, 43, 0.12), 0 32px 64px -24px rgba(33, 29, 43, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  /* Paper grain, barely there; tiled on the body so it can never cover content */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1em; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

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

::selection { background: var(--tint-green); color: var(--ink); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-s) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---- Text helpers ------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.9rem;
}

.lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 42ch; }

.muted { color: var(--ink-soft); }

/* Coral hand-drawn underline accent */
.u-accent {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 Q 30 3 60 7 T 118 5' fill='none' stroke='%23E8724F' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.24em;
  padding-bottom: 0.14em;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(33, 29, 43, 0.25);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn-large { padding: 1.05em 2em; font-size: var(--step-1); }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 239, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.brand .mark { flex: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.site-nav .nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--step--1);
}
.site-nav .nav-link:hover { color: var(--ink); }

.site-nav .btn { padding: 0.65em 1.3em; font-size: var(--step--1); }

@media (max-width: 720px) {
  .site-nav .nav-link { display: none; }
}

/* ---- Phone frame ------------------------------------------------------- */
.phone-frame {
  border-radius: 36px;
  border: 9px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  width: 100%;
}
.phone-frame img {
  border-radius: 26px;
  width: 100%;
  height: auto;
}

/* ---- Sections ---------------------------------------------------------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

.section-head {
  max-width: 56ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-alt { background: var(--board); border-block: 1px solid var(--hairline); }

/* ---- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem);
  overflow: clip;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
}
.hero::before {
  width: 480px;
  height: 480px;
  right: -140px;
  top: -80px;
  background: var(--tint-green);
}
.hero::after {
  width: 380px;
  height: 380px;
  left: -160px;
  bottom: -140px;
  background: var(--tint-peach);
  opacity: 0.8;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-copy h1 { margin-bottom: 0.45em; }

.hero-sub {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.75rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.trust-row {
  font-size: var(--step--1);
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  max-width: 46ch;
}
.trust-row .dot { color: var(--coral); }

.hero-visual {
  position: relative;
  max-width: 340px;
  justify-self: center;
}
.hero-visual .phone-frame { transform: rotate(2deg); }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -10% -6% 12%;
  background: var(--tint-amber);
  border-radius: var(--radius-l);
  transform: rotate(-4deg);
  z-index: -1;
  border: 1px solid var(--hairline);
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 280px; }
}

/* ---- Download / coming-soon panel -------------------------------------- */
.download-panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
}

.download-panel .app-icon {
  width: clamp(84px, 12vw, 128px);
  border-radius: 24%;
  box-shadow: var(--shadow-card);
}

.download-panel h2 { margin-bottom: 0.35em; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1.1rem 0 0.9rem;
}

/* App-Store-style "coming soon" badge */
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 0.55rem 1.35rem;
  min-height: 56px;
  text-decoration: none;
  line-height: 1.25;
  cursor: default;
}
.store-badge:hover { color: #fff; }
.store-badge .badge-top {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}
.store-badge .badge-main {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.store-badge[aria-disabled="true"] { opacity: 0.9; }

.follow-line { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 0.35rem; }

.pricing-line { font-size: var(--step--1); color: var(--ink-soft); margin: 0; }

@media (max-width: 640px) {
  .download-panel { grid-template-columns: 1fr; text-align: left; }
}

/* ---- Screenshot gallery (scroll-snap) ----------------------------------- */
.gallery {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-color: var(--brand) var(--board);
}

.gallery-item {
  flex: 0 0 auto;
  width: min(248px, 68vw);
  scroll-snap-align: start;
}

.gallery-item .phone-frame { border-width: 7px; border-radius: 30px; }
.gallery-item .phone-frame img { border-radius: 22px; }

.gallery-caption {
  margin-top: 0.8rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding-inline: 0.25rem;
}
.gallery-caption strong {
  display: block;
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
}

.gallery-hint {
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

/* ---- Numbered steps ------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-num {
  counter-increment: step;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step-num::before { content: counter(step); }

.step h3 { font-size: var(--step-1); margin-bottom: 0; }

.step p { color: var(--ink-soft); font-size: var(--step--1); margin: 0; }

.step-thumb {
  margin-top: auto;
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 6px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow-phone);
  height: 260px;
}
.step-thumb img {
  display: block;
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 100%;
  border-radius: 20px;
}
.step-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(to bottom, transparent 38%, var(--surface) 82%);
  pointer-events: none;
}

@media (max-width: 540px) { .step-thumb { height: 320px; } }

@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* ---- Card grid (guides) -------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 1.5rem;
  border-radius: var(--radius-m);
  border: 1px solid rgba(33, 29, 43, 0.08);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.tint-green { background: var(--tint-green); }
.tint-peach { background: var(--tint-peach); }
.tint-blue { background: var(--tint-blue); }
.tint-amber { background: var(--tint-amber); }

.card-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--brand);
}
.card:hover .card-link { color: var(--brand-dark); }

@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

/* ---- FAQ ------------------------------------------------------------------ */
.faq { max-width: 760px; }

.faq-item {
  border-bottom: 1px solid var(--hairline);
}
.faq-item:first-of-type { border-top: 1px solid var(--hairline); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid rgba(33, 29, 43, 0.25);
  display: grid;
  place-items: center;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--brand);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  background: var(--tint-green);
}

.faq-item .faq-answer {
  padding: 0 0.25rem 1.4rem;
  color: var(--ink-soft);
  max-width: 62ch;
}
.faq-item .faq-answer p { margin-bottom: 0.5em; }
.faq-item .faq-answer a { font-weight: 600; }

/* ---- Final CTA ------------------------------------------------------------ */
.final-cta {
  text-align: center;
  background: var(--brand-dark);
  color: #fff;
  border-radius: var(--radius-l);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}
.final-cta h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.final-cta p { color: rgba(255, 255, 255, 0.75); }
.final-cta .btn-primary {
  background: #fff;
  color: var(--brand-dark);
  margin-top: 1rem;
}
.final-cta .btn-primary:hover { background: var(--tint-green); color: var(--brand-dark); }
.final-cta .trial-line { margin-top: 1.1rem; font-size: var(--step--1); margin-bottom: 0; }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--board);
  border-top: 1px solid var(--hairline);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  margin-top: clamp(4rem, 9vw, 7rem);
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}

.footer-brand .brand { margin-bottom: 0.6rem; }
.footer-brand p { color: var(--ink-soft); max-width: 24ch; }

.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--brand); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  color: var(--ink-soft);
}
.footer-bottom p { margin: 0; }
.small-print { max-width: 62ch; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Guide article typography ---------------------------------------------- */
article.guide {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(3rem, 7vw, 5rem);
}

article.guide .eyebrow { margin-bottom: 0.75rem; }

article.guide h1 { font-size: var(--step-3); }

article.guide h2 {
  font-size: var(--step-2);
  margin-top: 2.2em;
  margin-bottom: 0.6em;
}

article.guide h3 {
  font-size: var(--step-1);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

article.guide p,
article.guide li { color: var(--ink); }

article.guide ul,
article.guide ol {
  padding-left: 1.4rem;
  margin: 0 0 1.25em;
}
article.guide li { margin-bottom: 0.5em; }
article.guide li::marker { color: var(--brand); font-weight: 600; }

article.guide blockquote {
  margin: 1.75em 0;
  padding: 1rem 1.4rem;
  border-left: 3px solid var(--coral);
  background: var(--tint-amber);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-style: italic;
  color: var(--ink);
}
article.guide blockquote p:last-child { margin-bottom: 0; }

article.guide .table-wrap { overflow-x: auto; margin: 1.75em 0; }
article.guide table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: var(--step--1);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-s);
}
article.guide th,
article.guide td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
article.guide th {
  font-family: var(--font-display);
  font-weight: 600;
  background: var(--board);
}
article.guide tr:last-child td { border-bottom: none; }

article.guide .cta-box {
  margin: 2.5em 0;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--tint-green);
  border: 1px solid rgba(46, 107, 74, 0.2);
  border-radius: var(--radius-m);
}
article.guide .cta-box h2,
article.guide .cta-box h3 { margin-top: 0; }
article.guide .cta-box p:last-of-type { margin-bottom: 1.25em; }

article.guide .related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25em;
}
@media (max-width: 680px) {
  article.guide .related-grid { grid-template-columns: 1fr; }
}

article.guide figure { margin: 2em 0; }
article.guide figure .phone-frame { max-width: 280px; margin-inline: auto; }
article.guide figcaption {
  text-align: center;
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin-top: 0.8rem;
}

/* ---- Reveal on scroll (JS adds .js to <html>; no-JS shows everything) ------ */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---- Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}
