:root {
  color-scheme: dark;
  --charcoal: #141519;
  --surface: #1c1e23;
  --surface-raised: #24262d;
  --ink: #f6f7f4;
  --muted: #bac0bb;
  --rule: #363941;
  --control-border: #707870;
  --accent: #d2f276;
  --accent-hover: #e1ff96;
  --on-accent: #191d12;
  --selection: #2c3824;
  --selection-border: #d2f27662;
  --button-height: 2.75rem;
  --button-radius: 999px;
  font-family: "Inter", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--charcoal); }
h1, h2, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  transform: translateY(-150%);
  color: var(--on-accent);
  background: var(--accent);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner, .footer-inner, .project-inner {
  width: min(100% - 3.5rem, 76rem);
  margin-inline: auto;
}
.header-inner, .footer-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  white-space: nowrap;
}
.brand-mark {
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
.header-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.9vw, 2.5rem); white-space: nowrap; }
.project-switch { position: relative; z-index: 2; }
.project-switch summary { padding-inline: 0.85rem; list-style: none; }
.project-switch summary::-webkit-details-marker { display: none; }
.project-switch[open] summary { border-color: var(--accent); }
.project-nav { position: absolute; top: calc(100% + 0.45rem); right: 0; min-width: 9rem; display: grid; gap: 0.22rem; padding: 0.35rem; border: 1px solid var(--rule); border-radius: 0.85rem; background: var(--surface); box-shadow: 0 1rem 2rem #0006; }
.project-nav a { display: flex; align-items: center; min-height: var(--button-height); padding-inline: 0.8rem; border: 1px solid transparent; border-radius: var(--button-radius); color: var(--muted); font-size: 0.875rem; font-weight: 650; }
.project-nav a:hover { background: var(--surface-raised); color: var(--ink); }
.project-nav a[aria-current="page"] { border-color: var(--selection-border); background: var(--selection); color: var(--accent); }
.nav-link { color: var(--muted); font-size: 0.9rem; }
.nav-link:hover { color: var(--ink); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 2.25rem;
  text-align: center;
}
.hero-copy { position: relative; z-index: 1; padding-inline: 1rem; }
.eyebrow {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  margin-top: 0.55rem;
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.16;
}
.hero-subtitle {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  letter-spacing: 0.055em;
}
.hero-subtitle span { margin-inline: 0.15rem; }
.hero-figure { width: min(100%, 66rem, max(44rem, calc((100svh - 19rem) * 1.52))); margin: 0.2rem auto 0; }
.hero-image { position: relative; aspect-ratio: 1440 / 945; background: radial-gradient(ellipse at 50% 43%, #24262a, var(--charcoal) 67%); }
.hero-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--charcoal), transparent 16%, transparent 90%, var(--charcoal));
  content: "";
  pointer-events: none;
}
.hero-image img { mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
.hero-image canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.has-viewer .hero-image { cursor: grab; touch-action: none; user-select: none; }
.has-viewer .hero-image.is-dragging { cursor: grabbing; }
.has-viewer .hero-image:focus-visible { outline-color: var(--accent); outline-offset: -4px; }
.hero-caption { color: var(--muted); font-size: 0.875rem; letter-spacing: 0.04em; }
.viewer-bar { position: relative; display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 0.65rem 1rem; padding: 0.3rem 1rem; }
.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-height);
  padding: 0.4rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  color: var(--on-accent);
  background: var(--accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 680;
  letter-spacing: 0.035em;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.view-button:hover, .view-button[aria-expanded="true"] { background: var(--accent-hover); }
.view-button-secondary { border-color: var(--control-border); color: var(--ink); background: var(--surface); }
.view-button-secondary:hover { border-color: var(--muted); background: var(--surface-raised); }

.project {
  padding-block: clamp(3.5rem, 9vw, 7.5rem);
  background: var(--charcoal);
  border-block-start: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}
.project-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.73fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}
.section-label { color: var(--accent); font-size: 0.9rem; font-weight: 650; letter-spacing: 0.1em; }
h2 { margin-top: 0.6rem; font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.18; letter-spacing: -0.055em; }
.project-description { max-width: 32em; margin-top: 1.2rem; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.specs { margin-top: 1.8rem; border-top: 1px solid var(--rule); }
.specs div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 650; text-align: end; }
.specs .pending-spec { color: var(--muted); font-weight: 400; }
.detail-figure video { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 1rem; background: var(--surface); }
.detail-figure figcaption { margin-top: 0.65rem; color: var(--muted); font-size: 0.875rem; }

.site-footer { color: var(--ink); background: var(--charcoal); }
.footer-inner { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }
.footer-inner a:hover { color: var(--ink); text-decoration: underline; }

@view-transition { navigation: auto; }
[data-product="tang-15"] :is(.cabinet-image, #caliper-poster) { view-transition-name: tang-15-object; }
[data-product="tang-11a"] :is(.cabinet-image, #caliper-poster) { view-transition-name: tang-11a-object; }
::view-transition-group(tang-15-object), ::view-transition-group(tang-11a-object) {
  animation-duration: 680ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 46rem) {
  .header-inner, .footer-inner, .project-inner { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 3.75rem; }
  .hero { padding-top: clamp(2.75rem, 11vw, 4rem); }
  .hero-figure { margin-top: 0.7rem; }
  .viewer-bar .hero-caption { order: 1; flex-basis: 100%; }
  .project-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .project-description { margin-top: 0.8rem; }
  .specs { margin-top: 1.3rem; }
}

@media (max-width: 32rem) {
  .header-inner { flex-wrap: wrap; gap: 0.65rem; padding-block: 0.65rem; }
  .header-nav { width: 100%; justify-content: space-between; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .view-button { transition: none; }
  @view-transition { navigation: none; }
  ::view-transition-group(*) { animation-duration: 1ms; }
}

.project-parts { margin-top: 1.2rem; max-width: 41rem; }
.project-parts summary { min-height: 2.75rem; padding-block: .65rem; cursor: pointer; font-size: .95rem; font-weight: 650; }
.project-parts p { margin-top: .3rem; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.project-parts .specs { margin-top: .75rem; }
