/*
  Aloop marketing site — shared design system.
  Tokens mirror the app design system (iOS Theme.color / AdminTheme):
  ink #1A1A1A, accent grey #74797E, neutral studio ground, 12px/999px radii,
  Space Grotesk (display) + Archivo (UI) + Space Mono (labels).
*/

:root {
  --ink: #1a1a1a;
  --ink-soft: #33363a;
  --muted: #74797e;
  --muted-2: #9a9ea3;
  --line: rgba(26, 26, 26, 0.10);
  --line-strong: rgba(26, 26, 26, 0.16);
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --ground-0: #ffffff;
  --ground-1: #f4f4f6;
  --ground-2: #ececef;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Archivo', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --container: 1120px;
  --prose: 760px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: radial-gradient(120% 90% at 50% -10%, var(--ground-0) 0%, var(--ground-1) 46%, var(--ground-2) 100%);
  background-attachment: fixed;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img, svg { max-width: 100%; }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container--prose { max-width: var(--prose); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* ---------- header ---------- */

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

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__link {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}
.nav__link:hover { color: var(--ink); text-decoration: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }

/* ---------- hero ---------- */

.hero {
  text-align: center;
  /* Fill the first screen (minus the 66px sticky header) so the next section
     sits fully below the fold instead of peeking up at the bottom. */
  min-height: calc(100vh - 66px);
  min-height: calc(100svh - 66px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(56px, 9vw, 96px) 0;
}
.hero .eyebrow { margin-bottom: 26px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 0.95;
  color: var(--ink);
  font-size: clamp(58px, 11vw, 116px);
  margin: 0;
}
.hero__title {
  margin: 28px auto 0;
  max-width: 720px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 3.3vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.4px;
  color: var(--ink);
  text-wrap: balance;
}
.hero__sub {
  margin: 22px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}
.hero__actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__note {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- interior page hero ---------- */

.page-hero {
  padding: clamp(48px, 8vw, 92px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--ink);
}
.page-hero__sub {
  margin: 18px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 19px;
}

/* ---------- sections ---------- */

.section { padding: clamp(52px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section__head { max-width: 640px; margin-bottom: 44px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__eyebrow { margin-bottom: 16px; }
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.8px;
  color: var(--ink);
}
.section__lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- grid + cards ---------- */

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted-2);
  margin-bottom: 16px;
}
.card__icon {
  width: 30px; height: 30px;
  margin-bottom: 16px;
  color: var(--ink);
}
.card__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.card__body { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- feature list (checks) ---------- */

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feature-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
}
.feature-list b {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.feature-list p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
.check {
  margin-top: 3px;
  width: 20px; height: 20px;
  flex: none;
  color: var(--ink);
}

/* ---------- split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

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

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); padding: 26px 0; }
.faq__q {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.faq__a { margin: 0; color: var(--muted); font-size: 16px; }

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

.cta {
  text-align: center;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(44px, 7vw, 72px) 28px;
}
.cta__title {
  margin: 0 auto;
  max-width: 560px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.6px;
  color: #fff;
}
.cta__sub { margin: 16px auto 0; max-width: 480px; color: rgba(255,255,255,0.72); font-size: 17px; }
.cta__note { margin-top: 28px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.6); }

/* ---------- prose (legal pages) ---------- */

.prose { padding: clamp(40px, 6vw, 64px) 0 clamp(64px, 9vw, 100px); }
.prose__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin: 0 0 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 48px 0 14px;
  scroll-margin-top: 84px;
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 30px 0 10px;
}
.prose p, .prose li { color: var(--ink-soft); font-size: 16.5px; line-height: 1.7; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 9px; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose__toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 44px;
}
.prose__toc p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.prose__toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.prose__toc li { margin: 0 0 7px; font-size: 15px; }
.prose__toc a { color: var(--ink-soft); text-decoration: none; }
.prose__toc a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 12px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.contact-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.contact-card p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.contact-card a { font-family: var(--font-mono); font-size: 15px; color: var(--ink); }
.entity {
  margin-top: 40px;
  padding: 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.entity p { margin: 0; color: var(--muted); font-size: 15.5px; }
.entity strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding: clamp(48px, 7vw, 72px) 0 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer__brand .brand { margin-bottom: 14px; }
.footer__tag { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 280px; }
.footer__col h4 {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 400;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer__col a { color: var(--muted); font-size: 15px; }
.footer__col a:hover { color: var(--ink); text-decoration: none; }
.footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__legal { margin: 0; color: var(--muted-2); font-size: 13.5px; }
.footer__legal a { color: var(--muted); }

/* ---------- utilities ---------- */

.mt-0 { margin-top: 0; }
.center { text-align: center; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { gap: 18px; }
  .nav__link--hide-sm { display: none; }
  .prose__toc ol { columns: 1; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
