/* RYEWIRED landing page. Colors, fonts, radii, and shadows come from css/tokens.css. */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --fs-sm: 14px;
  --fs-base: 17px;
  --fs-lg: 20px;
  --fs-h3: 20px;
  --fs-h2: clamp(30px, 4.2vw, 48px);
  --fs-h1: clamp(40px, 7vw, 84px);
  --wrap: 1440px;
  --header-h: 64px;
  --radius-xl: 16px;
  --z-header: 50;
  --z-skip: 60;
}

/* tokens.css locks the page for the app shell; a document page scrolls and allows selection. */
html, body { height: auto; overflow-x: hidden; overflow-y: visible; user-select: text; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { font-size: var(--fs-base); line-height: 1.6; color: var(--text-secondary); background: var(--bg-base); }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; }
h1, h2, h3 { color: var(--text-primary); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
/* Even out line lengths so a heading or short paragraph never ends on one or two words. */
h2, h3, .lede, .section-lede, .closing-lede, .card p, .split-copy p, .video-frame figcaption { text-wrap: balance; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-4); }
@media (min-width: 640px) { .wrap { padding: 0 var(--space-6); } }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: var(--radius-sm); }

.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: var(--z-skip);
  padding: var(--space-2) var(--space-4); background: var(--accent); color: var(--text-on-accent);
  border-radius: var(--radius); text-decoration: none;
}
.skip:focus { top: var(--space-3); }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-med), border-color var(--t-med), backdrop-filter var(--t-med);
}
.site-header.is-scrolled {
  background: var(--bg-overlay);
  border-bottom-color: var(--border);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }

.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.wordmark { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.12em; color: var(--rw-red); font-size: 18px; }

.header-nav { display: flex; align-items: center; gap: var(--space-2); }
.nav-link {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius);
  color: var(--text-secondary); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-raised); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--space-5);
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 38px; padding: 0 var(--space-4); font-size: var(--fs-sm); }
.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--border-light); color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-raised); border-color: var(--text-dim); }
/* Disabled buttons in the public pre-launch build (scripts/public-site.js). */
.btn.is-soon { opacity: .6; cursor: default; }
.btn-primary.is-soon:hover { background: var(--accent); }
.btn-ghost.is-soon:hover { background: none; border-color: var(--border-light); }
.btn.is-soon:active { transform: none; }

.eyebrow {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text);
  margin-bottom: var(--space-4);
}

/* ── Hero ── */
.hero { position: relative; margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + var(--space-9)); }
.hero-grid {
  position: absolute; inset: 0 0 30% 0; pointer-events: none;
  background-image: radial-gradient(circle, var(--border-light) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, var(--bg-base) 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, var(--bg-base) 0%, transparent 75%);
  opacity: 0.55;
}
.hero-copy { position: relative; text-align: center; max-width: 900px; }
.hero h1 { font-size: var(--fs-h1); letter-spacing: -0.035em; } /* nbsp in the markup keeps each phrase whole */
.lede { max-width: 620px; margin: var(--space-5) auto 0; font-size: var(--fs-lg); color: var(--text-secondary); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; margin-top: var(--space-6); }

.showcase-wrap { position: relative; margin-top: var(--space-8); perspective: 1600px; }
.showcase {
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-panel);
  box-shadow: var(--shadow-modal);
  transform-origin: 50% 0;
  transform: rotateX(var(--tilt, 0deg)) scale(var(--scale, 1)) translateY(var(--lift, 0px));
  will-change: transform;
}

/* ── Marquee ── */
.marquee {
  margin-top: var(--space-8);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--bg-base) 10%, var(--bg-base) 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, var(--bg-base) 10%, var(--bg-base) 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-list { display: flex; flex-shrink: 0; }
.marquee-list li {
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-5) var(--space-5) var(--space-5) 0;
  font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-primary); white-space: nowrap;
}
/* A breadboard hole between items. */
.marquee-list li::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--board-hole); box-shadow: inset 0 1px 0 var(--board-hole-shadow), 0 0 0 3px var(--bg-raised);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Sections ── */
.section { padding: var(--space-10) 0; }
/* Two plain sections in a row share one gap, the same as a plain section after a tinted one. */
.section:not(.section-alt) + .section:not(.section-alt) { padding-top: 0; }
.section-alt { background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto var(--space-8); text-align: center; }
.section-head h2, .split-copy h2, .closing h2 { font-size: var(--fs-h2); }
.section-lede { margin-top: var(--space-4); font-size: var(--fs-lg); }

.card-grid { display: grid; gap: var(--space-7) var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 760px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .card-grid { grid-template-columns: repeat(4, 1fr); } .card-grid .card-media { --tile-pad: var(--space-5); } }
.card { display: flex; flex-direction: column; }
/* The screenshot sits small inside a quiet tile, with room around it. */
.card-media {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  --tile-pad: var(--space-6);
  padding: var(--tile-pad); background: var(--bg-panel); border-radius: var(--radius-xl);
  transition: background-color var(--t-med);
  container-type: inline-size;
}
.card:hover .card-media { background: var(--bg-raised); }
/* 75cqw is the tile's height at 4:3; a percentage max-height would not resolve here. */
.card-media img {
  max-width: 100%; max-height: calc(75cqw - 2 * var(--tile-pad)); width: auto; height: auto;
  border-radius: var(--radius); border: 1px solid var(--border-light); box-shadow: var(--shadow-popover);
}
.card figcaption { padding-top: var(--space-5); font-size: 15px; line-height: 1.6; }
.card-step {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: var(--space-3);
}
.card h3 { font-size: 22px; margin-bottom: var(--space-3); }

.video-frame { max-width: 1000px; margin: 0 auto; }
.video-frame video { cursor: pointer;
  width: 100%; border-radius: var(--radius-xl); border: 1px solid var(--border-light);
  background: var(--bg-base); box-shadow: var(--shadow-modal);
}
.video-frame figcaption, .caption { margin-top: var(--space-4); text-align: center; font-size: var(--fs-sm); color: var(--text-dim); }

.split { display: grid; gap: var(--space-7); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.15fr 1fr; gap: var(--space-8); } }
.split-media img { max-height: 560px; width: auto; margin: 0 auto; border-radius: var(--radius-xl); border: 1px solid var(--border-light); box-shadow: var(--shadow-popover); }
@media (min-width: 900px) {
  .split-reverse { grid-template-columns: 1fr 1.15fr; }
  .split-reverse .split-media { order: 2; }
}
.split-copy h2 { margin-bottom: var(--space-5); }
.split-copy p + p { margin-top: var(--space-4); }
.text-link {
  display: inline-block; margin-top: var(--space-5);
  color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.text-link:hover { color: var(--text-primary); }

.closing { padding: var(--space-10) 0; border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.closing-inner { text-align: center; }
.closing-lede { max-width: 620px; margin: var(--space-4) auto 0; font-size: var(--fs-lg); color: var(--text-secondary); }

/* ── Footer ── */
.site-footer { background: var(--bg-panel); border-top: 1px solid var(--border); padding-top: var(--space-8); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 760px) { .footer-brand { grid-column: auto; } }
.footer-brand p { margin-top: var(--space-3); max-width: 260px; }
.footer-col h2 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: var(--space-3); font-weight: 600;
}
.footer-col li + li { margin-top: var(--space-2); }
.footer-col a, .footer-base a { text-decoration: none; color: var(--text-secondary); transition: color var(--t-fast); }
.footer-col a:hover, .footer-base a:hover { color: var(--text-primary); text-decoration: underline; }
.footer-col .soon-text { color: var(--text-dim); }
.footer-base {
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  margin-top: var(--space-8); padding-top: var(--space-5); padding-bottom: var(--space-6);
  border-top: 1px solid var(--border); color: var(--text-dim);
}

/* ── Reveal on scroll (added by landing.js, so content stays visible without script) ── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 480px) {
  .btn-sm { padding: 0 var(--space-3); }
  .nav-link { padding: var(--space-2); }
  .cta-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-list[aria-hidden="true"] { display: none; }
  .marquee-list { flex-wrap: wrap; justify-content: center; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .showcase { transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card-media { transition: none; }
}
