/* ============================================================
   Unitree G1 lineup site — shared stylesheet
   Dark, technical, product-focused. No framework.
   ============================================================ */

:root {
  --bg: #0b0b0e;
  --bg-raised: #111116;
  --fg: #f4f4f5;
  --muted: #9d9da8;
  --line: #26262e;
  --accent: #818cf8;        /* overridden per model page via body style */
  --accent-soft: rgba(129, 140, 248, .12);
  --radius: 16px;
  --container: 80rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
select { font-family: inherit; }

.display { font-family: "Space Grotesk", -apple-system, sans-serif; }
.container { max-width: var(--container); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .3em; color: var(--muted); }
.h2 { margin-top: .75rem; font-size: 1.875rem; font-weight: 600; letter-spacing: -.02em; }
@media (min-width: 768px) { .h2 { font-size: 2.25rem; } }

/* ---------------- Buttons ---------------- */
.btn { display: inline-block; border-radius: 9999px; font-weight: 500; transition: opacity .15s, border-color .15s, transform .15s; }
.btn:active { transform: scale(.98); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { opacity: .88; }
.btn-outline { border: 1px solid var(--line); color: var(--fg); }
.btn-outline:hover { border-color: var(--accent); }
.btn-lg { padding: .75rem 1.5rem; font-size: .875rem; }
.btn-sm { padding: .4rem 1rem; font-size: .75rem; }

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(38,38,46,.6);
  background: rgba(11,11,14,.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.header-inner { display: flex; height: 4rem; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-size: .875rem; font-weight: 600; letter-spacing: .3em; white-space: nowrap; }

.main-nav { display: none; align-items: center; gap: 2rem; font-size: .875rem; color: var(--muted); }
.main-nav > a:hover { color: var(--fg); }

/* Dropdown */
.nav-drop { position: relative; }
.nav-drop-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .875rem; color: var(--muted); padding: 1.2rem 0; }
.nav-drop-toggle:hover, .nav-drop.open .nav-drop-toggle { color: var(--fg); }
.nav-drop-toggle .caret { transition: transform .2s; font-size: .6rem; }
.nav-drop.open .caret { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% - .4rem); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 260px; padding: .5rem;
  background: #131318; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s;
}
.nav-drop.open .nav-drop-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-drop-menu a {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem; border-radius: 9px; font-size: .85rem; color: var(--fg);
}
.nav-drop-menu a:hover { background: rgba(255,255,255,.05); }
.nav-drop-menu a .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.nav-drop-menu a small { display: block; color: var(--muted); font-size: .72rem; }
.nav-drop-menu a.current { background: rgba(255,255,255,.04); outline: 1px solid var(--line); }

/* Mobile nav */
.nav-burger { display: inline-flex; flex-direction: column; gap: 5px; padding: .5rem; }
.nav-burger span { width: 20px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav {
  display: none; border-top: 1px solid var(--line);
  background: rgba(11,11,14,.97); padding: .75rem 1.5rem 1.25rem;
}
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .7rem 0; font-size: .95rem; border-bottom: 1px solid rgba(38,38,46,.5); }
.mobile-nav .group-label { padding: .9rem 0 .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .25em; color: var(--muted); }
.mobile-nav .sub { display: flex; align-items: center; gap: .6rem; padding-left: .25rem; }
.mobile-nav .sub .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-burger, .mobile-nav { display: none !important; }
}

/* ---------------- Hero (shared) ---------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(38,38,46,.6); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(11,11,14,.94) 0%, rgba(11,11,14,.75) 42%, rgba(11,11,14,.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 34%),
    linear-gradient(180deg, rgba(11,11,14,.55) 0%, transparent 30%);
}
.hero-tint { position: absolute; inset: 0; z-index: 1; opacity: .28; background: radial-gradient(ellipse at 75% 35%, var(--accent), transparent 60%); mix-blend-mode: screen; }
.hero-grid-overlay {
  position: absolute; inset: 0; z-index: 1; opacity: .05;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; min-height: 560px; padding-top: 5rem; padding-bottom: 5rem; }
.hero-badge {
  display: inline-flex; width: fit-content; align-items: center; gap: .5rem;
  border-radius: 9999px; border: 1px solid rgba(255,255,255,.14); background: rgba(11,11,14,.5);
  padding: .3rem .8rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .22em; color: #cfcfd6;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin-top: 1.4rem; font-size: 2.9rem; font-weight: 600; line-height: 1.04; letter-spacing: -.02em; max-width: 13ch; }
.hero .grad { background: linear-gradient(90deg, var(--accent), #e2e8f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin-top: 1.2rem; max-width: 34rem; color: #c3c3cc; font-size: 1.05rem; }
.hero-price { margin-top: 1.5rem; display: inline-flex; align-items: baseline; gap: .5rem; font-size: 1.05rem; color: #c3c3cc; }
.hero-price b { font-family: "Space Grotesk", -apple-system, sans-serif; font-size: 1.9rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.hero-price span { font-size: .85rem; color: var(--muted); }
.hero-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-stats { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.stat-chip {
  border: 1px solid rgba(255,255,255,.14); background: rgba(11,11,14,.55);
  border-radius: 9999px; padding: .35rem .9rem; font-size: .8rem; color: #d9d9e0;
}
.stat-chip b { color: var(--accent); font-weight: 600; }
@media (min-width: 768px) { .hero h1 { font-size: 4.2rem; } }

/* Model pages: hero sized to the full 16:9 image, lighter overlays */
body[data-model] .hero-content { min-height: min(56.25vw, 88vh); }
body[data-model] .hero-scrim {
  background:
    linear-gradient(90deg, rgba(11,11,14,.88) 0%, rgba(11,11,14,.52) 38%, rgba(11,11,14,.08) 72%),
    linear-gradient(0deg, var(--bg) 0%, transparent 20%),
    linear-gradient(180deg, rgba(11,11,14,.38) 0%, transparent 24%);
}
body[data-model] .hero-tint { opacity: .14; }

/* ---------------- Sections ---------------- */
.section { padding-top: 5rem; padding-bottom: 5rem; }
.section-alt { background: rgba(255,255,255,.015); border-top: 1px solid rgba(38,38,46,.6); border-bottom: 1px solid rgba(38,38,46,.6); }
.section-head { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 2.2rem; }
.section-head p.lede { max-width: 34rem; font-size: .9rem; color: var(--muted); }
@media (min-width: 768px) { .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }

/* ---------------- Lineup cards ---------------- */
.lineup-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lineup-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lineup-grid { grid-template-columns: repeat(3, 1fr); } }

.model-card {
  --mc: var(--accent);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  transition: border-color .18s, transform .18s;
}
.model-card:hover { border-color: color-mix(in srgb, var(--mc) 60%, transparent); transform: translateY(-3px); }
.model-card .card-top { position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--mc), transparent); opacity: .55; }
.model-card .card-img {
  display: flex; align-items: flex-end; justify-content: center; height: 360px; padding: 2rem 2rem 0;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--mc) 14%, transparent), transparent 70%);
}
.model-card .card-img img { max-height: 330px; width: auto; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); transition: transform .25s; }
@media (min-width: 1024px) {
  .model-card .card-img { height: 420px; }
  .model-card .card-img img { max-height: 390px; }
}
.model-card:hover .card-img img { transform: translateY(-4px) scale(1.02); }
.model-card .card-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.5rem; }
.model-tag {
  width: fit-content; border-radius: 9999px; padding: .16rem .7rem; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--mc); background: color-mix(in srgb, var(--mc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--mc) 35%, transparent);
}
.model-card h3 { margin-top: .8rem; font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.model-card .tagline { margin-top: .4rem; font-size: .875rem; color: var(--muted); flex: 1; }
.model-card .card-specs { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.spec-pill { border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 9999px; padding: .15rem .6rem; font-size: .72rem; color: var(--muted); }
.model-card .card-link { margin-top: 1.2rem; display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 500; color: var(--mc); }
.model-card .card-link svg { transition: transform .18s; }
.model-card:hover .card-link svg { transform: translate(2px,-2px); }

/* ---------------- Feature blocks (landing "why G1") ---------------- */
.feature-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.feature {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
.feature .f-icon {
  display: flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 11px; background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem;
}
.feature h3 { font-size: 1.05rem; font-weight: 600; }
.feature p { margin-top: .5rem; font-size: .875rem; color: var(--muted); }

/* ---------------- Spec sheet (model pages) ---------------- */
.spec-sheet { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-row { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid rgba(38,38,46,.6); }
.spec-row:last-child { border-bottom: none; }
.spec-row:nth-child(even) { background: rgba(255,255,255,.02); }
.spec-row dt { padding: .8rem 1.25rem .1rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.spec-row dd { padding: 0 1.25rem .8rem; font-size: .95rem; }
@media (min-width: 640px) {
  .spec-row { grid-template-columns: 260px 1fr; }
  .spec-row dt { padding: .85rem 1.25rem; }
  .spec-row dd { padding: .85rem 1.25rem; }
}

/* ---------------- Highlights ---------------- */
.highlight-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .highlight-grid { grid-template-columns: repeat(2, 1fr); } }
.highlight {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 1.3rem 1.4rem; background: rgba(255,255,255,.02);
}
.highlight h3 { font-size: 1rem; font-weight: 600; }
.highlight p { margin-top: .45rem; font-size: .875rem; color: var(--muted); }

/* ---------------- Use cases ---------------- */
.usecase-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.usecase {
  border: 1px solid var(--line); border-radius: 9999px; padding: .5rem 1.1rem;
  font-size: .85rem; color: #d3d3db; background: rgba(255,255,255,.03); transition: border-color .15s;
}
.usecase:hover { border-color: var(--accent); }

/* ---------------- Configurations filter ---------------- */
.config-filters { display: flex; flex-wrap: wrap; gap: 1.4rem 2.4rem; margin-bottom: 1.8rem; }
.config-filter-group { display: flex; flex-direction: column; gap: .55rem; }
.config-filter-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.config-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1px solid var(--line); border-radius: 9999px; padding: .42rem 1rem;
  background: rgba(255,255,255,.03); color: var(--muted); font: inherit; font-size: .85rem;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); color: var(--fg); }
.chip.active {
  border-color: var(--accent); color: var(--fg);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.config-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .config-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .config-grid { grid-template-columns: repeat(3, 1fr); } }
.config-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,.02); transition: border-color .15s;
}
.config-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.config-img { background: #fff; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.config-img img { max-width: 78%; max-height: 88%; object-fit: contain; }
.config-body { padding: 1.1rem 1.25rem 1.25rem; }
.config-body h3 { font-size: .98rem; font-weight: 600; }
.config-body p { margin-top: .35rem; font-size: .85rem; color: var(--muted); }
.config-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.config-empty { grid-column: 1 / -1; padding: 2.2rem; text-align: center; font-size: .9rem; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------------- Comparison tool ---------------- */
.compare-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.compare-bar label { font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.compare-select {
  appearance: none; -webkit-appearance: none;
  background: #15151b url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239d9da8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 1rem center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--fg);
  padding: .6rem 2.4rem .6rem 1rem; font-size: .9rem; min-width: 220px;
}
.compare-select:focus { outline: none; border-color: var(--accent); }

.compare-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare-scroll { overflow-x: auto; }
table.compare-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .875rem; }
.compare-table th, .compare-table td { padding: .75rem 1.1rem; text-align: left; border-bottom: 1px solid rgba(38,38,46,.6); }
.compare-table thead th { background: rgba(255,255,255,.04); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 500; }
.compare-table thead th.model-a { color: var(--accent); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody th { font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); width: 240px; }
.compare-table td { color: #d6d6de; }
.compare-table tr.diff { background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.compare-table tr.diff td { color: var(--fg); }
.compare-note { margin-top: .8rem; font-size: .75rem; color: var(--muted); }
.compare-note .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 30%, transparent); box-shadow: inset 2px 0 0 var(--accent); vertical-align: -1px; margin-right: .35rem; }

/* ---------------- CTA + footer ---------------- */
.cta-band { border-top: 1px solid rgba(38,38,46,.6); background: rgba(255,255,255,.02); }
.cta-inner { display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; justify-content: space-between; padding: 4rem 0; }
.cta-inner h3 { font-size: 1.7rem; font-weight: 600; letter-spacing: -.01em; }
.cta-inner p { margin-top: .5rem; max-width: 36rem; font-size: .9rem; color: var(--muted); }
@media (min-width: 768px) { .cta-inner { flex-direction: row; align-items: center; } }

.site-footer { border-top: 1px solid rgba(38,38,46,.6); padding: 2.2rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a:hover { color: var(--fg); }
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }

/* ---------------- Reveal on scroll (subtle) ---------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
