/* Rail City AI site styles
   One stylesheet for every page. Colors and sizes live in :root below.
   Look: near-black base, layered surfaces, fine borders, cyan as the only accent. */

@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1115;
  --surface: #15181d;
  --surface-2: #1b1f26;
  --line: #ffffff12;
  --line-strong: #ffffff24;
  --text: #e6e8eb;
  --muted: #9aa3ad;
  --cyan: #22d3ee;
  --cyan-hover: #67e8f9;
  --on-cyan: #061316;
  --photo-bg: #e7e9ec; /* light backdrop behind product photos; matches the baked-in image background */
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1200px;
  --font-head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  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; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }

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

a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cyan-hover); }

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: #f4f5f6;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--cyan); color: var(--on-cyan);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 17, 21, 0.85);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 24px; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em;
}
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 34px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.site-nav a {
  display: inline-block; padding: 7px 11px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (max-width: 520px) {
  .site-nav a { padding: 6px 8px; font-size: 0.92rem; }
}

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 64px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem;
  color: var(--muted); margin-bottom: 14px;
}
.section-link { margin-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 64px; overflow-x: clip; }
@media (min-width: 900px) { .hero { padding: 96px 0 112px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 0.95fr 1.15fr; gap: 48px; } }
.hero-copy h1 { max-width: 19ch; font-size: clamp(2rem, 3.4vw, 2.7rem); }
.hero-sub { color: var(--muted); font-size: 1.15rem; margin-bottom: 8px; }
.hero-note { color: var(--text); font-size: 0.98rem; margin-bottom: 0; }

.hero-product {
  position: relative; display: block; text-decoration: none;
  perspective: 1600px; padding: 8px 0 28px;
}
.hero-mat {
  display: block; border-radius: 14px; overflow: hidden;
  transform: rotateX(16deg) rotateY(-14deg) rotateZ(3deg);
  transform-origin: 50% 60%;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 30px 60px -12px rgba(0, 0, 0, 0.75),
    0 60px 90px -30px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease;
}
.hero-mat img { width: 100%; height: auto; }
.hero-product:hover .hero-mat { transform: rotateX(12deg) rotateY(-10deg) rotateZ(2deg); }
.chip {
  position: absolute; left: 6%; bottom: 0;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px; font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.hero-product:hover .chip { border-color: var(--cyan); }
@media (max-width: 959px) {
  .hero-mat { transform: rotateX(10deg) rotateY(-8deg) rotateZ(2deg); }
}

.page-hero { padding: 64px 0 48px; }
@media (min-width: 900px) { .page-hero { padding: 96px 0 56px; } }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 680px; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem; letter-spacing: 0;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--cyan); color: var(--on-cyan); }
.btn-primary:hover { background: var(--cyan-hover); color: var(--on-cyan); }
.btn-secondary { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: #ffffff47; background: #ffffff0a; color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--line-strong); }
.card p { color: var(--muted); }
.card .btn { margin-top: auto; align-self: flex-start; }
.card-icon { width: 36px; height: 36px; color: var(--cyan); margin-bottom: 18px; }

.status {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-bottom: 14px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.status-live { color: var(--text); }
.status-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }

/* Channel cards */
.channel-card { padding: 0; overflow: hidden; gap: 0; }
.channel-art {
  aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.channel-art img { width: 100%; height: 100%; object-fit: cover; }
.channel-top { display: flex; align-items: flex-start; gap: 14px; margin: -32px 28px 14px; position: relative; }
.channel-avatar, .channel-mono {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  border: 3px solid var(--surface); background: var(--surface-2);
}
.channel-mono {
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--cyan);
}
.channel-top > div { padding-top: 38px; }
.channel-top h3 { margin: 0; font-size: 1.3rem; }
.handle { color: var(--muted); font-size: 0.92rem; margin: 2px 0 0; }
.channel-card > p { margin-left: 28px; margin-right: 28px; }
.credit {
  font-size: 0.9rem; color: var(--text) !important;
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px !important;
}
.credit::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); flex: none; }
.channel-card .btn { margin: auto 28px 28px; }

/* Coming-soon tiles */
.tile { min-height: 150px; }
.tile h3 { font-size: 1.1rem; }
.teaser-link { margin-top: auto; font-weight: 600; }

/* ---------- Product (desk mat) ---------- */
.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 12px; overflow: hidden;
}
.product-photo { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.product-info {
  display: grid; gap: 20px; padding: 24px 12px 12px;
}
@media (min-width: 860px) {
  .product-info { grid-template-columns: 1fr auto; align-items: end; gap: 40px; padding: 28px 20px 16px; }
}
.product-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 12px; }
.product-lg .product-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.product-desc { color: var(--muted); max-width: 60ch; margin-bottom: 0; }
.specs { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 14px; }
.specs div { display: flex; gap: 8px; align-items: baseline; }
.specs dt { color: var(--muted); font-size: 0.92rem; }
.specs dd { margin: 0; font-weight: 600; font-size: 1.08rem; color: var(--text); }
.product-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (min-width: 860px) { .product-actions { justify-content: flex-end; max-width: 380px; } }
.fine { flex-basis: 100%; color: var(--muted); font-size: 0.88rem; margin: 0; }
@media (min-width: 860px) { .fine { text-align: right; } }
.product-lg { padding: 16px; }
.product-lg .product-info { padding-top: 32px; }
.merch-more { margin-top: 20px; }

/* ---------- Shop grid ---------- */
.shop-card { padding: 0; overflow: hidden; gap: 0; }
.shop-art { aspect-ratio: 4 / 5; background: var(--photo-bg); border-bottom: 1px solid var(--line); }
.shop-art img { width: 100%; height: 100%; object-fit: cover; }
.shop-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.shop-name { font-size: 1.2rem; letter-spacing: -0.005em; margin-bottom: 4px; }
.shop-price { color: var(--text) !important; font-weight: 600; font-size: 1.08rem; margin-bottom: 20px; }
.shop-more { margin-top: 32px; }

/* Template previews are landscape (4:3) on a dark background */
.template-art, .template-thumbs a { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.template-art img, .template-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.template-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-top: 2px solid var(--surface); border-bottom: 1px solid var(--line); }
.template-format { font-size: 0.92rem; margin: auto 0 0; }

.slogan {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--text); margin: 0 0 16px;
}

/* Notes, disclosures, prose */
.note {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 20px; color: var(--muted); max-width: 760px;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--text); }
.draft-banner {
  background: #241c08; border: 1px solid #854d0e; color: #fde68a;
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 32px;
}
.disclosure { color: var(--muted); font-size: 0.95rem; max-width: 760px; }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose p, .prose li { color: #c9ced4; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: #0c0e11; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.2fr 2fr; } }
.footer-brand p { color: var(--muted); max-width: 360px; }
.footer-brand .brand { margin-bottom: 14px; }
.site-footer h2 {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 14px;
}
.social-list, .legal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social-list a {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: 0.9rem; background: var(--surface);
}
.social-list a:hover { border-color: var(--line-strong); color: #fff; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 0.9rem;
}
.footer-bottom p { margin: 0; }
.legal-list { gap: 6px 20px; }
.legal-list a { color: var(--muted); }
.legal-list a:hover { color: var(--text); }
