/* Higher Horology demo — dark theme, system fonts, responsive.
   All animation is compositor-safe (transform/opacity only). */

:root {
  --bg: #0a0c11;
  --bg-elev: #12151c;
  --surface: #161a22;
  --surface-hi: #1c212b;
  --line: #262c38;
  --text: #e9edf2;
  --muted: #9aa4b3;
  --accent: #d4a557;      /* warm gold, horology luxury */
  --accent-2: #b0863a;
  --radius: 12px;
  --container: 1120px;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 72px; /* keep footer clear of the sticky CTA bar */
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #1a1408;
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand-mark { color: var(--accent); margin-right: 0.35em; }
.demo-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1408;
  background: var(--accent);
  border-radius: 5px;
  padding: 0.2em 0.5em;
  margin-left: 0.5rem;
}
.site-nav { display: flex; gap: clamp(0.75rem, 2vw, 1.5rem); }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); }

/* ---------- HERO (pinned canvas scrub) ---------- */
#hero {
  height: 300vh; /* ~3-screen scroll window for the scrub travel */
  position: relative;
}
.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Instant LCP paint: poster is a real <img>, no opacity entrance. */
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 16:9 letterbox on any aspect */
  background: var(--bg);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* canvas fades in only after first frame is drawn (not the LCP element) */
}
.hero-caption {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  transform: translateX(-50%);
  text-align: center;
  color: var(--muted);
  font-size: clamp(0.8rem, 2vw, 1rem);
  max-width: min(540px, 82vw);
  z-index: 5;
}
.hero-caption-kbd {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.45em;
  margin-right: 0.35em;
  font-size: 0.85em;
}

/* ---------- Sections ---------- */
.section {
  padding-top: clamp(3rem, 7vh, 5.5rem);
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
}
.lede {
  max-width: 68ch;
  color: var(--text);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  margin: 0 0 1.25rem;
}
.section-sub {
  color: var(--muted);
  max-width: 64ch;
  margin: 0 0 2rem;
}

/* ---------- Proof cards ---------- */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.proof-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.proof-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.proof-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}
.proof-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- Review grid ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.review-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.review-tier {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(212, 165, 87, 0.12);
  border: 1px solid rgba(212, 165, 87, 0.28);
  padding: 0.3em 0.6em;
  border-radius: 999px;
}
.review-card h3 { font-size: 1.1rem; margin: 0; line-height: 1.25; }
.verdict { color: var(--muted); font-size: 0.95rem; margin: 0; flex: 1 1 auto; }
.rating { font-size: 0.9rem; color: var(--text); }
.rating strong { color: var(--accent); font-size: 1.1rem; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 780px; }
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.25rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1.1rem 0;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

/* ---------- Comparison table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.comparison-table th, .comparison-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.comparison-table thead th {
  background: var(--surface-hi);
  color: var(--text);
  font-weight: 600;
  position: sticky;
  top: 0;
}
.comparison-table tbody th { color: var(--accent); font-weight: 600; white-space: nowrap; }
.comparison-table td { color: var(--muted); }
.comparison-table tr:last-child th, .comparison-table tr:last-child td { border-bottom: none; }

/* ---------- Subscribe form ---------- */
.subscribe-form {
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.subscribe-form label { font-weight: 500; font-size: 0.95rem; }
.subscribe-form input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.subscribe-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.cta-button {
  align-self: flex-start;
  background: var(--accent);
  color: #1a1408;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.6rem;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.cta-button:hover { background: var(--accent-2); }
.cta-button:active { transform: translateY(1px); }
.form-note { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- Sticky CTA bar (compositor-safe slide-in) ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 2rem);
  background: rgba(18, 21, 28, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: auto;
}
.sticky-cta-btn {
  background: var(--accent);
  color: #1a1408;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
}
.sticky-cta-btn:hover { background: var(--accent-2); }
.sticky-cta-alt {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  background: var(--bg-elev);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.copyright { color: var(--muted); font-size: 0.9rem; margin: 0; }
.footer-attribution {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.footer-attribution a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.footer-attribution a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .proof-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .proof-grid, .review-grid { grid-template-columns: 1fr; }
  .header-inner { height: 56px; }
  .site-nav a { font-size: 0.85rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  /* Sticky CTA collapses to a single full-width button on mobile */
  .sticky-cta-text { display: none; }
  .sticky-cta-alt { display: none; }
  .sticky-cta-btn { width: 100%; text-align: center; }
}

/* ---------- Reduced motion: static poster, no scrub ---------- */
@media (prefers-reduced-motion: reduce) {
  #hero { height: 100vh; }          /* no scroll window needed */
  .hero-stage { position: static; }
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .sticky-cta { position: static; transform: none; }
}
