/* ============================================================
   DomanskiAI — Design System
   Aesthetic: blueprint / dark / production-spec
   ============================================================ */

/* Metric-matched fallback for Inter — prevents CLS when the
   variable Inter loads in from Google Fonts. Values per the
   well-known Vercel/Next.js Inter fallback overrides. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  ascent-override: 90.20%;
  descent-override: 22.48%;
  line-gap-override: 0%;
  size-adjust: 107.40%;
}

:root {
  --charcoal: #0B0E12;
  --charcoal-2: #111418;
  --charcoal-3: #161A20;
  --line: #1E242C;
  --line-2: #2A3038;
  --offwhite: #F3EFE7;
  --offwhite-2: #E6E2DA;
  --green: #B6FF00;
  --green-dim: #8EC700;
  --green-glow: rgba(182, 255, 0, 0.18);
  --slate: #818B9D; /* bumped from #667085 to meet WCAG AA at 11px (was 3.88:1, now 4.6:1) */
  --slate-2: #9AA3B4;
  --slate-3: #B8C0CC;

  --font-sans: 'Inter', 'Inter Fallback', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --container: 1240px;
  --gutter: 32px;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--charcoal);
  color: var(--offwhite);
  font-family: 'Inter', 'Inter Fallback', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ----- BLUEPRINT GRID BACKGROUND ----- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(182, 255, 0, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(182, 255, 0, 0.035) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 30%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 0%, rgba(182, 255, 0, 0.08), transparent 60%);
  pointer-events: none;
}

main, header, footer { position: relative; z-index: 1; }

/* ----- TYPOGRAPHY ----- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--offwhite);
}
h1 { font-size: clamp(48px, 6.4vw, 96px); letter-spacing: -0.035em; }
h2 { font-size: clamp(36px, 4vw, 60px); letter-spacing: -0.028em; }
h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.015em; }
h4 { font-size: 18px; letter-spacing: -0.005em; }

p { margin: 0; color: var(--slate-3); }
p.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--offwhite-2); }

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

strong { font-weight: 700; color: var(--offwhite); }

::selection { background: var(--green); color: var(--charcoal); }

.green { color: var(--green); }
.slate { color: var(--slate-3); }
.dim { color: var(--slate); }

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}

/* small caps technical label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--green);
  display: inline-block;
}
.eyebrow.no-bar::before { display: none; }

/* ----- LAYOUT ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

section {
  padding: 96px 0;
  position: relative;
}
section + section { border-top: 1px solid var(--line); }

/* tick marks on section edges — blueprint feel */
section.ticked::before,
section.ticked::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 80px;
  height: 1px;
  background: var(--green);
  opacity: 0.6;
}
section.ticked::before { left: 0; }
section.ticked::after { right: 0; }

/* ----- HEADER ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(11, 14, 18, 0.7);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-lockup .mark {
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--charcoal-2);
}
.brand-lockup .mark svg { width: 24px; height: 24px; }
.brand-lockup .name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand-lockup .name .ai { color: var(--green); }

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-3);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--offwhite); background: var(--charcoal-3); }
.nav-link.active { color: var(--offwhite); }

/* ----- BUTTONS ----- */
.btn {
  --pad-y: 14px;
  --pad-x: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green);
  color: var(--charcoal);
  border-color: var(--green);
  box-shadow: 0 0 0 0 var(--green-glow);
}
.btn-primary:hover {
  background: #C9FF3D;
  box-shadow: 0 0 0 6px var(--green-glow);
}
.btn-primary .arrow { transition: transform .15s; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--offwhite);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--slate); background: var(--charcoal-2); }

.btn-sm { --pad-y: 9px; --pad-x: 14px; font-size: 13px; }

/* ----- PANELS / CARDS ----- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(17, 20, 24, 0.85), rgba(11, 14, 18, 0.85));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.panel.outlined-green { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset, 0 0 40px -10px var(--green-glow); }

/* Corner brackets — used on hero frame */
.bracket-frame {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 48px;
  background: linear-gradient(180deg, rgba(17, 20, 24, 0.7), rgba(11, 14, 18, 0.4));
  border: 1px solid var(--line);
}
.bracket-frame::before,
.bracket-frame::after,
.bracket-frame > .bl,
.bracket-frame > .br {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border: 2px solid var(--green);
  pointer-events: none;
}
.bracket-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius-xl); }
.bracket-frame::after  { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: var(--radius-xl); }
.bracket-frame > .bl   { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: var(--radius-xl); }
.bracket-frame > .br   { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius-xl); }

/* ----- PILL TAG ----- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(182, 255, 0, 0.08);
  border: 1px solid rgba(182, 255, 0, 0.4);
  border-radius: 999px;
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.tag-slate {
  color: var(--slate-3);
  background: var(--charcoal-3);
  border-color: var(--line-2);
}

/* ----- UTILITIES ----- */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; } .gap-12 { gap: 48px; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; } .mt-16 { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; } .mb-12 { margin-bottom: 48px; }

/* ----- LINE NUMBERS (blueprint feel) ----- */
.linenum {
  font-family: var(--font-mono);
  font-size: 60px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1;
}
.linenum-sm {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.1em;
}

/* ----- IMAGE PLACEHOLDER ----- */
.placeholder {
  position: relative;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 10px, transparent 10px 20px),
    var(--charcoal-2);
  display: grid;
  place-items: center;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  min-height: 180px;
  text-align: center;
  padding: 24px;
}

/* ----- FOOTER ----- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  position: relative;
}
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.site-footer .footer-h {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-2);
  margin-bottom: 16px;
}
.site-footer a { color: var(--slate-3); display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: var(--green); }
.site-footer .copy { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--slate); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }

/* ----- DOTS / CONNECTORS ----- */
.connector-down {
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, var(--green) 0%, transparent 100%);
  margin: 0 auto;
  position: relative;
}
.connector-down::after {
  content: "▼";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--green);
  font-size: 10px;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 860px) {
  section { padding: 64px 0; }
  .site-footer .grid { grid-template-columns: 1fr; gap: 32px; }
  .site-header .nav-link:not(.btn) { display: none; }
  .bracket-frame { padding: 28px; }
  .panel { padding: 22px; }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
