/* Asian Auto Electrical Industries — shared design tokens + base styles
   See /DESIGN.md for the design system this implements. */

:root {
  --ink: #0B1A2B;
  --brand: #09519E;
  --brand-dark: #073E7A;
  --brand-tint: #E9F0F8;
  --steel: #54626F;
  --steel-light: #8492A0;
  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --border: #E1E6EB;
  --success: #1F7A52;
  --success-tint: #E7F4EE;
  --focus-ring: #09519E;

  --font-display: 'Lexend', -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --container: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 700; }
h2 { font-size: clamp(26px, 3vw, 36px); }
h3 { font-size: 20px; }

p { color: var(--steel); max-width: 65ch; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}
.section-tight {
  padding: var(--space-12) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--brand);
  display: block;
}

.lede {
  font-size: 18px;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 46px;
  padding: 0 var(--space-6);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--steel-light); background: var(--surface); }

.btn-ghost-inverse { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost-inverse:hover { background: rgba(255,255,255,0.1); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 250, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: var(--space-6);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.brand-lockup img { height: 34px; width: auto; }

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--steel);
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }

.nav-cta { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }

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

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--ink);
  color: #fff;
}
.trust-bar .container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  padding: var(--space-8) var(--space-6);
}
.trust-stat { text-align: left; }
.trust-stat .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.trust-stat .label {
  font-size: 13px;
  color: #A9B7C4;
  margin-top: 2px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ---------- Icon chip ---------- */
.icon-chip {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Product card ---------- */
.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.product-card .photo {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.product-card .photo img { max-height: 100%; object-fit: contain; }
.product-card .body { padding: var(--space-5) var(--space-6) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.product-card .tag {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 9px;
  border-radius: 999px;
}
.product-card h3 { font-size: 17px; }
.product-card .spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--steel);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.product-card .spec-list li { display: flex; justify-content: space-between; gap: var(--space-2); }
.product-card .spec-list .k { color: var(--steel-light); }
.product-card .spec-list .v { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: #C7D1DA;
  padding: var(--space-16) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
footer h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); font-size: 14.5px; }
.footer-links a:hover { color: #fff; }
.footer-brand img { height: 30px; margin-bottom: var(--space-4); }
.footer-brand p { color: #A9B7C4; font-size: 14.5px; max-width: 40ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  font-size: 13px;
  color: #8496A5;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Utility ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.stack { display: flex; flex-direction: column; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

hr.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-12) 0;
}

table.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.spec-table th, table.spec-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
table.spec-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--steel);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.field label {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.field input, .field textarea, .field select {
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--ink);
  min-height: 46px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--brand);
}
.field .hint { font-size: 12.5px; color: var(--steel-light); }

.notice {
  display: flex;
  gap: var(--space-3);
  background: var(--brand-tint);
  border: 1px solid #CFE0F0;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: 14px;
  color: var(--ink);
}
.notice svg { flex-shrink: 0; color: var(--brand); margin-top: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.nav-links-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) var(--space-6);
    gap: var(--space-4);
  }
  .trust-bar .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: var(--space-12) 0; }
  .trust-bar .container { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: var(--space-6); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
