/*
 * LovePicto site styles.
 *
 * The palette mirrors lib/core/theme/app_colors.dart on purpose: warm neutral
 * paper carries the layout and a muted rose marks actions. The site should feel
 * like the same product as the app — editorial and calm, not a pink Valentine's
 * page.
 */

:root {
  /* Accent — muted rose, never candy pink */
  --rose-50: #fdf2f4;
  --rose-100: #fae3e7;
  --rose-300: #e9a9b6;
  --rose-500: #d4526c;
  --rose-600: #bc4059;
  --rose-700: #973247;

  /* Secondary — dusk plum */
  --plum-400: #8a7ba8;
  --plum-600: #5f5480;

  /* Warm neutrals */
  --ink-900: #16131a;
  --ink-700: #3a3440;
  --ink-500: #6b6470;
  --ink-300: #a9a2af;
  --ink-100: #e6e2e9;
  --paper: #fbfafb;
  --paper-alt: #f2f0f4;
  --white: #ffffff;

  --premium: #c9a227;
  --success: #2f9e68;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --page-max: 1120px;
  --shadow-soft: 0 1px 2px rgba(22, 19, 26, 0.04),
    0 12px 32px rgba(22, 19, 26, 0.06);
  --shadow-lift: 0 2px 4px rgba(22, 19, 26, 0.05),
    0 24px 60px rgba(22, 19, 26, 0.1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--rose-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.lead {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--ink-500);
  line-height: 1.65;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-600);
  margin-bottom: 14px;
}

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

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--rose-500);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(212, 82, 108, 0.28);
}

.btn-primary:hover {
  background: var(--rose-600);
  box-shadow: 0 12px 30px rgba(212, 82, 108, 0.34);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink-900);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-soft);
}

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

.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 202px;
  height: 64px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 13px;
  box-shadow: 0 12px 26px rgba(8, 8, 10, 0.22);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, background 0.18s ease;
}

.store-badge:hover {
  box-shadow: 0 16px 34px rgba(8, 8, 10, 0.3);
  text-decoration: none;
  transform: translateY(-2px);
}

.store-badge > img {
  display: block;
  width: 202px;
  height: 64px;
  max-width: none;
}

.store-badge-icon {
  flex: 0 0 auto;
}

.play-icon {
  width: 31px;
  height: 35px;
}

.apple-icon {
  width: 29px;
  height: 35px;
}

.store-badge-copy {
  display: block;
  text-align: left;
  white-space: nowrap;
}

.store-badge small {
  display: block;
  margin-bottom: 1px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.1;
  text-transform: uppercase;
}

.store-badge strong {
  display: block;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.store-badge.is-disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
}

/* ------------------------------------------------------------------ nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 251, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ink-100);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink-900);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  object-fit: contain;
}

.brand-wordmark-frame {
  position: relative;
  display: block;
  width: 142px;
  height: 34px;
  overflow: hidden;
  flex: none;
}

.brand-wordmark {
  position: absolute;
  top: -15px;
  left: -10px;
  display: block;
  width: 160px;
  height: auto;
  max-width: none;
  mix-blend-mode: multiply;
}

.footer .brand {
  font-size: 1.18rem;
}

.footer .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  color: var(--ink-700);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--rose-600);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  background: var(--paper-alt);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.lang-switch button {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  transition: all 0.16s ease;
}

.lang-switch button.is-active {
  background: var(--white);
  color: var(--ink-900);
  box-shadow: 0 1px 3px rgba(22, 19, 26, 0.1);
}

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

.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 8vw, 88px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(
    circle,
    rgba(233, 169, 182, 0.28) 0%,
    rgba(138, 123, 168, 0.1) 45%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--rose-500), var(--plum-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin-bottom: 32px;
  max-width: 46ch;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

/* --------------------------------------------------------------- device --
 * A screenshot in a handset bezel. The pictures are real exports of the app
 * (admin/lovepicto/android*), cropped to the screen and served as WebP, so the
 * page shows the product rather than a drawing of it. Each image keeps its own
 * height — the frame wraps whatever it is given, which is why nothing is
 * cropped and no two shots need the same aspect ratio.
 */
.device {
  position: relative;
  background: linear-gradient(160deg, #2c2733, var(--ink-900) 45%, #1c1822);
  border-radius: 34px;
  padding: 7px;
  box-shadow: var(--shadow-lift);
  flex: none;
}

.device img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  display: block;
  background: var(--paper-alt);
}

/* The pill cut into the top bezel — the one piece of the handset the crop
   removes, because the screenshot starts below it. */
.device::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  z-index: 2;
}

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

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 1px;
}

.hero-visual .glow {
  position: absolute;
  inset: -14% -6% auto;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(233, 169, 182, 0.42),
    rgba(138, 123, 168, 0.16) 52%,
    transparent 72%
  );
  filter: blur(6px);
  pointer-events: none;
}

.hero-visual .device-front {
  position: relative;
  z-index: 2;
  width: min(272px, 66vw);
  transform: rotate(-2deg);
}

.hero-visual .device-back {
  position: absolute;
  z-index: 1;
  top: 46px;
  left: 50%;
  width: min(206px, 50vw);
  margin-left: 74px;
  transform: rotate(7deg);
  opacity: 0.96;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin: 30px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid var(--ink-100);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-stats strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}

.hero-stats span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-500);
}

/* ------------------------------------------------------ template marquee --
 * Real template artwork, moving slowly in two rows that drift against each
 * other. The catalogue is the product — this is the one place on the page
 * where it gets to be the colour. Every tile is the same 3:4 card, so the
 * rows read as a shelf rather than a pile. Each track holds its tiles twice
 * and translates exactly half its width, so the loop has no seam.
 */
.strip {
  --tile-w: clamp(148px, 17vw, 216px);
  --tile-gap: clamp(14px, 2vw, 22px);
  display: grid;
  gap: var(--tile-gap);
  padding: clamp(36px, 6vw, 64px) 0;
  background: linear-gradient(180deg, var(--paper), var(--rose-50) 50%, var(--paper));
  overflow: hidden;
}

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  gap: var(--tile-gap);
  width: max-content;
  /* Top and bottom: room for the hover lift and the shadow, which overflow:
     hidden would clip. Right: one more gap, so half the track is exactly one
     set of tiles plus its gaps and -50% lands on the seam. */
  padding: 10px var(--tile-gap) 26px 0;
  animation: marquee 80s linear infinite;
}

/* The second row runs the other way and starts half a tile along, so no two
   covers ever line up in a column. */
.marquee-reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 92s;
  margin-left: calc(var(--tile-w) / -2);
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.tile {
  flex: none;
  width: var(--tile-w);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--rose-50);
  box-shadow:
    0 1px 2px rgba(22, 19, 26, 0.06),
    0 10px 24px rgba(22, 19, 26, 0.1),
    0 0 0 1px rgba(22, 19, 26, 0.04);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow:
    0 2px 4px rgba(22, 19, 26, 0.08),
    0 20px 38px rgba(22, 19, 26, 0.16),
    0 0 0 1px rgba(22, 19, 26, 0.04);
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* -------------------------------------------------------------- showcase --
 * One feature, its copy and the screen it actually looks like. Alternating
 * sides rather than a grid of cards, because these four are the reasons to
 * install and a card would give them the same weight as everything else.
 */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  padding: clamp(36px, 5vw, 56px) 0;
}

.showcase + .showcase {
  border-top: 1px solid var(--ink-100);
}

.showcase-reverse .showcase-copy {
  order: 2;
}

.showcase-copy h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.showcase-copy > p {
  color: var(--ink-500);
  font-size: 1.02rem;
  line-height: 1.65;
}

.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--rose-100);
  color: var(--rose-600);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ticks {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding: 8px 0 8px 30px;
  font-size: 0.96rem;
  color: var(--ink-700);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rose-100);
}

.ticks li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 18px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--rose-600);
  border-bottom: 2px solid var(--rose-600);
  transform: rotate(-45deg);
}

.showcase-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}

.showcase-media .device {
  width: min(246px, 60vw);
}

.showcase-media .device-aside {
  width: min(206px, 48vw);
  margin-top: 44px;
}

/* --------------------------------------------------------------- helpers -- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.chip-cloud-center,
.lang-list-center {
  justify-content: center;
}

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

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-alt {
  background: var(--paper-alt);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 48px;
}

.section-head h2 {
  margin-bottom: 14px;
}

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

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

.card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-500);
  font-size: 0.95rem;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--rose-50);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--rose-600);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--ink-100);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-700);
}

.chip-accent {
  background: var(--rose-500);
  border-color: var(--rose-500);
  color: var(--white);
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lang-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--ink-100);
  font-size: 0.93rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------ cta --- */

.cta {
  background: linear-gradient(135deg, var(--ink-900), #2b2333 60%, #40314a);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 68px);
  text-align: center;
}

.cta h2 {
  margin-bottom: 14px;
}

.cta p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 52ch;
  margin: 0 auto 32px;
}

.cta .store-row {
  justify-content: center;
}

.cta .store-badge {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.cta .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--white);
  box-shadow: none;
}

/* A desktop visitor installs on their phone, so the closing card offers a code
   to scan. "Get the app" in the header lands here on a desktop; on a phone the
   same button goes straight to that phone's store, and a code you would have
   to scan with the screen it is on is hidden. */
.cta-qr {
  display: none;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.cta-qr img {
  width: 96px;
  height: 96px;
  padding: 8px;
  background: var(--white);
  border-radius: var(--radius-md);
}

.cta .cta-qr p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  .cta-qr {
    display: flex;
  }
}

#download {
  scroll-margin-top: 96px;
}

/* The closing card gets the editor screen leaning out of its right edge — the
   last thing on the page should be the thing you get, not another paragraph.
   It only appears where there is room for it beside the copy. */
.cta {
  position: relative;
  overflow: hidden;
}

.cta-copy {
  position: relative;
  z-index: 2;
}

.cta-visual {
  display: none;
  position: absolute;
  right: clamp(24px, 5vw, 64px);
  top: 46px;
  width: 204px;
  z-index: 1;
}

.cta-visual .device {
  width: 100%;
  transform: rotate(-6deg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

@media (min-width: 981px) {
  .cta {
    text-align: left;
    padding-right: 330px;
  }

  .cta p {
    margin-left: 0;
    margin-right: 0;
  }

  .cta .store-row {
    justify-content: flex-start;
  }

  .cta-visual {
    display: block;
  }
}

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

.footer {
  border-top: 1px solid var(--ink-100);
  padding: 48px 0 40px;
  margin-top: 8px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

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

.footer-links a {
  color: var(--ink-500);
  font-size: 0.9rem;
}

.footer-legal {
  margin-top: 26px;
  font-size: 0.84rem;
  color: var(--ink-300);
}

/* ------------------------------------------------------------ doc pages --- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 88px;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  margin-bottom: 10px;
}

.doc .updated {
  color: var(--ink-300);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

.doc h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
}

.doc h3 {
  font-size: 1.02rem;
  margin: 26px 0 8px;
}

.doc p,
.doc li {
  color: var(--ink-700);
  font-size: 0.98rem;
}

.doc p {
  margin-bottom: 14px;
}

.doc ul,
.doc ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc .callout {
  background: var(--rose-50);
  border: 1px solid var(--rose-100);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
}

.doc .callout p:last-child {
  margin-bottom: 0;
}

/* Publisher contact at the foot of the legal pages. Written into the HTML
   rather than filled by shared.js: store reviewers and crawlers read the page
   without running it, and Apple's minimum EULA terms want the name, address,
   phone and email to be there. */
.doc .doc-contact {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 8px 0 24px;
}

.doc .doc-contact-name {
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 12px;
}

.doc .doc-contact dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
}

.doc .doc-contact dt {
  color: var(--ink-500);
  font-size: 0.88rem;
}

.doc .doc-contact dd {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

@media (max-width: 420px) {
  .doc .doc-contact dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .doc .doc-contact dd + dt {
    margin-top: 10px;
  }
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.93rem;
}

.doc th,
.doc td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--ink-100);
  vertical-align: top;
}

.doc th {
  font-weight: 700;
  color: var(--ink-900);
}

.doc td {
  color: var(--ink-500);
}

.doc h2 {
  scroll-margin-top: 88px;
}

/* Table of contents on the long legal pages. Plain list, no card — the page
   should read like a document, not a dashboard. */
.doc-toc {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 18px 22px 6px;
  margin: 0 0 36px;
}

.doc-toc h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 10px;
}

.doc-toc ol {
  margin: 0 0 12px;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
}

.doc-toc li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  break-inside: avoid;
}

.doc-toc a {
  color: var(--ink-700);
}

.doc-toc a:hover {
  color: var(--rose-600);
}

/* Wide tables scroll inside themselves rather than pushing the page sideways. */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 460px;
  margin-bottom: 0;
}

/* Cross-links between the legal documents, at the end of each one. */
.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-100);
}

.doc-nav a {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
  background: var(--white);
}

.doc-nav a:hover {
  border-color: var(--rose-300);
  color: var(--rose-600);
  text-decoration: none;
}

/* Support FAQ. <details> so a long page stays scannable and every answer is
   still in the DOM for search engines and for ⌘F. */
.doc details {
  border-bottom: 1px solid var(--ink-100);
  padding: 4px 0;
}

.doc details > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 30px 14px 0;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-900);
  position: relative;
}

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

.doc details > summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink-300);
}

.doc details[open] > summary::after {
  content: '\2212';
}

.doc details > summary:hover {
  color: var(--rose-600);
}

.doc details > *:not(summary) {
  margin-left: 0;
}

.doc details p:last-child {
  margin-bottom: 16px;
}

/* A quick-action row of buttons under a page title. */
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 36px;
}

@media (max-width: 600px) {
  .doc-toc ol {
    columns: 1;
  }
}

/* ------------------------------------------------------------ redirect ---- */

.redirect {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  text-align: center;
}

.redirect-inner {
  max-width: 420px;
}

.redirect .brand {
  justify-content: center;
  margin-bottom: 28px;
}

.redirect h1 {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  margin-bottom: 12px;
}

.redirect p {
  color: var(--ink-500);
  margin-bottom: 28px;
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 26px;
  border: 3px solid var(--ink-100);
  border-top-color: var(--rose-500);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 980px) {
  .showcase,
  .showcase-reverse {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .showcase-reverse .showcase-copy {
    order: 0;
  }

  .showcase-copy > p {
    margin-left: auto;
    margin-right: auto;
    max-width: 52ch;
  }

  .ticks {
    display: inline-block;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero .store-row,
  .hero-note,
  .hero-stats {
    justify-content: center;
  }

  .hero-stats li {
    align-items: center;
  }

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

  .nav-links {
    display: none;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 0 18px;
  }

  .nav-inner {
    height: 68px;
  }

  .nav .brand {
    gap: 8px;
    font-size: 1.12rem;
  }

  .nav .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .nav .brand-wordmark-frame {
    width: 118px;
    height: 30px;
  }

  .nav .brand-wordmark {
    top: -12px;
    left: -8px;
    width: 134px;
  }

  .store-row .btn {
    width: 100%;
  }

  .store-row .store-badge {
    width: 100%;
    max-width: 230px;
  }

  .hero-visual .device-back {
    display: none;
  }

  .showcase-media .device-aside {
    display: none;
  }

  .hero-stats {
    gap: 12px 22px;
  }

  .tile {
    width: 138px;
  }
}

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

  .btn:hover {
    transform: none;
  }

  .spinner {
    animation-duration: 3s;
  }

  /* A page-wide scroll of artwork is exactly what this setting is for. */
  .marquee-track,
  .marquee-reverse .marquee-track {
    animation: none;
    transform: none;
    margin-left: 0;
  }

  .tile:hover {
    transform: none;
  }

  .marquee {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
