/* AVANTIX — one stylesheet, no external requests.
   Everything is centred: the page, every section, every card, every figure.
   Written mobile-first; the only breakpoints widen the grids. */

:root {
  /* The palette is the logo's: white mark on near-black, one orange accent. */
  --paper: #0d0d0f;
  --paper-raised: #17171a;
  --ink: #f3f2f0;
  --ink-soft: #b4b3af;
  --ink-muted: #86868b;
  --line: #24242a;
  --line-strong: #3a3a41;
  --accent: #e07a2f;
  --accent-ink: #0d0d0f;
  --dark: #050506;
  --dark-soft: #141417;
  --on-dark: #f3f2f0;
  --on-dark-muted: #9b9a97;

  --measure: 62ch;
  --shell: 1140px;
  --shell-narrow: 820px;

  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.15rem + 0.9vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.35rem + 2.1vw, 3.1rem);
  --step-4: clamp(2.2rem, 1.5rem + 3.4vw, 4.2rem);

  --gap: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
  --section: clamp(3.75rem, 2.5rem + 5.5vw, 7.5rem);
  --radius: 2px;

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto,
    -apple-system, BlinkMacSystemFont, sans-serif;
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Source Han Sans SC", "Heiti SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  letter-spacing: 0.005em;
  text-align: center;              /* the whole site is centred */
  -webkit-font-smoothing: antialiased;
}

:lang(zh) body, body:lang(zh) { font-family: var(--font-cjk); line-height: 1.85; }
html[lang^="zh"] body { font-family: var(--font-cjk); line-height: 1.85; letter-spacing: 0.02em; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
html[lang^="zh"] h1, html[lang^="zh"] h2, html[lang^="zh"] h3 { letter-spacing: 0.01em; line-height: 1.35; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ---------------------------------------------------------------- structure */

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}
.shell--narrow { width: min(100% - 2.5rem, var(--shell-narrow)); }

.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.section--dark { background: var(--dark); color: var(--on-dark); border-top: 1px solid var(--line); }
.section--tint { background: var(--dark-soft); }

.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
}
.stack--tight { gap: 0.75rem; }

.measure { max-width: var(--measure); margin-inline: auto; }

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  translate: -50% -150%;
  z-index: 20;
  padding: 0.65rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
}
.skip-link:focus { translate: -50% 0.75rem; }

/* -------------------------------------------------------------------- type */

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section--dark .eyebrow { color: var(--on-dark-muted); }
html[lang^="zh"] .eyebrow { letter-spacing: 0.14em; }

.display { font-size: var(--step-4); }
.h1 { font-size: var(--step-3); }
.h2 { font-size: var(--step-2); }
.h3 { font-size: var(--step-1); }

.lede { font-size: var(--step-1); color: var(--ink-soft); }
.section--dark .lede { color: var(--on-dark-muted); }
.note { font-size: 0.78rem; color: var(--ink-muted); }
.section--dark .note { color: var(--on-dark-muted); }

.rule {
  width: 2.5rem;
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line-strong);
}
.section--dark .rule { background: var(--line-strong); }

/* ------------------------------------------------------------------ header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding-block: 1rem;
}
.masthead .langswitch { margin: 0; }
.masthead__logo img { height: 26px; width: auto; margin-inline: auto; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.35rem;
}
.nav a {
  display: inline-block;
  padding: 0.2rem 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
html[lang^="zh"] .nav a { text-transform: none; letter-spacing: 0.05em; font-size: 0.88rem; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.langswitch {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.langswitch a { border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.langswitch a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------ button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);   /* light pill on the near-black page */
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
html[lang^="zh"] .btn { text-transform: none; letter-spacing: 0.05em; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.btn--ghost { background: transparent; color: var(--ink); border-color: #6a6a72; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.section--dark .btn, .hero .btn {
  background: var(--on-dark); border-color: var(--on-dark); color: var(--dark);
}
.section--dark .btn:hover, .hero .btn:hover {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.section--dark .btn--ghost, .hero .btn--ghost {
  background: transparent; color: var(--on-dark); border-color: #6a6a72;  /* 3:1 non-text contrast */
}
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover {
  background: var(--on-dark); color: var(--dark); border-color: var(--on-dark);
}

.btnrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* -------------------------------------------------------------------- hero */

.hero {
  background: var(--dark);
  color: var(--on-dark);
  padding-block: clamp(4.5rem, 3rem + 8vw, 9rem);
}
.hero__mark { height: 46px; width: auto; margin-inline: auto; opacity: 0.95; }
.hero .lede { color: var(--on-dark-muted); }
.hero .eyebrow { color: var(--on-dark-muted); }

/* ------------------------------------------------------------------- grids */

.grid {
  display: grid;
  gap: var(--gap);
  justify-items: center;
  align-items: start;
  grid-template-columns: 1fr;
  width: 100%;
}
@media (min-width: 40rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 40rem) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 30rem) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ------------------------------------------------------------------- cards */

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  width: 100%;
  height: 100%;
  padding: clamp(1.35rem, 1rem + 1.2vw, 2rem);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card--flush { padding: 0; overflow: hidden; }
.card--flush .card__body { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.card--link { transition: border-color 0.18s ease, transform 0.18s ease; }
.card--link:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.card__media {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--dark-soft);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

.card__meta {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
html[lang^="zh"] .card__meta { text-transform: none; letter-spacing: 0.08em; }

.card__ref {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  word-break: break-all;
}

.figure-tile { gap: 0.35rem; }
.figure-tile__value { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; }
.figure-tile__label { font-size: 0.8rem; color: var(--ink-muted); }
.section--dark .figure-tile__label { color: var(--on-dark-muted); }
.section--dark .card { background: var(--paper-raised); border-color: var(--line); }

.scene {
  width: 100%;
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--dark-soft);
}
.scene img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ product page */

.product-hero__media {
  width: min(100%, 760px);
  margin-inline: auto;
  aspect-ratio: 3 / 2;
  background: var(--dark-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.spec-table { width: 100%; overflow-x: auto; }
.spec-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 0.88rem;
}
.spec-table caption {
  caption-side: top;
  padding-bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
html[lang^="zh"] .spec-table caption { text-transform: none; letter-spacing: 0.08em; }
.spec-table th, .spec-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.spec-table th { font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.spec-table td { color: var(--ink); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.chiprow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.chip {
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------- form */

.form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(100%, 34rem);
  margin-inline: auto;
}
.field { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; width: 100%; }
.field label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
html[lang^="zh"] .field label { text-transform: none; letter-spacing: 0.06em; font-size: 0.82rem; }
.field input, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  text-align: center;
}
.field textarea { min-height: 8rem; text-align: start; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }

/* ------------------------------------------------------------------ footer */

.footer {
  background: var(--dark);
  color: var(--on-dark-muted);
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem);
  font-size: 0.85rem;
}
.footer__mark { height: 22px; width: auto; margin-inline: auto; opacity: 0.9; }
.footer a { color: var(--on-dark); border-bottom: 1px solid var(--line-strong); }
.footer a:hover { border-bottom-color: var(--accent); }
.footer .nav a { color: var(--on-dark-muted); }
.footer .nav a:hover { color: var(--on-dark); }
.footer__legal { font-size: 0.75rem; color: #8d8c89; }  /* 4.5:1 on the footer ground */
