/* ═══════════════════════════════════════════════════════════════════
   GM TECH — Precision Dark Tech  |  style.css  v2.0
   Palette:  Navy deep #080f1a · Navy mid #0d1b2e · Ice blue #7bc4d4
   Fonts:    Oxanium (display) + Mulish (body)
   ═══════════════════════════════════════════════════════════════════ */

/* ── @layer Declaration ─────────────────────────────────────────── */
@layer base, layout, components, utilities, animations;

/* ── Design Tokens ──────────────────────────────────────────────── */
@layer base {
  :root {
    /* Core palette */
    --navy-0:  #060d18;
    --navy-1:  #080f1a;
    --navy-2:  #0d1b2e;
    --navy-3:  #122038;
    --navy-4:  #1a2e4a;

    /* Ice blue accent */
    --ice:        #7bc4d4;
    --ice-hi:     #a8dce8;
    --ice-lo:     #4a8fa0;
    --ice-dim:    rgba(123 196 212 / 0.12);
    --ice-glow:   rgba(123 196 212 / 0.22);

    /* Text */
    --tw:  #edf4f8;
    --t2:  #8faec0;
    --t3:  #4e6b80;

    /* Borders */
    --bdr:  rgba(123 196 212 / 0.10);
    --bdr2: rgba(123 196 212 / 0.20);

    /* Typography */
    --ff-disp: 'Outfit', sans-serif;
    --ff-body: 'Inter', sans-serif;
    --ff-mono: 'Courier New', 'Courier', monospace;

    /* Spacing */
    --r-sm:  6px;
    --r-md:  12px;
    --r-lg:  20px;
    --sec-py: clamp(60px, 8vw, 100px);

    /* Transitions */
    --ease:   cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --dur-sm: 0.2s;
    --dur-md: 0.3s;
    --dur-lg: 0.6s;

  }

  /* ── Reset & Base ─────────────────────────────────────────────── */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    tab-size: 4;
    color-scheme: dark;
    scroll-padding-top: 80px; /* offset for fixed header */
  }

  body {
    background: var(--navy-1);
    color: var(--tw);
    font-family: var(--ff-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100dvh;
  }

  /* Lists */
  ul, ol { list-style: none }

  /* Media */
  img, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Links */
  a {
    color: var(--ice);
    text-decoration: none;
    transition: color var(--dur-sm);
  }
  a:hover { color: var(--ice-hi) }

  /* Headings */
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
    line-height: 1.2;
  }

  /* Paragraphs */
  p { text-wrap: pretty }

  /* Interactive states */
  button { cursor: pointer; font: inherit; border: none; background: none }
  input, textarea, select { font: inherit; color: inherit }

  /* Reduce widows/orphans */
  p, li { orphans: 3; widows: 3 }
}

/* ── Accessibility ──────────────────────────────────────────────── */
@layer utilities {
  /* Screen reader only */
  .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;
  }

  /* Skip link */
  .skip-link {
    position: fixed;
    top: -100%;
    inset-inline-start: 1rem;
    z-index: 9999;
    background: var(--ice);
    color: var(--navy-1);
    padding: 0.5rem 1.2rem;
    border-radius: var(--r-sm);
    font-family: var(--ff-disp);
    font-size: 0.85rem;
    font-weight: 700;
    transition: top var(--dur-sm);
  }
  .skip-link:focus { top: 1rem }

  /* Focus styles — WCAG AA */
  :focus-visible {
    outline: 2px solid var(--ice);
    outline-offset: 3px;
    border-radius: 4px;
  }
  :focus:not(:focus-visible) { outline: none }

  /* Required field indicator */
  .req { color: #f87171; margin-inline-start: 2px; }

  /* Field error messages */
  .field-err {
    display: block;
    font-size: 0.78rem;
    color: #f87171;
    margin-top: 0.25rem;
    font-family: var(--ff-disp);
    letter-spacing: 0.04em;
  }
  .field-err[hidden] { display: none }

  /* High contrast support */
  @media (forced-colors: active) {
    .btn-ice { forced-color-adjust: none }
    .nav-logo-img { forced-color-adjust: none }
  }
}

/* ── Layout ─────────────────────────────────────────────────────── */
@layer layout {
  .container {
    width: 92%;
    max-width: 1200px;
    margin-inline: auto;
  }
}

/* ── Header ─────────────────────────────────────────────────────── */
@layer components {
  #hdr {
    position: fixed;
    inset: 0 0 auto;
    z-index: 600;
    transition:
      background var(--dur-md) var(--ease),
      backdrop-filter var(--dur-md),
      box-shadow var(--dur-md);
    will-change: background;
  }
  #hdr.scrolled {
    background: rgba(6 13 24 / 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--bdr), 0 4px 32px rgba(0 0 0 / 0.5);
  }

  .nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }

  /* Logo */
  .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
  }
  .nav-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--r-sm);
    border: 1px solid var(--bdr2);
    background: var(--navy-2);
    transition: border-color var(--dur-sm), box-shadow var(--dur-sm);
  }
  .nav-logo:hover .nav-logo-img,
  .nav-logo:focus-visible .nav-logo-img {
    border-color: var(--ice);
    box-shadow: 0 0 16px var(--ice-glow);
  }
  .logo-text {
    font-family: var(--ff-disp);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--tw);
    text-transform: uppercase;
    line-height: 1;
  }
  .logo-text em { color: var(--ice); font-style: normal }

  /* Nav links */
  .nav-list { display: flex; align-items: center; gap: 0.15rem }
  .nl {
    position: relative;
    display: block;
    padding: 0.4rem 0.9rem;
    font-family: var(--ff-disp);
    font-size: 0.83rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t2);
    border-radius: var(--r-sm);
    transition: color var(--dur-sm), background var(--dur-sm);
  }
  .nl:hover, .nl.active {
    color: var(--tw);
    background: var(--ice-dim);
  }
  .nl.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--ice);
    border-radius: 2px;
  }

  /* CTA nav link */
  .nl-cta {
    border: 1px solid var(--bdr2);
    color: var(--ice);
    margin-inline-start: 0.5rem;
    transition: background var(--dur-sm), color var(--dur-sm),
                box-shadow var(--dur-sm), border-color var(--dur-sm);
  }
  .nl-cta:hover {
    background: var(--ice);
    color: var(--navy-1);
    box-shadow: 0 0 24px var(--ice-glow);
    border-color: var(--ice);
  }

  /* Mobile toggle */
  .nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: var(--navy-3);
    border: 1px solid var(--bdr);
    border-radius: var(--r-sm);
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
    transition: background var(--dur-sm), border-color var(--dur-sm);
    touch-action: manipulation;
  }
  .nav-toggle:hover { background: var(--ice-dim); border-color: var(--bdr2) }
  .bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--tw);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s;
    pointer-events: none;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px) }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; transform: scaleX(0) }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px) }

  /* Mobile nav */
  @media (max-width: 860px) {
    .nav-toggle { display: flex }
    .nav-list {
      display: none;
      position: fixed;
      inset: 68px 0 auto;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      background: rgba(6 13 24 / 0.97);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--bdr);
      padding: 1rem;
      z-index: 599;
      overscroll-behavior: contain;
    }
    .nav-list.open {
      display: flex;
      animation: sld 0.2s ease;
    }
    .nl { padding: 0.85rem 1rem; font-size: 0.95rem; text-align: left }
    .nl.active::after { display: none }
    .nl-cta { margin-inline-start: 0; margin-top: 0.5rem }
  }
}

/* ── Buttons ─────────────────────────────────────────────────────── */
@layer components {
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--ff-disp);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--dur-sm) var(--ease);
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* WCAG touch target */
  }
  .btn i { transition: transform var(--dur-sm) var(--ease) }
  .btn:hover i { transform: translateX(3px) }
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
  }

  /* Primary CTA */
  .btn-ice { background: var(--ice); color: var(--navy-1) }
  .btn-ice:hover {
    background: var(--ice-hi);
    color: var(--navy-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(123 196 212 / 0.35);
  }

  /* Ghost / secondary */
  .btn-ghost {
    background: transparent;
    color: var(--tw);
    border-color: var(--bdr2);
  }
  .btn-ghost:hover {
    background: var(--ice-dim);
    color: var(--ice);
    border-color: var(--ice);
    transform: translateY(-2px);
  }

  /* Modifiers */
  .btn-full { width: 100%; justify-content: center }
  .btn-about { margin-top: 2rem }
}

/* ── Hero ────────────────────────────────────────────────────────── */
@layer components {
  .hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 100px 0 80px;
    overflow: hidden;
  }

  /* Background */
  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--navy-1);
  }
  .circuit-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    pointer-events: none;
  }
  .trace {
    stroke: var(--ice);
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: trace-draw 3s var(--ease) forwards;
  }
  .trace:nth-child(1) { animation-delay: 0.3s }
  .trace:nth-child(2) { animation-delay: 0.7s }
  .trace:nth-child(3) { animation-delay: 1.1s }
  .trace:nth-child(4) { animation-delay: 1.5s }
  .trace:nth-child(5) { animation-delay: 0.5s }
  .trace:nth-child(6) { animation-delay: 0.9s }
  .trace:nth-child(7) { animation-delay: 1.3s }

  .node {
    fill: var(--ice);
    opacity: 0;
    animation: nfade 0.4s ease forwards;
  }
  .node:nth-child(8)  { animation-delay: 1.8s }
  .node:nth-child(9)  { animation-delay: 2.0s }
  .node:nth-child(10) { animation-delay: 2.2s }
  .node:nth-child(11) { animation-delay: 2.4s }
  .node:nth-child(12) { animation-delay: 2.6s }
  .node:nth-child(13) { animation-delay: 2.8s }
  .node:nth-child(14) { animation-delay: 3.0s }

  .pad {
    fill: none;
    stroke: var(--ice);
    stroke-width: 2;
    opacity: 0;
    animation: nfade 0.5s ease forwards;
  }
  .pad:nth-child(15) { animation-delay: 2.0s }
  .pad:nth-child(16) { animation-delay: 2.4s }
  .pad:nth-child(17) { animation-delay: 2.8s }
  .pad:nth-child(18) { animation-delay: 3.2s }

  /* Atmospheric glows */
  .glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
  }
  .g1 { width: 600px; height: 600px; background: rgba(123 196 212 / 0.08); top: -150px; left: -200px }
  .g2 { width: 500px; height: 500px; background: rgba(74 143 160 / 0.07); bottom: -100px; right: -100px }

  /* Scan line */
  .scan-line {
    position: absolute;
    inset-inline: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ice), transparent);
    opacity: 0.3;
    top: 0;
    animation: scan 6s linear infinite;
    pointer-events: none;
  }

  /* Diagonal cut */
  .hero-cut {
    position: absolute;
    bottom: -1px;
    inset-inline: 0;
    height: 80px;
    background: var(--navy-2);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
    z-index: 1;
    pointer-events: none;
  }

  /* Hero layout */
  .hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 3rem;
    align-items: center;
    width: 100%;
  }

  /* Hero text elements */
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(123 196 212 / 0.3);
    border-radius: 999px;
    background: rgba(123 196 212 / 0.07);
    font-family: var(--ff-disp);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ice);
  }
  .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ice);
    flex-shrink: 0;
    animation: pdot 2s ease infinite;
  }

  .hero h1 {
    font-family: var(--ff-disp);
    font-size: clamp(2.4rem, 5.2vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--tw);
    margin-bottom: 1.25rem;
  }
  .ice-grad {
    background: linear-gradient(135deg, var(--ice) 0%, var(--ice-hi) 60%, #d4f1f8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-p {
    font-size: 1.1rem;
    color: var(--t2);
    max-width: 520px;
    line-height: 1.85;
    margin-bottom: 2rem;
  }
  .hero-btns {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
  }
  .hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  .hs { display: flex; flex-direction: column; gap: 2px }
  .hs-n {
    font-family: var(--ff-disp);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--tw);
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .hs-n b { color: var(--ice); font-weight: 800 }
  .hs-l {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--t3);
  }
  .hs-sep { width: 1px; height: 32px; background: var(--bdr2) }

  /* Terminal panel */
  .hero-terminal {
    background: var(--navy-2);
    border: 1px solid var(--bdr2);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(123 196 212 / 0.05), 0 32px 64px rgba(0 0 0 / 0.5);
  }
  .term-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--navy-3);
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--bdr);
  }
  .tdot { width: 11px; height: 11px; border-radius: 50% }
  .tdot-red    { background: #e74c3c }
  .tdot-yellow { background: #f1c40f }
  .tdot-ice    { background: var(--ice) }
  .ttitle {
    margin-inline-start: 0.5rem;
    font-family: var(--ff-mono);
    font-size: 0.78rem;
    color: var(--t3);
    letter-spacing: 0.04em;
  }
  .term-body {
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }
  .tl { font-family: var(--ff-mono); font-size: 0.83rem; color: var(--t2) }
  .to { color: var(--ice); padding-inline-start: 1rem }
  .to::before { content: '> '; color: var(--t3) }
  .tsuc { color: #3dd68c; font-weight: 700 }
  .tp { color: var(--ice-lo); margin-inline-end: 0.4rem; user-select: none }
  .tc { color: var(--ice) }
  .ta { color: var(--t2) }
  .tcur { color: var(--ice); animation: blink 1.2s step-end infinite }

  /* Hero reveal */
  .r { opacity: 0; transform: translateY(20px); animation: rev 0.7s var(--ease) forwards }
  .r0 { animation-delay: 0.10s }
  .r1 { animation-delay: 0.25s }
  .r2 { animation-delay: 0.40s }
  .r3 { animation-delay: 0.55s }
  .r4 { animation-delay: 0.70s }

  /* Hero responsive */
  @media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; max-width: 680px }
    .hero-terminal { display: none }
  }
  @media (max-width: 640px) {
    .hero { padding: 90px 0 100px }
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.8rem) }
    .hero-btns { flex-direction: column; align-items: flex-start }
    .hero-stats { gap: 1rem }
    .hs-n { font-size: 1.4rem }
  }
}

/* ── Section Base ────────────────────────────────────────────────── */
@layer components {
  .sec { padding: var(--sec-py) 0 }
  .sec-alt { background: var(--navy-2) }

  .sec-hd {
    text-align: center;
    max-width: 560px;
    margin-inline: auto;
    margin-bottom: 4rem;
  }
  .sec-hd h2,
  .sec-hd p,
  .sec-label {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--dur-lg) ease, transform var(--dur-lg) ease;
  }
  .sec-hd.revealed h2,
  .sec-hd.revealed .sec-label,
  .sec-hd.revealed p {
    opacity: 1;
    transform: translateY(0);
  }

  .sec-label {
    display: inline-block;
    font-family: var(--ff-mono);
    font-size: 0.78rem;
    color: var(--ice-lo);
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
  }
  .sec-hd h2 {
    font-family: var(--ff-disp);
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--tw);
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
    transition-delay: 0.1s;
  }
  .sec-hd p {
    font-size: 1rem;
    color: var(--t2);
    transition-delay: 0.18s;
  }
}

/* ── Services ────────────────────────────────────────────────────── */
@layer components {
  .svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
  }
  .svc-card {
    position: relative;
    overflow: hidden;
    background: var(--navy-2);
    border: 1px solid var(--bdr);
    border-radius: var(--r-lg);
    padding: 2rem 1.75rem 1.75rem;
    transition: transform var(--dur-sm) var(--ease), border-color var(--dur-sm), box-shadow var(--dur-sm);
    content-visibility: auto;
    contain-intrinsic-size: 0 280px;
  }
  .svc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(123 196 212 / 0.15), transparent 60%);
    opacity: 0;
    transition: opacity var(--dur-md);
    pointer-events: none;
  }
  .svc-card:hover {
    transform: translateY(-6px);
    border-color: var(--ice-lo);
    box-shadow: 0 0 0 1px rgba(123 196 212 / 0.12),
                0 24px 48px rgba(0 0 0 / 0.45),
                0 0 48px rgba(123 196 212 / 0.07);
  }
  .svc-card:hover::before { opacity: 1 }

  .svc-n {
    position: absolute;
    top: 1.5rem;
    inset-inline-end: 1.75rem;
    font-family: var(--ff-disp);
    font-size: 2.8rem;
    font-weight: 800;
    color: rgba(123 196 212 / 0.06);
    line-height: 1;
    user-select: none;
    pointer-events: none;
  }
  .svc-ico {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--bdr);
    transition: border-color var(--dur-sm), box-shadow var(--dur-sm);
    flex-shrink: 0;
  }
  .ico-ice   { background: rgba(123 196 212 / 0.1); color: var(--ice) }
  .ico-slate { background: rgba(74 143 160 / 0.1);  color: var(--ice-lo) }
  .svc-card:hover .svc-ico {
    border-color: var(--ice);
    box-shadow: 0 0 20px rgba(123 196 212 / 0.2);
  }

  .svc-card h3 {
    font-family: var(--ff-disp);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tw);
    margin-bottom: 0.6rem;
  }
  .svc-card p {
    font-size: 0.93rem;
    color: var(--t2);
    line-height: 1.75;
    margin-bottom: 1.1rem;
  }

  .svc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .svc-tags li {
    font-family: var(--ff-disp);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(123 196 212 / 0.08);
    color: var(--ice-lo);
    border: 1px solid rgba(123 196 212 / 0.15);
  }

  .svc-arr {
    position: absolute;
    bottom: 1.5rem;
    inset-inline-end: 1.75rem;
    color: var(--bdr2);
    font-size: 1rem;
    transition: color var(--dur-sm), transform var(--dur-sm);
    pointer-events: none;
  }
  .svc-card:hover .svc-arr {
    color: var(--ice);
    transform: translate(2px, -2px);
  }
}

/* ── About ───────────────────────────────────────────────────────── */
@layer components {
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
  }

  /* Visual side */
  .about-vis {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .avis-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .avis-rings {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .avis-logo {
    position: relative;
    z-index: 2;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--bdr2);
    background: var(--navy-2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(123 196 212 / 0.04), 0 0 64px rgba(123 196 212 / 0.12);
  }
  .avis-logo img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    object-position: center 25%;
  }

  .aring {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    animation: ring-spin linear infinite;
  }
  .aring-1 {
    width: 180px;
    height: 180px;
    border-width: 1px;
    border-color: rgba(123 196 212 / 0.25) transparent rgba(123 196 212 / 0.15) transparent;
    animation-duration: 12s;
  }
  .aring-2 {
    width: 240px;
    height: 240px;
    border-width: 1px;
    border-color: transparent rgba(123 196 212 / 0.18) transparent rgba(123 196 212 / 0.1);
    animation-duration: 20s;
    animation-direction: reverse;
  }

  /* Floating chips */
  .achip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--navy-3);
    border: 1px solid var(--bdr2);
    border-radius: var(--r-sm);
    padding: 0.45rem 0.85rem;
    font-family: var(--ff-disp);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tw);
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0 0 0 / 0.4);
    animation: chip-float 4s ease-in-out infinite;
  }
  .achip i { color: var(--ice); font-size: 0.8rem }
  .achip-1 { top: 20px;  inset-inline-end: -10px; animation-delay: 0s }
  .achip-2 { bottom: 50px; inset-inline-end: -20px; animation-delay: 1.5s }
  .achip-3 {
    top: 50%;
    inset-inline-start: -20px;
    transform: translateY(-50%);
    animation: chip-float-l 4s ease-in-out 0.8s infinite;
  }

  /* About text */
  .about-txt .sec-label { display: block; margin-bottom: 0.75rem }
  .about-txt h2 {
    font-family: var(--ff-disp);
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--tw);
    letter-spacing: -0.02em;
    margin-bottom: 1.1rem;
    line-height: 1.15;
  }
  .about-txt p { font-size: 0.98rem; color: var(--t2); line-height: 1.85; margin-bottom: 0.85rem }

  /* Process grid */
  .ap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 1.75rem;
  }
  .ap-item {
    background: var(--navy-1);
    border: 1px solid var(--bdr);
    border-radius: var(--r-md);
    padding: 1rem 1.1rem;
    transition: border-color var(--dur-sm);
  }
  .ap-item:hover { border-color: var(--ice-lo) }
  .ap-n {
    display: block;
    font-family: var(--ff-disp);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--ice);
    margin-bottom: 0.35rem;
  }
  .ap-item strong { display: block; font-size: 0.93rem; color: var(--tw); margin-bottom: 0.2rem }
  .ap-item span { font-size: 0.82rem; color: var(--t3) }

  @media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem }
    .avis-wrap { width: 240px; height: 240px }
    .aring-1 { width: 140px; height: 140px }
    .aring-2 { width: 190px; height: 190px }
  }
}

/* ── Portfolio ───────────────────────────────────────────────────── */
@layer components {
  .port-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .port-card {
    position: relative;
    overflow: hidden;
    background: var(--navy-2);
    border: 1px solid var(--bdr);
    border-radius: var(--r-lg);
    padding: 2rem 1.75rem 5rem;
    transition: transform var(--dur-sm) var(--ease), border-color var(--dur-sm), box-shadow var(--dur-sm);
    content-visibility: auto;
    contain-intrinsic-size: 0 280px;
  }
  .port-card:hover {
    transform: translateY(-5px);
    border-color: var(--bdr2);
    box-shadow: 0 24px 48px rgba(0 0 0 / 0.45), 0 0 40px rgba(123 196 212 / 0.06);
  }

  .port-ico {
    width: 48px;
    height: 48px;
    border-radius: var(--r-sm);
    background: var(--ice-dim);
    color: var(--ice);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(123 196 212 / 0.2);
  }
  .port-type {
    display: block;
    font-family: var(--ff-disp);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice-lo);
    margin-bottom: 0.5rem;
  }
  .port-card h3 {
    font-family: var(--ff-disp);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tw);
    margin-bottom: 0.55rem;
  }
  .port-card p { font-size: 0.9rem; color: var(--t2); line-height: 1.75 }

  .port-tags {
    position: absolute;
    bottom: 1.5rem;
    inset-inline-start: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .port-tags span {
    font-family: var(--ff-disp);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(123 196 212 / 0.08);
    color: var(--ice-lo);
    border: 1px solid rgba(123 196 212 / 0.15);
  }
  .port-n {
    position: absolute;
    bottom: 1rem;
    inset-inline-end: 1.5rem;
    font-family: var(--ff-disp);
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(123 196 212 / 0.05);
    line-height: 1;
    user-select: none;
    pointer-events: none;
  }

  @media (max-width: 900px) {
    .port-grid { grid-template-columns: 1fr 1fr }
  }
  @media (max-width: 580px) {
    .port-grid { grid-template-columns: 1fr }
  }
}

/* ── Contact ─────────────────────────────────────────────────────── */
@layer components {
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: start;
  }

  .cinfo h3 {
    font-family: var(--ff-disp);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tw);
    margin-bottom: 0.7rem;
  }
  .cinfo > p { font-size: 0.95rem; color: var(--t2); margin-bottom: 2rem; line-height: 1.8 }

  address { font-style: normal }
  .cinfo-list { display: flex; flex-direction: column; gap: 1.25rem }
  .cinfo-list li { display: flex; align-items: flex-start; gap: 1rem }
  .ci-ico {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    background: var(--ice-dim);
    color: var(--ice);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: 1px solid rgba(123 196 212 / 0.2);
  }
  .ci-lbl {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--t3);
    font-family: var(--ff-disp);
    margin-bottom: 0.15rem;
  }
  .cinfo-list a,
  .cinfo-list span {
    font-size: 0.9rem;
    color: var(--t2);
    transition: color var(--dur-sm);
    word-break: break-word;
  }
  .cinfo-list a:hover { color: var(--ice) }

  /* Form */
  .cform {
    background: var(--navy-2);
    border: 1px solid var(--bdr);
    border-radius: var(--r-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
  }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem }
  .fg { display: flex; flex-direction: column; gap: 0.4rem }
  .fg label {
    font-family: var(--ff-disp);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--t3);
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .fg input,
  .fg textarea {
    background: var(--navy-1);
    border: 1px solid var(--bdr);
    border-radius: var(--r-sm);
    padding: 0.75rem 1rem;
    color: var(--tw);
    font-family: var(--ff-body);
    font-size: 0.93rem;
    transition: border-color var(--dur-sm), box-shadow var(--dur-sm);
    resize: vertical;
    min-height: 44px; /* WCAG touch target */
  }
  .fg input:hover,
  .fg textarea:hover {
    border-color: var(--ice-lo);
  }
  .fg input::placeholder,
  .fg textarea::placeholder { color: var(--t3) }
  .fg input:focus,
  .fg textarea:focus {
    outline: none;
    border-color: var(--ice);
    box-shadow: 0 0 0 3px rgba(123 196 212 / 0.15);
  }
  .fg input[aria-invalid="true"],
  .fg textarea[aria-invalid="true"] {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248 113 113 / 0.15);
  }
  .fg textarea { min-height: 120px }

  /* Status messages */
  .fstat {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    animation: fadein 0.3s ease;
  }
  .fstat[hidden] { display: none }
  .fsucc { background: rgba(61 214 140 / 0.07); border: 1px solid rgba(61 214 140 / 0.25); color: #3dd68c }
  .ferr  { background: rgba(239 68 68 / 0.07);  border: 1px solid rgba(239 68 68 / 0.25);  color: #f87171 }
  .ferr a { color: #f87171; text-decoration: underline }
  .ferr a:hover { color: #fca5a5 }
  .fstat i { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px }
  .fstat strong { display: block; margin-bottom: 2px }
  .fstat span { opacity: 0.8 }

  @media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2rem }
    .form-row { grid-template-columns: 1fr }
  }
}

/* ── Footer ──────────────────────────────────────────────────────── */
@layer components {
  footer {
    background: var(--navy-0);
    border-top: 1px solid var(--bdr);
  }
  .foot-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 3.5rem 0 2rem;
  }
  .foot-brand .nav-logo { display: inline-flex; margin-bottom: 0.75rem }
  .foot-brand > p {
    font-size: 0.87rem;
    color: var(--t3);
    max-width: 240px;
    line-height: 1.7;
    margin-bottom: 1.25rem;
  }

  .foot-soc { display: flex; gap: 0.6rem }
  .soc {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--navy-2);
    border: 1px solid var(--bdr);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2);
    font-size: 0.85rem;
    min-height: 36px;
    transition: background var(--dur-sm), color var(--dur-sm), border-color var(--dur-sm), box-shadow var(--dur-sm);
  }
  .soc:hover {
    background: var(--ice-dim);
    color: var(--ice);
    border-color: var(--ice);
    box-shadow: 0 0 12px rgba(123 196 212 / 0.2);
  }

  .foot-nav h4,
  .foot-ct h4 {
    font-family: var(--ff-disp);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--t3);
    margin-bottom: 1rem;
  }
  .foot-nav ul { display: flex; flex-direction: column; gap: 0.5rem }
  .foot-ct {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-style: normal;
  }
  .fl { font-size: 0.88rem; color: var(--t2); transition: color var(--dur-sm); word-break: break-word }
  .fl:hover { color: var(--ice) }

  .foot-bot { border-top: 1px solid var(--bdr); padding: 1rem 0 }
  .foot-bot-in {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .foot-bot-in span { font-size: 0.8rem; color: var(--t3) }
  .foot-badge {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--ice-lo);
    letter-spacing: 0.1em;
  }

  @media (max-width: 860px) {
    .foot-top { grid-template-columns: 1fr 1fr; gap: 2rem }
    .foot-brand { grid-column: 1 / -1 }
  }
  @media (max-width: 480px) {
    .foot-top { grid-template-columns: 1fr }
    .foot-bot-in { flex-direction: column; text-align: center }
  }
}

/* ── Back to Top ─────────────────────────────────────────────────── */
@layer components {
  #btt {
    position: fixed;
    bottom: 1.75rem;
    inset-inline-end: 1.75rem;
    z-index: 400;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--navy-3);
    border: 1px solid var(--bdr2);
    color: var(--ice);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity var(--dur-sm), transform var(--dur-sm), background var(--dur-sm), box-shadow var(--dur-sm);
    touch-action: manipulation;
  }
  #btt.show { opacity: 1; transform: translateY(0); pointer-events: auto }
  #btt:hover { background: var(--ice); color: var(--navy-1); box-shadow: 0 0 20px rgba(123 196 212 / 0.3) }
}

/* ── Scroll Reveal ───────────────────────────────────────────────── */
@layer components {
  .js-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--dur-lg) var(--ease), transform var(--dur-lg) var(--ease);
    will-change: opacity, transform;
  }
  .js-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    will-change: auto; /* release after animation */
  }
}

/* ── Animations ──────────────────────────────────────────────────── */
@layer animations {
  @keyframes trace-draw { to { stroke-dashoffset: 0 } }
  @keyframes nfade      { to { opacity: 1 } }
  @keyframes scan       { 0% { top: 0; opacity: .3 } 70% { opacity: .15 } 100% { top: 100%; opacity: 0 } }
  @keyframes pdot       { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .4; transform: scale(1.4) } }
  @keyframes blink      { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }
  @keyframes rev        { to { opacity: 1; transform: translateY(0) } }
  @keyframes ring-spin  { to { transform: rotate(360deg) } }
  @keyframes chip-float   { 0%, 100% { transform: translateY(0) }           50% { transform: translateY(-6px) } }
  @keyframes chip-float-l { 0%, 100% { transform: translateY(-50%) }        50% { transform: translateY(calc(-50% - 6px)) } }
  @keyframes fadein     { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: translateY(0) } }
  @keyframes sld        { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: translateY(0) } }
}

/* ── 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;
  }
  .scan-line,
  .aring,
  .pulse-dot,
  .tcur,
  .trace,
  .node,
  .pad { animation: none !important }
  .trace { stroke-dashoffset: 0 }
  .node, .pad { opacity: 1 }
  .js-reveal { opacity: 1; transform: none; transition: none }
  .r { opacity: 1; transform: none; animation: none }
}

/* ── Print Styles ────────────────────────────────────────────────── */
@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em }
  a[href^="#"]::after,
  a[href^="javascript:"]::after { content: "" }
  #hdr, #btt, .nav-toggle, .hero-bg,
  .hero-cut, .glow, .scan-line, .circuit-svg { display: none !important }
  .hero { min-height: auto; padding: 2rem 0 }
  .sec { padding: 2rem 0 }
  .container { width: 100%; max-width: none }
  .hero-inner,
  .about-grid,
  .contact-grid,
  .foot-top { display: block }
}
