/* Yggltree product page. Tokens come from the app's frontend/src/style.css. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The app's coral palette (frontend/src/style.css). main.js sets the same tokens for the other themes. */
  --bg: #faf3ec;
  --surface: #ffffff;
  --surface-variant: #f2e9df;
  --text: #2b2622;
  --text-muted: #726760;
  --border: #e3d8cb;
  --border-strong: #b5aca1;
  --accent: #f4633a;
  --accent-deep: #d6380c;
  --accent-soft: #f89c82;
  --accent-container: #fde3d8;
  --on-accent: #ffffff;
  --complement: #0ca9d6;
  --text-on-dark: #d9d2cc;
  --line-on-dark: #544f4a;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-card: 18px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4.5vw, 48px);
  /* One rhythm for every section and feature row: about 64px between sections on phones, 96px on desktop. */
  --space-section: clamp(32px, 4vw, 48px);
  --space-row: clamp(28px, 3.5vw, 44px);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--border-strong) var(--bg);
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent-deep);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

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

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  color: var(--text);
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h2 {
  font-size: 36px;
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

@media (min-width: 760px) {
  h1 {
    font-size: 72px;
  }

  h2 {
    font-size: 48px;
  }
}

@media (min-width: 1100px) {
  h1 {
    font-size: 84px;
  }
}

h3 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

@media (min-width: 760px) {
  .wrap {
    padding-inline: 40px;
  }

}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.btn-primary {
  background: var(--accent-deep);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--text);
}

.btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.actions-left {
  justify-content: flex-start;
}

.actions-center {
  justify-content: center;
}

.fine {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Navigation */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: block;
  width: 96px;
  color: var(--text);
  text-decoration: none;
}

.mark {
  display: block;
  width: 100%;
  height: auto;
}

.legal {
  margin-top: 16px;
  max-width: 70ch;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal a {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent-deep);
}

/* Hero */

.hero {
  padding: 48px 0 var(--space-section);
}

@media (min-width: 900px) {
  .hero {
    padding-top: 72px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero-copy .lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  margin: 0;
  padding-bottom: 3.5rem;
}

.laptop {
  background: var(--surface);
  border-radius: var(--radius-card) var(--radius-card) 6px 6px;
  padding: 12px 12px 0;
  box-shadow: 0 2px 6px rgb(43 38 34 / 0.06), 0 22px 40px -26px rgb(43 38 34 / 0.38);
}

.laptop-screen {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-variant);
}

.laptop-screen img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

.laptop-base {
  height: 12px;
  margin: 0 -5%;
  background: linear-gradient(var(--surface-variant), var(--border));
  border-radius: 0 0 14px 14px;
}

.phone {
  position: absolute;
  right: -3%;
  bottom: 0;
  width: 36%;
  aspect-ratio: 390 / 844;
  padding: 8px;
  background: var(--text);
  border-radius: 40px;
  box-shadow: 0 22px 36px -22px rgb(43 38 34 / 0.45);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
}

.hero-visual figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Trust strip: four promises on the page's center line, each with a drawn icon in an outlined circle */

.strip {
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.strip-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: 0;
  padding-block: 44px;
  list-style: none;
}

.strip-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-inline: 20px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.strip-list li + li {
  border-left: 1px solid var(--border);
}

.strip-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent-deep);
}

.strip-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .strip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-block: 30px;
  }

  .strip-list li {
    padding: 22px 12px;
    font-size: 1rem;
  }

  .strip-list li:nth-child(odd) {
    border-left: 0;
  }

  .strip-list li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}
/* Sections */

.section {
  padding-block: var(--space-section);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.section-head .lead {
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

/* Tools: a two-column ledger of rules, each one a button that opens its panel */

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 72px);
}

.ledger-item {
  border-top: 1px solid var(--border);
}

.ledger-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 24px 14px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), transform 0.3s var(--ease-out);
}

.ledger-row:hover {
  background: var(--surface);
  box-shadow: 0 16px 34px -24px rgb(43 38 34 / 0.4);
  transform: translateY(-2px);
}

.ledger-row .illus {
  display: block;
  width: 84px;
  height: 84px;
}

.ledger-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}

.ledger-desc {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.ledger-arrow {
  color: var(--accent-deep);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s var(--ease-out), transform 0.3s var(--ease-out);
}

.ledger-row:hover .ledger-arrow,
.ledger-row:focus-visible .ledger-arrow {
  opacity: 1;
  transform: none;
}

/* Tool panel */

.module-dialog {
  width: min(calc(100vw - 32px), 580px);
  max-height: calc(100vh - 48px);
  padding: 28px;
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 90px -30px rgb(43 38 34 / 0.5);
  overflow-y: auto;
}

.module-dialog::backdrop {
  background: rgb(43 38 34 / 0.45);
}

.module-dialog[open] {
  animation: module-dialog-in 0.35s var(--ease-out);
}

@keyframes module-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.module-dialog-head {
  position: relative;
}

.module-dialog-art {
  padding-top: 14px;
}

/* The illustration is shown large and centered at the top of the dialog. A tall or wide
   illustration is fitted inside the same box, so every module lines up. */
.module-dialog-art svg {
  display: block;
  width: min(100%, 420px);
  height: 240px;
  margin-inline: auto;
}

.module-dialog-head .module-dialog-close {
  position: absolute;
  top: 0;
  right: 0;
}

.module-dialog-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.module-dialog-close:hover {
  border-color: var(--text);
}

.module-dialog-title {
  margin-top: 22px;
  font-size: clamp(1.6rem, 3.4vw, 2rem);
}

.module-dialog-content {
  margin-top: 14px;
}

.module-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
}

.module-heading {
  margin-top: 22px;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
}

.module-points {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.module-points li {
  position: relative;
  padding-left: 22px;
}

.module-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.module-dialog-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.module-dialog-foot .btn {
  padding: 0.75rem 1.2rem;
}

/* Screens: alternating feature rows */

/* Private by design: a plain three-node diagram on a warm ground */

.section-private {
  background: var(--surface-variant);
  border-block: 1px solid var(--border);
}

.privacy-grid {
  display: grid;
  gap: clamp(28px, 3.5vw, 44px);
}

.flow {
  margin: 0;
}

.flow-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr) minmax(0, 1.2fr) minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: stretch;
}

.flow-station {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 2px 6px rgb(43 38 34 / 0.06), 0 22px 40px -28px rgb(43 38 34 / 0.38);
}

.flow-icon,
.flow-packet svg,
.flow-check svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  color: var(--accent-deep);
}

.flow-name {
  font-weight: 750;
  font-size: 1.1rem;
  color: var(--text);
}

.flow-note {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.flow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.flow-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-deep);
}

.flow-station-relay {
  background: var(--text);
  border-color: var(--text);
  padding-block: 34px;
  box-shadow: 0 30px 60px -30px rgb(43 38 34 / 0.55);
}

.flow-station-relay .flow-name {
  color: var(--bg);
}

.flow-station-relay .flow-note {
  color: var(--text-on-dark);
}

.flow-station-relay .flow-icon {
  color: var(--accent-soft);
}

.flow-station-relay .flow-tag {
  color: var(--bg);
}

.flow-station-relay .flow-tag::before {
  background: var(--accent-soft);
}

.flow-wire {
  position: relative;
  align-self: center;
  height: 0;
  margin-inline: 4px;
  border-top: 2px dashed var(--accent-deep);
}

.flow-packet {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent-deep);
  color: var(--bg);
  box-shadow: 0 8px 18px -8px rgb(43 38 34 / 0.6);
}

.flow-packet svg {
  width: 17px;
  height: 17px;
}

.flow.is-in .flow-packet {
  animation: flow-travel 1.6s var(--ease-out) 0.6s both;
}

.flow.is-in .flow-wire-2 .flow-packet {
  animation-delay: 1.5s;
}

@keyframes flow-travel {
  from {
    transform: translate(calc(-50% - 7rem), -50%);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.flow-phones {
  position: relative;
  width: 64px;
  height: 52px;
  margin-bottom: 10px;
}

.flow-phone {
  position: absolute;
  top: 0;
  width: 30px;
  height: 50px;
  border: 2px solid var(--accent-deep);
  border-radius: 9px;
  background: var(--surface);
}

.flow-phone-back {
  left: 0;
  top: 6px;
}

.flow-phone-front {
  left: 30px;
  z-index: 1;
}

.flow-views {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: clamp(36px, 5vw, 56px);
}

.flow-view {
  padding: clamp(24px, 3vw, 34px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}

.flow-view h3 {
  font-size: 1.2rem;
}

.flow-view-relay {
  background: var(--text);
  border-color: var(--text);
}

.flow-view-relay h3 {
  color: var(--bg);
}

.flow-cipher {
  margin-top: 16px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--text-on-dark);
}

.flow-view-note {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.flow-view-relay .flow-view-note {
  color: var(--text-on-dark);
}

.flow-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.flow-list li.is-done {
  color: var(--text-muted);
}

.flow-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent-deep);
  border-radius: 50%;
}

.flow-check-done {
  background: var(--accent-deep);
}

.flow-check svg {
  width: 13px;
  height: 13px;
  stroke: var(--on-accent);
  stroke-width: 3;
}

@media (max-width: 760px) {
  .flow-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-wire {
    width: 2px;
    height: 56px;
    margin-inline: auto;
    border-top: 0;
    border-left: 2px dashed var(--accent-deep);
  }

  .flow-packet {
    top: 50%;
  }

  .flow.is-in .flow-packet {
    animation: none;
  }

  .flow-views {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-packet {
    animation: none !important;
  }
}

.privacy-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* How it works */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-width: 52rem;
}

.step {
  display: grid;
  grid-template-columns: clamp(64px, 7vw, 92px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.step:last-child {
  border-bottom: 1px solid var(--border);
}

.step-num {
  color: var(--accent-deep);
  font-size: clamp(2.6rem, 4.4vw, 3.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.step p {
  margin-top: 0.5rem;
  color: var(--text-muted);
  max-width: 40rem;
}

/* Keep: stacked rows, heading left, plain words right */

.keep-grid {
  display: grid;
  max-width: 60rem;
}

.keep {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.keep:last-child {
  border-bottom: 1px solid var(--border);
}

.keep p {
  color: var(--text-muted);
}

/* For the curious */

.section-curious {
  background: var(--text);
  color: var(--bg);
}

.section-curious h2 {
  color: var(--bg);
}

.section-curious .lead {
  color: var(--text-on-dark);
}

.section-curious .section-head .lead {
  color: var(--text-on-dark);
}

.curious-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.curious-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.curious-list li {
  padding: 22px 0;
  border-top: 1px solid var(--line-on-dark);
  color: var(--text-on-dark);
}

.curious-list li:last-child {
  border-bottom: 1px solid var(--line-on-dark);
}

.curious-list strong {
  display: block;
  color: var(--bg);
  font-weight: 700;
  margin-bottom: 4px;
}

.section-curious a {
  color: var(--accent-soft);
}

.section-curious a:hover {
  color: var(--surface);
}

/* FAQ */

.faq-wrap {
  max-width: 60rem;
}

.faq {
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.35s var(--ease-out), background-color 0.25s var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  background: var(--accent-container);
  border-color: var(--accent-soft);
}

.faq details p {
  padding: 0 60px 24px 0;
  color: var(--text-muted);
  max-width: 46rem;
}

/* Close */

.close {
  padding-block: var(--space-section);
  text-align: center;
}

.close-inner {
  display: grid;
  justify-items: center;
}

.close .lead {
  margin-top: 1.2rem;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-inner ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-inner a {
  color: var(--text);
}

.footer-inner a:hover {
  color: var(--accent-deep);
}

/* Reveal on scroll: visible by default, animated only when JS is on and motion is allowed */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn {
    transition: none;
  }
}

/* Narrower screens */

@media (max-width: 960px) {
  .hero-grid,
  .curious-grid,
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    margin-top: 16px;
  }

  .ledger {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .keep {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .faq details p {
    padding-right: 0;
  }
}

@media (max-width: 420px) {
  .phone {
    width: 40%;
  }

  .ledger-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
  }

  .ledger-row .illus {
    width: 64px;
    height: 64px;
  }
}

/* Illustrations are inline SVG, so the theme colors reach them */

.illus .fh-line {
  fill: var(--accent);
}

.illus .fh-shirt {
  fill: var(--complement);
}

.illus .fh-none {
  fill: none;
}

.illus .fh-accent {
  fill: var(--accent);
}

.illus .fh-ink {
  fill: var(--text);
}

/* Theme picker */

.theme-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.theme-tile {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.theme-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -22px rgb(43 38 34 / 0.45);
}

.theme-tile[aria-pressed="true"] {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-container);
}

.theme-swatches {
  display: flex;
  gap: 6px;
}

.theme-swatches i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgb(43 38 34 / 0.12);
}

.theme-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.theme-now {
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Growth rows: heading on the left, plain words on the right */

.grow-rows {
  display: grid;
  max-width: 60rem;
}

.grow-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(20px, 4vw, 56px);
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.grow-row:last-child {
  border-bottom: 1px solid var(--border);
}

.grow-row p {
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .grow-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

/* A theme change fades the page colors; reduced motion skips the fade */

html.theme-changing *,
html.theme-changing *::before,
html.theme-changing *::after {
  transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out), color 0.5s var(--ease-out), fill 0.5s var(--ease-out) !important;
}

/* Character scenes: a tool's own illustration, shown large beside a section heading */

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.section-split .section-head {
  margin-bottom: 0;
}

.scene svg {
  display: block;
  width: 100%;
  height: auto;
}

.scene-close {
  width: min(100%, 300px);
  margin: 0 auto clamp(28px, 3.5vw, 44px);
}

@media (max-width: 760px) {
  .section-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-split .scene {
    width: min(100%, 240px);
    margin-top: 28px;
  }
}

/* The logo in white, used at the top of the dark hero */

.band-mark {
  width: 100%;
  color: var(--on-accent);
}

.band-mark .mark {
  width: 100%;
}

.ticker {
  padding-block: 22px;
  border-top: 1px solid var(--accent-soft);
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 36s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  color: var(--on-accent);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ticker-track span::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker {
    display: none;
  }
}

/* One hero: the dark band, the logo in white, the headline, the buttons, and the screens */

.hero.hero-band {
  padding: 0;
  overflow: hidden;
  background: var(--accent-deep);
  color: var(--on-accent);
}

.hero-band .hero-grid {
  padding-block: clamp(40px, 6vw, 72px) var(--space-section);
}

.hero-band .band-mark {
  width: min(100%, 520px);
  margin-bottom: clamp(20px, 3vw, 32px);
}

.hero-band h1 {
  color: var(--on-accent);
}

.hero-band .lead,
.hero-band .fine {
  color: var(--on-accent);
}

.hero-band .btn-primary {
  background: var(--bg);
  color: var(--text);
}

.hero-band .btn-primary:hover {
  background: var(--surface);
  color: var(--text);
}

.hero-band .btn-secondary {
  color: var(--on-accent);
  border-color: var(--on-accent);
}

.hero-band .btn-secondary:hover {
  background: var(--on-accent);
  color: var(--accent-deep);
}

.hero-band .hero-visual figcaption {
  color: var(--on-accent);
}

/* Who touches your data: the same rows as the growth section, with a term and what it means */

.who-rows {
  max-width: 60rem;
  margin: 28px 0 0;
}

.who-rows dt {
  font-weight: 700;
  color: var(--text);
}

.who-rows dd {
  margin: 0;
  color: var(--text-muted);
}

/* See it in action: the app's screens in a carousel */

.carousel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.carousel-head .section-head {
  margin-bottom: 0;
}

.carousel-controls {
  display: flex;
  gap: 10px;
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}

.carousel-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-track {
  position: relative;
  display: flex;
  gap: clamp(16px, 2.5vw, 28px);
  margin: 0;
  padding: 4px 0 8px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 min(84%, 720px);
  margin: 0;
  scroll-snap-align: start;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 2px 6px rgb(43 38 34 / 0.05), 0 26px 44px -30px rgb(43 38 34 / 0.4);
}

.slide-shot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(260px, 38vw, 400px);
  margin: 0;
  padding: clamp(16px, 2vw, 24px);
  background: var(--surface-variant);
}

.slide-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.slide-phone .slide-shot img {
  width: auto;
  aspect-ratio: 390 / 844;
  padding: 8px;
  background: var(--text);
  border-radius: 34px;
}

.slide-copy {
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px) clamp(24px, 3vw, 32px);
}

.slide-copy h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
}

.slide-copy p {
  margin-top: 10px;
  max-width: 36rem;
  color: var(--text-muted);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: clamp(20px, 2.5vw, 28px);
}

.carousel-dots button {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--border-strong);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.carousel-dots button[aria-current="true"]::before {
  width: 26px;
  background: var(--accent-deep);
}

/* For the curious: the family binder's illustration, under the lead */

.scene-curious {
  width: min(100%, 300px);
  margin-top: clamp(32px, 4vw, 56px);
}

/* The two panels under the privacy diagram arrive one after the other */

.flow-views .flow-view + .flow-view {
  transition-delay: 0.15s;
}
