/* UltraTrain 2.0 website: shared tokens, shell and components. No build step. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/DMSans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/BarlowCondensed-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/BarlowCondensed-800-latin.woff2") format("woff2");
}

:root {
  --bg: #070D1A;
  --surface: #0F1B30;
  --surface-2: #132240;
  --border: #1E2E4A;
  --border-strong: #2A3D60;
  --cyan: #2EC5FF;
  --violet: #7A5CFF;
  --red: #D92B3C;
  --coral: #FF4D5A;
  --muted: #93A3BC;
  --text: #F4F7FB;
  --text-dim: #C6D0DF;
  --neon: linear-gradient(90deg, #2EC5FF 0%, #7A5CFF 50%, #FF4D5A 100%);
  --radius: 20px;
  --radius-lg: 22px;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Barlow Condensed", "Roboto Condensed", system-ui, sans-serif;
  --gutter: 16px;
  --container: 1160px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.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: absolute; left: 16px; top: -60px; z-index: 100; background: var(--surface); border: 1px solid var(--border); padding: 10px 14px; border-radius: 999px; color: var(--text); }
.skip-link:focus { top: 12px; }

/* Type */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: condensed;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 9vw, 4.9rem); }
h2 { font-size: clamp(2.1rem, 6.2vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 3.2vw, 1.7rem); font-weight: 700; line-height: 1.12; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-dim); line-height: 1.55; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-stretch: condensed; font-weight: 700;
  font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
  margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--neon); border-radius: 2px; }
.gradient-text { background: var(--neon); -webkit-background-clip: text; background-clip: text; color: transparent; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 760px) { :root { --gutter: 32px; } }

/* Buttons and chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem; line-height: 1;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px rgba(217, 43, 60, .75), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: #E63A4B; box-shadow: 0 14px 34px -10px rgba(217, 43, 60, .9); }
.btn-ghost { background: rgba(15, 27, 48, .6); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface); }
.btn-sm { padding: 10px 16px; font-size: .9rem; }

.app-store { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .25s var(--ease), filter .25s; }
.app-store img { height: 50px; width: auto; }
.app-store:hover { transform: translateY(-1px); filter: brightness(1.08); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--text-dim);
  background: rgba(15, 27, 48, .7); border: 1px solid var(--border);
}
.chip svg { width: 16px; height: 16px; color: var(--cyan); flex: none; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 24px 60px -40px rgba(0,0,0,.8);
}

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 10px var(--gutter);
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto; max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; gap: 8px; height: var(--nav-h);
  padding: 0 10px 0 14px; border-radius: 999px;
  background: rgba(7, 13, 26, .72); border: 1px solid rgba(30, 46, 74, .9);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 10px 40px -20px rgba(0,0,0,.9);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: none; align-items: center; gap: 4px; margin: 0 8px; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); text-decoration: none; }
.lang { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.lang a, .lang span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; padding: 5px 9px; border-radius: 999px; color: var(--muted); }
.lang [aria-current] { background: var(--surface-2); color: var(--text); }
.lang a:hover { text-decoration: none; color: var(--text); }
.nav-cta { display: none; }
.nav-store-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 999px; background: #fff; color: #000; }
.nav-store-icon svg { width: 18px; height: 18px; }
.nav-toggle { width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.nav-toggle svg { width: 18px; height: 18px; }
.nav-menu {
  pointer-events: auto; max-width: var(--container); margin: 8px auto 0; padding: 8px;
  border-radius: 22px; background: rgba(7, 13, 26, .92); border: 1px solid var(--border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: none; flex-direction: column;
}
.nav-menu[data-open="true"] { display: flex; }
.nav-menu a { padding: 12px 14px; border-radius: 14px; color: var(--text); font-weight: 500; }
.nav-menu a:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.nav-menu .btn { margin: 6px; }
@media (min-width: 900px) {
  .nav-links { display: inline-flex; }
  .nav-cta { display: inline-flex; }
  .nav-store-icon, .nav-toggle, .nav-menu { display: none !important; }
}

/* Sections */
main { padding-top: calc(var(--nav-h) + 20px); }
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head .lead { margin-top: 16px; }

/* Ultra speech bubble */
.ultra-note { display: flex; align-items: flex-end; gap: 14px; max-width: 560px; }
.ultra-note picture { flex: none; }
.ultra-note img { width: 88px; height: 88px; flex: none; filter: drop-shadow(0 10px 24px rgba(46, 197, 255, .35)); }
.ultra-note.float img { animation: ultra-float 6s ease-in-out infinite; }
.bubble {
  position: relative; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 14px 18px; color: var(--text); font-weight: 500; line-height: 1.45;
  box-shadow: 0 0 0 1px rgba(46,197,255,.08), 0 20px 50px -30px rgba(46,197,255,.5);
  min-height: 52px;
}
.bubble::before {
  content: ""; position: absolute; left: -7px; bottom: 22px; width: 12px; height: 12px;
  background: var(--surface); border-left: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong);
  transform: rotate(45deg);
}
.bubble .caret { display: inline-block; width: 2px; height: 1em; background: var(--cyan); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(2) infinite; }
.bubble.done .caret { display: none; }
@keyframes blink { to { opacity: 0; } }
@keyframes ultra-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Reveal and motion */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ultra-note.float img, .bubble .caret { animation: none; }
  .btn, .app-store { transition: none; }
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0 36px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer .brand { margin: 0 0 10px; }
.footer .footer-h { margin: 0 0 12px; font-family: var(--font-body); font-stretch: normal; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; line-height: 1.4; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .85rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* Legal and article pages */
.page { padding: calc(var(--nav-h) + 36px) 0 72px; }
.page .container { max-width: 760px; }
.page .back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.page .back:hover { color: var(--text); }
.page h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); margin-bottom: 10px; }
.page .date, .page .subtitle { color: var(--muted); margin-bottom: 36px; }
.page .subtitle { font-size: 1.1rem; color: var(--text-dim); line-height: 1.55; }
.page h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 44px 0 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.page h3 { font-size: 1.12rem; font-family: var(--font-body); font-stretch: normal; font-weight: 700; letter-spacing: 0; margin: 24px 0 8px; }
.page p, .page li { color: var(--text-dim); }
.page p a, .page li a { text-decoration: underline; text-underline-offset: 3px; }
.page strong { color: var(--text); }
.page ul, .page ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.page li { margin-bottom: .45em; }
.page .faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; margin: 0 0 12px; }
.page .faq-item h3 { margin: 0 0 6px; }
.page .faq-item p { margin: 0; }
.page .overflow { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 16px; }
.page table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.page caption { text-align: left; color: var(--muted); font-size: .85rem; padding: 10px 14px 0; caption-side: top; }
.page th, .page td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.page th { color: var(--text); font-weight: 600; background: rgba(255,255,255,.03); }
.page tr:last-child td { border-bottom: 0; }
.page td { color: var(--text-dim); }
.page .cta-card {
  margin: 44px 0 0; padding: 28px; border-radius: var(--radius-lg); text-align: center;
  background: radial-gradient(120% 140% at 10% 0%, rgba(46,197,255,.18), transparent 50%), radial-gradient(120% 140% at 100% 100%, rgba(255,77,90,.18), transparent 50%), var(--surface);
  border: 1px solid var(--border-strong);
}
.page .cta-card h3 { font-family: var(--font-display); font-stretch: condensed; font-weight: 800; font-size: 1.7rem; margin: 0 0 8px; }
.page .cta-card p { margin: 0 0 18px; }
.page .cta-card .app-store { margin: 0 auto; }
.page .related { margin-top: 28px; }
.page .contact-card { margin-top: 40px; }
