:root {
  --ink: #111111;
  --ink-soft: #191919;
  --paper: #f4f5f6;
  --card: #ffffff;
  --muted: #696b70;
  --line: rgba(17, 17, 17, 0.14);
  --orange: #ff8a00;
  --gold: #ffbd55;
  --cream: #ffe9c2;
  --focus: #4fa3ff;
  --content: 1180px;
  --header-height: 78px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  color: #111;
  background: #fff;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(24px, calc((100vw - var(--content)) / 2));
  color: #fff;
  background: rgba(13, 13, 13, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 174, 61, 0.26);
  border-radius: 50%;
  background: #050505;
}

.brand-logo { width: 54px; height: 54px; object-fit: contain; }

.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 0.95rem; letter-spacing: 0.04em; }
.brand-copy small { margin-top: 6px; color: #aaa; font-size: 0.62rem; letter-spacing: 0.17em; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: #d9d9d9;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 999px;
  transition: color 160ms ease, background 160ms ease;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.menu-button span:not(.sr-only) { display: block; width: 20px; height: 1px; margin: 6px auto; background: currentColor; transition: transform 180ms ease; }
.menu-button[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.5px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.5px) rotate(-45deg); }

.hero {
  min-height: 100svh;
  padding: calc(var(--header-height) + 54px) max(24px, calc((100vw - var(--content)) / 2)) 72px;
  display: grid;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 72% 42%, rgba(255, 138, 0, 0.18), transparent 34%),
    linear-gradient(135deg, #101010, #171717 58%, #0d0d0d);
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr); gap: clamp(40px, 7vw, 94px); align-items: center; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: #b9b9b9;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.eyebrow span { width: 24px; height: 2px; background: var(--orange); }
.eyebrow.dark { color: #6a6c70; }

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(4rem, 8.8vw, 8.6rem);
  font-weight: 780;
  letter-spacing: -0.07em;
  line-height: 0.85;
}
.hero h1 em { color: var(--cream); font-family: Georgia, "Noto Serif TC", serif; font-weight: 400; }

.hero-intro { max-width: 620px; margin: 34px 0 0; color: #c9c9c9; font-size: clamp(1rem, 1.3vw, 1.18rem); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #111; background: linear-gradient(135deg, var(--cream), var(--orange)); }
.button-quiet { color: #fff; border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.04); }
.button-quiet:hover { background: rgba(255, 255, 255, 0.1); }
.version-note { margin: 28px 0 0; color: #737373; font-size: 0.78rem; letter-spacing: 0.08em; }

.hero-stage {
  position: relative;
  margin: 0;
  min-height: min(560px, 60vw);
  display: grid;
  place-items: center;
  isolation: isolate;
}
.stage-grid {
  position: absolute;
  inset: 5%;
  z-index: -3;
  opacity: 0.17;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle, black, transparent 74%);
}
.orbit { position: absolute; border: 1px solid rgba(255, 184, 74, 0.22); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 80%; aspect-ratio: 1; transform: rotate(-20deg) scaleY(.62); }
.orbit-two { width: 56%; aspect-ratio: 1; border-color: rgba(255,255,255,.13); transform: rotate(48deg) scaleY(.76); }
.world-core {
  position: relative;
  width: clamp(230px, 29vw, 380px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  border: 1px solid rgba(255, 167, 44, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(255, 188, 83, 0.16), rgba(0,0,0,.7) 65%);
  box-shadow: 0 0 90px rgba(255, 127, 0, 0.08);
  cursor: pointer;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1), box-shadow 500ms ease;
}
.world-core { will-change: transform; }
.hero-stage.awake .world-core { transform: rotate(3deg) scale(1.045); box-shadow: 0 0 130px rgba(255, 127, 0, 0.3); }
@media (hover: hover) {
  .world-core:hover { transform: scale(1.025); box-shadow: 0 0 110px rgba(255, 127, 0, 0.18); }
}
.hero-logo { width: 82%; aspect-ratio: 1; object-fit: contain; }
.core-ring { position: absolute; inset: -13px; border: 1px dashed rgba(255,255,255,.22); border-radius: inherit; animation: spin 30s linear infinite; }
.world-hint { position: absolute; bottom: 5%; max-width: 280px; margin: 0; color: #929292; font-size: 0.82rem; text-align: center; }
.stage-label { position: absolute; color: #7e7e7e; font-size: 0.66rem; letter-spacing: .14em; }
.stage-label-a { top: 12%; left: 4%; }
.stage-label-b { right: 7%; bottom: 18%; }

@keyframes spin { to { transform: rotate(360deg); } }

.section { padding: clamp(84px, 10vw, 140px) max(24px, calc((100vw - var(--content)) / 2)); }
.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: end; margin-bottom: 48px; }
.section-heading h2, .about h2, .connect h2 { margin: 0; font-size: clamp(2.35rem, 5vw, 5rem); letter-spacing: -0.055em; line-height: .98; }
.section-heading > p { max-width: 460px; margin: 0; color: var(--muted); font-size: 1rem; }

.products { background: var(--paper); }
.product-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.product-card {
  --accent: var(--orange);
  position: relative;
  grid-column: span 6;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.2vw, 42px);
  overflow: hidden;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.product-card:nth-child(1), .product-card:nth-child(4) { grid-column: span 7; }
.product-card:nth-child(2), .product-card:nth-child(3) { grid-column: span 5; }
.product-card.dark { color: #fff; background: #151515; border-color: rgba(255,255,255,.1); }
.product-card::before { content: ""; position: absolute; width: 250px; height: 250px; right: -120px; top: -120px; border-radius: 50%; background: var(--accent); opacity: .12; filter: blur(12px); }
.product-top { position: relative; display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.product-id { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .12em; }
.dark .product-id { color: #929292; }
.product-status { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 2px 10px; color: #676767; background: rgba(17,17,17,.05); border-radius: 999px; font-size: .72rem; }
.dark .product-status { color: #c7c7c7; background: rgba(255,255,255,.08); }
.product-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8d8d8d; }
.product-status.is-live::before { background: #ff9a20; box-shadow: 0 0 0 4px rgba(255,154,32,.12); }
.product-visual { height: 118px; display: flex; align-items: center; margin: 34px 0 24px; }
.product-visual img { max-width: min(260px, 90%); max-height: 105px; object-fit: contain; object-position: left center; }
.product-glyph { font-size: clamp(3.5rem, 7vw, 5.8rem); font-weight: 800; letter-spacing: -.07em; line-height: 1; color: var(--accent); }
.product-glyph sup { font-size: .24em; letter-spacing: 0; vertical-align: top; }
.product-card h3 { margin: 0; font-size: clamp(1.55rem, 2.5vw, 2.4rem); line-height: 1.05; }
.product-card p { max-width: 540px; margin: 14px 0 30px; color: var(--muted); }
.dark.product-card p { color: #aaa; }
.product-action {
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  border: 0;
  border-top: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
}
.product-action span:last-child { color: var(--accent); font-size: 1.25rem; transition: transform 180ms ease; }
.product-action:hover span:last-child { transform: translate(3px, -3px); }

.about { display: grid; grid-template-columns: .48fr 1.2fr .55fr; gap: clamp(30px, 6vw, 80px); align-items: start; background: #fff; }
.about-index { color: #e8e8e8; font-size: clamp(4.8rem, 10vw, 9rem); font-weight: 850; line-height: .72; letter-spacing: -.09em; }
.about-index span { color: #b9b9b9; font-size: .17em; letter-spacing: .12em; }
.about-copy p { max-width: 700px; color: var(--muted); font-size: 1.03rem; }
.about-copy p:first-of-type { margin-top: 30px; }
.text-link { display: inline-flex; gap: 12px; align-items: center; min-height: 46px; margin-top: 10px; font-weight: 750; text-underline-offset: 6px; }
.about-note { padding: 20px 0; border-top: 2px solid var(--orange); border-bottom: 1px solid var(--line); }
.note-number { color: #8c8c8c; font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.about-note p { margin: 18px 0 4px; font-family: Georgia, "Noto Serif TC", serif; font-size: 1.06rem; }

.lab { color: #fff; background: #111; }
.lab .section-heading > p { color: #a7a7a7; }
.lab-shelf { display: grid; grid-template-columns: 1.5fr .5fr; gap: 18px; }
.lab-card { min-height: 260px; padding: clamp(26px, 4vw, 48px); border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); }
.lab-id { color: #8b8b8b; font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.lab-card h3 { max-width: 650px; margin: 64px 0 12px; font-size: clamp(1.8rem, 3.5vw, 3.4rem); letter-spacing: -.045em; line-height: 1; }
.lab-card p { max-width: 600px; margin: 0; color: #a6a6a6; }
.lab-card-small { display: grid; align-content: center; justify-items: center; text-align: center; background: radial-gradient(circle, rgba(255,138,0,.13), transparent 64%); }
.lab-card-small span { color: var(--gold); font-size: 4rem; font-weight: 200; }
.lab-card-small p { font-size: .74rem; letter-spacing: .13em; }

.connect { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(50px, 8vw, 110px); background: var(--paper); }
.social-list { border-top: 1px solid var(--line); }
.social-item {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.social-item strong { font-size: 1.06rem; }
.social-item small { display: block; color: var(--muted); }
.social-item > span:last-child { color: var(--orange); font-size: 1.4rem; }
.social-item.is-pending { cursor: pointer; border-inline: 0; border-top: 0; background: transparent; text-align: left; width: 100%; }

.site-footer {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 38px max(24px, calc((100vw - var(--content)) / 2));
  color: #a2a2a2;
  background: #0e0e0e;
  font-size: .86rem;
}
.footer-brand { display: flex; align-items: center; gap: 14px; color: #dedede; }
.footer-brand img { width: 58px; height: 58px; object-fit: contain; }
.footer-brand p { margin: 0; line-height: 1.35; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; color: #fff; text-underline-offset: 5px; }

.toast {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 14px 18px;
  color: #fff;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,.14);
  border-left: 3px solid var(--orange);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.noscript { margin: 0; padding: 14px 20px; color: #fff; background: #7c2f00; text-align: center; }

.reveal { opacity: 1; transform: none; }
/* Progressive enhancement: animate only after JavaScript has announced itself.
   This keeps Drive/static previews readable instead of leaving the page blank. */
.js-enabled .reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms ease, transform 650ms ease; }
.js-enabled .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --header-height: 70px; }
  .site-header { padding-inline: 18px; }
  .menu-button { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    padding: 16px 18px 24px;
    background: rgba(13,13,13,.98);
    border-bottom: 1px solid rgba(255,255,255,.1);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 180ms ease;
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { justify-content: space-between; min-height: 50px; border-radius: 8px; }
  .hero { min-height: auto; padding-top: calc(var(--header-height) + 54px); }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { order: 1; }
  .hero-stage { order: 2; min-height: 430px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .product-card, .product-card:nth-child(n) { grid-column: span 6; min-height: 360px; }
  .about { grid-template-columns: 1fr; }
  .about-index { font-size: 5rem; }
  .about-note { max-width: 580px; }
  .connect { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand-copy small { display: none; }
  .hero { padding-inline: 18px; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(3.6rem, 18vw, 5.2rem); }
  .hero-intro { margin-top: 26px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .hero-stage { min-height: 360px; }
  .world-core { width: min(74vw, 300px); }
  /* Mobile: keep the "awake" reaction, without the rotation that can look like a page jump. */
  .hero-stage.awake .world-core { transform: scale(1.02); box-shadow: 0 0 100px rgba(255, 127, 0, 0.24); }
  .world-hint { bottom: 0; }
  .section { padding: 78px 18px; }
  .section-heading h2, .about h2, .connect h2 { font-size: clamp(2.45rem, 12vw, 3.4rem); }
  .product-grid { grid-template-columns: 1fr; }
  .product-card, .product-card:nth-child(n) { grid-column: auto; min-height: 350px; border-radius: 18px; }
  .product-visual { height: 92px; margin-block: 26px 20px; }
  .product-visual img { max-height: 84px; }
  .about-index { font-size: 4.3rem; }
  .lab-shelf { grid-template-columns: 1fr; }
  .lab-card { min-height: 240px; }
  .lab-card-small { min-height: 180px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
