﻿@layer theme, base, revamp-tokens, components, utilities;
@layer revamp-tokens {

:root {
  /* Brand palette - cold modern technical-editorial */
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #0b2545;
  --muted: #3a4a63;
  --primary: #0b2545;
  --accent: #00b4d8;
  --on-primary: #f4f6fa;
  --on-accent: #0b2545;

  /* Extended neutrals */
  --neutral-100: #f4f6fa;
  --neutral-200: #e3e8f0;
  --neutral-300: #9aa6b8;
  --neutral-400: #3a4a63;
  --neutral-900: #0b2545;

  /* Radii - sharp */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  /* Shadows - crisp */
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 1px 3px rgba(11, 37, 69, 0.04);
  --shadow-md: 0 4px 12px rgba(11, 37, 69, 0.08), 0 2px 4px rgba(11, 37, 69, 0.04);
  --shadow-lg: 0 12px 32px rgba(11, 37, 69, 0.12), 0 4px 8px rgba(11, 37, 69, 0.06);

  /* Typography */
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Section spacing - compact */
  --section-py: clamp(40px, 5vw, 64px);
}

/* Base typography */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Reusable component classes */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 1px solid var(--primary);
  text-transform: uppercase;
}

.btn-primary:hover {
  background: var(--neutral-400);
  border-color: var(--neutral-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 1px solid var(--primary);
  text-transform: uppercase;
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--on-primary);
  transform: translateY(-1px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 1px solid var(--accent);
  text-transform: uppercase;
}

.btn-accent:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.dotted-underline {
  border-bottom: 1px dotted var(--muted);
  transition: all 0.3s ease;
}

.dotted-underline:hover {
  border-bottom: 1px dotted var(--accent);
}

.card-surface {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.card-surface:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-surface2 {
        background: var(--surface);
        border: 1px solid var(--neutral-200);
        border-radius: var(--radius-md);
        transition: all 0.3s ease;
}

.card-surface2:hover {
        border-color: var(--accent);
        box-shadow: var(--shadow-md);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.icon-badge-accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.section-shell {
  padding-block: var(--section-py);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--on-primary);
}

.grid-pattern {
  background-image:
    linear-gradient(var(--neutral-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--neutral-200) 1px, transparent 1px);
  background-size: 32px 32px;
}

.tech-border {
  position: relative;
}

.tech-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 2px;
  background: var(--accent);
}

.tech-border::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2rem;
  background: var(--accent);
}

.corner-bracket {
  position: relative;
}

.corner-bracket::before,
.corner-bracket::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent);
}

.corner-bracket::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.corner-bracket::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

.data-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neutral-200), transparent);
}
    /* Active nav indicator — applied by currentPath prop in Layout.
   Text always stays dark (var(--primary)) for AAA contrast;
   accent color marks position via underline / left stripe / mono prefix. */
    .nav-link-active {
        color: var(--primary) !important;
        background: var(--neutral-100);
        position: relative;
        font-weight: 600 !important;
        border-radius: var(--radius-md);
    }

    .nav-link-active::after {
        content: '';
        position: absolute;
        left: 1rem;
        right: 1rem;
        bottom: -1px;
        height: 2px;
        background: var(--accent);
        border-radius: 1px;
    }

    .nav-link-active:hover {
        color: var(--primary) !important;
        background: var(--neutral-200);
    }

    .nav-sub-active {
        color: var(--primary) !important;
        font-weight: 600 !important;
        background: var(--neutral-100);
        position: relative;
        border-left: 2px solid var(--accent);
        padding-left: calc(1rem - 2px);
    }

    .nav-sub-active::before {
        content: '//';
        font-family: var(--font-mono);
        font-size: 0.65rem;
        color: var(--neutral-400);
        margin-right: 6px;
        letter-spacing: 0.05em;
    }

    .nav-sub-active:hover {
        color: var(--primary) !important;
        background: var(--neutral-200) !important;
    }

    /* Grouped top-level active — light tint behind the parent label when sub-page is active */
    .nav-parent-active {
        color: var(--primary) !important;
        background: var(--neutral-100);
        position: relative;
        font-weight: 600 !important;
    }

    .nav-parent-active::after {
        content: '';
        position: absolute;
        left: 1rem;
        right: 1rem;
        bottom: -1px;
        height: 2px;
        background: var(--accent);
        border-radius: 1px;
    }

    .nav-parent-active:hover {
        color: var(--primary) !important;
        background: var(--neutral-200) !important;
    }
}

    /* Hash-link navigation glides instead of teleporting, and the target
       section clears the sticky header. In the base layer so an explicit
       scroll-mt-* utility on an element still wins. */
    @layer base {
      @media (prefers-reduced-motion: no-preference) {
        html { scroll-behavior: smooth; }
      }
      [id] { scroll-margin-top: 6rem; }
    }
