:root {
  --bg: #070605;
  --ink: #f6efe4;
  --mute: #9a9082;
  --red: #ff2d1a;
  --ember: #ff6a2a;
  --line: rgba(246, 239, 228, 0.12);
  --font-display: "Syne", "Noto Sans SC", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans SC", "Noto Sans TC", "Syne", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(255, 45, 26, 0.22), transparent 55%),
    radial-gradient(900px 500px at 10% 110%, rgba(255, 106, 42, 0.12), transparent 50%),
    linear-gradient(160deg, #120a08 0%, var(--bg) 45%, #0c0b09 100%);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.glyph {
  position: fixed;
  inset: auto -6vw -18vh auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(12rem, 42vw, 34rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 45, 26, 0.28);
  pointer-events: none;
  user-select: none;
  transform: rotate(-8deg);
  animation: drift 14s ease-in-out infinite alternate;
  z-index: 0;
}

.scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  opacity: 0.35;
  z-index: 1;
}

main,
.foot {
  position: relative;
  z-index: 2;
}

.top {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.top-end {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.top-link {
  color: var(--mute);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.top-link:hover {
  color: var(--ink);
  border-color: var(--red);
}

.lang-switch {
  position: relative;
}

.lang-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: rgba(255, 106, 42, 0.55);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 10.5rem;
  max-height: min(60vh, 22rem);
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #140e0c;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.lang-menu[hidden] {
  display: none !important;
}

html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

.lang-option {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  cursor: pointer;
}

.lang-option:hover {
  background: rgba(255, 45, 26, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: calc(100vh - 4.5rem);
  padding: 1.5rem clamp(1.25rem, 5vw, 4.5rem) 3.5rem;
}

.hero-copy {
  max-width: 34rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--ember);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.line {
  display: block;
}

.line.en {
  font-size: clamp(2rem, 5.5vw, 4.4rem);
}

.line.zh {
  margin-top: 0.08em;
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  color: var(--red);
  text-shadow: 0 0 40px rgba(255, 45, 26, 0.35);
}

.lead {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  color: var(--mute);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.tweet-shot {
  margin: 0;
}

.tweet-shot a {
  display: block;
  text-decoration: none;
}

.tweet-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 45, 26, 0.08);
  background: #fff;
}

.tweet-shot figcaption {
  margin-top: 0.7rem;
  color: var(--mute);
  font-size: 0.88rem;
}

@media (prefers-reduced-motion: no-preference) {
  .eyebrow,
  .line,
  .lead,
  .actions,
  .tweet-shot {
    animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .eyebrow { animation-delay: 0.08s; }
  .line.en { animation-delay: 0.18s; }
  .line.zh {
    animation-name: slam;
    animation-delay: 0.3s;
  }
  .lead { animation-delay: 0.45s; }
  .actions { animation-delay: 0.58s; }
  .tweet-shot { animation-delay: 0.28s; }
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--red);
  color: #fff8f2;
  font-weight: 700;
}

.btn.primary:hover {
  background: #ff4735;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover,
.btn.ghost.copied {
  border-color: var(--ember);
  color: #fff;
}

.pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 1.6rem 1rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--mute);
  font-size: 0.9rem;
}

.meaning {
  padding: 4.5rem clamp(1.25rem, 5vw, 4.5rem);
  max-width: 760px;
}

.meaning h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.meaning p {
  margin: 0;
  color: var(--mute);
  font-size: 1.1rem;
  line-height: 1.8;
}

.foot {
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  color: var(--mute);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

@keyframes rise {
  from {
    transform: translateY(18px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slam {
  0% {
    transform: translateY(28px) scale(0.97);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  from {
    transform: rotate(-8deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-5deg) translate3d(-2vw, -3vh, 0);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1rem;
  }

  .tweet-shot {
    order: -1;
  }
}

@media (max-width: 720px) {
  .pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-link {
    display: none;
  }
}
