/* ===================================================================
   Adaptive Prototype Experts LLC — APE Brand Design System v2.0
   Industrial Light: cool gray #F2F3F5 · dark olive #1E2420 · amber #D4880A
   =================================================================== */

:root {
  /* === SURFACES === */
  --color-page-bg:        #F2F3F5;
  --color-section-bg:     #E8EAED;
  --color-dark-bg:        #1E2420;
  --color-dark-bg-2:      #2E3A36;
  /* === AMBER (Brand Identity) === */
  --color-amber-cta:      #D4880A;
  --color-amber-accent:   #F5A623;
  --color-amber-tint:     #FFF0CC;
  --color-amber-deep:     #7A4500;
  --color-amber-hover:    #B8720A;
  /* === TYPE === */
  --color-headline:       #1E2420;
  --color-body:           #4A5250;
  --color-muted:          #8A9290;
  /* === BORDERS === */
  --color-border:         #DDE0E6;
  --color-border-strong:  #C4C8D0;
  /* === SEMANTIC === */
  --color-success:        #1A7A3C;
  --color-success-bg:     #E6F4EC;
  --color-error:          #C0392B;
  --color-error-bg:       #FAEAEA;
  --color-info:           #185FA5;
  /* === TYPOGRAPHY === */
  --font-display:         'Barlow Condensed', sans-serif;
  --font-body:            'Inter', sans-serif;
  --font-mono:            'JetBrains Mono', monospace;
  /* === SPACING === */
  --space-xs:             4px;
  --space-sm:             8px;
  --space-md:             12px;
  --space-lg:             16px;
  --space-xl:             24px;
  --space-2xl:            32px;
  --space-3xl:            48px;
  --space-4xl:            64px;
  --space-section:        96px;
  /* === RADIUS === */
  --radius-sm:            4px;
  --radius-md:            7px;
  --radius-lg:            12px;
  --radius-xl:            16px;
  --radius-pill:          20px;
  --radius-circle:        50%;
  /* === SHADOWS === */
  --shadow-card:          0 2px 12px rgba(30, 36, 32, 0.08);
  --shadow-modal:         0 8px 40px rgba(30, 36, 32, 0.16);
  --shadow-dropdown:      0 4px 16px rgba(30, 36, 32, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-body);
  background: var(--color-page-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-headline);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-amber-cta); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-amber-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--color-amber-cta);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 8px; }

/* ---------- Nav ---------- */
.site-nav {
  background: var(--color-page-bg);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow .3s ease;
}
.site-nav.scrolled {
  box-shadow: var(--shadow-dropdown);
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--color-body);
  transition: color .2s ease;
}
.nav-link:hover { color: var(--color-headline); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--color-amber-cta);
  transition: width .25s ease;
  border-radius: 1px;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { width: 100%; }
.nav-link[aria-current="page"] { color: var(--color-amber-cta); }

#main-menu { display: none; }
#main-menu.open { display: flex; }
@media (min-width: 768px) { #main-menu { display: flex; } }

/* ---------- Hero amber stripe ---------- */
.hero-section {
  position: relative;
  background: var(--color-page-bg);
}
.hero-section::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 7px;
  background: var(--color-amber-cta);
  pointer-events: none;
}

/* ---------- Dark section (CTA bands) ---------- */
.dark-section {
  position: relative;
  background: var(--color-dark-bg);
}
.dark-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--color-amber-cta);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-page-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-amber-cta);
  box-shadow: var(--shadow-card);
}

.card-elevated {
  background: var(--color-page-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-elevated:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-modal);
}

.card-tinted {
  background: var(--color-amber-tint);
  border: 0.5px solid var(--color-amber-cta);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Project thumb shimmer */
.project-thumb { position: relative; overflow: hidden; }
.project-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(212,136,10,0.15) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .6s ease;
}
.card:hover .project-thumb::after,
.card-elevated:hover .project-thumb::after { transform: translateX(110%); }

/* Step number underline grow */
.step-num::after {
  content: '';
  display: block;
  margin-top: 10px;
  width: 28px; height: 3px;
  background: var(--color-amber-cta);
  border-radius: 2px;
  transition: width .3s ease;
}
.card:hover .step-num::after { width: 48px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary {
  background: var(--color-amber-cta);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 13px 30px;
  font-size: 15px;
}
.btn-primary:hover { background: var(--color-amber-hover); color: #fff; }

.btn-secondary {
  background: transparent;
  color: var(--color-amber-cta);
  border: 1.5px solid var(--color-amber-cta);
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-size: 15px;
}
.btn-secondary:hover { background: var(--color-amber-tint); }

.btn-dark {
  background: var(--color-dark-bg);
  color: var(--color-page-bg);
  border-radius: var(--radius-md);
  padding: 13px 30px;
  font-size: 15px;
}
.btn-dark:hover { background: var(--color-dark-bg-2); color: var(--color-page-bg); }

.btn-ghost {
  background: transparent;
  color: var(--color-body);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-size: 15px;
}
.btn-ghost:hover { border-color: var(--color-border-strong); color: var(--color-headline); }

/* Small button size */
.btn-sm { padding: 6px 14px; font-size: 11px; border-radius: var(--radius-sm); }
/* Nav CTA sizing */
.btn-nav { padding: 8px 18px; font-size: 13px; border-radius: var(--radius-md); }

/* ---------- Badges & Tags ---------- */
.badge-gold {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-amber-tint);
  color: var(--color-amber-deep);
  border: 0.5px solid var(--color-amber-cta);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-neutral {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-section-bg);
  color: var(--color-body);
  border: 0.5px solid var(--color-border);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-dark {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-dark-bg);
  color: var(--color-amber-accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-amber-cta);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 12px;
}

/* ---------- Entrance animations ---------- */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp .7s ease-out forwards; }
.animate-delay-1 { animation-delay: .1s; opacity: 0; }
.animate-delay-2 { animation-delay: .2s; opacity: 0; }
.animate-delay-3 { animation-delay: .3s; opacity: 0; }
.animate-delay-4 { animation-delay: .45s; opacity: 0; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .animate-fade-in-up, .animate-delay-1, .animate-delay-2,
  .animate-delay-3, .animate-delay-4 {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
}

/* ---------- Ticker / marquee ---------- */
.ticker-band { overflow: hidden; background: var(--color-amber-cta); }
.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  white-space: nowrap;
  padding: 13px 0;
  animation: ticker 32s linear infinite;
}
.ticker-band:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-dark-bg);
  padding: 0 28px;
  border-right: 1px solid rgba(30, 36, 32, 0.2);
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table caption {
  text-align: left;
  padding: 0 0 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-amber-cta);
}
.spec-table thead th {
  background: var(--color-dark-bg);
  color: var(--color-page-bg);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}
.spec-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-body);
}
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tbody tr:hover td { background: var(--color-amber-tint); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-body);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-headline);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color .2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border: 2px solid var(--color-amber-cta);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 20px;
}
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-note {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 12px;
}

dl.contact-meta dt {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-amber-cta);
  margin-top: 20px;
}
dl.contact-meta dd { margin: 4px 0 0; color: var(--color-body); }
dl.contact-meta a { color: var(--color-body); text-decoration: none; border-bottom: 1px solid var(--color-border); }
dl.contact-meta a:hover { color: var(--color-headline); border-color: var(--color-amber-cta); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-section-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-amber-cta); }
