/* =============================================================
   RB- Development — stylesheet
   Design: SaaS / Product · Theme: Dark
   ============================================================= */

/* --- Custom Properties --------------------------------- */
:root {
  /* Surface */
  --bg:             #09090b;
  --bg-subtle:      #111113;
  --bg-card:        #18181b;
  --bg-elevated:    #1f1f23;

  /* Text */
  --text:           #fafafa;
  --text-muted:     #a1a1aa;
  --text-faint:     #71717a;

  /* Borders & shadow */
  --border:         rgba(255,255,255,.07);
  --border-strong:  rgba(255,255,255,.12);
  --border-hover:   rgba(var(--primary-rgb),.28);
  --shadow-sm:      0 1px 2px rgba(0,0,0,.3);
  --shadow-card:    0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-hover:   0 12px 32px rgba(0,0,0,.55);
  --shadow-primary: 0 8px 28px rgba(var(--primary-rgb),.25);

  --nav-bg:         rgba(9,9,11,.72);

  /* Brand — Indigo */
  --primary:        #6366f1;
  --primary-rgb:    99,102,241;
  --primary-light:  #818cf8;
  --primary-dark:   #4f46e5;
  --primary-bg:     rgba(var(--primary-rgb),.10);

  /* Semantic */
  --ok:             #22c55e;
  --warn:           #f59e0b;
  --err:            #ef4444;

  /* Motion */
  --t:              200ms;
  --t-slow:         450ms;
  --ease:           cubic-bezier(.4,0,.2,1);

  /* Radius */
  --r:              8px;
  --r-lg:           12px;
  --r-pill:         9999px;

  /* Layout */
  --container:      1152px;
  --section:        96px;

  /* Type */
  --font-sans:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --- Reset --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select, button { font: inherit; }
ul { list-style: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Layout -------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: var(--section) 0; position: relative; }
.section--subtle { background: var(--bg-subtle); }

.section__head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section__head--left {
  margin-left: 0; margin-right: 0; text-align: left;
}
.section__eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-bg);
  border: 1px solid rgba(var(--primary-rgb),.18);
  border-radius: var(--r-pill);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--primary-light);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.section__title {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section__lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* --- Navigation ---------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), backdrop-filter var(--t) var(--ease);
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: opacity var(--t) var(--ease);
}
.nav__brand:hover { opacity: .85; }
.nav__logo-img {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}
.nav__brand-text {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: -0.005em;
}
.footer__brand .nav__logo-img { width: 36px; height: 36px; }
.footer__brand .nav__brand-text { font-size: 1rem; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t) var(--ease);
}
.nav__links a:hover { color: var(--text); }

/* --- Buttons ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
              box-shadow var(--t) var(--ease), border-color var(--t) var(--ease),
              transform var(--t) var(--ease);
  cursor: pointer;
}
.btn--sm { padding: 8px 16px; }
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 0 0 1px rgba(var(--primary-rgb),.4);
}
.btn--primary:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-primary), 0 0 0 1px rgba(var(--primary-rgb),.55);
}
.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(255,255,255,.18);
}
.btn__arrow {
  transition: transform var(--t) var(--ease);
  font-size: 1em;
  line-height: 1;
}
.btn:hover .btn__arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-light);
  font-weight: 500;
  font-size: .9375rem;
  transition: color var(--t) var(--ease);
}
.link-arrow:hover { color: var(--primary); }
.link-arrow:hover .btn__arrow { transform: translateX(4px); }

/* --- Hero ---------------------------------------------- */
.hero {
  position: relative;
  padding: 160px 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 85%;
  z-index: -2;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(var(--primary-rgb),.35) 0%, transparent 60%),
    radial-gradient(ellipse 35% 35% at 20% 40%, rgba(129,140,248,.18) 0%, transparent 65%),
    radial-gradient(ellipse 35% 35% at 80% 30%, rgba(79,70,229,.2) 0%, transparent 65%);
  filter: blur(8px);
  pointer-events: none;
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 65% 50% at 50% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 65% 50% at 50% 20%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  animation: heroIn var(--t-slow) var(--ease) both;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--primary-bg);
  border: 1px solid rgba(var(--primary-rgb),.2);
  border-radius: var(--r-pill);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 32px;
  animation: heroFade var(--t-slow) var(--ease) both;
}
.hero__badge-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.22);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .45; }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  animation: heroFade var(--t-slow) var(--ease) .05s both;
}
.hero__title-accent {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 55%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 40px;
  animation: heroFade var(--t-slow) var(--ease) .1s both;
}
.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
  animation: heroFade var(--t-slow) var(--ease) .15s both;
}
.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  animation: heroFade var(--t-slow) var(--ease) .2s both;
}
.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}
.hero__meta-label {
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.hero__meta-value {
  font-size: .9375rem;
  color: var(--text);
  font-weight: 500;
}

@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Services ------------------------------------------ */
.service {}
.service__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  background: var(--primary-bg);
  border: 1px solid rgba(var(--primary-rgb),.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  margin-bottom: 20px;
}
.service__icon svg { width: 22px; height: 22px; }
.service__title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}
.service__desc {
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.65;
  margin-bottom: 16px;
}
.service__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service__list li {
  font-size: .8125rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  padding-left: 16px;
  position: relative;
}
.service__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 1px;
  background: var(--primary);
  transform: translateY(-50%);
}

/* --- Cards --------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}

/* --- Zigzag (Approach) --------------------------------- */
.zigzag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  margin-top: 96px;
}
.zigzag:first-of-type { margin-top: 0; }
.zigzag--reverse .zigzag__text { order: 2; }
.zigzag--reverse .zigzag__visual { order: 1; }

.zigzag__title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.zigzag__text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: .9375rem;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary-bg);
  border: 1px solid rgba(var(--primary-rgb),.3);
}
.check-list li::after {
  content: '';
  position: absolute;
  left: 5px; top: 10px;
  width: 8px; height: 4px;
  border-left: 1.5px solid var(--primary-light);
  border-bottom: 1.5px solid var(--primary-light);
  transform: rotate(-45deg);
}

/* --- Mock visuals -------------------------------------- */
.mock {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.mock__bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.mock__file {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-faint);
  font-style: normal;
}

.mock__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.mock__line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}
.mock__line--title {
  height: 14px;
  width: 60%;
  background: linear-gradient(90deg, rgba(var(--primary-rgb),.55), rgba(var(--primary-rgb),.25));
  margin-bottom: 4px;
}
.mock__line--tag {
  height: 20px;
  width: 35%;
  border-radius: var(--r-pill);
  background: var(--primary-bg);
  border: 1px solid rgba(var(--primary-rgb),.22);
  margin-top: 8px;
}
.w-90 { width: 90%; } .w-80 { width: 80%; } .w-75 { width: 75%; }
.w-60 { width: 60%; } .w-50 { width: 50%; }

.mock__code {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.75;
  color: #d4d4d8;
  overflow-x: auto;
  white-space: pre;
}
.tok-k { color: #c084fc; }
.tok-f { color: #60a5fa; }
.tok-t { color: #34d399; }

.dash-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.dash-row:last-child { border-bottom: 0; }
.dash-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.dash-dot--ok   { background: var(--ok); }
.dash-dot--warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}
.dash-label { font-size: .875rem; color: var(--text-muted); }
.dash-val {
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--text);
}

/* --- Stats --------------------------------------------- */
.stats {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px;
}
.stat__number {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  background: linear-gradient(180deg, var(--text) 0%, rgba(250,250,250,.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Stack --------------------------------------------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stack-col {
  padding: 24px;
  border-left: 1px solid var(--border);
}
.stack-col:first-child { border-left: 0; padding-left: 0; }
.stack-col__title {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 16px;
}
.stack-list { display: flex; flex-direction: column; gap: 10px; }
.stack-list li {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- About --------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}
.about .section__head { margin: 0; max-width: none; }
.about__body p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 20px;
}
.about__body p:last-of-type { margin-bottom: 32px; }

/* --- Contact ------------------------------------------- */
.contact { position: relative; overflow: hidden; isolation: isolate; }
.contact__bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 70%;
  z-index: -1;
  background: radial-gradient(ellipse 55% 40% at 50% 20%, rgba(var(--primary-rgb),.18) 0%, transparent 60%);
  pointer-events: none;
}
.contact__inner {
  max-width: 720px;
  margin: 0 auto;
}

.form {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form__group label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.form__opt {
  font-weight: 400;
  color: var(--text-faint);
  font-size: .75rem;
}
.form__group input,
.form__group select,
.form__group textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: .9375rem;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
  font-family: inherit;
}
.form__group input::placeholder,
.form__group textarea::placeholder { color: var(--text-faint); }
.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.form__group input[aria-invalid="true"],
.form__group select[aria-invalid="true"],
.form__group textarea[aria-invalid="true"] {
  border-color: var(--err);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.form__group textarea { resize: vertical; min-height: 140px; }
.form__group select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 10px; padding-right: 36px; }

.form__group--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}
.form__group--check input {
  margin-top: 3px;
  width: 16px; height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.form__group--check label {
  font-weight: 400;
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.55;
}
.form__group--check a { color: var(--primary-light); text-decoration: underline; text-decoration-color: rgba(var(--primary-rgb),.35); text-underline-offset: 2px; }
.form__group--check a:hover { text-decoration-color: var(--primary); }

.form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.form__note {
  font-size: .8125rem;
  color: var(--text-faint);
}
.form__note a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.form__note a:hover { color: var(--text); }

.form__feedback {
  display: none;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: .875rem;
  line-height: 1.5;
}
.form__feedback.is-visible { display: block; }
.form__feedback.is-success {
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.25);
  color: #86efac;
}
.form__feedback.is-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.28);
  color: #fca5a5;
}

.btn[disabled] { opacity: .7; cursor: wait; }
.btn.is-loading .btn__label::after {
  content: '…';
  display: inline-block;
  animation: loadingDots 1.2s steps(4, end) infinite;
}
@keyframes loadingDots {
  0% { opacity: .2; }
  50% { opacity: 1; }
  100% { opacity: .2; }
}

/* --- Footer -------------------------------------------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 64px;
}
.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__tagline {
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.65;
  max-width: 320px;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer__heading {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a {
  font-size: .875rem;
  color: var(--text-muted);
  transition: color var(--t) var(--ease);
}
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  margin-top: 64px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--text-faint);
}
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Legal pages (privacy) ----------------------------- */
.legal {
  padding: 160px 0 96px;
  max-width: 760px;
}
.legal__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.legal__meta {
  color: var(--text-faint);
  font-size: .875rem;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.legal h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 48px 0 14px;
  color: var(--text);
}
.legal h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}
.legal p {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 1rem;
  margin-bottom: 14px;
}
.legal ul {
  padding-left: 20px;
  margin-bottom: 18px;
  list-style: disc;
}
.legal ul li {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 6px;
  padding-left: 6px;
}
.legal ul li::marker { color: var(--primary); }
.legal a {
  color: var(--primary-light);
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary-rgb),.35);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--t) var(--ease);
}
.legal a:hover { text-decoration-color: var(--primary); }
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
}
.legal__back:hover { color: var(--text); }
.legal__toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 48px;
}
.legal__toc h2 {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.legal__toc ol {
  padding-left: 20px;
  color: var(--text-muted);
  font-size: .9375rem;
}
.legal__toc li { margin-bottom: 4px; }

/* --- Animations ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* --- Reduced motion ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__badge-dot { animation: none; }
}

/* --- Responsive ---------------------------------------- */
@media (max-width: 1024px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stack-col { border-left: 0; padding-left: 0; padding: 16px 0; }
  .stack-col + .stack-col { border-top: 1px solid var(--border); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  :root { --section: 72px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__inner { height: 56px; }
  .hero { padding: 120px 0 72px; }
  .hero__meta { grid-template-columns: 1fr; gap: 24px; }
  .zigzag { grid-template-columns: 1fr; gap: 32px; margin-top: 64px; }
  .zigzag--reverse .zigzag__text { order: 0; }
  .zigzag--reverse .zigzag__visual { order: 0; }
  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section: 56px; }
  .container { padding: 0 20px; }
  .grid--3 { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .stack-grid { grid-template-columns: 1fr; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }
  .section__head { margin-bottom: 40px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__bottom-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mock__code { font-size: .75rem; }
}

@media (max-width: 480px) {
  .nav__brand-text { display: none; }
  .hero__title { font-size: 2.25rem; }
  .form__actions { flex-direction: column; align-items: stretch; }
  .form__actions .btn { width: 100%; }
  .form__note { text-align: center; }
}
