/* StitchWorks marketing site */
:root {
  --bg: #faf7f2;
  --bg-alt: #f2ece2;
  --surface: #ffffff;
  --text: #1d1b22;
  --muted: #5c5866;
  --line: #e3dccf;
  --brand: #b4233c;       /* crimson thread */
  --brand-ink: #ffffff;
  --teal: #0f766e;
  --gold: #b7791f;
  --stitch: rgba(180, 35, 60, .55);
  --radius: 18px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(29,27,34,.06), 0 8px 24px rgba(29,27,34,.08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141218;
    --bg-alt: #1b1820;
    --surface: #211e27;
    --text: #f1eef5;
    --muted: #b1abbb;
    --line: #34303c;
    --brand: #ef5a74;
    --brand-ink: #1a0a0e;
    --teal: #3cc4b6;
    --gold: #e3ad4f;
    --stitch: rgba(239, 90, 116, .6);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 17px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.logo svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .97rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .btn { color: var(--brand-ink); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-weight: 600; text-decoration: none; border: 0; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }

/* App Store badges (placeholder artwork — replace with Apple's official badges) */
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 10px; }
.badge { display: inline-flex; align-items: center; gap: 10px; min-width: 200px; padding: 9px 18px 9px 14px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid #a6a6a6; line-height: 1.1; }
.badge svg { width: 26px; height: 26px; fill: #fff; flex: none; }
.badge small { display: block; font-size: .7rem; opacity: .9; }
.badge strong { display: block; font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
.badge:hover { background: #1a1a1a; }
.placeholder-note { font-size: .82rem; color: var(--muted); }
.placeholder-note::before { content: "⚑ "; color: var(--gold); }

/* Hero */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.lede { font-size: 1.22rem; color: var(--muted); max-width: 34em; }
.hero-art { position: relative; }
@media (max-width: 880px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; }
}

/* Stitched frame motif */
.stitched { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.stitched::after { content: ""; position: absolute; inset: 9px; border: 2px dashed var(--stitch); border-radius: calc(var(--radius) - 8px); pointer-events: none; }

/* Screenshot placeholders */
.shot { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: 28px; color: var(--muted); background:
  repeating-linear-gradient(45deg, transparent 0 14px, color-mix(in srgb, var(--line) 55%, transparent) 14px 15px), var(--surface); }
.shot.ipad { aspect-ratio: 4 / 3; }
.shot span { font-size: .88rem; font-weight: 600; background: var(--surface); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); }

/* Sections */
section { padding: 80px 0; }
.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 30px 28px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; }
.feature .icon svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin: 0; }
.i1 { background: var(--brand); } .i2 { background: var(--teal); } .i3 { background: var(--gold); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.shots { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: end; }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 24px; justify-content: center; }
.plan { padding: 40px 36px; text-align: center; }
.plan h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.price { font-size: 3.2rem; font-weight: 750; letter-spacing: -.03em; line-height: 1; margin: 10px 0 4px; }
.price small { font-size: 1.05rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .sub { color: var(--muted); margin-bottom: 0; }
.plan .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--teal); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 680px) { .plans { grid-template-columns: 1fr; } }
.included { max-width: 720px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; padding: 0; list-style: none; }
.included li { padding-left: 30px; position: relative; }
.included li::before { content: ""; position: absolute; left: 0; top: .55em; width: 18px; border-top: 2px dashed var(--brand); }
@media (max-width: 600px) { .included { grid-template-columns: 1fr; } }
.fine { max-width: 720px; margin: 32px auto 0; font-size: .9rem; color: var(--muted); text-align: center; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.06rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* CTA band */
.cta { text-align: center; }
.cta .badges { justify-content: center; }

/* Document pages (legal, support) */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2em; }
.doc h3 { margin-top: 1.5em; }
.doc li { margin-bottom: .4em; }
.meta { color: var(--muted); font-size: .95rem; }
.draft-banner { border: 2px dashed var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); padding: 16px 20px; border-radius: 12px; margin: 0 0 32px; font-size: .97rem; }
.draft-banner strong { color: var(--gold); }
.ph { background: color-mix(in srgb, var(--gold) 22%, transparent); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.cards .stitched { padding: 26px 26px; }
.cards p { color: var(--muted); margin-bottom: .6em; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: .93rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0 0 .4em; max-width: 30em; }

/* Long email addresses and URLs must never cause horizontal scroll on phones */
.doc a, .btn { overflow-wrap: anywhere; }
