/* ==========================================================================
   Cafeity — marketing site
   Tokens follow the Cafeity design system (CDS) and the app's current palette.
   ========================================================================== */

:root {
  /* surface */
  --sand-0:   #FFFFFF;
  --sand-50:  #F9F7F3;
  --sand-100: #F1EEE8;
  --sand-200: #E4E0D8;
  --sand-300: #CFCAC0;
  --sand-400: #A9A399;
  --sand-500: #807A70;
  --sand-900: #1A1817;
  --ink:      #14110F;

  /* brand + metric accents */
  --violet:   #6C5CE7;
  --violet-d: #5B4BC4;
  --violet-w: #EFECFD;
  --protein:  #B5806A;
  --water:    #2F80ED;
  --fibre:    #10B4A8;
  --weight:   #E05FA8;

  /* type */
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* rhythm — 4pt grid, 8pt working */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;
  --s20: 80px; --s24: 96px; --s32: 128px;

  --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --r-xl: 40px; --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20,17,15,.06), 0 2px 8px rgba(20,17,15,.04);
  --shadow-md: 0 2px 4px rgba(20,17,15,.05), 0 12px 32px rgba(20,17,15,.08);
  --shadow-lg: 0 8px 24px rgba(20,17,15,.08), 0 32px 64px rgba(20,17,15,.12);

  --maxw: 1200px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s5); }
.section { padding-block: var(--s20); }
.section--tight { padding-block: var(--s16); }
@media (min-width: 900px) { .section { padding-block: var(--s24); } }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  color: var(--sand-500);
  background: var(--sand-0);
  border: 1px solid var(--sand-200);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  margin-bottom: var(--s4);
}
.h1 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem); line-height: 1.05; }
.h2 { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem); line-height: 1.12; }
.h3 { font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.75rem); line-height: 1.2; }
.lede { font-size: clamp(1rem, .95rem + .35vw, 1.125rem); line-height: 1.6; color: var(--sand-500); max-width: 62ch; }
.muted { color: var(--sand-500); }
.fine { font-size: 13px; line-height: 1.5; color: var(--sand-400); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s6);
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.btn--primary { background: var(--ink); color: var(--sand-0); }
.btn--primary:hover { background: #2b2522; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: var(--sand-0); color: var(--ink); border-color: var(--sand-200); }
.btn--ghost:hover { border-color: var(--sand-300); transform: translateY(-1px); }
.btn--onDark { background: var(--sand-0); color: var(--ink); }
.btn--onDark:hover { background: #fff; transform: translateY(-1px); }
.btn--quietDark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.24); }
.btn--quietDark:hover { background: rgba(255,255,255,.2); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding-block: var(--s3);
  background: rgba(249,247,243,.82); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-header.is-stuck { border-bottom-color: var(--sand-200); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; }
.nav { display: none; margin-inline: auto; gap: var(--s2); }
@media (min-width: 860px) { .nav { display: flex; } }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--sand-500);
  padding: 10px 14px; border-radius: var(--r-pill); transition: color .15s ease, background-color .15s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--sand-100); }
.header-cta { margin-left: auto; }
@media (min-width: 860px) { .header-cta { margin-left: 0; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--sand-0);
  padding-block: var(--s20) 0;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 90%;
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(108,92,231,.55), transparent 70%),
    radial-gradient(50% 50% at 78% 18%, rgba(224,95,168,.34), transparent 70%),
    radial-gradient(45% 45% at 60% 60%, rgba(47,128,237,.28), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero > .wrap { position: relative; text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-pill); padding: 6px 6px 6px 8px; font-size: 13px; margin-bottom: var(--s6);
}
.hero .badge b { background: var(--violet); color: #fff; border-radius: var(--r-pill); padding: 3px 9px; font-size: 12px; font-weight: 600; }
.hero .badge span { padding-right: var(--s3); color: rgba(255,255,255,.86); }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero .lede { color: rgba(255,255,255,.72); margin: var(--s5) auto 0; max-width: 48ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; margin-top: var(--s8); }

/* hero device + floating cards */
.stage { position: relative; margin-top: var(--s16); display: flex; justify-content: center; }
.device { width: min(300px, 72vw); border-radius: 38px; box-shadow: var(--shadow-lg); display: block; }
.device--sm { width: min(260px, 64vw); border-radius: 32px; }
.float {
  position: absolute; display: none; text-align: left;
  background: rgba(28,25,23,.72); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md);
  padding: var(--s4); box-shadow: var(--shadow-md);
}
@media (min-width: 980px) { .float { display: block; } }
.float--l { left: 4%; top: 22%; width: 190px; }
.float--r { right: 4%; top: 34%; width: 232px; }
.float .k { font-size: 12px; color: rgba(255,255,255,.6); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.float .v { font-size: 17px; font-weight: 600; margin-top: var(--s1); }
.float .row { display: flex; gap: var(--s3); margin-top: var(--s3); }
.float .cell { flex: 1; text-align: center; }
.float .cell b { display: block; font-size: 15px; font-weight: 600; }
.float .cell span { font-size: 11px; color: rgba(255,255,255,.6); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- generic cards ---------- */
.grid { display: grid; gap: var(--s6); }
.g2 { grid-template-columns: 1fr; }
.g3 { grid-template-columns: 1fr; }
.g4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .g4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--sand-0); border: 1px solid var(--sand-200);
  border-radius: var(--r-lg); padding: var(--s6);
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 19px; margin-bottom: var(--s2); }
.card p { font-size: 15px; color: var(--sand-500); }
.card--dark { background: var(--ink); border-color: rgba(255,255,255,.1); color: var(--sand-0); }
.card--dark p { color: rgba(255,255,255,.68); }
.card--wash { background: linear-gradient(140deg, var(--violet-w), var(--sand-0) 65%); }

/* bento */
.bento { display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento .span2 { grid-column: span 2; } }
.bento .card { display: flex; flex-direction: column; gap: var(--s4); }
.bento .card .body { flex: 1; }

/* mock rows used inside the bento */
.mock { border-radius: var(--r-md); padding: var(--s4); background: var(--sand-50); border: 1px solid var(--sand-200); }
.card--dark .mock { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-block: 10px; font-size: 14px; }
.mock-row + .mock-row { border-top: 1px solid var(--sand-200); }
.card--dark .mock-row + .mock-row { border-top-color: rgba(255,255,255,.1); }
.mock-row .lbl { display: flex; align-items: center; gap: var(--s2); font-weight: 600; }
.mock-row .val { color: var(--sand-500); font-variant-numeric: tabular-nums; }
.card--dark .mock-row .val { color: rgba(255,255,255,.66); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 500;
  background: var(--sand-0); border: 1px solid var(--sand-200); border-radius: var(--r-pill); padding: 7px 14px; color: var(--sand-500); }
.chip--dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.8); }

/* meters */
.meter { height: 6px; border-radius: var(--r-pill); background: var(--sand-100); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: var(--r-pill); }

/* stats */
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.stat span { display: block; margin-top: var(--s2); font-size: 14px; color: var(--sand-500); }

/* split section (text + device) */
.split { display: grid; gap: var(--s12); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s16); } .split--rev > *:first-child { order: 2; } }
.shot-wash { display: flex; justify-content: center; padding: var(--s10) var(--s6);
  border-radius: var(--r-xl); background: linear-gradient(150deg, var(--violet-w), #E7F0FB 55%, var(--sand-100)); }

/* faq */
.faq { border-top: 1px solid var(--sand-200); }
.faq details { border-bottom: 1px solid var(--sand-200); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s5) var(--s2); cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: var(--s2); }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--sand-400); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 var(--s2) var(--s5); font-size: 15px; color: var(--sand-500); max-width: 68ch; }

/* forms */
.form-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.field { flex: 1 1 260px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: var(--s2); }
input, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--sand-0); border: 1px solid var(--sand-200);
  border-radius: var(--r-sm); padding: 13px var(--s4); min-height: 48px;
}
textarea { min-height: 132px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--sand-400); }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }

/* closing CTA */
.cta {
  background: var(--ink); color: var(--sand-0);
  border-radius: var(--r-xl); padding: var(--s16) var(--s6); text-align: center; position: relative; overflow: hidden;
}
.cta::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 100%;
  background: radial-gradient(50% 60% at 50% 40%, rgba(108,92,231,.5), transparent 70%); filter: blur(24px); }
.cta > * { position: relative; }
.cta p { color: rgba(255,255,255,.7); margin: var(--s4) auto 0; max-width: 46ch; }
.cta .actions { display: flex; justify-content: center; gap: var(--s3); margin-top: var(--s8); flex-wrap: wrap; }

/* footer */
.site-footer { padding-block: var(--s16) var(--s10); border-top: 1px solid var(--sand-200); margin-top: var(--s20); }
.footer-grid { display: grid; gap: var(--s10); grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.site-footer h4 { font-size: 14px; margin-bottom: var(--s4); }
.site-footer li + li { margin-top: 10px; }
.site-footer a { text-decoration: none; font-size: 15px; color: var(--sand-500); }
.site-footer a:hover { color: var(--ink); }
.legal { margin-top: var(--s12); padding-top: var(--s6); border-top: 1px solid var(--sand-200);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between; }
.legal p { font-size: 13px; color: var(--sand-400); max-width: 76ch; }

/* misc */
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.stack-sm > * + * { margin-top: var(--s2); }
.stack > * + * { margin-top: var(--s4); }
.stack-lg > * + * { margin-top: var(--s8); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 100; background: var(--sand-0); padding: var(--s3) var(--s4); border-radius: var(--s2); }
