/* =========================================================
   APEX MOTOR EDUCATION SOLUTIONS LTD — Design System
   Palette: Ink navy / slate surfaces / amber + indigo accents
   Type: Space Grotesk (display) + Inter (body) + JetBrains Mono (data/code)
   ========================================================= */

:root {
  /* Color tokens */
  --ink:            #0B0F19;
  --ink-soft:       #0F1424;
  --surface:        #151B2E;
  --surface-raised: #1B2238;
  --border:         #2A3252;
  --border-soft:    #232A45;
  --text:           #F4F6F8;
  --text-dim:       #A7AFC4;
  --text-faint:     #6B7390;
  --amber:          #E8A33D;
  --amber-soft:     #F4C77A;
  --indigo:         #4C6EF5;
  --indigo-soft:    #7B95FF;
  --green:          #3FC98B;
  --red:            #EF5A6F;

  /* Type */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --maxw: 1180px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; color: var(--text-dim); }

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber);
  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;
  }
}

/* =========================================================
   Header / Nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--amber), var(--indigo));
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--ink);
  border-radius: 4px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14.5px;
  color: var(--text-dim);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--amber-soft); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-ghost { display: none; }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  color: #1A1304;
  box-shadow: 0 8px 24px -8px rgba(232, 163, 61, 0.5);
}
.btn-primary:hover { background: var(--amber-soft); }

.btn-secondary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(76, 110, 245, 0.5);
}
.btn-secondary:hover { background: var(--indigo-soft); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-faint); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* =========================================================
   Mobile menu drawer
   ========================================================= */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--ink-soft);
  z-index: 99;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu .container { padding-top: 20px; padding-bottom: 30px; }
.mobile-menu a {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-soft);
}
.mobile-menu .btn { margin-top: 20px; }

/* =========================================================
   Eyebrow / Section labels
   ========================================================= */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}

.section {
  padding: 90px 0;
}
.section-tight { padding: 60px 0; }

@media (max-width: 700px) {
  .section { padding: 60px 0; }
}

.section-head {
  max-width: 640px;
  margin-bottom: 50px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin-top: 14px;
}
.section-head p {
  margin-top: 14px;
  font-size: 17px;
}

/* =========================================================
   Page header banner (non-home pages)
   ========================================================= */

.page-banner {
  padding: 64px 0 50px;
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(circle at 15% 20%, rgba(76, 110, 245, 0.12), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(232, 163, 61, 0.10), transparent 50%);
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.breadcrumb a:hover { color: var(--text-dim); }
.page-banner h1 {
  font-size: clamp(32px, 5vw, 46px);
}
.page-banner .lede {
  margin-top: 16px;
  max-width: 640px;
  font-size: 17.5px;
}

/* =========================================================
   Learning path node strip (signature wayfinding device)
   ========================================================= */

.path-strip {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 36px 0 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.path-node {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.path-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--text-faint);
  flex-shrink: 0;
}
.path-node.is-active .path-dot {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.18);
}
.path-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.path-node.is-active .path-label { color: var(--amber-soft); }
.path-line {
  width: 46px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* =========================================================
   Cards
   ========================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 22px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* =========================================================
   Tags / badges
   ========================================================= */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tag-amber { color: var(--amber-soft); border-color: rgba(232,163,61,0.35); background: rgba(232,163,61,0.08); }
.tag-indigo { color: var(--indigo-soft); border-color: rgba(76,110,245,0.35); background: rgba(76,110,245,0.08); }
.tag-green { color: var(--green); border-color: rgba(63,201,139,0.35); background: rgba(63,201,139,0.08); }
.tag-red { color: var(--red); border-color: rgba(239,90,111,0.35); background: rgba(239,90,111,0.08); }

/* =========================================================
   Forms
   ========================================================= */

.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.field .hint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 6px;
  display: block;
}
input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  border-color: var(--indigo);
}
textarea { resize: vertical; min-height: 120px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A7AFC4' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 60px 0 30px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--amber-soft); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-brand-line .brand-mark { width: 26px; height: 26px; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Utility
   ========================================================= */

.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
