/* ==========================================================================
   NixterTech — Design tokens
   ========================================================================== */
:root {
  /* Color */
  --color-bg-deep: #0A0F1D;
  --color-bg-surface: #10162A;
  --color-bg-elevated: #161D35;
  --color-bg-elevated-hover: #1B2440;
  --color-border: rgba(231, 234, 243, 0.09);
  --color-border-strong: rgba(231, 234, 243, 0.16);

  --color-text-primary: #E7EAF3;
  --color-text-muted: #93A0BD;
  --color-text-faint: #5D6A8A;

  --color-accent: #7C89F7;
  --color-accent-soft: rgba(124, 137, 247, 0.14);
  --color-accent-warm: #F5A623;
  --color-accent-warm-soft: rgba(245, 166, 35, 0.14);
  --color-accent-teal: #4FD1C5;

  --color-danger: #F27A6A;
  --color-success: #4FD1C5;

  /* Typography */
  --font-display: 'Sora', 'IBM Plex Sans', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 3.75rem;

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 6.5rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 2px 10px rgba(3, 6, 16, 0.35);
  --shadow-md: 0 12px 32px rgba(3, 6, 16, 0.45);
  --shadow-lg: 0 24px 60px rgba(3, 6, 16, 0.55);
  --shadow-glow: 0 0 0 1px rgba(124, 137, 247, 0.25), 0 8px 30px rgba(124, 137, 247, 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.18s;
  --dur-med: 0.4s;
  --dur-slow: 0.8s;

  --content-max: 1240px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--color-accent);
  color: #0A0F1D;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-header {
  max-width: 640px;
  margin: 0 0 var(--space-xl);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0 0 var(--space-sm);
}

.section-sub {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  margin-top: var(--space-sm);
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: #0A0F1D;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(124, 137, 247, 0.4), 0 14px 36px rgba(124, 137, 247, 0.28);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}
.btn-lg { padding: 1rem 1.85rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }
@media (max-width: 640px) {
  .btn-block-mobile { width: 100%; }
}

/* ==========================================================================
   Portfolio bar
   ========================================================================== */
.portfolio-bar {
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  padding: 0.55rem var(--space-md);
}
.portfolio-bar p {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}
.portfolio-bar a {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-border-strong);
}
.portfolio-bar a:hover { text-decoration-color: var(--color-accent); color: var(--color-accent); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 29, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(10, 15, 29, 0.92);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.9rem var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--color-text-primary);
}
.logo-mark { color: var(--color-accent); display: inline-flex; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.logo-accent { color: var(--color-accent); }

.main-nav { display: none; }
.nav-list { display: flex; align-items: center; gap: var(--space-lg); }
.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.4rem 0.1rem;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav-link:hover, .nav-link.is-active { color: var(--color-text-primary); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-sm); }
.btn-nav { display: none; }

.menu-toggle {
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-icon { position: relative; width: 18px; height: 13px; display: inline-block; }
.menu-icon span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out), top var(--dur-fast) var(--ease-out);
}
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 5.5px; }
.menu-icon span:nth-child(3) { top: 11px; }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav-list { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: var(--space-md); }
.mobile-nav-link {
  display: block;
  padding: 0.75rem 0.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  text-decoration: none;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 960px) {
  .main-nav { display: block; }
  .btn-nav { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 140%;
  background-image:
    linear-gradient(to right, rgba(231,234,243,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(231,234,243,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 80%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}
.hero-glow-1 {
  width: 480px; height: 480px;
  background: var(--color-accent);
  top: -160px; left: -120px;
}
.hero-glow-2 {
  width: 420px; height: 420px;
  background: var(--color-accent-warm);
  bottom: -180px; right: -100px;
  opacity: 0.18;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-copy h1 {
  font-size: var(--fs-3xl);
  line-height: 1.08;
  margin-bottom: var(--space-md);
}
.hero-sub {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-lg);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.hero-visual { justify-self: center; width: 100%; max-width: 420px; }
.graph-svg { overflow: visible; }
.graph-node circle { transition: r var(--dur-med) var(--ease-out); }
.graph-node-core circle { filter: drop-shadow(0 0 18px rgba(124,137,247,0.45)); }
.node-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--color-text-primary);
}
.node-label-sm { font-size: 11px; }
.node-label-xs { font-size: 9px; fill: var(--color-text-muted); }
.graph-lines path {
  stroke-dasharray: 6 6;
  animation: dash 6s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -120; } }
@media (prefers-reduced-motion: reduce) {
  .graph-lines path { animation: none; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
  .hero-copy h1 { font-size: var(--fs-4xl); }
}

/* ==========================================================================
   Principles strip
   ========================================================================== */
.principles {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.principle-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.principle-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--color-accent);
}
.partner-logos-placeholder { height: 0; }

@media (min-width: 700px) {
  .principles-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .principles-grid { grid-template-columns: repeat(6, 1fr); }
  .principle-item { flex-direction: column; text-align: center; gap: 0.5rem; }
}

/* ==========================================================================
   Capabilities
   ========================================================================== */
.capability-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.capability-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.capability-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
  background: var(--color-bg-elevated);
}
.capability-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}
.capability-card h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2xs); }
.capability-card p { color: var(--color-text-muted); font-size: var(--fs-sm); }

@media (min-width: 700px) {
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .capability-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Products
   ========================================================================== */
.products { background: var(--color-bg-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.product-card {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -30%;
  width: 220px; height: 220px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  z-index: 0;
}
.product-card-forge::before { background: var(--color-accent-warm); }
.product-card-trip::before { background: var(--color-accent-teal); }
.product-card-watershed::before { background: var(--color-accent); }

.product-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); position: relative; z-index: 1; }
.product-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  color: var(--color-text-primary);
}
.product-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.6rem;
}
.product-card h3 { font-size: var(--fs-xl); margin-bottom: var(--space-2xs); position: relative; z-index: 1; }
.product-card p { color: var(--color-text-muted); font-size: var(--fs-sm); margin-bottom: var(--space-md); position: relative; z-index: 1; }
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-accent);
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.product-link svg { transition: transform var(--dur-fast) var(--ease-out); }
.product-link:hover svg { transform: translate(2px, -2px); }

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Engagement models
   ========================================================================== */
.engagement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.engagement-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  background: linear-gradient(180deg, var(--color-bg-surface), var(--color-bg-deep));
}
.engagement-card h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2xs); }
.engagement-card p { color: var(--color-text-muted); font-size: var(--fs-sm); }

@media (min-width: 900px) {
  .engagement-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Process
   ========================================================================== */
.process { background: var(--color-bg-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.process-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  counter-reset: none;
}
.process-step {
  position: relative;
  padding-left: 3.25rem;
}
.process-index {
  position: absolute;
  left: 0; top: -0.2rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--color-accent);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
}
.process-step h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2xs); }
.process-step p { color: var(--color-text-muted); font-size: var(--fs-sm); max-width: 46ch; }

@media (min-width: 900px) {
  .process-list { grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
  .process-step { padding-left: 0; padding-top: 3.25rem; }
  .process-index { left: 0; top: 0; }
}

/* ==========================================================================
   Why
   ========================================================================== */
.why-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg) var(--space-md);
}
.why-item { border-left: 2px solid var(--color-border-strong); padding-left: var(--space-md); }
.why-item h3 { font-size: var(--fs-md); margin-bottom: var(--space-3xs); }
.why-item p { color: var(--color-text-muted); font-size: var(--fs-sm); }

@media (min-width: 800px) {
  .why-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .why-list { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Company
   ========================================================================== */
.company-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.company-copy p { color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.company-copy p:last-child { margin-bottom: 0; }

.code-panel {
  background: #0D1226;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.code-panel-header {
  display: flex;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.code-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-border-strong);
}
.code-panel-body {
  margin: 0;
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--color-accent-teal);
  white-space: pre-wrap;
  overflow-x: auto;
}

@media (min-width: 900px) {
  .company-inner { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Lead generation
   ========================================================================== */
.lead-gen {
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(124,137,247,0.14), transparent 70%), var(--color-bg-deep);
  text-align: center;
}
.lead-gen-inner { max-width: 680px; }
.lead-gen h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-sm); }
.lead-gen p { color: var(--color-text-muted); font-size: var(--fs-md); margin-bottom: var(--space-lg); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: var(--color-bg-surface); border-top: 1px solid var(--color-border); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
.contact-intro { max-width: 420px; }
.contact-email { margin-top: var(--space-md); color: var(--color-text-muted); font-size: var(--fs-sm); }
.contact-email a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.contact-email a:hover { text-decoration: underline; }

.contact-form {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-primary); }
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--color-bg-deep);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--color-danger);
}
.field-error {
  font-size: var(--fs-xs);
  color: var(--color-danger);
  min-height: 1em;
}
.form-note {
  font-size: var(--fs-sm);
  color: var(--color-success);
  margin: 0;
  min-height: 1.2em;
}
.form-note.is-error { color: var(--color-danger); }

@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .contact-inner { grid-template-columns: 0.8fr 1.2fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-bg-deep);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2xl);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}
.footer-brand p { color: var(--color-text-muted); font-size: var(--fs-sm); margin-top: var(--space-sm); max-width: 32ch; }
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-sm);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: var(--color-text-muted); text-decoration: none; font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}
.footer-bottom p {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
}

@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1.4fr repeat(3, 1fr); }
}