/* BuyThisAgain marketing site — tokens sampled directly from the app icon
   (median-cut quantization of icon-1024.png: a matte sapphire shopping bag
   in a glowing cyan repeat-loop on a deep navy gradient), not guessed. Same
   approach ../swornin/ and ../quickvars/ use for their own palettes.
   Typography: Space Grotesk for headlines/eyebrows — deliberately different
   from swornin's serif Fraunces and quickvars' SF Mono, a confident
   geometric grotesk that reads as "consumer utility," not "developer tool"
   or "keepsake." Inter for body copy, consistent with the other two. */

:root {
  --ink: #050a3a;
  --surface: #0d1f5e;
  --surface-2: #15326e;
  --paper: #f2f5fa;
  --muted: #8fa3d9;
  --cyan: #5ceafa;
  --line: #1c3f8f;

  --font-display: 'Space Grotesk', 'Segoe UI', ui-sans-serif, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 720px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--paper);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

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

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.nav-word {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--paper);
}

.nav-word img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.nav-word span {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

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

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

.hero {
  padding-top: 48px;
  padding-bottom: 64px;
  text-align: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 28px;
  border-radius: 22px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5.4vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 auto 24px;
  max-width: 17ch;
}

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

.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 auto 32px;
}

.hero-sub strong {
  color: var(--paper);
  font-weight: 600;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--cyan);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}

/* ---------- Sections ---------- */

section.block {
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}

.block-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
}

.steps {
  display: grid;
  gap: 20px;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--cyan);
  padding-top: 2px;
}

.step h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.facts {
  display: grid;
  gap: 24px;
}

.fact {
  border-left: 2px solid var(--line);
  padding-left: 18px;
}

.fact h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-display);
}

.fact p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.mission {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-align: center;
  margin: 0 auto;
}

.mission .accent {
  color: var(--cyan);
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--paper);
}

.footer-word {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Legal / article pages ---------- */

.article {
  padding-top: 48px;
  padding-bottom: 64px;
}

.article h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.article .updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 40px;
}

.article h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 12px;
}

.article p,
.article li {
  color: var(--paper);
  font-size: 15.5px;
  line-height: 1.7;
}

.article p {
  margin: 0 0 16px;
}

.article ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.article code {
  font-family: var(--font-display);
  font-size: 0.9em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 5px;
}

.article a {
  color: var(--cyan);
}

.article strong {
  color: var(--paper);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 32px;
}

.back-link:hover {
  color: var(--paper);
}

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

.faq-item:first-child {
  border-top: none;
  padding-top: 0;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 560px) {
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Phone frame (shared by /buythisagain/tour) ---------- */

.phone-frame {
  width: 300px;
  height: 620px;
  margin: 0 auto;
  background: #ffffff;
  border: 10px solid #000;
  border-radius: 46px;
  position: relative;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  flex-shrink: 0;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #000;
  border-radius: 12px;
  z-index: 5;
}

.phone-screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 44px 18px 18px;
  color: #12151d;
  font-family: var(--font-body);
  text-align: left;
}

/* ---------- App-screen content (inside .phone-screen) ---------- */

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-step-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a93a1;
  font-family: var(--font-display);
}

.app-close {
  color: #8a93a1;
  font-size: 15px;
  line-height: 1;
}

.app-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 14px;
  color: #12151d;
}

.app-input {
  width: 100%;
  border: 1px solid #e2e5eb;
  border-radius: 10px;
  background: #f4f6f9;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: #12151d;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.app-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8a93a1;
  margin: 4px 0 8px;
  font-family: var(--font-display);
}

.app-value {
  font-weight: 700;
  font-size: 18px;
  font-family: var(--font-display);
  color: #12151d;
  margin: 2px 0 14px;
}

.app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.app-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #12151d;
  color: #f2f5fa;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}

.app-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.app-btn-ghost {
  display: block;
  width: 100%;
  border: 1px solid #e2e5eb;
  border-radius: 12px;
  background: transparent;
  color: #12151d;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 13px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}

.app-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #eef0f4;
}

.app-row-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #eef1f6;
  flex-shrink: 0;
  overflow: hidden;
}

.app-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-row-body {
  flex: 1;
  min-width: 0;
}

.app-row-name {
  font-size: 14px;
  font-weight: 600;
  color: #12151d;
  margin: 0;
}

.app-row-value {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: #99a1b0;
  margin: 1px 0 0;
}

.app-badge {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #566073;
  background: #eef1f6;
  border-radius: 6px;
  padding: 3px 6px;
  flex-shrink: 0;
}

.app-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.app-chip {
  border: 1px solid #e2e5eb;
  background: #f4f6f9;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--font-body);
  color: #566073;
}

.app-chip .k {
  display: block;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #99a1b0;
  margin-bottom: 2px;
}

.app-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #f4f6f9;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.app-price-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #12151d;
}

.app-price-meta {
  font-size: 11.5px;
  color: #8a93a1;
}

.app-empty {
  text-align: center;
  padding: 60px 12px 20px;
}

.app-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
}

.app-empty h2 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 8px;
  color: #12151d;
}

.app-empty p {
  font-size: 12.5px;
  color: #8a93a1;
  margin: 0 0 20px;
  line-height: 1.5;
}

.app-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #8a93a1;
  font-family: var(--font-display);
}

/* ---------- /buythisagain/tour ---------- */

.tour-row {
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.tour-row:nth-child(even) {
  flex-direction: row-reverse;
}

.tour-copy {
  flex: 1;
  min-width: 0;
}

.tour-copy .block-label {
  color: var(--cyan);
  margin-bottom: 14px;
}

.tour-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.tour-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 40ch;
}

.tour-mini-frame {
  width: 260px;
  height: 540px;
}

.tour-outro {
  text-align: center;
  padding: 64px 0 80px;
  border-top: 1px solid var(--line);
}

.tour-outro p {
  color: var(--muted);
  margin-bottom: 24px;
}

@media (max-width: 720px) {
  .tour-row,
  .tour-row:nth-child(even) {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .tour-copy p {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
}
