/* ============================================================================
 * v2 — Traditional Chinese, the beta dialog, and the depth pass.
 *
 * The page is still one accent colour on near-black, but flat black read as a template: the
 * background is now three stacked gradients plus a faint grid, cards lift on hover, and sections
 * arrive as they scroll in. Everything animated is behind a reduced-motion check, and nothing
 * moves that carries information.
 * ========================================================================== */

/* ---------- CJK type ----------
 * Barlow Condensed and Figtree carry no Chinese glyphs, so a Chinese page falls back to whatever
 * the OS picks - usually a serif on Windows, which looks nothing like the English page. These
 * two rules give Chinese pages a sans stack that matches Figtree's weight, and stop the tight
 * Latin letter-spacing from squeezing Chinese characters together.
 */
.lang-cjk {
  font-family: Figtree, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC",
    system-ui, sans-serif;
}
.lang-cjk h1,
.lang-cjk h2,
.lang-cjk .section-head h2,
.lang-cjk .modal__title {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", Figtree,
    system-ui, sans-serif;
  letter-spacing: 0;
  font-weight: 800;
  line-height: 1.12;
}
.lang-cjk h1 { font-size: clamp(40px, 6.4vw, 72px); }
.lang-cjk .eyebrow { letter-spacing: 0.08em; }
.lang-cjk .lede { line-height: 1.85; }
.lang-cjk .feature p,
.lang-cjk .prose p,
.lang-cjk .prose li { line-height: 1.85; }

/* ---------- background ---------- */

body {
  background:
    radial-gradient(120% 80% at 50% -10%, #17120F 0%, rgba(11, 12, 14, 0) 60%),
    linear-gradient(180deg, #0C0D10 0%, #0A0B0D 55%, #0C0B0A 100%);
  background-attachment: fixed;
}

/* A faint grid, faded out at the edges. Sits behind everything (z-index 0) and never takes a
   pointer event, so it costs one paint and cannot break a click. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 75%);
}

/* ---------- the gutter the body sections lost ----------
 * .hero and .section set their padding with a shorthand whose horizontal part is 0, which wipes
 * the inline padding .container had just given them. The visible result: the header logo sat 64px
 * inside the left edge of every paragraph below it, and on a phone the text and cards ran flush to
 * the screen with no margin at all. Restating the vertical padding with padding-block leaves the
 * container's horizontal gutter intact, so header and body line up by construction.
 */
/* The measure grows by the gutter it now respects, so the text column keeps the width it had
   before (1024px at 1440) instead of shrinking by 128px. */
:root { --measure: 72rem; }

.hero {
  padding-block: clamp(56px, 9vw, 108px) clamp(48px, 7vw, 84px);
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(56px, 8vw, 96px);
  padding-inline: var(--gutter);
}
.section--tight {
  padding-block-start: 0;
}

/* ---------- language menu ----------
 * The two pill buttons that lived here became a five-language menu; its styles are in
 * ride-lang.css, kept separate because it is chrome rather than the page's visual language.
 */

.nav { margin-left: auto; }
@media (max-width: 620px) {
  .header-inner { gap: 10px; flex-wrap: wrap; padding-block: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; }
}

/* ---------- hero depth ---------- */

.hero__art { isolation: isolate; }
.hero__glow {
  position: absolute;
  width: min(78%, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 75, 31, 0.5), rgba(255, 75, 31, 0) 62%);
  filter: blur(18px);
  z-index: -1;
  animation: heroGlow 7s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}
.hero__icon { animation: float 9s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* The headline is a sentence now, not two short chunks, and at the old 82px it broke into four
   lines and pushed the phone down half a screen. A little smaller and tighter keeps it at three
   and still reads as the loudest thing on the page. */
h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.02;
}
.lang-cjk h1 { font-size: clamp(34px, 5vw, 58px); }

/* The gradient sweep across the emphasised half of the headline. */
h1 em {
  background: linear-gradient(100deg, #FFD9C7 0%, #FF7A3D 45%, #FF4B1F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lang-cjk h1 em { background-image: linear-gradient(100deg, #FFCDB5 0%, #FF6B33 100%); }

.btn__arrow { transition: transform 0.18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* A sheen that crosses the primary button once, on hover. */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s ease;
}
.btn--primary:hover::after { left: 120%; }

/* ---------- reveal on scroll ---------- */

/* Scoped to .js: without scripting the elements stay visible, which is what the comment in the
   base template promises. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- features: lift + warm edge ---------- */

.feature {
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.25s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 61, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 75, 31, 0.08) inset;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 122, 61, 0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.feature:hover::before { opacity: 1; }

/* ---------- the beta band ---------- */

.beta-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(255, 122, 61, 0.28);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 75, 31, 0.16), transparent 55%),
    linear-gradient(180deg, #191412, #121316);
  overflow: hidden;
}
.beta-band::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -40%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 75, 31, 0.22), transparent 65%);
  filter: blur(12px);
  pointer-events: none;
}
.beta-band h2 {
  font-family: "Barlow Condensed", Figtree, sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.lang-cjk .beta-band h2 { font-family: inherit; letter-spacing: 0; }
.beta-band .lede { margin: 0 0 22px; }
.beta-band__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.beta-band__points li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
.beta-band__num {
  font-family: "Barlow Condensed", Figtree, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-2);
  opacity: 0.9;
}
.beta-band__points b { display: block; font-size: 15px; letter-spacing: 0.01em; }
.beta-band__points p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .beta-band { grid-template-columns: 1fr; }
}

/* The brand-name disclaimer is a sentence, not a badge: it starts on its own line at the left
   edge of the footer instead of floating in the middle of it. */
.footer-fineprint {
  flex-basis: 100%;
  margin: 0;
  text-align: left;
  max-width: 72ch;
}

/* ---------- dialog ---------- */

html.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}
.modal[hidden] { display: none; }
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 9, 0.72);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease both;
}
.modal__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(22px, 3.4vw, 34px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 75, 31, 0.13), transparent 55%),
    linear-gradient(180deg, #16181D, #0F1114);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: panelIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.modal__x {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.modal__x:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pill--warn {
  color: #FFC9B8;
  background: rgba(255, 75, 31, 0.12);
  border: 1px solid rgba(255, 75, 31, 0.3);
}

.modal__title {
  font-family: "Barlow Condensed", Figtree, sans-serif;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.modal__intro { margin: 0 0 22px; color: var(--muted); font-size: 15.5px; }
.lang-cjk .modal__intro { line-height: 1.8; }

/* ---------- fields ---------- */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #D7DBE0;
  margin-bottom: 7px;
}
.field__opt { color: var(--muted); font-weight: 500; font-size: 12px; }
.field input,
.select__btn {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder { color: #6C737C; }
.field input:hover,
.select__btn:hover { border-color: #333941; }
.field input:focus,
.select__btn:focus-visible,
.select__btn[aria-expanded="true"] {
  outline: none;
  border-color: rgba(255, 122, 61, 0.75);
  background: rgba(255, 122, 61, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 75, 31, 0.14);
}
.field--err input,
.field--err .select__btn {
  border-color: #E0483F;
  background: rgba(224, 72, 63, 0.08);
}
.field__hint { margin: 7px 0 0; font-size: 12.5px; color: var(--muted); }

/* Custom listbox — a native select cannot be styled to match the page. */
.select { position: relative; }
.select__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.select__value[data-empty] { color: #6C737C; }
.select__caret { color: var(--muted); transition: transform 0.18s ease; flex: none; }
.select__btn[aria-expanded="true"] .select__caret { transform: rotate(180deg); }
.select__menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0; right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid #2B3037;
  background: #15171B;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  max-height: 260px;
  overflow: auto;
}
.select__menu[hidden] { display: none; }
.select__menu li {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  cursor: pointer;
}
.select__menu li:hover,
.select__menu li[aria-selected="true"] {
  background: rgba(255, 122, 61, 0.14);
  color: #FFD9C7;
}
.select__other { margin-top: 8px; }
.select__other[hidden] { display: none; }

/* ---------- the ask, the offer, the small print ---------- */

.modal__focus {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
}
.modal__focus-title {
  margin: 0 0 8px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.lang-cjk .modal__focus-title { letter-spacing: 0.06em; }
.modal__focus ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.modal__focus li { margin: 4px 0; }

.modal__founding {
  margin: 16px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: #FFD9C7;
  background: linear-gradient(100deg, rgba(255, 75, 31, 0.16), rgba(255, 75, 31, 0.04));
  border: 1px solid rgba(255, 122, 61, 0.25);
}

.modal__err {
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 14px;
  color: #FFC9C4;
  background: rgba(224, 72, 63, 0.14);
  border: 1px solid rgba(224, 72, 63, 0.4);
}
.modal__err[hidden] { display: none; }

.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn__spin {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn__spin[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal__privacy { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- success ---------- */

.modal__done[hidden] { display: none; }
.modal__done { text-align: center; padding: 8px 4px 4px; }
.done__mark {
  width: 54px; height: 54px;
  margin: 4px auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #0B0C0E;
  background: linear-gradient(180deg, #6FE0A1, #34C77B);
  box-shadow: 0 12px 30px rgba(52, 199, 123, 0.35);
}
.modal__done .modal__title { margin-bottom: 10px; }
.modal__done .modal__intro { margin-bottom: 20px; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .reveal { opacity: 1; transform: none; transition: none; }
  .hero__icon, .hero__glow { animation: none; }
  .modal__panel, .modal__scrim { animation: none; }
  .btn--primary::after { display: none; }
  .btn__arrow, .feature { transition: none; }
}
