/* Treasure Ray — shared site styles
   Warm-paper editorial system: Fraunces serif for display type, system sans
   for body/UI, one cobalt accent. Shared across every page so the studio
   site reads as one system instead of five independently-styled documents. */

@font-face {
  font-family: 'Fraunces';
  src: local('Fraunces');
  font-weight: 400 700;
}

:root {
  --paper: #f6f2ea;
  --paper-raised: #fffdf8;
  --ink: #1c1a15;
  --ink-soft: #5c574c;
  --ink-faint: #948d7c;
  --line: #e2dbc9;
  --accent: #0047c2;
  --accent-soft: #e8eefc;
  --accent-ink: #ffffff;
  --live: #1a7a3e;
  --live-soft: #e3f5e9;
  --shadow-card: 0 24px 50px -28px rgba(28, 26, 21, 0.28), 0 4px 12px -6px rgba(28, 26, 21, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16140f;
    --paper-raised: #1e1b14;
    --ink: #f3efe4;
    --ink-soft: #b8b0a0;
    --ink-faint: #7d7768;
    --line: #322d22;
    --accent: #6d97ff;
    --accent-soft: #232a42;
    --accent-ink: #0a1024;
    --live: #7fd9a0;
    --live-soft: #173726;
  }
}
:root[data-theme="dark"] {
  --paper: #16140f;
  --paper-raised: #1e1b14;
  --ink: #f3efe4;
  --ink-soft: #b8b0a0;
  --ink-faint: #7d7768;
  --line: #322d22;
  --accent: #6d97ff;
  --accent-soft: #232a42;
  --accent-ink: #0a1024;
  --live: #7fd9a0;
  --live-soft: #173726;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 40px; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

#progressBar {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 100;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Header / nav ─────────────────────────────────────────────────────── */

header {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper-raised) 88%, transparent);
  backdrop-filter: blur(14px);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: block; flex-shrink: 0;
}
.brand-sub { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; font-size: 13px; color: var(--ink-faint); margin-left: 6px; }

nav { display: flex; align-items: center; gap: 30px; }
nav a { color: var(--ink-soft); font-weight: 700; font-size: 13.5px; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.active { color: var(--ink); }

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 11px;
  font-weight: 700; font-size: 14px;
}
.btn-primary { background: var(--ink); color: var(--paper-raised); transition: transform 0.15s ease, opacity 0.15s ease; }
.btn-primary:hover { transform: translateY(-2px); text-decoration: none; opacity: 0.92; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.4px solid var(--line); transition: border-color 0.15s ease, color 0.15s ease; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Section rhythm ───────────────────────────────────────────────────── */

section { padding: 72px 0; }

[data-reveal] { opacity: 0; transform: translateY(28px); }
[data-reveal].revealed {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1);
}

h1, h2, h3 { font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

/* ── Marquee strip ────────────────────────────────────────────────────── */

.marquee-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 14px; padding-right: 14px; }
.marquee-group span.label { font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.marquee-group span.hi { color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ── Pillars (about section) ──────────────────────────────────────────── */

.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  margin-top: 40px;
}
.pillar { background: var(--paper-raised); padding: 28px 24px; }
.pillar-num { font-family: 'Fraunces', serif; font-size: 13px; color: var(--ink-faint); }
.pillar h3 { font-size: 15.5px; font-weight: 800; margin: 14px 0 6px; font-family: 'Plus Jakarta Sans', sans-serif; }
.pillar p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin: 0; }

/* ── Catalog rows (products list on homepage) ────────────────────────── */

.catalog { display: flex; flex-direction: column; margin-top: 12px; }
.cat-row {
  display: grid; grid-template-columns: 56px 1fr 1fr auto;
  gap: 24px; align-items: center; padding: 26px 0;
  border-top: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.cat-row:last-child { border-bottom: 1px solid var(--line); }
.cat-row:hover .cat-arrow { transform: translateX(4px); }
.cat-num { font-family: 'Fraunces', serif; font-size: 20px; color: var(--ink-faint); }
.cat-name { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.cat-tag { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: 4px; }
.cat-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.cat-meta { display: flex; align-items: center; gap: 16px; }
.cat-arrow { font-size: 18px; color: var(--ink-faint); transition: transform 0.15s ease; }

@media (max-width: 760px) {
  .cat-row { grid-template-columns: 1fr; gap: 8px; }
  .cat-meta { justify-content: space-between; }
}

/* ── Status pills ─────────────────────────────────────────────────────── */

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 5px 11px; border-radius: 999px;
}
.status-pill.live { background: var(--live-soft); color: var(--live); }
.status-pill.play { background: var(--accent-soft); color: var(--accent); }
.status-dot { width: 6px; height: 6px; border-radius: 999px; animation: pulseDot 1.8s ease-in-out infinite; }
.status-dot.green { background: var(--live); }
.status-dot.ember { background: var(--accent); }

/* ── Product cards (products.html, swiftride.html) ───────────────────── */

.product-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
  margin: 0 0 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.product-card.reverse { direction: rtl; }
.product-card.reverse > * { direction: ltr; }

.pc-visual {
  min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #0d1e4a, #0047c2);
}
.pc-visual.dood { background: linear-gradient(155deg, #2a2115, #4a3620); }
.pc-visual .glyph {
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600;
}
.route-line { position: absolute; right: -6px; bottom: -6px; opacity: 0.4; pointer-events: none; }
.route-line path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease 0.3s; }
.revealed .route-line path { stroke-dashoffset: 0; }

.pc-body { padding: 34px 36px; background: var(--paper-raised); }
.pc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pc-body h2 { font-size: 24px; margin: 0; }
.pc-body .tagline { font-size: 13.5px; color: var(--ink-faint); font-weight: 600; }
p.lede { font-size: 14.5px; max-width: 640px; margin-bottom: 14px; color: var(--ink-soft); line-height: 1.65; }
p.lede:last-of-type { margin-bottom: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 22px; }
.feature { border-radius: 13px; padding: 16px; background: var(--paper); border: 1px solid var(--line); }
.feature-icon { width: 18px; height: 18px; margin-bottom: 9px; display: block; fill: none; stroke: currentColor; color: var(--accent); }
.feature h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 800; margin: 0 0 4px; }
.feature p { font-size: 12.5px; margin: 0; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 760px) {
  .product-card { grid-template-columns: 1fr; }
  .product-card.reverse { direction: ltr; }
  .pc-body { padding: 26px 22px; }
}

/* ── How-it-works steps (swiftride.html) ─────────────────────────────── */

.how-it-works { margin-top: 52px; }
.how-it-works h2 { font-size: 26px; margin: 0 0 24px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.step { padding: 20px; border-radius: 14px; background: var(--paper-raised); border: 1px solid var(--line); }
.step-num { font-family: 'Fraunces', serif; font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.step h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14.5px; font-weight: 800; margin: 0 0 6px; }
.step p { font-size: 13px; margin: 0; color: var(--ink-soft); line-height: 1.5; }

/* ── Contact page ─────────────────────────────────────────────────────── */

.contact-card {
  display: inline-block;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 44px;
  box-shadow: var(--shadow-card);
}
.contact-card .label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.contact-card .email { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--ink); transition: color 0.15s ease; }
.contact-card .email:hover { color: var(--accent); text-decoration: none; }

/* ── Legal / privacy page ─────────────────────────────────────────────── */

.legal-body { line-height: 1.7; }
.legal-body h1 { font-size: 38px; margin: 12px 0 8px; }
.legal-body .updated { color: var(--ink-faint); font-size: 13.5px; margin-bottom: 40px; }
.legal-body h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17.5px; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 12px; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 15px; }
.legal-body ul { padding-left: 22px; margin: 8px 0; }
.legal-body li { margin-bottom: 6px; }
.legal-body li strong { color: var(--ink); }
.legal-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin: 16px 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */

footer { padding: 40px 0; text-align: center; color: var(--ink-faint); font-size: 13px; border-top: 1px solid var(--line); }
footer nav { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
footer nav a { font-size: 13px; color: var(--ink-faint); font-weight: 600; }
footer nav a:hover { color: var(--ink); }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .wrap { padding: 0 22px; }
  nav { gap: 16px; }
  .pillars { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
