/* Keep it, Sell it, Donate it: marketing site (dummy)
   Brand rules: three full-bleed stripes behind everything, the Keep / Sell / Donate
   header is the site title and is never covered, all copy sits in white boxes with black text. */

:root {
  --keep: #3fb0d4;
  --sell: #7ed957;
  --donate: #ff5757;
  --discard: #8c52ff;
  --ink: #000000;
  --text: #0a1628;
  --muted: #334155;
  --line: #d7e6f6;
  --soft: #e6f6fb;
  --white: #ffffff;
  --radius: 22px;
  --head-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 14px); }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
  font-size: 1.0625rem;
  background-color: var(--keep);
  /* The three stripes. Fixed so they stay put while white boxes scroll over them. */
  background-image: linear-gradient(
    90deg,
    var(--keep) 0 33.333%,
    var(--sell) 33.333% 66.666%,
    var(--donate) 66.666% 100%
  );
  -webkit-text-size-adjust: 100%;
}

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

a, button, summary { touch-action: manipulation; }
a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 300;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Brand header: the site title. Sticky, opaque, always on top. ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.brand {
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(90deg, var(--keep) 0 33.333%, var(--sell) 33.333% 66.666%, var(--donate) 66.666% 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: var(--head-h);
  text-decoration: none;
  color: var(--white);
}

.brand-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0.5rem 0.25rem;
}
.brand-cell + .brand-cell { border-left: 1px solid rgba(255, 255, 255, 0.55); }
.brand-keep { background: var(--keep); }
.brand-sell { background: var(--sell); }
.brand-donate { background: var(--donate); }

.brand-cell img {
  width: clamp(34px, 5.5vw, 48px);
  height: clamp(34px, 5.5vw, 48px);
  border-radius: 10px;
  display: block;
}

.brand-word {
  font-size: clamp(0.85rem, 1.7vw, 1.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
}
.brand-word small { font-size: 1em; font-weight: 700; margin-left: 0.18em; }

/* ---------- Layout ---------- */

.wrap {
  width: min(100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px), 1080px);
  margin-inline: auto;
}

main { padding-block: 1rem 2rem; }

.card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  margin-block: clamp(0.85rem, 2vw, 1.25rem);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.card > h2:first-child, .card > .eyebrow + h2 { margin-top: 0; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(2.05rem, 5.6vw, 3.4rem); font-weight: 800; margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.35rem); font-weight: 800; margin: 0 0 0.85rem; }
h3 { font-size: 1.2rem; font-weight: 800; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 500; line-height: 1.55; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Top nav (inside a white box, never on the stripes) ---------- */

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.7rem 1rem;
  margin-block: 1rem 0;
}
.topnav ul { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; margin: 0; padding: 0; list-style: none; }
.topnav a { font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.topnav .actions { display: flex; gap: 0.5rem; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 1.3rem;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-light { background: var(--soft); color: var(--ink); border-color: var(--line); }
.btn-sm { min-height: 44px; padding: 0 1rem; font-size: 0.92rem; }

.store-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.25rem 0 0.75rem; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 58px;
  padding: 0.5rem 1.2rem 0.5rem 1rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  min-width: 14.5rem; /* both store buttons are always the same width */
}
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: block; line-height: 1.15; }
.store small { display: block; font-size: 0.78rem; font-weight: 600; opacity: 0.85; }
.store strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }

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

.hero { display: grid; gap: 1.5rem 2.5rem; align-items: center; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.15fr 0.85fr; } }

.snap-line { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.snap-line li {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-weight: 800;
  color: var(--white);
  background: var(--ink);
}
.snap-line li:nth-child(1) { background: var(--keep); }
.snap-line li:nth-child(2) { background: var(--sell); color: var(--ink); }
.snap-line li:nth-child(3) { background: var(--donate); }

.hero-note { font-size: 0.92rem; font-weight: 600; color: var(--muted); margin: 0; }

.hero-phones { display: flex; justify-content: center; align-items: flex-start; gap: 0; padding-block: 0.5rem; }
.hero-phones .phone:first-child { transform: rotate(-4deg) translateY(1.4rem); margin-right: -2.2rem; z-index: 1; }
.hero-phones .phone:last-child { transform: rotate(3deg); z-index: 2; }

/* ---------- Phone-shaped stills ---------- */

.phone {
  position: relative;
  width: min(46vw, 214px);
  aspect-ratio: 540 / 1058;
  margin: 0;
  padding: 8px;
  border-radius: 34px;
  background: #0b0b10;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28), inset 0 0 0 2px #2b2b33;
}
.phone::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 34px;
  height: 4px;
  margin-left: -17px;
  border-radius: 4px;
  background: #2b2b33;
}
.phone img { display: block; width: 100%; height: 100%; border-radius: 27px; object-fit: cover; background: var(--soft); }

/* ---------- Answer box ---------- */

.answer { padding-left: clamp(1.25rem, 4vw, 2.5rem); border-left: 10px solid var(--ink); border-image: linear-gradient(180deg, var(--keep) 0 33.3%, var(--sell) 33.3% 66.6%, var(--donate) 66.6%) 1; }
.answer p { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; line-height: 1.55; }

/* ---------- Generic grids ---------- */

.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Each tile has an even border all the way round, in the brand colour for its position. */
.tile {
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 18px;
  border: 3px solid var(--keep);
  background: var(--white);
}
.tile p { margin: 0; font-size: 0.98rem; }
.tile h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.mail { display: inline-block; padding: 0.6rem 0; font-weight: 800; overflow-wrap: anywhere; }
p.last { margin-bottom: 0; }

/* Plain notes list (contact page) */
.notes { display: grid; gap: 0.7rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.notes li { padding: 0.9rem 1.1rem; border-radius: 14px; background: var(--soft); border: 1.5px solid var(--line); }
.notes strong { display: block; }
.grid-2 .tile:nth-child(2n) { border-color: var(--sell); }
.grid-3 .tile:nth-child(3n+2) { border-color: var(--sell); }
.grid-3 .tile:nth-child(3n) { border-color: var(--donate); }
.grid-4 .tile:nth-child(4n+2) { border-color: var(--sell); }
.grid-4 .tile:nth-child(4n+3) { border-color: var(--donate); }
.grid-4 .tile:nth-child(4n) { border-color: var(--discard); }

/* ---------- Video ---------- */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; display: block; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-poster .play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45)); transition: transform 0.15s ease; }
.video-poster:hover .play, .video-poster:focus-visible .play { transform: scale(1.1); }
.video-poster:focus-visible { outline: 4px solid #000; outline-offset: -4px; }
.transcript { margin-top: 1rem; }
.transcript summary { cursor: pointer; font-weight: 700; padding: 0.4rem 0; }
.transcript p { margin: 0.6rem 0 0; max-width: 46rem; }
.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  color: var(--white);
  background: linear-gradient(90deg, var(--keep) 0 33.333%, var(--sell) 33.333% 66.666%, var(--donate) 66.666%);
}
.video-placeholder .inner { background: rgba(0, 0, 0, 0.78); padding: 1.1rem 1.4rem; border-radius: 16px; max-width: 28rem; }
.video-placeholder .play { width: 64px; height: 64px; margin: 0 auto 0.6rem; display: block; }
.video-placeholder p { margin: 0; font-weight: 700; }
.video-placeholder small { display: block; margin-top: 0.3rem; opacity: 0.85; font-weight: 500; }

/* ---------- Steps ---------- */

.steps { display: grid; gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.4rem 1.75rem;
  border-radius: 20px;
  background: var(--soft);
  border: 1.5px solid var(--line);
}
.step .num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  background: var(--ink);
}
.step .phone { margin: 0.4rem 0 1.1rem; width: min(62vw, 210px); }
.step h3 { margin-bottom: 0.4rem; }
.step p { margin: 0; font-size: 0.98rem; }

/* ---------- Rules list ---------- */

.rules { display: grid; gap: 0.7rem; margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: rule; }
.rules li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.4rem;
  border-radius: 14px;
  background: var(--soft);
  border: 1.5px solid var(--line);
  counter-increment: rule;
}
.rules li::before {
  content: counter(rule);
  position: absolute;
  left: 0.9rem;
  top: 0.8rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  font-size: 0.9rem;
}
.rules strong { display: block; }

/* ---------- Features with a phone ---------- */

.split { display: grid; gap: 1.5rem 2.5rem; align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr auto; } }
.split .phone { margin-inline: auto; width: min(60vw, 232px); }

/* ---------- Plans ---------- */

.table-scroll { overflow-x: auto; margin-top: 1rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { padding: 0.75rem 0.8rem; text-align: left; border-bottom: 1.5px solid var(--line); }
thead th { font-weight: 800; border-bottom: 3px solid var(--ink); vertical-align: bottom; }
thead th small { display: block; font-weight: 600; color: var(--muted); }
tbody th { font-weight: 700; }
td strong { font-weight: 800; }
@media (max-width: 520px) {
  table { font-size: 0.86rem; }
  th, td { padding: 0.6rem 0.3rem; }
}

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

.faq { display: grid; gap: 0.6rem; margin-top: 1rem; }
.faq details { border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 3.5rem 1.1rem 1.25rem;
  position: relative;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
/* The + and minus are drawn as bars, not text, so they sit dead centre in the circle. */
.faq summary::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  translate: 0 -50%;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background-color: var(--ink);
  background-image: linear-gradient(var(--white), var(--white)), linear-gradient(var(--white), var(--white));
  background-repeat: no-repeat;
  background-position: center, center;
  background-size: 0.85rem 2px, 2px 0.85rem;
}
.faq details[open] summary::after { background-size: 0.85rem 2px, 0 0; }
.faq details[open] { background: var(--soft); }
.faq .a { padding: 0 1.25rem 1.25rem; }
.faq .a p:last-child { margin-bottom: 0; }

/* ---------- Final CTA + footer ---------- */

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

footer.card { margin-bottom: 2rem; font-size: 0.95rem; }
footer nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0 0 1rem; padding: 0; list-style: none; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
footer p { margin: 0 0 0.5rem; }
footer p a { display: inline-block; padding: 0.6rem 0; }

@media (max-width: 520px) {
  :root { --head-h: 68px; }
  .topnav ul { display: none; }
  .topnav { justify-content: center; }
  .hero-phones .phone { width: 42vw; }
  /* Phone: stack the store buttons at identical width, centred in their box */
  .store-row, .cta .store-row { flex-direction: column; align-items: stretch; justify-content: flex-start; max-width: 20rem; }
  .cta .store-row { margin-inline: auto; }
  .store { width: 100%; justify-content: flex-start; padding-left: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---------- Guide pages (articles) ---------- */

.prose { max-width: 46rem; margin-inline: auto; }
.prose h1 { margin-bottom: 0.6rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.byline { margin: 0 0 1.1rem; font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.crumb { display: flex; width: fit-content; align-items: center; min-height: 44px; margin: 0 0 0.4rem; font-weight: 700; font-size: 0.95rem; }

.toc { margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-radius: 16px; background: var(--soft); border: 1.5px solid var(--line); }
.toc strong { display: block; margin-bottom: 0.2rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc a { display: inline-block; padding: 0.6rem 0; }

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 5px;
}

.note { margin: 1.25rem 0 0; padding: 0.9rem 1.1rem; border-radius: 14px; background: var(--soft); border: 1.5px solid var(--line); font-size: 0.97rem; }
.note p { margin: 0; }
.guides-links a { display: inline-block; padding: 0.6rem 0; font-weight: 700; }

/* Tile titles that link to a guide */
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; }

/* Printing: the moving guide prints only its checklist */
@media print {
  .site-head, .skip-link, .no-print, footer, .store-row, .topnav { display: none !important; }
  body { background: #fff !important; }
  body[data-print] .card:not(.printable) { display: none !important; }
  .card { box-shadow: none !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important; }
  .checklist li { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* Guide cards that mix prose and tiles: keep both on the same column */
.card > .prose + .grid { max-width: 46rem; margin-inline: auto; }
.card:has(> .steps) .prose { max-width: none; }

/* App Store badge while the iPhone app is not yet live */
.store-soon { opacity: 0.7; cursor: default; }
