:root {
  color-scheme: dark;
  --bg: #060907;
  --panel: #111713;
  --panel-2: #1a211c;
  --ink: #edf1ec;
  --muted: #9aa69d;
  --orange: #ff7900;
  --line: #344039;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; background: var(--bg); }
body { margin: 0; color: var(--ink); background:
  radial-gradient(circle at 80% 4%, #17261b 0, transparent 28rem), var(--bg); }
main { background-color: var(--bg); }
a { color: inherit; }
.site-header { width: min(calc(100% - 40px), var(--max)); margin: auto; min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; letter-spacing: .04em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--orange);
  border-radius: 8px; color: var(--orange); font-weight: 800; }
nav { display: flex; gap: 26px; }
nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
nav a:hover, nav a:focus-visible { color: var(--orange); }
main { overflow: hidden; }
.hero, .section { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.hero { min-height: 690px; display: grid; grid-template-columns: .85fr 1.35fr; gap: 54px; align-items: center; }
.eyebrow { margin: 0 0 16px; color: var(--orange); font-size: .76rem; font-weight: 750; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--muted); }
.lead { max-width: 590px; color: #c7d0c9; font-size: 1.14rem; line-height: 1.65; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 34px; }
.badges span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--muted); font-size: .8rem; }
.primary { display: inline-block; padding: 13px 18px; border-radius: 7px; color: #111; background: var(--orange);
  text-decoration: none; font-weight: 750; }
.device-frame { margin: 0; padding: 10px; border: 1px solid #65411e; border-radius: 20px;
  background: #020302; box-shadow: 0 24px 70px #0008; }
.device-frame img { display: block; width: 100%; height: auto; border-radius: 11px; }
.device-frame figcaption { padding: 10px 7px 2px; color: #77847a; font-size: .73rem; }
.preview-section { display: grid; gap: 20px; }
.interactive-panel { display: grid; grid-template-columns: minmax(240px,.55fr) minmax(560px,1fr);
  gap: 20px; align-items: start; padding: 18px; border: 1px solid #65411e;
  border-radius: 14px; background: #0d120f; }
.interactive-panel[hidden] { display: none; }
.interactive-panel h3 { margin: 0 0 12px; font-size: 1.45rem; letter-spacing: 0; }
.interactive-panel p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.interactive-panel iframe { width: 100%; min-height: 610px; border: 1px solid var(--line);
  border-radius: 9px; background: #050705; }
.preview-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-controls button { border: 1px solid #536056; border-radius: 7px;
  background: #171c18; color: #dce4dd; padding: 9px 13px; cursor: pointer;
  font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.preview-controls button:hover, .preview-controls button:focus-visible,
.preview-controls button.active { border-color: #ff7900; color: #ff9a42; outline: none; }
.static-preview { margin: 0; padding: 10px; border: 1px solid #65411e;
  border-radius: 14px; background: #020302; max-width: 800px; }
.static-preview img { display: block; width: 100%; height: auto; border-radius: 6px; }
.static-preview figcaption { padding: 9px 4px 1px; color: #879087; font-size: .73rem; }
.preview-note { max-width: 760px; color: #98a098; }
.section { padding-block: 110px; border-top: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: 1fr .75fr; gap: 80px; }
h2 { margin: 0; font-size: clamp(2.1rem, 4.2vw, 4.2rem); line-height: 1.05; letter-spacing: -.04em; }
.intro-grid > p, .section-heading > p, .italian > p { color: var(--muted); line-height: 1.75; font-size: 1.05rem; }
.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-heading.compact { max-width: 660px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-grid article { min-height: 280px; padding: 28px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(145deg, var(--panel-2), var(--panel)); }
.index { color: var(--orange); font: 700 .75rem/1 monospace; }
h3 { margin: 54px 0 15px; color: var(--orange); font-size: 1.8rem; letter-spacing: .06em; }
.feature-grid p { color: var(--muted); line-height: 1.65; }
.c64-play { margin-top: 18px; padding: 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 28px; border: 1px solid #65411e;
  border-radius: 14px; background: #0d120f; }
.c64-play h3 { margin: 0 0 10px; }
.c64-play p:not(.eyebrow) { margin: 0; max-width: 720px; color: var(--muted); line-height: 1.6; }
.lab-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); }
.lab-list li { min-height: 115px; display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px; background: var(--bg); }
.lab-list b { font-size: 1.05rem; }
.lab-list span { color: var(--muted); font-size: .82rem; }
.italian { max-width: 900px; margin-left: max(20px, calc((100% - var(--max)) / 2)); }
footer { width: min(calc(100% - 40px), var(--max)); margin: auto; padding: 34px 0 50px; display: flex;
  justify-content: space-between; gap: 20px; color: #718078; border-top: 1px solid var(--line); font-size: .8rem; }
@media (max-width: 900px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 80px 0; }
  .device-frame { transform: none; }
  .intro-grid { grid-template-columns: 1fr; gap: 30px; }
  .interactive-panel { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .c64-play { align-items: flex-start; flex-direction: column; }
  .lab-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-header, .hero, .section, footer { width: min(calc(100% - 24px), var(--max)); }
  h1 { font-size: 3rem; }
  .section { padding-block: 74px; }
  .lab-list { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
