/* ============================================================
   ENFRA — Base Design System
   Theme: Neo-Brutalist / Light
   Brand accent: #875BF7

   00. Imports
   01. Design Tokens
   02. Reset
   03. Base Elements
   04. Typography
   05. Layout
   06. Sections
   07. Navigation
   08. Components
   09. Utilities
   10. Responsive
   ============================================================ */


/* 00. IMPORTS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');


/* 01. DESIGN TOKENS
   ============================================================ */

:root {

  /* — Background — */
  --bg:        #FAFAF8;
  --bg-alt:    #F4F0FF;   /* light purple tint for section variation */
  --surface:   #111111;   /* dark surface for code blocks */

  /* — Foreground — */
  --fg:        #0A0A0A;
  --fg-60:     rgba(10, 10, 10, 0.60);
  --fg-50:     rgba(10, 10, 10, 0.50);
  --fg-40:     rgba(10, 10, 10, 0.40);
  --fg-30:     rgba(10, 10, 10, 0.30);
  --fg-12:     rgba(10, 10, 10, 0.08);

  /* — Brand accent — */
  --accent:      #875BF7;
  --accent-dark: #5720B7;
  --accent-10:   rgba(135, 91, 247, 0.08);
  --accent-20:   rgba(135, 91, 247, 0.18);

  /* — Lines — */
  --line:       rgba(10, 10, 10, 0.12);
  --line-mid:   rgba(10, 10, 10, 0.20);
  --line-strong: #0A0A0A;

  /* — Borders — */
  --border:        1px solid var(--line-strong);
  --border-mid:    1px solid var(--line-mid);
  --border-light:  1px solid var(--line);
  --border-accent: 1px solid var(--accent);

  /* — Hard shadows (neo-brutalist signature — offset, zero blur) — */
  --shadow-sm:     2px 2px 0 var(--fg);
  --shadow-md:     4px 4px 0 var(--fg);
  --shadow-lg:     6px 6px 0 var(--fg);
  --shadow-accent: 4px 4px 0 var(--accent);

  /* — Typography — */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "Courier New", monospace;

  /* Fluid type scale */
  --size-display:  clamp(40px, 5vw, 72px);
  --size-headline: clamp(28px, 3.5vw, 48px);
  --size-title:    clamp(18px, 2.5vw, 30px);
  --size-body-lg:  clamp(16px, 1.4vw, 20px);
  --size-body:     16px;
  --size-small:    14px;
  --size-label:    11px;
  --size-micro:    10px;

  /* Weights — heavy for brutalism */
  --weight-display: 800;
  --weight-heading: 700;
  --weight-body:    400;
  --weight-medium:  500;

  /* Tracking */
  --track-display: -0.03em;
  --track-heading: -0.02em;
  --track-body:     0em;
  --track-label:    0.10em;
  --track-mono:     0.02em;

  /* Leading */
  --lead-display: 0.95;
  --lead-heading: 1.05;
  --lead-body:    1.65;

  /* — Spacing scale — */
  --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;

  /* Fluid section rhythm */
  --section-y: clamp(80px, 10vw, 160px);
  --section-x: clamp(24px, 5vw, 80px);

  /* — Layout — */
  --max-w:   1440px;
  --col-gap: 1px;
  --cols-12: repeat(12, 1fr);
  --radius:  0;
}


/* 02. RESET
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

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

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: var(--lead-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font: inherit;
  background: none;
  border: none;
}

input, textarea, select {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  outline: none;
}

ul, ol { list-style: none; }

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

hr {
  border: none;
  border-top: var(--border);
}


/* 03. BASE ELEMENTS
   ============================================================ */

::selection {
  background-color: var(--accent);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::-webkit-scrollbar        { width: 4px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--line-strong); }


/* 04. TYPOGRAPHY
   ============================================================ */

.t-display {
  font-size: var(--size-display);
  font-weight: var(--weight-display);
  line-height: var(--lead-display);
  letter-spacing: var(--track-display);
}

.t-headline {
  font-size: var(--size-headline);
  font-weight: var(--weight-display);
  line-height: var(--lead-heading);
  letter-spacing: var(--track-display);
}

.t-title {
  font-size: var(--size-title);
  font-weight: var(--weight-heading);
  line-height: var(--lead-heading);
  letter-spacing: var(--track-heading);
}

.t-body-lg {
  font-size: var(--size-body-lg);
  font-weight: var(--weight-body);
  line-height: var(--lead-body);
}

.t-body  { font-size: var(--size-body);  line-height: var(--lead-body); }
.t-small { font-size: var(--size-small); line-height: 1.5; }

.t-mono {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--track-mono);
}

/*
   Split headline pattern
   ─────────────────────
   Primary phrase = near-black.
   Secondary phrase = brand purple — creates graphic punch, not opacity fade.
*/
.split-primary   { color: var(--fg); }
.split-secondary { color: var(--accent); }

.t-accent { color: var(--accent); }
.t-muted  { color: var(--fg-60); }
.t-dim    { color: var(--fg-40); }

.fw-medium  { font-weight: 500; }
.fw-bold    { font-weight: 700; }
.fw-black   { font-weight: 800; }

.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }


/* 05. LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--section-x);
}

.grid-12 {
  display: grid;
  grid-template-columns: var(--cols-12);
  column-gap: var(--col-gap);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: var(--col-gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--col-gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--col-gap); }

.span-1  { grid-column: span 1; }
.span-2  { grid-column: span 2; }
.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }


/* 06. SECTIONS
   ============================================================ */

.section {
  width: 100%;
  border-top: var(--border);
  padding-block: var(--section-y);
  padding-inline: var(--section-x);
}

.section--alt {
  background-color: var(--bg-alt);
}

/*
   Section label — monospace counter + descriptor
   ───────────────────────────────────────────────
   Number box: filled black/white inverted — graphic, punchy.
   Text: monospace, muted, uppercase.
*/
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s8);
}

.section-label__num {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  font-weight: 500;
  color: var(--bg);
  background: var(--fg);
  padding: 2px 6px;
  line-height: 1.5;
  letter-spacing: var(--track-mono);
}

.section-label__text {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  color: var(--fg-60);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}

.section-label--accent .section-label__num {
  background: var(--accent);
  color: #FFFFFF;
}

/*
   Feature row — full-width two-column split
*/
.feature-row {
  display: grid;
  grid-template-columns: 5fr 7fr;
  border-top: var(--border);
}

.feature-row:last-child { border-bottom: var(--border); }

.feature-row__text {
  padding-block: var(--s12);
  padding-right: var(--s12);
  border-right: var(--border);
}

.feature-row__visual {
  padding-block: var(--s12);
  padding-left: var(--s12);
  display: flex;
  align-items: center;
}

.step-counter {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  color: var(--accent);
  margin-bottom: var(--s4);
}


/* 07. NAVIGATION
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding-inline: var(--section-x);
  background-color: var(--bg);
  border-bottom: var(--border);
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Force wordmark to dark on light bg */
.nav__logo svg path {
  fill: var(--fg);
}

/* Preserve the purple mark */
.nav__logo svg path[fill="#875BF7"],
.nav__logo svg path[style*="875BF7"],
.nav__logo svg path[style*="5720B7"] {
  fill: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s8);
}

.nav__link {
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  color: var(--fg-60);
  transition: color 120ms ease;
}

.nav__link:hover { color: var(--fg); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-shrink: 0;
}

.nav__login {
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  color: var(--fg-60);
  padding: var(--s2) var(--s4);
  transition: color 120ms ease;
}

.nav__login:hover { color: var(--fg); }


/* 08. COMPONENTS
   ============================================================ */

/* ── Buttons ────────────────────────────────────────────────── */

/*
   Neo-brutalist buttons — hard box shadows, no border-radius.
   Active state simulates physical press: translate + shadow collapse.
*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 10px var(--s6);
  font-family: var(--font-sans);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  transition: box-shadow 80ms ease, transform 80ms ease;
}

.btn:active {
  transform: translate(2px, 2px);
}

/* Ghost — white/bg fill, black border, black shadow */
.btn--ghost {
  border: var(--border);
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover    { box-shadow: var(--shadow-md); }
.btn--ghost:active   { box-shadow: none; }

/* Solid — black fill, white text */
.btn--solid {
  border: var(--border);
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.btn--solid:hover  { box-shadow: var(--shadow-md); }
.btn--solid:active { box-shadow: none; }

/* Accent solid — purple fill, white text, black shadow */
.btn--accent-solid {
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}
.btn--accent-solid:hover  { box-shadow: var(--shadow-lg); }
.btn--accent-solid:active { box-shadow: none; }

/* Accent ghost — purple border/text, purple shadow */
.btn--accent {
  border: var(--border-accent);
  background: var(--bg);
  color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.btn--accent:hover  { box-shadow: 6px 6px 0 var(--accent); }
.btn--accent:active { box-shadow: none; }

/* Sizes */
.btn--sm { padding: var(--s2) var(--s4); font-size: var(--size-label); }
.btn--lg { padding: var(--s4) var(--s8); font-size: var(--size-body); font-weight: 700; }


/* ── Inputs ─────────────────────────────────────────────────── */

.input {
  display: block;
  width: 100%;
  padding: 10px var(--s4);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  color: var(--fg);
  background: var(--bg);
  border: var(--border);
  outline: none;
  transition: box-shadow 80ms ease;
}

.input::placeholder { color: var(--fg-40); }
.input:focus        { box-shadow: var(--shadow-sm); }

.input-row {
  display: flex;
  align-items: stretch;
  border: var(--border);
  box-shadow: var(--shadow-md);
}

.input-row .input    { border: none; flex: 1; }
.input-row .btn      { border: none; border-left: var(--border); flex-shrink: 0; }
.input-row:focus-within { box-shadow: var(--shadow-lg); }


/* ── Tags / badges ──────────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s3);
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--fg-60);
  border: var(--border);
}

.tag--accent {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent-dark);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--s3);
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  border: var(--border);
  color: var(--fg-60);
}

.badge--accent {
  color: var(--accent);
  border-color: var(--accent);
}


/* ── Stat block ─────────────────────────────────────────────── */

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding-top: var(--s6);
  border-top: var(--border);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.stat__label {
  font-size: var(--size-small);
  color: var(--fg-60);
  line-height: 1.5;
}


/* ── Cards ──────────────────────────────────────────────────── */

/*
   Cards: 1px black border + hard offset shadow.
   Hover lifts by expanding shadow.
*/
.card {
  border: var(--border);
  padding: var(--s8);
  background: var(--bg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 80ms ease, transform 80ms ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card--accent {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.card--accent:hover {
  box-shadow: 6px 6px 0 var(--accent);
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(var(--card-cols, 3), 1fr);
  gap: var(--s6);
}


/* ── Dividers ───────────────────────────────────────────────── */

.divider         { width: 100%; height: 1px; background: var(--line); }
.divider--mid    { background: var(--line-mid); }
.divider--strong { background: var(--line-strong); }
.divider--accent { background: var(--accent); }
.divider-v       { width: 1px; height: 100%; background: var(--line); }


/* ── Testimonial / pull-quote ───────────────────────────────── */

.testimonial {
  border-top: 2px solid var(--accent);
  padding-top: var(--s6);
}

.testimonial__quote {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: var(--s4);
}

.testimonial__author {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  color: var(--fg-60);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}


/* ── JSON syntax colors — light mode ────────────────────────── */

.jk { color: #333333; }            /* keys / braces */
.js { color: #0A7A3D; }            /* strings — green */
.jn { color: var(--accent); }      /* numbers — purple */
.jg { color: #0A7A3D; }            /* "high" — green */
.jm { color: #B05E00; }            /* "medium" — amber */


/* 09. UTILITIES
   ============================================================ */

.d-flex  { display: flex; }
.d-grid  { display: grid; }
.d-block { display: block; }
.d-none  { display: none; }

.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.self-start      { align-self: flex-start; }
.flex-1          { flex: 1; }
.flex-shrink-0   { flex-shrink: 0; }

.gap-2  { gap: var(--s2); }
.gap-3  { gap: var(--s3); }
.gap-4  { gap: var(--s4); }
.gap-6  { gap: var(--s6); }
.gap-8  { gap: var(--s8); }
.gap-12 { gap: var(--s12); }

.mt-2  { margin-top: var(--s2);  }
.mt-4  { margin-top: var(--s4);  }
.mt-6  { margin-top: var(--s6);  }
.mt-8  { margin-top: var(--s8);  }
.mt-10 { margin-top: var(--s10); }
.mt-12 { margin-top: var(--s12); }
.mt-16 { margin-top: var(--s16); }

.mb-4  { margin-bottom: var(--s4);  }
.mb-6  { margin-bottom: var(--s6);  }
.mb-8  { margin-bottom: var(--s8);  }
.mb-12 { margin-bottom: var(--s12); }

.p-4  { padding: var(--s4); }
.p-6  { padding: var(--s6); }
.p-8  { padding: var(--s8); }
.p-12 { padding: var(--s12); }

.w-full          { width: 100%; }
.overflow-hidden { overflow: hidden; }
.relative        { position: relative; }
.absolute        { position: absolute; }
.inset-0         { inset: 0; }

.border-top    { border-top: var(--border); }
.border-bottom { border-bottom: var(--border); }
.border-right  { border-right: var(--border); }
.border-left   { border-left: var(--border); }

.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;
}


/* 10. RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  :root { --section-x: clamp(24px, 4vw, 48px); }

  .grid-12 { grid-template-columns: repeat(8, 1fr); }

  .span-7, .span-8, .span-9,
  .span-10, .span-11, .span-12 { grid-column: span 8; }

  .feature-row { grid-template-columns: 1fr; }

  .feature-row__text {
    border-right: none;
    border-bottom: var(--border);
    padding-right: 0;
    padding-bottom: var(--s8);
  }

  .feature-row__visual {
    padding-left: 0;
    padding-top: var(--s8);
  }

  .nav__links { display: none; }
}

@media (max-width: 640px) {
  :root {
    --section-x: 20px;
    --section-y: clamp(60px, 8vw, 80px);
  }

  .grid-12, .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  [class*="span-"] { grid-column: span 1; }

  .card-grid {
    --card-cols: 1;
    grid-template-columns: 1fr;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row .btn {
    border-left: none;
    border-top: var(--border);
    width: 100%;
  }
}
