/* fitté web: the app's system (fitte-app DESIGN.md). Ink only, the photos
   carry the colour; system type; hairlines instead of shadows. */

:root {
  --text: #0d0d0d;
  --text-2: #6b6b6b;
  --bg: #ffffff;
  --card: #f4f4f4;
  --fill: #f1f1f1;
  --border: #e4e4e4;
  --tint: #0d0d0d;
  --on-tint: #ffffff;
  --error: #d1283f;
  --wordmark-filter: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #ffffff;
    --text-2: #9e9e9e;
    --bg: #000000;
    --card: #1c1c1e;
    --fill: #1c1c1e;
    --border: #2c2c2e;
    --tint: #ffffff;
    --on-tint: #000000;
    --error: #ff5a6e;
    --wordmark-filter: invert(1);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 10px 16px; border-radius: 10px; background: var(--tint); color: var(--on-tint); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }
.narrow { max-width: 760px; }

/* Type */
h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; }
h3 { font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
h1, h2, h3, .lead { text-wrap: balance; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--text-2); }
.muted { color: var(--text-2); }
.meta { font-size: 13px; color: var(--text-2); }

/* Header and footer */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
.nav .left { justify-self: start; }
.nav .right { justify-self: end; }
.nav-links { display: flex; gap: 28px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--text-2); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }
.wordmark { display: block; height: 36px; width: auto; filter: var(--wordmark-filter); }

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.site-footer .links a { color: var(--text-2); text-decoration: none; }
.site-footer .links a:hover { color: var(--text); }
.site-footer .meta { margin-top: 20px; }

/* Store badges (Apple's and Google's own artwork, black) */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badges.center { justify-content: center; }
.badges img { height: 48px; width: auto; }
@media (prefers-color-scheme: dark) { .badges img { outline: 1px solid #3a3a3c; border-radius: 9px; } }

/* Buttons (same as the app's Button) */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--tint); color: var(--on-tint); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.button.secondary { background: var(--fill); color: var(--text); }
.button:disabled { opacity: 0.5; cursor: default; }
.button.small { min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; }

/* Photos and small parts */
.photo { position: relative; overflow: hidden; border-radius: 12px; background: var(--card); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.photo img + img { position: absolute; inset: 0; }
@media (prefers-reduced-motion: no-preference) { .photo img { transition: opacity 0.8s ease; } }
.chip { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 500; }
.swatch { display: inline-block; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); }
.feedback { background: var(--bg); border-radius: 16px; padding: 14px 16px; }
.feedback b { display: block; font-size: 15px; margin-bottom: 4px; }
.feedback p { font-size: 14px; line-height: 1.45; color: var(--text-2); }

/* Sections */
.block { padding: 88px 0 104px; border-top: 1px solid var(--border); }
.block.flush { border-top: 0; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 40px; }
.head p { max-width: 420px; }
.more { font-size: 15px; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Landing: hero */
.wall { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 8px) / 5); gap: 8px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.wall::-webkit-scrollbar { display: none; }
.wall .photo { aspect-ratio: 3 / 4; border-radius: 4px; }
.wall .photo:nth-child(even) { margin-top: 48px; }
@media (max-width: 760px) { .wall { grid-auto-columns: 42%; } .wall .photo:nth-child(even) { margin-top: 28px; } }
.intro { text-align: center; padding: 56px 0 96px; }
.intro .lead { margin: 18px auto 32px; max-width: 480px; }

/* Landing: how it works */
.steps { display: grid; gap: 48px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps .visual { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; background: var(--card); overflow: hidden; margin-bottom: 20px; }
@media (max-width: 899px) { .steps .visual.text { aspect-ratio: auto; height: 300px; } }
.steps .num { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.steps p { margin-top: 8px; font-size: 16px; }
.grid4 { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.grid4 img { width: 100%; height: 100%; object-fit: cover; }
.example { position: absolute; inset: 0; padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.example .tag { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.example .name { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.example .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.example .chip { background: var(--bg); font-size: 13px; }
.steps .over { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.steps .fill { position: absolute; inset: 0; border-radius: 0; }

/* Landing: horizontal rails (app screens, style packs); full bleed on phones */
.rail { display: grid; grid-auto-flow: column; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 767px) { .rail { margin: 0 -24px; padding: 0 24px; scroll-padding: 0 24px; } }

.band { background: var(--card); padding: 88px 0 104px; }
.screens { grid-auto-columns: calc((100% - 4 * 16px) / 5); }
@media (max-width: 1023px) { .screens { grid-auto-columns: 34%; } }
@media (max-width: 767px) { .screens { grid-auto-columns: 64%; } }
.screen img { width: 100%; height: auto; aspect-ratio: 660 / 900; object-fit: cover; object-position: top; border-radius: 16px; border: 1px solid var(--border); background: var(--bg); }
.screen b { display: block; margin-top: 14px; font-size: 16px; }
.screen span { display: block; margin-top: 2px; font-size: 14px; color: var(--text-2); }

.packs { grid-auto-columns: calc((100% - 5 * 16px) / 6); }
@media (max-width: 1023px) { .packs { grid-auto-columns: 26%; } }
@media (max-width: 767px) { .packs { grid-auto-columns: 42%; } }
.pack .photo { aspect-ratio: 4 / 5; }
.pack b { display: block; margin-top: 10px; font-size: 15px; }
.pack span { font-size: 14px; color: var(--text-2); }

/* Landing: FAQ */
.faq { display: grid; gap: 40px; }
@media (min-width: 900px) { .faq { grid-template-columns: 1fr 1.6fr; gap: 80px; } }
details { border-top: 1px solid var(--border); }
details:last-child { border-bottom: 1px solid var(--border); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--text-2); }
details[open] summary::after { content: "–"; }
details p { padding: 0 0 22px; max-width: 620px; color: var(--text-2); font-size: 16px; }
details a { color: var(--text); }

/* Post cards (landing and blog index) */
.posts { display: grid; gap: 40px 28px; }
@media (min-width: 900px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post { display: block; text-decoration: none; }
.post .photo { aspect-ratio: 3 / 2; }
.post .meta { margin-top: 14px; }
.post h3 { font-size: 19px; margin-top: 4px; }
.post p { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.post:hover h3 { text-decoration: underline; text-underline-offset: 3px; }

.cta { text-align: center; padding: 104px 0; border-top: 1px solid var(--border); }
.cta .lead { margin: 16px auto 32px; max-width: 440px; }

/* Cookie consent: both choices equally easy */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 260px; font-size: 14px; color: var(--text-2); }
.consent p a { color: var(--text); }
.consent .actions { display: flex; gap: 8px; }

.hidden { display: none !important; }

/* Text pages: help, privacy, terms, blog posts */
.page-head { padding: 56px 0 48px; }
.page-head .lead { margin-top: 12px; max-width: 560px; }
.doc { padding-top: 56px; padding-bottom: 104px; }
.doc > h1, .doc header h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 12px; }
.doc > h1 + p { color: var(--text-2); margin-bottom: 40px; }
.doc h2 { font-size: 26px; letter-spacing: -0.02em; margin: 48px 0 14px; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; }
.doc p + p { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 22px; margin: 12px 0; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--text); text-underline-offset: 3px; }
.doc a.button { color: var(--on-tint); margin-top: 20px; }
.doc section + section { margin-top: 8px; }
.doc .note { background: var(--card); border-radius: 16px; padding: 20px 22px; margin: 16px 0; }
.doc .note > :first-child { margin-top: 0; }
.faq-list details:first-child { border-top: 1px solid var(--border); }

/* Blog post */
.post-page header { margin-bottom: 32px; }
.post-page header .meta { margin-bottom: 14px; }
.post-page header .meta a { color: var(--text-2); }
.post-page header .lead { margin-top: 4px; }
.post-hero { width: 100%; height: auto; border-radius: 12px; margin-bottom: 40px; }
.prose img, .post-image { width: 100%; height: auto; border-radius: 12px; margin: 28px 0; }
.prose figure { margin: 32px 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--text-2); text-align: center; }
.prose h2 { font-size: 28px; }
.prose blockquote { margin: 24px 0; padding-left: 18px; border-left: 2px solid var(--text); font-size: 19px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose strong { font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.post-page footer { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.blog-list { padding-bottom: 104px; }
.post-word { width: 40% !important; height: auto !important; position: absolute; inset: 0; margin: auto; object-fit: contain !important; filter: var(--wordmark-filter); opacity: 0.25; }

/* Email-link pages (verify email, reset password) */
.auth { max-width: 480px; padding-top: 72px; padding-bottom: 104px; min-height: 60vh; }
.auth h1 { font-size: 34px; letter-spacing: -0.03em; }
.auth .lead { margin: 10px 0 28px; }
.auth .button { width: 100%; }
.auth .help { margin-top: 28px; font-size: 14px; color: var(--text-2); text-align: center; }
.auth .help a { color: var(--text); }
.spinner { display: block; width: 28px; height: 28px; margin-bottom: 24px; border: 3px solid var(--border); border-top-color: var(--text); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Form fields (the app's TextField) */
.form { display: grid; gap: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.field input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid transparent; border-radius: 14px; background: var(--fill); color: var(--text); font: inherit; font-size: 16px; }
.field input::placeholder { color: var(--text-2); }
.field input:focus { outline: none; border-color: var(--text); }
.hint { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.form-error { font-size: 15px; color: var(--error); }
