/* swapleapp.com: the landing, support and privacy pages. Plain CSS, no framework, the system fonts.
   Colours are the app's Cozy palette (apps/ios/Packages/WhiteElephantKit/Sources/DesignSystem/Room/SpeechBubble.swift):
   cream and cocoa by day, Snowy night navy in dark mode. */

:root {
  --page: #fff8ee;
  --card: #ffffff;
  --cream2: #fceedc;
  --line: #ebd3b4;
  --ink: #3a2618;
  --ink2: #7a5f4c;
  --berry: #cc4434;
  --berry-dark: #a8332a;
  --berry-ink: #a8332a;
  --butter: #ffd66b;
  --butter-dark: #e0ae3a;
  --on-butter: #3a2618;
  --focus: var(--berry-ink); /* 5.8:1 or better on page, card and tint, light and dark (WCAG 2.2 wants 3:1) */
  --bezel: #1c1512;
  --shadow: rgba(90, 46, 20, 0.16);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111a2b;
    --card: #1b2740;
    --cream2: #2a3a58;
    --line: #3a4d70;
    --ink: #f1f5fb;
    --ink2: #c5d0e1;
    --berry-ink: #ffb596;
    --bezel: #05070c;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Reduce Motion: no smooth scrolling, transitions, animations or hover lifts, including anything added later. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .guide-card a:hover { transform: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--berry-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--round); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.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; }

/* Header */

.site-header { padding: 18px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--round); font-weight: 800; font-size: 1.375rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink2); text-decoration: none; font-size: 1rem; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--cream2); }
@media (max-width: 480px) { .nav .nav-optional { display: none; } }

/* Hero */

.hero { padding: 32px 0 72px; }
.hero .container { display: grid; gap: 48px; align-items: center; }
@media (min-width: 860px) { .hero .container { grid-template-columns: 1fr auto; gap: 64px; } }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
@media (max-width: 859px) { .hero-copy { justify-items: center; text-align: center; } }
.hero-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px var(--shadow); }
.hero-title { font-size: clamp(1.75rem, 4.2vw, 2.5rem); font-weight: 900; letter-spacing: -0.01em; max-width: 16em; }
.hero-lede { font-size: clamp(1.1875rem, 2.4vw, 1.375rem); color: var(--ink2); max-width: 34em; }
.hero-note { font-size: 0.9375rem; color: var(--ink2); }

/* The wordmark: a visually hidden "Swaple" for screen readers, then six hidden-from-them letters. Cream letters with a berry rim and a berry lip, each tipped a little (SwapleWordmark in the app). */
.wordmark { margin: 0; display: inline-flex; gap: 0.02em; font-family: var(--round); font-weight: 900; font-size: clamp(4rem, 11vw, 6rem); line-height: 1; padding-bottom: 0.12em; }
.wordmark span[aria-hidden] {
  display: inline-block;
  color: #fff8ee;
  -webkit-text-stroke: 0.1em var(--berry);
  paint-order: stroke fill;
  text-shadow: 0 0.03em 0 var(--berry-dark), 0 0.06em 0 var(--berry-dark), 0 0.09em 0 var(--berry-dark), 0 0.17em 0.06em rgba(20, 26, 51, 0.3);
}
.wordmark span:nth-child(2) { transform: rotate(-7deg); }
.wordmark span:nth-child(3) { transform: rotate(4deg) translateY(-0.09em); }
.wordmark span:nth-child(4) { transform: rotate(-3deg) translateY(0.015em); }
.wordmark span:nth-child(5) { transform: rotate(5deg) translateY(-0.075em); }
.wordmark span:nth-child(6) { transform: rotate(-4deg) translateY(-0.015em); }
.wordmark span:nth-child(7) { transform: rotate(6deg) translateY(-0.105em); }

/* Download: Apple's badge once the app is live, a quiet pill until then */

.download { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
@media (max-width: 859px) { .hero .download { justify-content: center; } }
.appstore-badge { display: inline-block; line-height: 0; }
.appstore-badge img { height: 54px; width: auto; }
.coming-soon {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--round); font-weight: 800; font-size: 1.125rem;
  color: #fff; background: var(--berry);
  box-shadow: 0 4px 0 var(--berry-dark);
}
.coming-soon svg { width: 20px; height: 20px; fill: currentColor; }

/* Phones: the app's screenshots in a plain bezel */

.phone {
  --w: 300px;
  width: var(--w);
  max-width: 100%;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.165);
  background: var(--bezel);
  box-shadow: 0 30px 60px -20px var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone-screen { width: 100%; border-radius: calc(var(--w) * 0.135); background: var(--cream2); }
.hero .phone { --w: 320px; margin: 0 auto; }
@media (max-width: 400px) { .hero .phone { --w: 280px; } }

/* Sections */

.section { padding: 72px 0; }
.section.is-tinted { background: var(--cream2); }
.section-head { display: grid; gap: 12px; text-align: center; justify-items: center; margin-bottom: 48px; }
.eyebrow { font-family: var(--round); font-weight: 800; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--berry-ink); }
.section-title { font-size: clamp(1.875rem, 4.6vw, 2.75rem); font-weight: 900; }
.section-lede { color: var(--ink2); max-width: 36em; }

/* Gallery: one row on wide screens, swipe on phones */

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 32px; justify-content: center; }
@media (max-width: 1140px) {
  .gallery { justify-content: start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 24px; margin: 0 -16px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  /* The gallery is a tab stop (arrow keys scroll it); draw the ring inside so the page edge doesn’t clip it. */
  .gallery:focus-visible { outline-offset: -3px; border-radius: 12px; }
}
@media (min-width: 640px) and (max-width: 1140px) { .gallery { padding: 4px 32px 24px; margin: 0 -32px; } }
.shot { margin: 0; display: grid; gap: 20px; align-content: start; scroll-snap-align: center; }
.shot .phone { --w: 250px; }
.shot-title { font-size: 1.3125rem; font-weight: 800; margin-bottom: 6px; }
.shot-text { font-size: 1rem; color: var(--ink2); }

/* How it works */

.steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 24px; display: grid; gap: 10px; align-content: start; }
.step::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--round); font-weight: 900; font-size: 1.25rem;
  background: var(--butter); color: var(--on-butter); box-shadow: 0 3px 0 var(--butter-dark);
  margin-bottom: 6px;
}
.step h3 { font-size: 1.3125rem; font-weight: 800; }
.step p { font-size: 1rem; color: var(--ink2); }

/* Features */

.features { display: grid; gap: 36px 40px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 6px 16px; }
.feature-icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--cream2); color: var(--berry-ink); }
.section.is-tinted .feature-icon { background: var(--card); }
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.1875rem; font-weight: 800; }
.feature p { font-size: 1rem; color: var(--ink2); }

/* Closing call to action */

.cta { text-align: center; display: grid; gap: 22px; justify-items: center; }
.cta .download { justify-content: center; }

/* Documents: support and privacy */

.doc { padding: 24px 0 80px; }
.doc .container { max-width: 760px; }
.doc h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); font-weight: 900; margin-bottom: 12px; }
.doc .doc-lede { font-size: 1.25rem; color: var(--ink2); margin-bottom: 40px; }
.doc h2 { font-size: 1.625rem; font-weight: 800; margin: 48px 0 14px; }
.doc h3 { font-size: 1.1875rem; font-weight: 800; margin: 28px 0 8px; }
.doc p, .doc li { font-size: 1.0625rem; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 12px 0; }
.doc li + li { margin-top: 8px; }
.doc .meta { font-size: 0.9375rem; color: var(--ink2); }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px 26px; display: grid; gap: 8px; }
.contact-card .email { font-family: var(--round); font-size: 1.375rem; font-weight: 800; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: var(--round); font-weight: 800; font-size: 1.1875rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--berry-ink); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > p, .faq details > ul { margin-top: 10px; color: var(--ink2); }
.table-wrap { overflow-x: auto; margin: 16px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--round); font-weight: 800; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 0.9375rem; color: var(--ink2); }
.site-footer .container { display: grid; gap: 32px; }
.footer-columns { display: grid; gap: 28px; }
@media (min-width: 640px) { .footer-columns { grid-template-columns: 1fr 2fr; } }
.footer-heading { font-family: var(--round); font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.footer-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
@media (min-width: 640px) { .footer-columns > div:last-child .footer-list { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.footer-list a { color: var(--ink2); text-decoration: none; }
.footer-list a:hover { color: var(--ink); text-decoration: underline; }
.legal { display: grid; gap: 6px; font-size: 0.875rem; line-height: 1.5; }

/* Guides */

.container.narrow { max-width: 760px; }
.crumbs { font-size: 0.9375rem; color: var(--ink2); margin-bottom: 18px; }
.crumbs a { color: var(--ink2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.guide .meta { margin: -24px 0 32px; }
.prose > :first-child { margin-top: 0; }
.prose p + p, .prose p + ul, .prose p + ol, .prose ul + p, .prose ol + p { margin-top: 14px; }
.prose ol { padding-left: 1.4em; margin: 12px 0; }
.prose ol li + li { margin-top: 8px; }
.tip { margin: 24px 0; padding: 18px 22px; border-radius: 18px; background: var(--cream2); border-left: 5px solid var(--butter-dark); }
.tip p { font-size: 1rem; }
.faq-section h2 { font-size: 1.625rem; font-weight: 800; margin: 48px 0 14px; }
.section .faq-section h2 { margin-top: 0; text-align: center; font-size: clamp(1.75rem, 4vw, 2.375rem); font-weight: 900; margin-bottom: 28px; }
.app-cta { margin: 56px 0 0; padding: 26px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: start; }
@media (max-width: 520px) { .app-cta { grid-template-columns: 1fr; } }
.app-cta img { width: 72px; height: 72px; border-radius: 17px; }
.app-cta-copy { display: grid; gap: 12px; }
.app-cta-copy p { font-size: 1rem; color: var(--ink2); }
.app-cta .app-cta-title { font-family: var(--round); font-weight: 900; font-size: 1.375rem; color: var(--ink); }
.app-cta .coming-soon { font-size: 1rem; padding: 11px 18px; }
.related h2 { font-size: 1.625rem; font-weight: 800; margin: 56px 0 18px; }
.guide-cards { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
@media (min-width: 640px) { .guide-cards { grid-template-columns: repeat(2, 1fr); } }
.guides-index .guide-cards { margin-bottom: 8px; }
.guide-card a { height: 100%; display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s; }
.guide-card a:hover { border-color: var(--berry); transform: translateY(-2px); }
.guide-card-title { font-family: var(--round); font-weight: 800; font-size: 1.1875rem; }
.guide-card-text { font-size: 0.9375rem; color: var(--ink2); }
