/* StitchCraft marketing site — no frameworks, no JS, system fonts only. */

:root {
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --ink: #2B2430;
  --muted: #6B6070;
  --accent: #C2416B;
  --accent-dark: #A23257;
  --accent-soft: #F8E7EE;
  --border: #ECE2D7;
  --shadow: 0 20px 50px -24px rgba(43, 36, 48, 0.28);
  --radius: 18px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header ---------- */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.site-nav { display: none; gap: 24px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

.header-cta { margin-left: auto; }

@media (min-width: 860px) {
  .site-nav { display: flex; }
  .header-cta { margin-left: 0; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(43, 36, 48, 0.55);
}
.btn-primary:hover { background: #000; color: #fff; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

.btn-small { padding: 9px 18px; font-size: 14px; }

.btn .apple-logo { width: 17px; height: 20px; flex: none; }
.btn-primary .apple-logo path, .btn-accent .apple-logo path { fill: #fff; }

.btn-sub { display: block; font-size: 11px; font-weight: 500; opacity: 0.75; }

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

.hero { padding: 72px 0 40px; overflow: hidden; }

.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
  .hero { padding: 96px 0 64px; }
}

.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 20px;
}

.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.hero-note { font-size: 14px; color: var(--muted); }

.hero-visual { position: relative; display: flex; justify-content: center; }

.hero-fan {
  display: grid;
  place-items: center;
  width: min(460px, 94vw);
  padding: 18px 0 8px;
}

.hero-fan img {
  grid-area: 1 / 1;
  width: 46%;
  border-radius: 30px;
  border: 4px solid var(--ink);
  background: var(--ink);
  box-shadow: 0 16px 36px -20px rgba(43, 36, 48, 0.45);
}

.hero-fan .fan-left {
  transform: translate(-56%, 4.5%) rotate(-8deg);
  z-index: 1;
}

.hero-fan .fan-right {
  transform: translate(56%, 4.5%) rotate(8deg);
  z-index: 1;
}

.hero-fan .fan-center {
  z-index: 2;
  box-shadow: var(--shadow);
}

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

section { padding: 64px 0; }
@media (min-width: 860px) { section { padding: 88px 0; } }

.section-head { max-width: 640px; margin-bottom: 44px; }

h2 {
  font-size: clamp(27px, 3.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin-bottom: 14px;
}

.section-head p { color: var(--muted); font-size: 18px; }

h3 { font-size: 20px; letter-spacing: -0.01em; margin-bottom: 8px; }

.alt-bg { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Card grids ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.alt-bg .card { background: var(--bg); }

.card p { color: var(--muted); font-size: 15.5px; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  margin-bottom: 16px;
}

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

.steps { counter-reset: step; display: grid; gap: 20px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}

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

/* ---------- Screenshot gallery ---------- */

.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 24px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  scrollbar-width: thin;
}

.gallery figure { flex: 0 0 auto; scroll-snap-align: center; width: min(250px, 68vw); }

.gallery img {
  border-radius: 28px;
  border: 4px solid var(--ink);
  background: var(--ink);
  box-shadow: 0 14px 34px -18px rgba(43, 36, 48, 0.4);
}

.gallery figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  font-weight: 500;
}

/* ---------- iPad section ---------- */

.ipad-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .ipad-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; } }

.ipad-lede { color: var(--muted); font-size: 18px; margin: 0 0 24px; }

.ipad-visual { display: flex; justify-content: center; }

.ipad-shot {
  width: min(520px, 92vw);
  border-radius: 24px;
  border: 5px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow);
}

/* ---------- Checklist ---------- */

.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { padding-left: 30px; position: relative; color: var(--muted); }
.checklist li strong { color: var(--ink); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A23257' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}

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

.faq { max-width: 760px; }

#faq .section-head {
  max-width: none;
  text-align: center;
}

#faq .faq { margin: 0 auto; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.alt-bg .faq details { background: var(--bg); }

.faq summary {
  cursor: pointer;
  padding: 18px 48px 18px 22px;
  font-weight: 600;
  font-size: 16.5px;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent-dark);
}
.faq details[open] summary::after { content: "\2212"; }

.faq .faq-a { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; }
.faq .faq-a a { font-weight: 600; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(135deg, #A23257, #C2416B 55%, #D4628C);
  border-radius: 26px;
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.88); max-width: 34em; margin: 0 auto 28px; font-size: 18px; }
.cta-band .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--bg); color: var(--ink); }
.cta-band .btn-primary .apple-logo path { fill: var(--ink); }
.cta-band .app-icon-lg { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 22px; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.4); }

/* ---------- Article / guide pages ---------- */

.article { padding: 56px 0 72px; }
.article .wrap { max-width: 780px; }

.article header h1 { margin-bottom: 16px; }

.article .answer-box {
  background: var(--accent-soft);
  border: 1px solid #F0D2DE;
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 26px 0 36px;
  font-size: 17.5px;
}

.article h2 { margin: 48px 0 16px; }
.article h3 { margin: 32px 0 10px; }
.article p { margin-bottom: 18px; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--accent-dark); font-weight: 600; }

.article .table-scroll { overflow-x: auto; margin-bottom: 18px; }
.article table { border-collapse: collapse; width: 100%; font-size: 15.5px; background: var(--surface); border-radius: 12px; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.article th { background: var(--accent-soft); color: var(--accent-dark); font-weight: 650; }

.article figure { margin: 28px 0; }
.article figure img { border-radius: 22px; border: 4px solid var(--ink); box-shadow: var(--shadow); margin: 0 auto; width: min(300px, 80vw); }
.article figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 12px; }

.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }

.inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 36px 0;
}
.inline-cta img { width: 56px; height: 56px; border-radius: 14px; }
.inline-cta .inline-cta-text { flex: 1 1 240px; }
.inline-cta .inline-cta-text strong { display: block; font-size: 17px; }
.inline-cta .inline-cta-text span { color: var(--muted); font-size: 14.5px; }

/* ---------- Related guides ---------- */

.related { border-top: 1px solid var(--border); padding-top: 40px; margin-top: 56px; }
.related h2 { font-size: 24px; margin: 0 0 20px; }
.related ul { list-style: none; margin: 0; display: grid; gap: 12px; }
.related li { margin: 0; }
.related a { font-weight: 600; }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  background: var(--surface);
  font-size: 14.5px;
  color: var(--muted);
}

.footer-grid { display: grid; gap: 32px; margin-bottom: 36px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.site-footer .brand { margin-bottom: 12px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

.footer-legal { border-top: 1px solid var(--border); padding-top: 22px; font-size: 13px; }
