/* TRITON Asia — design tokens */
:root {
  --color-bg: #0a0e14;
  --color-bg-elevated: #121820;
  --color-surface: #1a2332;
  --color-text: #f0f4f8;
  --color-text-muted: #94a3b8;
  --color-accent: #3b9eff;
  --color-accent-hover: #5eb0ff;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-success: #34d399;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent-hover);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow {
  max-width: 800px;
}

.center {
  text-align: center;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.section {
  padding: 4rem 0;
}

.prose {
  color: var(--color-text-muted);
}

.prose strong {
  color: var(--color-text);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.2;
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.primary-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.lang-switcher a.is-active {
  color: var(--color-accent);
}

.lang-sep {
  color: var(--color-text-muted);
  margin: 0 0.25rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--color-accent);
  color: #0a0e14;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #0a0e14;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  min-height: min(85vh, 720px);
}

.hero-has-media,
.hero-has-video {
  min-height: min(92vh, 820px);
}

.hero-bg,
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59, 158, 255, 0.15), transparent),
    linear-gradient(180deg, var(--color-bg-elevated) 0%, var(--color-bg) 100%);
}

.hero-media video,
.hero-media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media-image {
  background-size: cover;
  background-position: center;
}

.hero-has-video .hero-inner,
.hero-has-video .hero-bg,
.hero-has-media .hero-inner {
  position: relative;
  z-index: 2;
}

.hero-has-video::after,
.hero-has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.45) 0%, rgba(10, 14, 20, 0.88) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-has-media .hero-media {
  z-index: 0;
}

.section-figure {
  margin: 0;
}

.section-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.section-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.grid-2.img-right {
  direction: ltr;
}

.product-card-img {
  margin: -0.25rem -0.25rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.product-card-body {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.testimonial-photo {
  margin: -0.25rem -0.25rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.testimonial-photo img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.content-block.has-side-image .grid-2 {
  align-items: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-headline {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}

.hero-subhead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.element-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  font-family: ui-monospace, monospace;
}

.hero-badge {
  margin-top: 2rem;
}

/* Stats */
.stats-marquee {
  padding: 2rem 0;
  border-block: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}

.stat-cell {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.stat-sublabel {
  display: block;
  font-size: 0.7rem;
  color: var(--color-accent);
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.cards-grid {
  display: grid;
  gap: 1.5rem;
}

.cards-grid.cols-3,
.cards-grid:not([class*="cols-"]) {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Cards */
.info-card,
.product-card,
.step-card,
.mini-card,
.path-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

.info-card:hover,
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 158, 255, 0.3);
}

.product-card.featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

/* Timeline */
.timeline {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.timeline-item {
  border-left: 2px solid var(--color-accent);
  padding-left: 1.5rem;
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.5;
}

/* Comparison */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

.comparison-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comparison-col li {
  padding: 0.5rem 0;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.comparison-col.highlight {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--color-accent);
}

.comparison-vs {
  align-self: center;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  padding: 1.25rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  color: var(--color-accent);
  font-size: 1.25rem;
}

.faq-question[aria-expanded="true"]::after {
  content: "−";
}

.faq-answer {
  padding-bottom: 1.25rem;
  color: var(--color-text-muted);
}

.faq-answer[hidden] {
  display: none;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, rgba(59, 158, 255, 0.2), rgba(26, 35, 50, 0.9));
  border-block: 1px solid var(--color-border);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0;
  border: 1px solid var(--color-border);
}

.testimonial-card footer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Partners */
.partner-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Asia bar */
.asia-contact-bar {
  padding: 1.25rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.asia-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.asia-bar-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.asia-bar-text span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.asia-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  padding: 3rem 0 1.5rem;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.legal-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-link-btn:hover {
  color: var(--color-accent);
}

body.legal-dialog-open {
  overflow: hidden;
}

.legal-dialog-root[hidden] {
  display: none;
}

.legal-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(85vh, 720px);
  height: auto;
  margin: auto;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.legal-dialog::backdrop {
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(4px);
}

.legal-dialog-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.legal-dialog-header {
  position: relative;
  flex-shrink: 0;
  padding: 1.25rem 3rem 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.legal-dialog-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.legal-dialog-updated {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.legal-dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.legal-dialog-close:hover {
  background: var(--color-accent);
  color: #0a0e14;
}

.legal-dialog-body {
  flex: 1;
  min-height: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.legal-dialog-body::-webkit-scrollbar {
  width: 8px;
}

.legal-dialog-body::-webkit-scrollbar-track {
  background: transparent;
}

.legal-dialog-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
}

.legal-dialog-body::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

.legal-section {
  margin-bottom: 1.25rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--color-accent);
}

.legal-section p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.pull-quote {
  margin: 2rem 0 0;
  padding: 1.5rem;
  border-left: 3px solid var(--color-accent);
  font-style: italic;
  color: var(--color-text-muted);
}

.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.9rem;
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li::before {
  content: "✓ ";
  color: var(--color-success);
}

.param-groups {
  display: grid;
  gap: 1.5rem;
}

.param-group {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.element-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.path-card ol {
  color: var(--color-text-muted);
  padding-left: 1.25rem;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .comparison-vs {
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  .lab-link {
    display: none;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 2.5rem 0;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .header-actions .lang-switcher {
    order: -1;
  }
}
