/* ==========================================================
   AUTO CHINA PL - Design System (main.css)
   Glassmorphism dark theme, tokens, resets, utilities
   ========================================================== */

/* ── Google Fonts are loaded via PHP enqueue ── */

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  /* Background */
  --bg:            #0e0e10;
  --bg2:           #1a1a1f;
  --bg3:           #141418;

  /* Text */
  --ink:           #f5f5f7;
  --ink-2:         #8a8a8e;
  --ink-3:         #56565b;
  --ink-4:         #3a3a3f;

  /* Brand */
  --red:           #ef4444;
  --red-hover:     #dc2626;
  --red-rgb:       239, 68, 68;

  /* Glass */
  --glass-bg:      rgba(255, 255, 255, 0.10);
  --glass-bg2:     rgba(255, 255, 255, 0.06);
  --glass-stroke:  rgba(255, 255, 255, 0.12);
  --glass-blur:    26px;
  --glass-sat:     1.65;

  /* Shadows */
  --shadow-card:   0 18px 50px -18px rgba(14, 14, 16, .45);
  --shadow-glass:  0 8px 32px rgba(0, 0, 0, .28);

  /* Layout */
  --wrap:          min(1340px, 100% - 48px);
  --section-pad:   clamp(56px, 9vw, 112px);
  --radius:        22px;
  --radius-sm:     12px;
  --radius-xs:     8px;

  /* Typography */
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --font-cn:       'Noto Sans SC', sans-serif;

  /* Animation */
  --ease:          cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Nav */
  --nav-h:         80px;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
}

input, textarea, select {
  font-family: inherit;
}

/* ── Global Background ─────────────────────────────────── */
.gbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.gbg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.gbg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: orb-float 16s ease-in-out infinite;
  will-change: transform;
}

.gbg-orb.a {
  width: clamp(400px, 50vw, 700px);
  height: clamp(400px, 50vw, 700px);
  background: radial-gradient(circle, #ef444430, #9333ea18 60%, transparent 80%);
  top: -15%;
  left: -10%;
  animation-delay: 0s;
}

.gbg-orb.b {
  width: clamp(300px, 40vw, 600px);
  height: clamp(300px, 40vw, 600px);
  background: radial-gradient(circle, #3b82f628, #06b6d418 60%, transparent 80%);
  bottom: 20%;
  right: -10%;
  animation-delay: -8s;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  33%       { transform: translateY(-40px) scale(1.05); }
  66%       { transform: translateY(20px) scale(0.97); }
}

/* ── Page Shift (for fixed nav) ────────────────────────── */
.ac-page-shift {
  position: relative;
  z-index: 1;
}

/* ── Glass Utility ─────────────────────────────────────── */
.ac-glass {
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
}

/* ── Glassmorphism Background (for pages) ──────────────── */
.ac-home {
  background: transparent;
  min-height: 100vh;
}

/* ── Container / Wrap ──────────────────────────────────── */
.wrap, .container {
  width: var(--wrap);
  margin-inline: auto;
}

/* ── Section Spacing ───────────────────────────────────── */
.sec {
  padding-block: var(--section-pad);
}

/* ── Section Header ────────────────────────────────────── */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 52px);
  flex-wrap: wrap;
}

.sec-head h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--ink);
}

.sec-head p {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 460px;
  line-height: 1.65;
}

/* ── Kick Label ────────────────────────────────────────── */
.kick {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

/* ── Scroll Reveal ─────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.rv.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn .ar {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.btn:hover .ar {
  transform: translateX(3px);
}

/* Red / Primary */
.btn.red {
  background: var(--red);
  color: #fff;
}

.btn.red:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(var(--red-rgb), 0.35);
}

/* Ghost */
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.22);
}

.btn.ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
}

/* Dark Glass */
.btn.darkglass {
  background: rgba(14,14,16,0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}

.btn.darkglass:hover {
  background: rgba(14,14,16,0.75);
}

/* Configure (dark) */
.btn.cfg {
  background: var(--bg2);
  color: var(--ink);
  border: 1px solid var(--glass-stroke);
}

.btn.cfg:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* CPO */
.btn.cpo {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 13px;
  flex-direction: column;
  gap: 1px;
  padding: 8px 14px;
}

.btn.cpo small {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.75;
  display: block;
}

.btn.cpo:hover {
  background: rgba(255,255,255,0.06);
  color: var(--ink);
}

/* ── 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;
}

/* ── Breadcrumbs ───────────────────────────────────────── */
.ac-breadcrumbs {
  padding: calc(var(--nav-h) + 16px) 0 0;
  width: var(--wrap);
  margin-inline: auto;
}

.ac-breadcrumbs.pill {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  left: max(24px, calc((100vw - var(--wrap)) / 2));
  width: auto;
  padding: 8px 16px;
  background: rgba(14, 14, 16, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  z-index: 10;
}

.ac-breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.ac-breadcrumbs.pill ol {
  color: rgba(255, 255, 255, 0.85);
}

.ac-breadcrumbs.pill a {
  color: rgba(255, 255, 255, 0.85);
}

.ac-breadcrumbs a:hover,
.ac-breadcrumbs.pill a:hover { 
  color: #fff; 
}

.ac-breadcrumbs .sep { margin: 0 2px; opacity: 0.4; }

/* ── Chinese font utility ─────────────────────────────── */
.cn {
  font-family: var(--font-cn);
  font-size: 0.65em;
  opacity: 0.55;
  margin-left: 6px;
  font-weight: 400;
  letter-spacing: 0;
}

/* ── Values / Why Auto China ──────────────────────────── */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.val {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.val:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glass);
}

.val .ic {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: rgba(239,68,68,0.12);
  color: var(--red);
}

.val .ic svg { width: 24px; height: 24px; }

.val h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.val p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
  flex: 1;
}

.val-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.val:hover .val-link { gap: 8px; }

/* ── Brands Section ───────────────────────────────────── */
.brands-section {
  background: transparent;
}

.brands-head {
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 640px;
}

.brands-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.brands-sub {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 900px) {
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .brands-grid { grid-template-columns: 1fr; }
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: rgba(255,255,255,0.025);
  position: relative;
  transition: background 0.22s var(--ease);
  overflow: hidden;
  text-decoration: none;
}

.brand-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.28s var(--ease);
}

.brand-card:hover {
  background: rgba(255,255,255,0.055);
}

.brand-card:hover::before {
  transform: scaleY(1);
}

.bc-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 22px;
}

.bc-body {
  flex: 1;
  min-width: 0;
}

.bc-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 5px;
  transition: color 0.2s;
}

.brand-card:hover .bc-name {
  color: #fff;
}

.bc-cn {
  font-family: var(--font-cn);
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1;
  font-weight: 400;
}

.bc-arrow {
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s, transform 0.22s var(--ease), color 0.22s;
}

.bc-arrow svg {
  width: 100%;
  height: 100%;
}

.brand-card:hover .bc-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--red);
}

/* ── Trust Band ───────────────────────────────────────── */
.trust-band {
  border-block: 1px solid var(--glass-stroke);
  padding-block: 28px;
  background: rgba(255,255,255,0.03);
}

.known {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
}

.known-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  white-space: nowrap;
}

.known-logos {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
  flex-wrap: wrap;
  flex: 1;
}

.known-logos img {
  height: 24px;
  width: auto;
  opacity: 0.55;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}

.known-logos img:hover { opacity: 0.85; }

.reviews {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.review {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.2s;
}

.review:hover { color: var(--ink); }

.review .stars {
  color: #f59e0b;
  font-size: 12px;
}

@media (max-width: 900px) {
  .known {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .known-logos {
    justify-content: center;
    flex: unset;
  }
  .reviews {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
}

/* ── Contact Section ──────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 768px) {
  .contact-wrap { grid-template-columns: 1fr; }
}

.contact-info {
  padding: clamp(32px, 4vw, 56px);
  background: rgba(239,68,68,0.06);
  border-right: 1px solid var(--glass-stroke);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.contact-info .lede2 {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
  flex: 1;
}

.contact-form {
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cf-head h2 { font-size: clamp(20px, 2.5vw, 28px); }

/* Form fields */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.field {
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.18);
  padding-block: 4px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 20px 12px 8px;
  font-size: 15px;
  color: var(--bg);
  line-height: 1.4;
}

.field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #6b7280;
  transition: all 0.2s;
  pointer-events: none;
}

.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label,
.field textarea:not(:placeholder-shown) ~ label {
  top: 10px;
  font-size: 11px;
  color: var(--red);
}

.field input::placeholder,
.field textarea::placeholder { color: transparent; }

.field textarea { resize: vertical; min-height: 100px; }

/* Form submit */
.form-submit {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.form-msg {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  display: none;
}

.form-msg.success {
  display: block;
  background: rgba(34,197,94,0.12);
  color: #16a34a;
}

.form-msg.error {
  display: block;
  background: rgba(239,68,68,0.12);
  color: var(--red);
}

/* ── Responsive Helpers ────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-pad: clamp(40px, 8vw, 64px);
    --wrap: calc(100% - 32px);
  }
}

@media (max-width: 480px) {
  :root { --wrap: calc(100% - 24px); }
}
