/* ============ Fonts ============ */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/cinzel-latin.woff2') format('woff2');
}

/* ============ Tokens ============ */
:root {
  --bg: #0b1626;
  --bg-deep: #05070d;
  --gold: #f0c040;
  --gold-soft: #d4a850;
  --bronze: #c4782c;
  --bronze-hover: #d4883c;
  --text: rgba(255, 255, 255, 0.88);
  --text-muted: rgba(255, 255, 255, 0.62);
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.09);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  color: #f5ecd8;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; position: relative; }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.35em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* ============ Reveal-on-scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(rgba(5, 7, 13, 0.75), rgba(5, 7, 13, 0));
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark { height: 36px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 200ms ease;
}
.site-nav a:hover { color: var(--gold); }

.nav-cta {
  border: 1px solid rgba(240, 192, 64, 0.5);
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--gold) !important;
}
.nav-cta:hover { background: rgba(240, 192, 64, 0.1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #f5ecd8;
  border-radius: 2px;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-deep);
  padding: 90px 0 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  animation: heroBgIn 1200ms cubic-bezier(0.22, 1, 0.36, 1) 300ms forwards;
}

@keyframes heroBgIn {
  to { opacity: 1; transform: none; }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,7,13,0.15) 0%, rgba(5,7,13,0.35) 55%, rgba(5,7,13,0.92) 100%);
}

/* The splash screen's own 1536x1024 composition, reused here so each layer's
   percentage position lines up exactly like it does on first launch. */
.hero-canvas {
  position: relative;
  width: min(100%, calc(76vh * 1536 / 1024));
  aspect-ratio: 1536 / 1024;
  margin: 0 auto;
  z-index: 1;
}

.layer {
  position: absolute;
  width: auto;
  height: auto;
  opacity: 0;
}

.layer-tower {
  left: 42.9362%;
  top: 13.4766%;
  width: 14.4531%;
  height: 32.5195%;
  mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  animation: heroTowerIn 900ms cubic-bezier(0.22, 1, 0.36, 1) 650ms forwards;
}

.layer-horse {
  left: 32.2917%;
  top: 17.1875%;
  width: 16.0156%;
  height: 28.8086%;
  animation: heroHorseIn 900ms cubic-bezier(0.22, 1, 0.36, 1) 900ms forwards;
}

.layer-squire {
  left: 50.0651%;
  top: 24.6094%;
  width: 14.6484%;
  height: 21.9727%;
  animation: heroSquireIn 900ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms forwards;
}

.layer-text {
  left: 26.7578%;
  top: 45.0195%;
  width: 47.0703%;
  height: 33.4961%;
  animation: heroTextIn 900ms cubic-bezier(0.22, 1, 0.36, 1) 100ms forwards;
}

@keyframes heroTowerIn {
  from { opacity: 0; transform: translateY(-8%); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroHorseIn {
  from { opacity: 0; transform: translateX(-10%); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroSquireIn {
  from { opacity: 0; transform: translateX(10%); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroTextIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: none; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  padding: 0 24px;
  margin-top: 8px;
}

.hero-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.1em;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.preeo-mark {
  height: 20px;
  width: auto;
  opacity: 0.85;
}

.hero-tagline {
  font-family: 'Cinzel', serif;
  color: var(--gold-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
}

.hero-sub {
  color: var(--text);
  font-size: 1.02rem;
  margin-bottom: 1.8em;
}

.hero-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1.4em;
  margin-bottom: 0;
}

.scroll-hint {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 36px;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  animation: scrollhint 1800ms ease-in-out infinite;
}
@keyframes scrollhint {
  0%   { opacity: 1; top: 6px; }
  70%  { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 6px; }
}

/* ============ Store buttons ============ */
.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: linear-gradient(180deg, var(--bronze-hover), var(--bronze));
  border-radius: 12px;
  text-decoration: none;
  color: #fff8ee;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(240, 192, 64, 0.35);
  filter: brightness(1.05);
}
.store-icon { display: flex; color: #fff8ee; }
.store-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-text small { font-size: 0.68rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.04em; }
.store-text strong { font-family: 'Cinzel', serif; font-size: 1.05rem; }

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.about-copy p { color: var(--text); }

.about-art {
  display: flex;
  justify-content: center;
}
.about-art img {
  max-width: 340px;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.5));
}

/* ============ Features ============ */
.features { background: linear-gradient(180deg, var(--bg) 0%, #0e1c30 100%); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 28px 22px;
}

.feature-icon { color: var(--gold); margin-bottom: 14px; }

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ============ Screenshots ============ */
.shot-group-title {
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.shot-grid-mobile {
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.shot-tile {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
}

.shot-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-tile-portrait {
  aspect-ratio: 9 / 19.5;
}

/* ============ Download ============ */
.download {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.download-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.download-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 13, 0.86);
}
.download-inner { position: relative; z-index: 1; }
.download-crest {
  width: 64px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
}
.download h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.download p { color: var(--text-muted); margin-bottom: 32px; }

/* ============ Creator ============ */
.creator { text-align: center; }
.creator-wrap { max-width: 640px; }
.creator p { color: var(--text); }

.creator-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.6em;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.creator-brand-mark {
  height: 16px;
  width: auto;
}
.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 22px;
  background: linear-gradient(180deg, var(--bronze-hover), var(--bronze));
  border-radius: 12px;
  text-decoration: none;
  color: #fff8ee;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.btn-linkedin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(240, 192, 64, 0.35);
  filter: brightness(1.05);
}

/* ============ Legal (privacy policy) ============ */
.legal { padding-top: 140px; }
.legal-wrap { max-width: 720px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 2em;
}
.legal h2 {
  font-size: 1.2rem;
  color: var(--gold-soft);
  margin-top: 1.6em;
}
.legal p, .legal li { color: var(--text); }
.legal ul { margin: 0 0 1em; padding-left: 1.3em; }
.legal li { margin-bottom: 0.4em; }

/* ============ Footer ============ */
.site-footer {
  background: var(--bg-deep);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-mark { height: 22px; opacity: 0.75; }
.footer-inner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-link:hover { color: var(--gold); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-art { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-deep);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; width: 100%; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .nav-toggle { display: flex; }

  .hero-canvas { width: min(100%, 92vw); }

  .feature-grid { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: 1fr; }
  .shot-grid-mobile { grid-template-columns: 1fr; max-width: 220px; }
  .section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .scroll-hint span, .hero-bg, .layer {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
