/* ============================================================
   R-GX GDK — site styles
   Single visual world: the CPC Plus / GX4000 splash, extended.
   Palette and type are derived from the R-GX GDK splash artwork.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* ground */
  --void:        #05070f;
  --deep:        #080d1b;
  --panel:       #0c1326;
  --panel-2:     #111a31;
  --line:        #1d2b4d;
  --line-soft:   #16213c;

  /* accents, lifted straight off the splash */
  --cyan:        #3ee3ff;
  --cyan-dim:    #1b9fc4;
  --cyan-glow:   rgba(62, 227, 255, .38);
  --magenta:     #ff2e7e;
  --magenta-dim: #b01a52;
  --magenta-glow:rgba(255, 46, 126, .32);

  /* blue-biased neutrals — never a flat grey */
  --ink:         #e9eefb;
  --ink-2:       #b9c6e2;
  --dim:         #8598ba;
  --faint:       #5b6c8d;

  /* type */
  --display: "Chakra Petch", "Segoe UI Semibold", system-ui, sans-serif;
  --body:    "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", "Cascadia Mono", ui-monospace, Menlo, monospace;

  /* scale */
  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(1rem, .97rem + .16vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.12rem + .4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.33rem + .82vw, 2.1rem);
  --step-3:  clamp(1.95rem, 1.6rem + 1.7vw, 3rem);
  --step-4:  clamp(2.4rem, 1.8rem + 2.9vw, 4.1rem);

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #9cf1ff; }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .005em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: 66ch; }

.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 {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: #04121a; padding: .6rem 1rem;
  font-family: var(--mono); font-size: var(--step--1); z-index: 999;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 .9rem;
  display: block;
}
.eyebrow--magenta { color: var(--magenta); }

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  line-height: 1.55;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--cyan-dim), transparent 70%);
  border: 0;
  margin: 0;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(5, 7, 15, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 62px;
  padding-block: .5rem;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 30px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 1.9rem);
  margin-left: auto;
}
.nav a {
  font-family: var(--display);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
}

.langs {
  display: flex;
  gap: .3rem;
  margin-left: .4rem;
  padding-left: clamp(.6rem, 2vw, 1.2rem);
  border-left: 1px solid var(--line);
}
.langs a {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--faint);
  padding: .18rem .42rem;
  border: 1px solid transparent;
  border-radius: 2px;
}
.langs a:hover { color: var(--ink-2); border-color: var(--line); }
.langs a[aria-current="true"] {
  color: var(--void);
  background: var(--cyan);
  font-weight: 600;
}

.navtoggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: .45rem .6rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .navtoggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--deep);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"] { border-bottom-color: var(--cyan); }
  .langs { border-left: 0; padding-left: 0; margin-left: 0; margin-top: .8rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; }

.hero__art {
  position: relative;
  width: 100%;
  max-width: 1670px;
  margin-inline: auto;
}
.hero__art img { width: 100%; }
.hero__art::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 55%;
  background: linear-gradient(to bottom,
    rgba(5,7,15,0) 0%,
    rgba(5,7,15,.55) 34%,
    rgba(5,7,15,.92) 62%,
    var(--void) 82%);
  pointer-events: none;
}

.hero__body {
  position: relative;
  margin-top: clamp(-5rem, -7vw, -2rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  text-align: center;
}
.hero__title {
  font-size: var(--step-3);
  max-width: 20ch;
  margin-inline: auto;
}
.hero__title em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 26px var(--cyan-glow);
}
.hero__sub {
  margin: 1.1rem auto 0;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: var(--step-1);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .78rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--magenta);
  color: #14020a;
  box-shadow: 0 0 0 0 var(--magenta-glow);
}
.btn--primary:hover { background: #ff4a8f; color: #14020a; box-shadow: 0 10px 34px -10px var(--magenta-glow); }

.btn--ghost {
  border-color: var(--cyan-dim);
  color: var(--cyan);
  background: rgba(62, 227, 255, .05);
}
.btn--ghost:hover { border-color: var(--cyan); background: rgba(62, 227, 255, .11); color: #9cf1ff; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ---------- section frame ---------- */
.section { padding-block: clamp(3.2rem, 7vw, 5.6rem); }
.section--tight { padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.section--panel {
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(62,227,255,.06), transparent 62%),
    var(--deep);
  border-block: 1px solid var(--line-soft);
}

.section__head { margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section__head h2 { font-size: var(--step-2); }
.section__head p { margin-top: .9rem; color: var(--ink-2); max-width: 62ch; }

/* ---------- hardware spec strip ---------- */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.spec {
  background: var(--deep);
  padding: 1.35rem 1.25rem;
}
.spec__n {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.spec__n span { color: var(--cyan); font-size: .5em; margin-left: .15em; }
.spec__l {
  display: block;
  margin-top: .55rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- feature cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.card__icon {
  width: 38px; height: 38px;
  color: var(--cyan);
  margin-bottom: .2rem;
}
.card h3 {
  font-size: var(--step-1);
}
.card p { color: var(--ink-2); font-size: .97rem; }
.card__tag {
  margin-top: auto;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: .6rem;
}

/* ---------- split rows ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
}
.split--top { align-items: start; }
.split--reverse > *:first-child { order: 2; }
@media (max-width: 700px) {
  .split--reverse > *:first-child { order: 0; }
}
.split h3 { font-size: var(--step-2); margin-bottom: .9rem; }
.split p + p { margin-top: .9rem; }
.split p { color: var(--ink-2); }

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.shot img { width: 100%; }
.shot figcaption {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--dim);
  padding: .7rem .9rem;
  border-top: 1px solid var(--line-soft);
}

/* placeholder frame for screenshots not supplied yet */
.shot--empty {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(-45deg, rgba(62,227,255,.04) 0 10px, transparent 10px 20px),
    var(--panel);
  color: var(--faint);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .1em;
  text-align: center;
  padding: 1rem;
}

/* ---------- callout ---------- */
.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  background: linear-gradient(90deg, rgba(255,46,126,.07), transparent 55%), var(--panel);
  padding: 1.5rem 1.6rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout h3 { font-size: var(--step-1); margin-bottom: .6rem; }
.callout p { color: var(--ink-2); }
.callout p + p { margin-top: .8rem; }

/* ---------- spec table ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tablewrap--narrow table.spectable { min-width: 330px; }
table.spectable {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: .94rem;
}
table.spectable th,
table.spectable td {
  text-align: left;
  padding: .82rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.spectable thead th {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--deep);
}
table.spectable tbody th {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
table.spectable td { color: var(--ink-2); }
table.spectable tbody tr:last-child th,
table.spectable tbody tr:last-child td { border-bottom: 0; }

code, .mono {
  font-family: var(--mono);
  font-size: .92em;
  color: var(--cyan);
  background: rgba(62, 227, 255, .07);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: .06em .34em;
  white-space: nowrap;
}
table.spectable code { background: none; border: 0; padding: 0; }

.note {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--faint);
  margin-top: .9rem;
}

.stack { display: grid; gap: clamp(2.2rem, 5vw, 3.4rem); }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 2px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pill--live { color: var(--cyan); }
.pill--wip  { color: #ffc75a; }
.pill--plan { color: var(--faint); }

/* ---------- roadmap (a real sequence, so it is numbered) ---------- */
.roadmap { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 1.2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: 1px solid var(--line-soft); }
.step__n {
  counter-increment: step;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--cyan);
  padding-top: .35rem;
}
.step__n::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.step p { color: var(--ink-2); font-size: .97rem; }
@media (max-width: 520px) {
  .step { grid-template-columns: 1fr; gap: .3rem; }
}

/* ---------- video ---------- */
.videoframe {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.videoframe iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

.videogrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
}
.videocard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.videocard .videoframe { border: 0; border-radius: 0; }
.videocard__meta { padding: .95rem 1.1rem; }
.videocard__meta h3 { font-size: 1.05rem; }
.videocard__meta p {
  margin-top: .35rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--dim);
}

/* ---------- channel CTA ---------- */
.channel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(70% 160% at 100% 50%, rgba(255,46,126,.12), transparent 60%),
    var(--panel);
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
}
.channel > div:first-child { flex: 1 1 22rem; max-width: 48ch; }
.channel > .cta-row { flex: 0 1 auto; }
.channel h2 { font-size: var(--step-2); max-width: 22ch; }
.channel p { color: var(--ink-2); margin-top: .6rem; max-width: 46ch; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  border-top: 1px solid var(--line-soft);
  background: var(--deep);
  padding-block: clamp(2.6rem, 6vw, 4rem) 2rem;
  overflow: hidden;
}
/* neon floor grid, echoing the splash artwork */
.footer::before {
  content: "";
  position: absolute;
  left: -25%; right: -25%; bottom: 0;
  height: 220px;
  background-image:
    linear-gradient(to right, rgba(62,227,255,.40) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(62,227,255,.40) 1px, transparent 1px);
  background-size: 62px 62px;
  transform: perspective(280px) rotateX(64deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 75%);
  mask-image: linear-gradient(to bottom, transparent, #000 75%);
  pointer-events: none;
}
.footer__inner { position: relative; z-index: 1; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  align-items: start;
}
.footer img.mark { height: 34px; width: auto; margin-bottom: .9rem; }
.footer h4 {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: .8rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer li a { color: var(--ink-2); font-size: .95rem; }
.footer li a:hover { color: var(--cyan); }
.footer__note {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.6rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--faint);
}

.social {
  display: flex;
  gap: .6rem;
  margin-top: .2rem;
}
.social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.social a:hover { color: var(--cyan); border-color: var(--cyan-dim); }
.social svg { width: 19px; height: 19px; }

/* ---------- not-yet-available links (e.g. FR / ES) ---------- */
a.is-disabled { opacity: .4; cursor: not-allowed; }
.langs a.is-disabled:hover { color: var(--faint); border-color: transparent; }
.footer li a.is-disabled:hover { color: var(--ink-2); }
