/* =============================================================
   Swipekit landing page — "Signal Grid" (polished brutalism)
   Retheme: edit the :root colour tokens below to recolour everything.
   ============================================================= */

:root {
  /* ── Colour (Signal Grid) ── */
  --color-bg:       #ffffff;
  --color-surface:  #f4f4f4;
  --color-brand:    #F45F7E;  /* white on it ≈ 6.1:1 AA  */
  --color-brand-hi: #F45F7E;  /* on white ≈ 6.1:1 AA     */
  --color-brand-dk: #D63B5C;
  --color-text:     #0a0a0a;  /* on white ≈ 19:1 AAA     */
  --color-muted:    #4a4a4a;  /* on white ≈ 8.8:1 AAA    */
  --color-border:   #0a0a0a;  /* structural dark hairlines */
  --grid-line:      #e9e9e9;  /* faint background grid    */
  --color-invert-bg:#0a0a0a;
  --color-invert-tx:#ffffff;

  /* ── Type ── */
  --font-head: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --text-sm:   clamp(0.875rem, 0.80rem + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.30vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1.00rem + 0.60vw, 1.375rem);
  --text-xl:   clamp(1.375rem, 1.10rem + 1.40vw, 2rem);
  --text-2xl:  clamp(1.75rem,  1.20rem + 2.80vw, 3rem);
  --text-3xl:  clamp(2.25rem,  1.50rem + 3.80vw, 4.25rem);

  --leading-tight: 1.08;
  --leading-snug:  1.25;
  --leading-body:  1.6;

  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ── Spacing ── */
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-s:  clamp(0.75rem, 0.5rem + 1vw,  1rem);
  --space-m:  clamp(1.25rem, 0.9rem + 1.6vw, 1.75rem);
  --space-l:  clamp(2rem,    1.5rem + 2.4vw, 3rem);
  --space-xl: clamp(3rem,    2.2rem + 4vw,   5rem);
  --space-2xl:clamp(4rem,    2.8rem + 6vw,   7rem);

  /* ── Layout ── */
  --content-max: 75rem;
  --nav-height:  4rem;
  --shadow-hard: 4px 4px 0 var(--color-border);
  --shadow-hard-lg: 7px 7px 0 var(--color-border);

  /* ── Motion gate (single source of truth) ── */
  --motion-ok: 1;
}

@media (prefers-reduced-motion: reduce) {
  :root { --motion-ok: 0; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-height) + 1rem); }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: var(--color-brand-hi); }
ul[role="list"], ol[role="list"] { list-style: none; }

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; }
h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); font-weight: var(--weight-bold); }
h2 { font-size: var(--text-2xl); line-height: var(--leading-snug);  font-weight: var(--weight-bold); }
h3 { font-size: var(--text-lg);  line-height: var(--leading-snug);  font-weight: var(--weight-bold); }

/* ── Layout utilities ── */
.container { width: min(100% - 2 * var(--space-m), var(--content-max)); margin-inline: auto; }
.container--narrow { max-width: 48rem; }
.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-l); }
.section--surface { background: var(--color-surface); border-block: 1.5px solid var(--color-border); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
}
.eyebrow--center { text-align: center; }
.eyebrow--invert { color: #ffffff; opacity: 0.85; }

.section__title {
  text-align: center;
  max-width: 22ch;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── Skip link ── */
.skip-link {
  position: fixed; top: var(--space-2); left: var(--space-2); z-index: 9999;
  padding: var(--space-2) var(--space-4);
  background: var(--color-brand); color: #fff;
  text-decoration: none; font-weight: var(--weight-semibold);
  border: 1.5px solid var(--color-border);
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { clip-path: none; }

/* ── Focus styles ── */
:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ── Buttons (rectangular, invert on hover) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-m);
  min-height: 2.875rem; min-width: 2.875rem;
  font-family: var(--font-head);
  font-size: var(--text-base); font-weight: var(--weight-bold);
  text-decoration: none; border-radius: 0;
  border: 1.5px solid var(--color-border); cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn svg { flex-shrink: 0; }

.btn--primary { background: var(--color-brand); color: #fff; box-shadow: var(--shadow-hard); }
.btn--primary:hover { background: var(--color-bg); color: var(--color-brand); transform: translate(-1px,-1px); box-shadow: var(--shadow-hard-lg); }
.btn--primary:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--color-border); }

.btn--ghost { background: var(--color-bg); color: var(--color-text); box-shadow: var(--shadow-hard); }
.btn--ghost:hover { background: var(--color-text); color: var(--color-bg); transform: translate(-1px,-1px); box-shadow: var(--shadow-hard-lg); }
.btn--ghost:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--color-border); }

.btn--invert { background: #fff; color: var(--color-text); border-color: #fff; box-shadow: 4px 4px 0 var(--color-brand); }
.btn--invert:hover { background: var(--color-brand); color: #fff; border-color: #fff; transform: translate(-1px,-1px); box-shadow: 6px 6px 0 #fff; }
.btn--invert:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #fff; }

/* ── Sticky nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.nav--scrolled { border-bottom-color: var(--color-border); background: color-mix(in srgb, var(--color-bg) 95%, transparent); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-height); }
.nav__logo {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-head); font-weight: var(--weight-bold); font-size: 1.25rem;
  letter-spacing: -0.03em; color: var(--color-text); text-decoration: none;
}
.nav__mark { color: var(--color-brand); font-size: 1.1em; line-height: 1; }
.nav__toggle {
  display: none; background: var(--color-bg); color: var(--color-text);
  border: 1.5px solid var(--color-border); border-radius: 0;
  width: 2.75rem; height: 2.75rem; font-size: 1.25rem; cursor: pointer; box-shadow: 3px 3px 0 var(--color-border);
}
.nav__menu ul { display: flex; align-items: center; gap: var(--space-l); list-style: none; }
.nav__menu a {
  font-family: var(--font-head); font-weight: var(--weight-medium);
  color: var(--color-text); text-decoration: none; font-size: var(--text-base);
}
.nav__menu a:not(.btn):hover { color: var(--color-brand); }
.nav__cta { padding-block: var(--space-2); min-height: 2.5rem; }

/* ── Hero ── */
.hero {
  position: relative;
  background-image:
    linear-gradient(var(--grid-line) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid-line) 1.5px, transparent 1.5px);
  background-size: 44px 44px;
  background-position: center top;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 70% 0%, transparent 40%, var(--color-bg) 100%);
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; gap: var(--space-xl); align-items: center;
  grid-template-columns: 1.05fr 0.95fr;
}
.hero__text { max-width: 36rem; }
.hero h1 { margin-bottom: var(--space-m); }
.hero__sub { font-size: var(--text-lg); color: var(--color-muted); margin-bottom: var(--space-l); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-4); }
.hero__reassure { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-muted); }

/* ── Hero browser mock ── */
.hero__visual { position: relative; }
.browser-mock {
  border: 1.5px solid var(--color-border); border-radius: 0;
  background: var(--color-bg); box-shadow: var(--shadow-hard-lg); overflow: hidden;
}
.browser-mock__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border-bottom: 1.5px solid var(--color-border);
}
.browser-mock__bar .dot { width: .7rem; height: .7rem; border-radius: 50%; border: 1.5px solid var(--color-border); }
.browser-mock__url {
  margin-left: .5rem; font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dapp {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--color-bg);
  background-size: 22px 22px, 22px 22px, auto;
}
.dapp__filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  padding: .2rem .45rem; background: var(--color-bg);
  border: 1.5px solid var(--color-border); color: var(--color-muted);
}
.chip--on { background: var(--color-brand); color: #fff; }
.dapp__card {
  position: relative; display: flex; align-items: center; gap: var(--space-3);
  padding: .6rem; background: var(--color-bg);
  border: 1.5px solid var(--color-border); box-shadow: 2px 2px 0 var(--color-border);
}
.dapp__photo {
  width: 4.5rem; height: 4.5rem; flex-shrink: 0;
  border: 1.5px solid var(--color-border);
  background: linear-gradient(135deg, #F45F7E, #6c8cff);
}
.dapp__meta { display: flex; flex-direction: column; gap: .4rem; flex: 1; min-width: 0; }
.dapp__line { display: block; height: .5rem; background: var(--grid-line); }
.dapp__line--name { width: 72%; height: .7rem; background: var(--color-text); }
.dapp__line--short { width: 45%; }
.dapp__stamp {
  position: absolute; top: .4rem; right: .4rem;
  font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700;
  padding: .12rem .35rem; background: var(--color-text); color: #fff;
}
.dapp__status {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--color-muted);
}
.dapp__pulse {
  width: .55rem; height: .55rem; flex-shrink: 0; border-radius: 50%;
  background: var(--color-brand); border: 1.5px solid var(--color-border);
}
@media (prefers-reduced-motion: no-preference) {
  .dapp__pulse { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
}
.hero__clip {
  position: absolute; right: -0.5rem; bottom: -0.9rem;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  padding: var(--space-2) var(--space-3);
  background: var(--color-brand); color: #fff; border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-hard);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__clip { animation: clip-pop 4s ease-in-out infinite; }
  @keyframes clip-pop {
    0%, 70%, 100% { transform: translateY(0) rotate(-2deg); }
    78% { transform: translateY(-6px) rotate(-2deg); }
  }
}

/* ── Stat band ── */
.stat-band {
  display: grid; gap: 0;
  grid-template-columns: repeat(4, 1fr);
  border: 1.5px solid var(--color-border); box-shadow: var(--shadow-hard);
}
.stat-band li {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--space-l) var(--space-4);
  border-right: 1.5px solid var(--color-border);
}
.stat-band li:last-child { border-right: 0; }
.stat-band strong { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: var(--weight-bold); line-height: 1; }
.stat-band span { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-muted); margin-top: var(--space-2); }

/* ── Card grid ── */
.card-grid {
  display: grid; gap: var(--space-l);
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
}

/* ── Feature cards ── */
.feature-card {
  background: var(--color-bg); padding: var(--space-l);
  border: 1.5px solid var(--color-border); box-shadow: var(--shadow-hard);
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard-lg); }
.feature-icon {
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: var(--space-4);
  background: var(--color-brand); color: #fff; border: 1.5px solid var(--color-border);
}
.feature-card h3 { margin-bottom: var(--space-2); }
.feature-card p { color: var(--color-muted); }

/* ── How it works ── */
.steps {
  display: grid; gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}
.step-card {
  position: relative; background: var(--color-bg); padding: var(--space-l);
  border: 1.5px solid var(--color-border); box-shadow: var(--shadow-hard);
}
.step-card__num {
  display: inline-block; font-family: var(--font-mono); font-size: var(--text-xl); font-weight: 700;
  color: var(--color-brand); margin-bottom: var(--space-3);
}
.step-card h3 { margin-bottom: var(--space-2); }
.step-card p { color: var(--color-muted); }
.how__cta { display: flex; justify-content: center; margin-top: var(--space-xl); }

/* ── Testimonials ── */
.testimonial-card {
  background: var(--color-bg); padding: var(--space-l);
  border: 1.5px solid var(--color-border); box-shadow: var(--shadow-hard);
}
.testimonial-card blockquote p { font-size: var(--text-lg); margin-bottom: var(--space-m); }
.testimonial-card footer { display: flex; align-items: center; gap: var(--space-3); }
.avatar {
  width: 3rem; height: 3rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: var(--weight-bold); font-size: var(--text-sm);
  border: 1.5px solid var(--color-border);
  background: hsl(var(--avatar-hue, 222) 75% 92%);
  color: hsl(var(--avatar-hue, 222) 70% 28%);
  user-select: none;
}
.testimonial-card cite { font-style: normal; font-size: var(--text-sm); line-height: 1.4; }
.testimonial-card cite span { color: var(--color-muted); }

/* ── FAQ ── */
.faq-item { border-bottom: 1.5px solid var(--color-border); }
.faq-item:first-of-type { border-top: 1.5px solid var(--color-border); }
.faq-item summary {
  cursor: pointer; padding-block: var(--space-m);
  font-family: var(--font-head); font-weight: var(--weight-semibold); font-size: var(--text-lg);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--color-brand); font-size: 1.6em; line-height: 1; flex-shrink: 0; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding-bottom: var(--space-m); color: var(--color-muted); max-width: 60ch; }

/* ── Closing CTA band ── */
.cta-band { background: var(--color-invert-bg); color: var(--color-invert-tx); text-align: center; }
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; margin-bottom: var(--space-m); }
.cta-band__sub { color: #cfcfcf; font-size: var(--text-lg); max-width: 42ch; margin-inline: auto; margin-bottom: var(--space-l); }
.cta-band__actions { display: flex; justify-content: center; margin-bottom: var(--space-m); }
.cta-band__reassure { font-family: var(--font-mono); font-size: var(--text-sm); color: #9a9a9a; }

/* ── Footer ── */
.site-footer { border-top: 1.5px solid var(--color-border); padding-block: var(--space-xl) var(--space-l); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-l); justify-content: space-between; align-items: start; }
.site-footer__tag { color: var(--color-muted); font-size: var(--text-sm); margin-top: var(--space-2); max-width: 28ch; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: var(--space-m); }
.site-footer__nav a { font-family: var(--font-head); color: var(--color-text); text-decoration: none; font-weight: var(--weight-medium); }
.site-footer__nav a:hover { color: var(--color-brand); }
.site-footer__legal {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-l); justify-content: space-between;
  margin-top: var(--space-l); padding-top: var(--space-m); border-top: 1.5px solid var(--grid-line);
  font-size: var(--text-sm); color: var(--color-muted);
}
.site-footer__disclosure { font-family: var(--font-mono); font-size: 0.75rem; }
.site-footer__credit { font-family: var(--font-mono); font-size: 0.75rem; }
.site-footer__credit a { color: var(--color-brand); font-weight: var(--weight-bold); }

/* ── Scroll reveal (visible by default; only hidden when motion allowed) ── */
[data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(1.5rem); transition: opacity .55s ease, transform .55s ease; }
  [data-reveal].is-visible { opacity: 1; transform: none; }
  [data-reveal][data-reveal-delay="1"] { transition-delay: .08s; }
  [data-reveal][data-reveal-delay="2"] { transition-delay: .16s; }
  [data-reveal][data-reveal-delay="3"] { transition-delay: .24s; }
}

/* ── Responsive ── */
@media (max-width: 60rem) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-l); }
  .hero__visual { order: 2; max-width: 32rem; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .stat-band li:nth-child(2) { border-right: 0; }
  .stat-band li:nth-child(1), .stat-band li:nth-child(2) { border-bottom: 1.5px solid var(--color-border); }
}

@media (max-width: 48rem) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--color-bg); border-bottom: 1.5px solid var(--color-border);
    visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path .2s ease, visibility .2s ease; pointer-events: none;
  }
  .nav__menu.is-open { visibility: visible; clip-path: inset(0 0 0 0); pointer-events: auto; }
  .nav__menu ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-3) var(--space-m) var(--space-m); }
  .nav__menu li { border-top: 1px solid var(--grid-line); }
  .nav__menu li:first-child { border-top: 0; }
  .nav__menu a:not(.btn) { display: block; padding-block: var(--space-3); }
  .nav__cta { margin-top: var(--space-3); }
}

@media (max-width: 30rem) {
  .stat-band { grid-template-columns: 1fr; }
  .stat-band li { border-right: 0; border-bottom: 1.5px solid var(--color-border); }
  .stat-band li:last-child { border-bottom: 0; }
}
