/* ==========================================================================
   Stiva - redesign leggero ed editoriale (v3)
   Principi: un solo fondo, pochi pesi grassi, niente scatole/blob, molta aria.
   Base home + componenti per blog, pagine legali, 404 e pricing.
   ========================================================================== */


:root {
  --forest: #00342b;
  --forest-2: #004d40;
  --ink: #1f211d;
  --body: #3f4844;
  --muted: #6a716d;
  --paper: #ffffff;
  --line: rgba(0, 52, 43, 0.12);
  --line-soft: rgba(0, 52, 43, 0.07);
  --amber: #e3a46d;
  --teal: #7ebdac;
  --dark: #121413;
  --dark-2: #1e2322;
  --dark-line: #313936;
  --radius: 12px;
  --wide: 1080px;
  --read: 620px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--forest);
}

.wrap {
  width: min(var(--wide), calc(100vw - 40px));
  margin: 0 auto;
}

/* Text-only sections: a centered reading column, so the copy isn't left-hugging
   a column that was sized for a screenshot. */
.wrap.wrap--prose {
  width: min(760px, calc(100vw - 40px));
}

/* ---------- Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(var(--wide), calc(100vw - 40px));
  margin: 0 auto;
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest);
  font-family: Newsreader, Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 11px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Inline links: hidden on mobile (moved into the hamburger), shown from 600px */
.nav-inline {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--forest);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover {
  background: color-mix(in srgb, var(--forest) 7%, transparent);
}

/* ---- Mobile hamburger menu (hidden on desktop) ---- */
.nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--forest);
  cursor: pointer;
  list-style: none;
}

.nav-menu-toggle::-webkit-details-marker {
  display: none;
}

.nav-menu-toggle:hover {
  background: color-mix(in srgb, var(--forest) 7%, transparent);
}

.nav-menu-icon {
  width: 22px;
  height: 22px;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  padding: 7px;
  display: grid;
  gap: 2px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 52, 43, 0.14);
  z-index: 30;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--forest);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-menu-item:hover {
  background: color-mix(in srgb, var(--forest) 7%, transparent);
}

/* ---------- Buttons ----------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--forest);
  color: var(--paper);
}

.button.primary:hover {
  background: var(--forest-2);
}

.button.secondary {
  border-color: var(--line);
  background: var(--paper);
  color: var(--forest);
}

.button.secondary:hover {
  border-color: color-mix(in srgb, var(--forest) 30%, transparent);
  background: color-mix(in srgb, var(--forest) 5%, var(--paper));
}

/* Browser icon inside a button (extensions page) */
.button svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-right: 9px;
  fill: currentColor;
}

/* Not clickable yet: same shape as the live button, but dashed and muted */
.button.is-soon {
  border-style: dashed;
  color: var(--muted);
  cursor: default;
}

.button.is-soon:hover {
  border-color: var(--line);
  background: var(--paper);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- Eyebrow (blog, 404) ---------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
}

/* ---------- Hero -------------------------------------------------------- */

.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(40px, 8.5vw, 68px);
  text-wrap: balance;
}

.hero-copy {
  max-width: var(--read);
  margin: 22px 0 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 21px;
  line-height: 1.5;
  color: var(--body);
}

.hero-meta {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-meta strong {
  color: var(--forest);
  font-weight: 600;
}

/* ---------- Store actions (Google Play badge + iOS waitlist) ------------ */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0;
}

/* The official Play badge ships with ~29px of transparent padding above and
   below the artwork (646x250 image, 646x192 of ink). At 68px tall the visible
   badge is ~52px, which lines up with the 50px button beside it; the negative
   margins claw back the invisible padding so the vertical rhythm holds. */
.store-badge {
  display: inline-flex;
  margin: -9px 0;
  border-radius: 8px;
}

.store-badge img {
  display: block;
  width: auto;
  height: 68px;
}

.store-badge:hover img {
  opacity: 0.88;
}

.store-badge:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* Companion browser extensions: a quiet row under the store buttons, so the
   app stays the primary call to action. Desktop only on the English home,
   where phones get a single link to /extensions instead (the Chrome Web
   Store can't install anything from a phone). */
.hero-ext {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.hero-ext-label {
  margin-right: 2px;
}

.hero-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
}

.hero-ext-link svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

a.hero-ext-link:hover {
  background: color-mix(in srgb, var(--forest) 7%, transparent);
  border-color: color-mix(in srgb, var(--forest) 30%, transparent);
}

a.hero-ext-link:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.hero-ext-link.is-soon {
  border-style: dashed;
  color: var(--muted);
}

.hero-ext-soon {
  font-weight: 500;
}

.hero-ext-more {
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.hero-ext-more a {
  color: var(--forest);
  text-underline-offset: 3px;
}

.hero-ext-desktop {
  display: none;
}

@media (min-width: 600px) {
  .hero-ext-desktop {
    display: flex;
  }

  .hero-ext-more {
    display: none;
  }
}

/* Scroll cue: only shown on the full-height desktop hero (see 860px query) */
.hero-scroll {
  display: none;
}

@keyframes hero-scroll-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* Single, straight phone - no blob, no second device */
.phone-stage {
  display: grid;
  place-items: center;
}

.phone {
  width: min(74vw, 280px);
  border-radius: 34px;
  background: #151816;
  padding: 9px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 52, 43, 0.16);
}

.phone img {
  width: 100%;
  border-radius: 26px;
}

/* ---------- Generic section -------------------------------------------- */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line-soft);
}

.section-head {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-head.section-head--with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.blog-rss-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

.blog-rss-link:hover {
  color: var(--forest-2);
}

.section-head h1,
.section-head h2 {
  font-size: clamp(30px, 5.5vw, 46px);
}

.section-head p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.section-head a {
  color: var(--forest-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Product demo: one sticky phone, scroll-driven --------------- */

.demo-grid {
  display: grid;
  gap: 32px;
}

/* The sticky phone column: hidden on mobile, each step shows its own shot */
.demo-phone {
  display: none;
}

.demo-steps {
  display: grid;
}

.demo-step {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.demo-step h3 {
  font-size: clamp(26px, 5vw, 34px);
}

.demo-step p {
  margin: 12px 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 16px;
}

.demo-step-shot {
  margin-top: 22px;
}

.demo-step-shot .phone {
  width: min(70vw, 260px);
}

/* ---------- Pay once (no heavy cards) ---------------------------------- */

.terms {
  display: grid;
  gap: 0;
}

.term {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.term h3 {
  font-size: 22px;
}

.term p {
  margin: 8px 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Final CTA (the one dark moment) ---------------------------- */

.final {
  padding: 84px 0;
  background: var(--dark);
  color: #d8ddd8;
  border: 0;
}

.final-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.final h2 {
  max-width: 16ch;
  color: var(--teal);
  font-size: clamp(34px, 6vw, 56px);
}

.final p {
  margin: 18px 0 0;
  color: #aab4ae;
  font-size: 17px;
}

.final-principle {
  margin: 18px 0 0;
  color: #cfd8d2;
  font-weight: 500;
}

/* ---------- Waitlist forms --------------------------------------------- */

.signup {
  width: 100%;
}

.form-row {
  display: grid;
  gap: 10px;
}

.signup input[type="email"] {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 60%, #fff);
  color: var(--ink);
  font: 500 15px/1 Inter, sans-serif;
}

.form-note,
.success-message,
.error-message {
  margin: 12px 0 0;
  font-size: 13px;
}

.form-note {
  color: var(--muted);
}

.success-message {
  display: none;
  color: var(--forest-2);
  font-weight: 600;
}

.error-message {
  display: none;
  color: #b3261e;
  font-weight: 600;
}

/* Dark variant inside the final section */
.final .signup input[type="email"] {
  background: var(--dark-2);
  border-color: var(--dark-line);
  color: #e5e2db;
}

.final .form-note {
  color: #9aa39d;
}

.final .success-message {
  color: var(--teal);
}

.final .error-message {
  color: #ffb4ab;
}

/* ---------- 404 -------------------------------------------------------- */

.error-hero {
  min-height: 56vh;
  display: flex;
  align-items: center;
}

.error-hero .eyebrow {
  margin-bottom: 18px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Legal / prose pages --------------------------------------- */

.legal {
  width: min(760px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.legal h1 {
  font-size: clamp(34px, 6vw, 52px);
  margin-bottom: 8px;
}

.legal h2 {
  margin: 40px 0 6px;
  font-size: clamp(24px, 4vw, 32px);
}

.legal h3 {
  margin: 30px 0 8px;
  font-size: 20px;
}

.legal p {
  margin: 0 0 16px;
  color: var(--body);
}

.legal ul,
.legal ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--body);
}

.legal li {
  margin: 6px 0;
}

.legal a {
  color: var(--forest-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal strong {
  color: var(--ink);
}

/* ---------- Pricing compare table ------------------------------------- */

.compare {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare th,
.compare td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare thead th {
  background: var(--paper);
  color: var(--forest);
  font-family: Newsreader, Georgia, serif;
  font-size: 18px;
  font-weight: 600;
}

.compare thead th.col-plan {
  text-align: center;
  width: 22%;
}

.compare thead th.col-premium {
  background: color-mix(in srgb, var(--forest) 6%, var(--paper));
}

.compare thead th .th-price {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.compare tbody td.cell-plan {
  text-align: center;
  width: 22%;
}

.compare tbody td.cell-premium {
  background: color-mix(in srgb, var(--forest) 4%, transparent);
}

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

.price-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.feat-name {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

.feat-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 360px;
}

.yes {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  color: var(--forest);
}

.yes svg {
  width: 13px;
  height: 13px;
}

.limit {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.no {
  display: inline-block;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--forest) 24%, transparent);
  vertical-align: middle;
}

/* ---------- Pricing FAQ ------------------------------------------------- */

.faq {
  max-width: 760px;
  margin: 0;
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.faq-q {
  font-family: Newsreader, Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--forest);
}

.faq-a {
  margin: 8px 0 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.faq-more {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.faq-more a {
  color: var(--forest-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- SEO landing pages (pocket-alternative, read-it-later-app) --- */

.la-hero {
  padding: 56px 0 20px;
}

.la-hero .hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.la-hero h1 {
  max-width: 17ch;
  font-size: clamp(34px, 6.5vw, 56px);
  text-wrap: balance;
}

.la-lede {
  max-width: var(--read);
  margin: 22px 0 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 21px;
  line-height: 1.5;
  color: var(--body);
}

.la-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0;
}

.la-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.la-note strong {
  color: var(--forest);
  font-weight: 600;
}

.la-p {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--body);
  font-size: 17px;
}

/* Alternating feature rows */
.la-rows {
  display: grid;
  gap: 0;
}

.la-row {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

/* Text-only variant (no screenshots): keep rows full width */
.la-rows--text .la-row {
  display: block;
}

.la-rows--text .la-row p {
  max-width: 62ch;
}

.la-row h3 {
  font-size: clamp(22px, 4vw, 28px);
}

.la-row p {
  margin: 10px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 16px;
}

.la-row-media {
  margin-top: 22px;
}

.la-row-media .phone {
  width: min(64vw, 230px);
}

/* Long-tail sub-sections and numbered steps */
.la-sub {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.la-sub h3 {
  font-size: 22px;
}

.la-sub p {
  margin: 8px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
}

.la-steps {
  counter-reset: la-step;
  display: grid;
  gap: 0;
}

.la-step {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.la-step::before {
  counter-increment: la-step;
  content: counter(la-step);
  flex: none;
  font-family: Newsreader, Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--forest);
  line-height: 1.2;
}

.la-step h3 {
  font-size: 20px;
}

.la-step p {
  margin: 6px 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 15px;
}

/* Multi-column comparison table: extends .compare with horizontal scroll */
.cmp-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cmp-scroll .compare {
  border: 0;
  border-radius: 0;
  min-width: 760px;
}

.compare th.col-app {
  text-align: center;
  width: auto;
  font-size: 16px;
}

.compare th.col-app.col-stiva {
  background: color-mix(in srgb, var(--forest) 6%, var(--paper));
}

.compare td.cell-app {
  text-align: center;
  font-size: 13px;
  color: var(--body);
}

.compare td.cell-app.cell-stiva {
  background: color-mix(in srgb, var(--forest) 4%, transparent);
  color: var(--ink);
  font-weight: 600;
}

.cmp-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.la-subs {
  margin-top: 28px;
}

@media (min-width: 760px) {
  .la-row {
    display: grid;
    grid-template-columns: 1fr minmax(0, 280px);
    gap: 44px;
    align-items: center;
  }

  .la-row-media {
    margin-top: 0;
    justify-self: center;
  }

  /* Alternate sides, keeping the text in the wide track both ways */
  .la-row:nth-child(even) {
    grid-template-columns: minmax(0, 280px) 1fr;
  }

  .la-row:nth-child(even) .la-row-body {
    order: 2;
  }

  .la-row:nth-child(even) .la-row-media {
    order: 1;
  }
}

@media (min-width: 860px) {
  .la-hero .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.9fr);
    gap: 48px;
  }

  /* Text-only hero (no phone beside it): keep a single column */
  .la-hero--solo .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Blog index ------------------------------------------------- */

.post-list {
  display: grid;
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: color-mix(in srgb, var(--forest) 30%, transparent);
  transform: translateY(-2px);
}

.post-card-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card-title {
  color: var(--forest);
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.1;
}

.post-card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.post-card-more {
  margin-top: 4px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Blog post -------------------------------------------------- */

.post-main {
  padding: 48px 0 72px;
}

.post {
  max-width: 720px;
  margin: 0 auto;
}

.post-head {
  margin-bottom: 28px;
}

.post-head h1 {
  margin-top: 12px;
  font-size: clamp(33px, 7vw, 54px);
}

.post-meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.post-meta a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body {
  color: #2c322f;
  font-family: Newsreader, Georgia, serif;
  font-size: 20px;
  line-height: 1.62;
}

.post-body p {
  margin: 0 0 22px;
}

.post-body h2 {
  margin: 40px 0 14px;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.12;
}

.post-body h3 {
  margin: 32px 0 12px;
  font-size: clamp(22px, 4vw, 28px);
}

.post-body a {
  color: var(--forest-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body img {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  margin: 24px auto;
  border-radius: var(--radius);
}

.post-body figure {
  margin: 24px 0;
}

.post-body figure img {
  margin: 0 auto;
}

.post-body video {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  margin: 24px auto;
  border-radius: var(--radius);
}

.post-body figure video {
  margin: 0 auto;
}

.post-body figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.post-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-style: italic;
}

.post-body ul,
.post-body ol {
  margin: 0 0 22px;
  padding-left: 24px;
}

.post-body li {
  margin: 6px 0;
}

.post-foot {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-follow {
  margin: 0 0 18px;
  font-size: 15px;
}

/* ---------- End-of-post download card ----------------------------------- */

.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 52px 0 0;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--forest) 3%, var(--paper));
}

.post-cta-title {
  margin: 0;
  font-size: 20px;
}

.post-cta-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* Companion extensions row: sits under the store buttons, full width */
.post-cta-ext {
  flex-basis: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.post-cta-ext .hero-ext,
.post-cta-ext .hero-ext-more {
  margin: 0;
}

/* ---------- SEO pre-footer -------------------------------------------- */

.prefooter {
  padding: 20px 0;
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
}

.prefooter .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.prefooter a {
  color: #6f7873;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.prefooter a:hover {
  color: #cfd8d2;
}

.prefooter-featured {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
}

.prefooter-featured span {
  color: #6f7873;
  font-size: 13px;
}

.prefooter-featured a {
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
}

.prefooter-featured img {
  display: block;
  height: 28px !important;
  width: auto !important;
}

/* directree's badge is much wider (6:1) and edge-to-edge, so at 28px it
   dominates the row; shrink it to match the others' visual weight. */
.prefooter-featured img[src*="directree.io"] {
  height: 20px !important;
}

/* ---------- Footer ------------------------------------------------------ */

.footer {
  padding: 26px 0;
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
  color: #9aa39d;
  font-size: 13px;
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer a {
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-social-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  color: inherit;
  transition: color .15s ease;
}

.footer-social:hover {
  color: #fff;
}

.footer-social svg {
  flex: none;
}

.footer-language {
  width: max-content;
  appearance: none;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, #9aa39d 50%), linear-gradient(135deg, #9aa39d 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: #9aa39d;
  font: 500 13px/1 Inter, sans-serif;
  cursor: pointer;
}

/* ==========================================================================
   Tablet / desktop
   ========================================================================== */

@media (min-width: 600px) {
  .nav-inline {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr auto;
  }

  .terms {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 36px;
  }

  .term {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 4px 0 4px 24px;
  }

  .term:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .post-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .wrap,
  .nav {
    width: min(var(--wide), calc(100vw - 56px));
  }

  .brand {
    font-size: 27px;
  }

  .brand img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .hero {
    position: relative;
    min-height: calc(100svh - 65px);   /* header (65px) + hero = one screen */
    padding: 80px 0 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: 48px;
  }

  .hero-scroll {
    display: grid;
    place-items: center;
    position: absolute;
    left: 50%;
    bottom: 22px;
    width: 40px;
    height: 40px;
    transform: translateX(-50%);   /* fallback centering if animation is off */
    color: var(--muted);
    transition: color 0.2s ease;
    animation: hero-scroll-bob 2.2s ease-in-out infinite;
  }

  .hero-scroll:hover {
    color: var(--forest);
  }

  .final-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  /* Demo becomes a two-column sticky layout */
  .demo-grid {
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  /* The first shot (in normal flow) sets the height; the others overlay it
     absolutely so the sticky phone can never stretch to the column height. */
  .demo-phone {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    justify-self: center;
    width: min(100%, 300px);
  }

  .demo-phone .phone {
    width: 100%;
    opacity: 0;
    transition: opacity 0.45s ease;
  }

  .demo-phone .phone:first-child {
    position: relative;
  }

  .demo-phone .phone:not(:first-child) {
    position: absolute;
    inset: 0;
  }

  .demo-phone .phone.is-active {
    opacity: 1;
  }

  .demo-steps {
    padding: 4vh 0;
  }

  .demo-step {
    min-height: 64vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 0;
    padding: 0;
    opacity: 0.4;
    transition: opacity 0.35s ease;
  }

  .demo-step.is-active {
    opacity: 1;
  }

  /* On desktop the per-step inline phone is hidden (sticky one is used) */
  .demo-step-shot {
    display: none;
  }

  .footer .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .compare th,
  .compare td {
    padding: 12px 8px;
  }

  .feat-desc {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .demo-step,
  .demo-phone .phone {
    transition: none;
  }

  .store-badge:hover img {
    opacity: 1;
  }

  .hero-scroll {
    animation: none;
  }
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
}

.footer-badge a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s ease;
}

.footer-badge a:hover {
  color: #fff;
}

/* Hero meta: keep "Pay once, when it's worth it." on its own line on desktop */
.hero-meta-br {
  display: none;
}

@media (min-width: 860px) {
  .hero-meta-br {
    display: inline;
  }
}
