/* ==========================================================================
   CyberRide — marketing site component + layout CSS (plain, class-based).
   Server-rendered port of ui_kits/website. Pairs with cyberride.css (tokens).
   ========================================================================== */

/* ---------- Keyframes ---------- */
@keyframes cr-floor { from { background-position: 0 0; } to { background-position: 0 60px; } }
@keyframes cr-pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes cr-sweep { from { transform: translateY(-160px); } to { transform: translateY(120vh); } }

/* ---------- Layout ---------- */
.cr-wrap        { max-width: var(--container-wide); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.cr-wrap--slim  { max-width: var(--container); }
.cr-section     { padding-top: var(--space-9); padding-bottom: var(--space-9); }
img { max-width: 100%; }
.cr-chamfer-tr  { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }

/* ---------- Buttons ---------- */
.cr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm);
  letter-spacing: var(--track-wide); text-transform: uppercase; line-height: 1; white-space: nowrap;
  border: 1.5px solid var(--cyan-500); cursor: pointer; text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform var(--dur-fast) var(--ease-snap), filter var(--dur-base), background var(--dur-base), box-shadow var(--dur-base);
}
.cr-btn--sm { padding: 8px 16px; font-size: var(--text-xs); clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); }
.cr-btn--lg { padding: 16px 34px; font-size: var(--text-base); clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px)); }
.cr-btn--primary   { background: var(--cyan-500);    color: var(--void-900); box-shadow: var(--glow-cyan); }
.cr-btn--secondary { background: var(--magenta-500); color: var(--void-900); border-color: var(--magenta-500); box-shadow: var(--glow-magenta); }
.cr-btn--territory { background: var(--lime-500);    color: var(--void-900); border-color: var(--lime-500); box-shadow: var(--glow-lime); }
.cr-btn--ghost     { background: transparent;        color: var(--cyan-500); border-color: var(--line-cyan-hi); box-shadow: none; }
.cr-btn--primary:hover, .cr-btn--secondary:hover, .cr-btn--territory:hover { filter: brightness(1.12); }
.cr-btn--ghost:hover { background: var(--fill-cyan); box-shadow: var(--glow-cyan-sm); }
.cr-btn:active { transform: translateY(1px) scale(.985); }
.cr-btn svg { width: 1em; height: 1em; }

/* ---------- Icon button ---------- */
.cr-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  background: var(--surface-1); color: var(--accent); border: 1.5px solid var(--line-cyan); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: all var(--dur-base);
}
.cr-iconbtn:hover { color: var(--accent-hover); border-color: var(--line-cyan-hi); background: var(--fill-cyan); box-shadow: var(--glow-cyan-sm); }
.cr-iconbtn:active { transform: scale(.92); }

/* ---------- Badge ---------- */
.cr-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px;
  font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 500;
  letter-spacing: var(--track-wider); text-transform: uppercase; line-height: 1;
  border: 1px solid currentColor; border-radius: var(--radius-sm); white-space: nowrap;
}
.cr-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: 0 0 auto; }
.cr-badge.is-cyan    { color: var(--cyan-500);    background: var(--fill-cyan); }
.cr-badge.is-magenta { color: var(--magenta-500); background: var(--fill-magenta); }
.cr-badge.is-lime    { color: var(--lime-500);    background: var(--fill-lime); }
.cr-badge.is-amber   { color: var(--amber-500);   background: rgba(255,176,32,.10); }
.cr-badge.is-neutral { color: var(--text-muted);  background: rgba(150,180,210,.08); }
.cr-badge.is-outline { background: transparent; }

/* ---------- Card (HUD panel) ---------- */
.cr-card {
  position: relative; padding: 24px;
  background: linear-gradient(180deg, rgba(20,26,40,.85), rgba(8,11,19,.85));
  border: 1px solid var(--line-cyan); backdrop-filter: blur(6px);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  transition: border-color var(--dur-base), box-shadow var(--dur-base), transform var(--dur-base) var(--ease-out);
  --brk: var(--cyan-500);
}
.cr-card.is-magenta { --brk: var(--magenta-500); }
.cr-card.is-lime    { --brk: var(--lime-500); }
.cr-card.is-interactive:hover { border-color: var(--brk); box-shadow: 0 0 0 1px var(--brk), 0 18px 44px rgba(0,0,0,.6); transform: translateY(-4px); }
.cr-card .brk { position: absolute; width: 11px; height: 11px; pointer-events: none; }
.cr-card .brk.tl { top: 8px; left: 8px; border-top: 2px solid var(--brk); border-left: 2px solid var(--brk); }
.cr-card .brk.bl { bottom: 8px; left: 8px; border-bottom: 2px solid var(--brk); border-left: 2px solid var(--brk); }
.cr-card .brk.br { bottom: 8px; right: 8px; border-bottom: 2px solid var(--brk); border-right: 2px solid var(--brk); }

/* ---------- Section head ---------- */
.cr-sechead { max-width: 720px; margin-bottom: var(--space-7); }
.cr-sechead.center { margin-left: auto; margin-right: auto; text-align: center; max-width: 640px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); background: transparent; border-bottom: 1px solid transparent;
  transition: background 240ms, border-color 240ms, backdrop-filter 240ms;
}
.site-header.scrolled { background: rgba(4,6,11,.82); border-bottom: 1px solid var(--line-cyan); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .glyph { width: 34px; height: 34px; background: var(--cyan-500); box-shadow: var(--glow-cyan); display: grid; place-items: center;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.brand .glyph b { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--void-900); }
.brand .word { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; text-transform: uppercase; color: var(--ink-900); }
.brand .word .r { color: var(--cyan-500); text-shadow: var(--text-glow-cyan); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.navlinks { display: flex; gap: 26px; }
.navlinks a, .site-nav .login { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--text-muted); text-decoration: none; transition: color 160ms; }
.site-nav .login { color: var(--text-body); }
.navlinks a:hover, .site-nav .login:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 70% 0%, #0a1420, var(--void-900) 70%); }
.hero__grid { position: absolute; inset: -20% -20% 30% -20%; opacity: .5; -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); mask-image: linear-gradient(180deg, transparent, #000 60%); }
.hero__floor { position: absolute; left: -30%; right: -30%; bottom: -10%; height: 65%; transform: perspective(600px) rotateX(62deg); transform-origin: bottom; }
.hero__floor > div { position: absolute; inset: 0; background-size: 60px 60px; animation: cr-floor 6s linear infinite; }
.hero__sector { position: absolute; transform: skewX(-12deg); animation: cr-pulse 4.5s ease-in-out infinite; }
.hero__sweep { position: absolute; inset: 0; height: 140px; background: linear-gradient(180deg, transparent, rgba(0,229,255,.18), transparent); animation: cr-sweep 5s linear infinite; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, var(--void-900) 8%, rgba(4,6,11,.55) 46%, rgba(4,6,11,.15) 100%); }
.hero__inner { position: relative; width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: 80px var(--gutter); }
.hero__col { max-width: 680px; }
.hero h1 { font-size: var(--text-hero); margin: 0 0 22px; }
.hero .lead { max-width: 540px; margin: 0 0 38px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); letter-spacing: .06em; }
.hero__fade { position: absolute; bottom: 0; left: 0; right: 0; height: 100px; background: linear-gradient(180deg, transparent, var(--void-900)); }

/* Trailer box CTA */
.trailer-box { display: flex; align-items: center; gap: 14px; padding: 10px 20px 10px 12px; cursor: pointer;
  background: rgba(8,11,19,.6); border: 1.5px solid var(--line-cyan-hi); backdrop-filter: blur(6px);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); transition: border-color .2s, box-shadow .2s; }
.trailer-box:hover { box-shadow: var(--glow-cyan-sm); border-color: var(--cyan-500); }
.trailer-box .play { width: 40px; height: 40px; display: grid; place-items: center; background: var(--cyan-500); box-shadow: var(--glow-cyan); color: var(--void-900);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.trailer-box .t1 { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-900); }
.trailer-box .t2 { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--text-muted); }

/* ---------- Stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line-cyan); border: 1px solid var(--line-cyan); }
.stat-strip .cell { background: var(--void-800); padding: 26px 28px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .lab { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: var(--track-wider); text-transform: uppercase; color: var(--text-muted); }
.stat .val { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.75rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .val.is-cyan { color: var(--cyan-500); text-shadow: 0 0 14px rgba(0,229,255,.33); }
.stat .val.is-lime { color: var(--lime-500); text-shadow: 0 0 14px rgba(182,255,46,.33); }
.stat .val.is-magenta { color: var(--magenta-500); text-shadow: 0 0 14px rgba(255,30,111,.33); }
.stat .val.is-neutral { color: var(--text-hi); }
.stat .delta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--lime-500); }

/* ---------- Feature grid ---------- */
.feature-grid, .news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 28px; }
.feature-grid { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.feature-card { display: flex; flex-direction: column; padding: 0; }
.feature-card .body { padding: 30px 30px 0; }
.feature-card .visual-wrap { padding: 0 30px 30px; margin-top: auto; }
.feature-card .ico { width: 46px; height: 46px; display: grid; place-items: center; border: 1.5px solid var(--brk); color: var(--brk);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.feature-card h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink-900); }
.feature-card ul { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-card li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-body); }
.feature-card li svg { color: var(--brk); }
.hud-visual { position: relative; height: 200px; background: var(--void-900); border: 1px solid var(--line-cyan); overflow: hidden; }
.hud-tag { position: absolute; display: flex; align-items: center; gap: 8px; padding: 5px 9px; background: rgba(4,6,11,.8); font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; }

/* ---------- News ---------- */
.news-band { background: var(--void-800); border-top: 1px solid var(--line-cyan); border-bottom: 1px solid var(--line-cyan); }
.news-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 44px; }
.news-card { display: flex; flex-direction: column; padding: 0; }
.news-card .thumb { position: relative; height: 150px; background: var(--void-900); overflow: hidden; border-bottom: 1px solid var(--line-cyan); display: grid; place-items: center; }
.news-card .thumb .ico { opacity: .5; }
.news-card .thumb .badge-pos { position: absolute; top: 12px; left: 12px; }
.news-card .inner { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card .date { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--text-muted); }
.news-card h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 19px; text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink-900); line-height: 1.15; }
.news-card p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.news-card .more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Updates ---------- */
.update-row { padding: 0; }
.update-row .grid { display: grid; grid-template-columns: minmax(150px, 200px) 1fr; }
.update-row .ver { padding: 26px 24px; border-right: 1px solid var(--line-cyan); background: var(--void-900); }
.update-row .ver .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--cyan-500); text-shadow: var(--text-glow-cyan); }
.update-row .ver .d { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--text-muted); margin-top: 4px; }
.update-row .notes { padding: 26px 28px; }
.update-row .notes h3 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink-900); }
.update-row .notes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.update-row .notes li { display: flex; align-items: flex-start; gap: 14px; }
.update-row .notes li span.txt { color: var(--text-body); font-size: 15.5px; line-height: 1.5; }

/* ---------- Final CTA ---------- */
.final-cta { position: relative; overflow: hidden; border-top: 1px solid var(--line-cyan); }
.final-cta .bg { position: absolute; inset: 0; background-size: 46px 46px; opacity: .9; }
.final-cta .glow { position: absolute; inset: 0; background: radial-gradient(90% 120% at 50% 100%, rgba(0,229,255,.10), transparent 60%); }
.final-cta .inner { position: relative; max-width: 860px; margin: 0 auto; padding: var(--space-10) var(--gutter); text-align: center; }
.final-cta h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin: 0 0 20px; }
.final-cta .lead { max-width: 560px; margin: 0 auto 38px; color: var(--text-body); }
.final-cta .ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.final-cta .fine { margin-top: 26px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--void-900); border-top: 1px solid var(--line-cyan); }
.site-footer .cols { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, 1fr); gap: 40px; margin-bottom: 48px; padding-top: var(--space-8); }
.site-footer .about p { margin: 0 0 20px; color: var(--text-muted); font-size: 15px; max-width: 300px; line-height: 1.55; }
.site-footer .socials { display: flex; gap: 10px; }
.site-footer .col h4 { margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.site-footer .col a { color: var(--text-body); font-size: 15px; text-decoration: none; transition: color 160ms; }
.site-footer .col a:hover { color: var(--accent); }
.site-footer .legal { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 24px 0 32px; border-top: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--text-muted); }

/* ---------- Trailer modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(2,3,7,.86); backdrop-filter: blur(8px); display: none; place-items: center; padding: 24px; }
.modal.open { display: grid; }
.modal .frame { position: relative; width: min(900px, 92vw); aspect-ratio: 16/9; background: var(--void-900); border: 1.5px solid var(--cyan-500); box-shadow: var(--glow-cyan);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); overflow: hidden; }
.modal .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.modal .play-lg { display: inline-grid; place-items: center; width: 74px; height: 74px; background: var(--cyan-500); box-shadow: var(--glow-cyan); color: var(--void-900);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.modal .cap { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; color: var(--text-muted); text-transform: uppercase; }
.modal .close { position: absolute; top: 12px; right: 12px; }
.modal .badge-pos { position: absolute; top: 14px; left: 14px; }

@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .update-row .grid { grid-template-columns: 1fr; } .update-row .ver { border-right: none; border-bottom: 1px solid var(--line-cyan); } }
@media (max-width: 720px) { .navlinks, .site-nav .login { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero__floor > div, .hero__sweep, .hero__sector { animation: none; } }
