:root {
  --bg: #1e1915;
  --bg-deep: #0a0807;
  --panel: #2a231d;
  --line: #3d3329;
  --text: #e9e2d8;
  --muted: #a99c8c;
  --gold: #d9a552;
  --gold-light: #e4b465;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%) fixed;
  color: var(--text);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--gold-light); }
h1, h2, h3, .brand span { font-family: Georgia, "Times New Roman", serif; font-weight: bold; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; margin: 0 0 .5em; color: var(--gold-light); }
h2 { font-size: 1.9rem; color: var(--gold); margin: 0 0 1em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; color: var(--gold-light); }
img { max-width: 100%; height: auto; display: block; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem max(16px, 4vw);
  background: rgba(10, 8, 7, .92);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--gold); font-size: 1.3rem; }
.brand em { font-style: normal; color: var(--gold-light); }
nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--gold-light); }

main > section { padding: 4.5rem max(16px, 6vw); max-width: 1300px; margin: 0 auto; }

.hero { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start; }
.hero h1 { margin-top: 0; }
.lead { font-size: 1.1rem; color: var(--text); }
.small { color: var(--muted); font-size: .9rem; }
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: max-content; max-width: 100%; gap: .8rem; margin: 1.6rem 0 .8rem; }
.actions .btn { text-align: center; white-space: nowrap; }
@media (max-width: 420px) { .actions { grid-auto-flow: row; width: auto; } }
.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 6px;
  border: 1px solid var(--gold); color: var(--gold-light); text-decoration: none; font-weight: 600;
}
.btn.primary { background: var(--gold); color: var(--bg-deep); }
.btn:hover { background: var(--gold-light); color: var(--bg-deep); }

figure { margin: 0; }
figure img { border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
figcaption { color: var(--muted); font-size: .85rem; margin-top: .6rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.grid article, .editions article {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1.4rem;
}
.grid p { margin: 0; color: #d6cdc1; font-size: .97rem; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 2rem; }
.shots img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; width: 100%; }

.editions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; max-width: 760px; }
.badge { display: inline-block; margin: .4rem 0 0; padding: .2rem .7rem; border-radius: 99px; border: 1px solid var(--gold); color: var(--gold-light); font-size: .85rem; }

.contact p { font-size: 1.1rem; }

footer { border-top: 1px solid var(--line); padding: 2rem max(16px, 6vw); color: var(--muted); font-size: .85rem; text-align: center; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 1.2rem; }
  /* Phone order: headline, slideshow, then the intro text and buttons */
  .hero-text { display: contents; }
  .hero h1 { order: 1; margin-bottom: 0; }
  .slideshow { order: 2; margin-bottom: 2.6rem; }
  .hero .lead, .hero .actions, .hero .small { order: 3; }
  .hero .lead { margin: 0; }
  .hero .actions { margin: .4rem 0 0; }
}
@media (max-width: 900px) {
  .shots { grid-template-columns: 1fr; }
  nav { display: none; }
  main > section { padding: 3rem 16px; }
}

.credit { color: var(--muted); font-size: .9rem; margin-top: 2rem; }

/* Feature cards: equal height, open card spans the row and slides its detail out */
.grid article { display: flex; flex-direction: column; transition: border-color .25s, transform .25s, box-shadow .25s; }
.grid article:hover { border-color: #5a4630; transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.grid article.open { border-color: var(--gold); }
.grid article .more { display: none; }
.drawer { grid-column: 1 / -1; overflow: hidden; height: 0; transition: height .45s cubic-bezier(.2,.7,.2,1); background: var(--panel); border: 1px solid var(--gold); border-radius: 8px; }
.drawer .more-inner { padding: 1.4rem; }
.drawer.open .more-inner { opacity: 1; transform: none; }
.more-btn {
  margin-top: auto; align-self: flex-start; padding: .9rem 0 0; background: none; border: 0; cursor: pointer;
  color: var(--gold); font-family: inherit; font-size: .9rem; font-weight: 600;
}
.more-btn::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.15em) rotate(45deg); transition: transform .3s; }
.open .more-btn::after { transform: translateY(.05em) rotate(-135deg); }
.more-btn:hover { color: var(--gold-light); }
.more-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.6rem; align-items: center; padding-top: 1rem; opacity: 0; transform: translateY(-10px); transition: opacity .4s .1s, transform .4s .1s; }
.more-inner p { color: #d6cdc1 !important; }
.crop { aspect-ratio: 16 / 9; border-radius: 6px; border: 1px solid var(--line); background-repeat: no-repeat; box-shadow: 0 8px 28px rgba(0,0,0,.45); }

/* Hero glow and entrance */
.hero { position: relative; }
.hero::before { content: ""; position: absolute; inset: -10% -20% auto auto; width: 70%; height: 120%; background: radial-gradient(closest-side, rgba(217,165,82,.16), transparent); pointer-events: none; z-index: -1; }
.btn { transition: background .2s, color .2s, transform .2s; }
.btn:hover { transform: translateY(-2px); }
.top { transition: padding .3s, background .3s; }
.top.scrolled { padding-top: .4rem; padding-bottom: .4rem; }
h2 { position: relative; padding-bottom: .4rem; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 2px; background: var(--gold); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.reveal.seen { opacity: 1; transform: none; }

/* Gallery */
.shots a { display: block; overflow: hidden; border-radius: 8px; }
.shots img { transition: transform .5s; cursor: zoom-in; }
.shots a:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5,4,3,.92); display: grid; place-items: center; padding: 2rem; cursor: zoom-out; animation: fade .25s; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; width: auto; border-radius: 6px; }
@keyframes fade { from { opacity: 0; } }

/* Rights */
.rights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem 2.4rem; }
.rights-grid p { margin: 0; color: #d6cdc1; font-size: .97rem; border-left: 2px solid var(--line); padding-left: 1rem; }
.rights-grid strong { display: block; color: var(--gold-light); margin-bottom: .2rem; }

@media (max-width: 900px) {
  .more-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Footer links and legal pages */
.legal-links { margin-top: .6rem; }
footer a { color: var(--gold); }
.legal { max-width: 820px; margin: 0 auto; padding: 3rem 16px 4rem; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.4rem; margin: 2.4rem 0 .8rem; }
.legal h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.legal p, .legal li, .legal dd { color: #d6cdc1; }
.legal li { margin-bottom: .4rem; }
.legal dt { color: var(--gold-light); font-weight: 600; margin-top: .8rem; }
.legal dd { margin: .2rem 0 0 1.2rem; }
.legal section { scroll-margin-top: 80px; }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.4rem; margin: 1.6rem 0; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc a { text-decoration: none; }
nav a[aria-current] { color: var(--gold-light); }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.legal-page nav { display: flex !important; }
main.legal > section { padding: 0; max-width: none; }
.legal li ul { margin-top: .4rem; }

/* Hero slideshow: slides cross-fade; the frame keeps the first slide's 16:9 shape */
.slideshow { position: relative; aspect-ratio: 16 / 9; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease-in-out; pointer-events: none; }
.slide-frame { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: contain; background: #0a0807; border: 0; border-radius: 0; box-shadow: none; }
.slide figcaption { position: absolute; left: 0; right: 0; top: 100%; }
.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold);
  background: rgba(10,8,7,.7); color: var(--gold-light); font-size: 1.6rem; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .3s, background .2s;
}
.slideshow:hover .slide-nav, .slide-nav:focus-visible { opacity: 1; }
.slide-nav:hover { background: var(--gold); color: var(--bg-deep); }
.prev { left: 12px; } .next { right: 12px; }
.dots { position: absolute; right: 0; top: calc(100% + .55rem); display: flex; gap: .5rem; align-items: center; }
.dots .pause { width: 22px; height: 22px; margin-left: .3rem; border-radius: 50%; border: 1px solid var(--gold); background: transparent; color: var(--gold-light); font-size: .6rem; line-height: 1; display: grid; place-items: center; }
.dots .pause:hover { background: var(--gold); color: var(--bg-deep); }
.dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--gold); background: transparent; cursor: pointer; }
.dots button.on { background: var(--gold); }
.slide figcaption { padding-right: 8rem; }
@media (hover: none) { .slide-nav { opacity: 1; } }
.wip { margin: 2.4rem 0 0; padding: .8rem 1.1rem; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 6px 6px 0; color: #d6cdc1; font-size: .95rem; }
.wip strong { color: var(--gold-light); }
.wip + .credit { margin-top: 1rem; }
/* Tighter gap between the hero and the first section */
main > section.hero { padding-bottom: 2.5rem; }
main > section.features { padding-top: 2.5rem; }
@media (min-width: 1101px) {
  main > section.hero { max-width: 1500px; grid-template-columns: 1fr 1.7fr; }
  .hero-text { grid-row: 1 / span 2; }
}

/* Logo on the page itself */
.demo-row { display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: center; }
.emblem { width: 100%; border: 0; box-shadow: none; -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); }
.footer-logo { width: 56px; height: 56px; margin: 0 auto 1rem; opacity: .9; }
@media (max-width: 700px) { .demo-row { grid-template-columns: 1fr; } .emblem { width: 200px; margin: 0 auto; } }
/* Headline a touch smaller on mid-size screens so the text column isn't much taller than the slideshow */
h1 { font-size: clamp(2rem, 3.6vw, 3.2rem); }

/* Tester call-out: a slim strip the width of the slideshow, under its caption */
.tester { grid-column: 2; align-self: start; display: flex; align-items: baseline; gap: 1rem; margin-top: .4rem; text-decoration: none; padding: .7rem 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: rgba(217,165,82,.06); transition: background .2s, border-color .2s; }
.tester:hover { background: rgba(217,165,82,.14); border-color: var(--gold); }
.tester strong { flex: none; color: var(--gold-light); font-family: Georgia, serif; font-size: 1.05rem; }
.tester strong::after { content: " →"; }
.tester span { color: #d6cdc1; font-size: .9rem; }

/* Stacked hero (phones and half-width windows): tester box after the buttons */
@media (max-width: 1100px) {
  main > section.hero { max-width: 760px; }
  .tester { order: 4; grid-column: auto; display: block; margin-top: .4rem; }
  .tester strong { display: block; }
}

/* Lightbox title */
.lightbox figure { display: grid; justify-items: center; gap: .8rem; }
.lightbox figcaption { color: var(--gold-light); font-family: Georgia, serif; font-size: 1.2rem; }
.lightbox img { max-height: 86vh; max-width: 94vw; width: auto; height: auto; }
.lightbox figure { margin: 0; }

/* Tester places open or full (set in site.js) */
.testers-open .when-full, .testers-full .when-open { display: none !important; }

/* Tester page */
.apply-box { background: var(--panel); border: 1px solid var(--gold); border-radius: 8px; padding: 1.4rem; margin-top: 1rem; }
.apply-box label { display: flex; gap: .7rem; align-items: flex-start; color: var(--text); cursor: pointer; margin-bottom: 1.2rem; }
.apply-box input { margin-top: .35rem; width: 18px; height: 18px; accent-color: var(--gold); }
.btn.disabled { opacity: .45; cursor: not-allowed; transform: none; }
.full-notice { border-left: 3px solid var(--gold); background: var(--panel); padding: 1rem 1.2rem; border-radius: 0 6px 6px 0; }

/* About */
.about-text { max-width: 760px; }
.about-text p { color: #d6cdc1; font-size: 1.05rem; }
.signoff { font-family: Georgia, serif; font-style: italic; color: var(--gold-light) !important; font-size: 1.3rem !important; margin-top: 1.4rem; }
.badge.muted { border-color: var(--line); color: var(--muted); }

/* Embedded tester form */
.form-frame { background: #f4efe8; border: 1px solid var(--gold); border-radius: 8px; overflow: hidden; margin: 1rem 0; }
.form-frame iframe { display: block; width: 100%; height: 1900px; border: 0; }
@media (max-width: 600px) { .form-frame iframe { height: 2300px; } }
