/* The Last Seal: home page (index.html). Logo and date, then the showcase film. */

:root {
  --ink: #070605;
  --paper: #f1e6d2;
  --paper-dim: #c4b8a3;   /* 10:1 on --ink */
  --paper-faint: #8f8574; /* 5.3:1 on --ink, small print only */
  --ember: #e0763a;       /* 6.7:1 on --ink */
  --ember-hot: #ffb070;
  --seal: #b8402e;
  --f-title: "Cinzel", "Trajan Pro", "Optima", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --gutter: clamp(16px, 4vw, 72px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--f-title); line-height: 1.5;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember-hot); outline-offset: 5px; }

/* ---------- Hero: logo and date on ink ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-content: center; justify-items: center; gap: clamp(1.4rem, 3.5vh, 2.6rem);
  padding: 72px var(--gutter) 120px;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 42% at 50% 47%, rgba(184, 64, 46, .10) 0%, rgba(224, 118, 58, .04) 45%, transparent 72%),
    radial-gradient(ellipse 120% 90% at 50% 45%, #15100c 0%, var(--ink) 62%);
}
.hero::after { /* soft vignette */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: inset 0 0 22vmax rgba(0, 0, 0, .75);
}
.logo { margin: 0; line-height: 1; }
.logo__img { width: min(900px, 86vw); height: auto; filter: drop-shadow(0 8px 40px rgba(0, 0, 0, .7)); }
.logo__text { font-weight: 500; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(2.6rem, 1.2rem + 6.5vw, 8rem); color: var(--paper); }
.logo.is-text .logo__img { display: none; }
.logo.is-text .logo__text { display: block; }

.date {
  margin: 0; display: flex; align-items: center; gap: 1em;
  font-weight: 600; font-size: clamp(.78rem, .68rem + .45vw, 1.15rem);
  letter-spacing: .52em; text-transform: uppercase; color: var(--ember);
  padding-left: .52em; /* balances the trailing letter-space so the line reads centred */
}
.date b { font-weight: 600; color: var(--ember-hot); }
.date::before, .date::after { content: ""; width: 2.4em; height: 1px; background: currentColor; opacity: .6; }

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; padding: 6px 12px;
  text-decoration: none; color: var(--paper-faint);
  font-size: .66rem; letter-spacing: .42em; text-transform: uppercase;
  transition: color .3s var(--ease);
}
.scroll-cue:hover { color: var(--paper-dim); }
.scroll-cue__label { padding-left: .42em; }
.scroll-cue__line { position: relative; width: 1px; height: 46px; overflow: hidden; background: linear-gradient(180deg, rgba(196, 184, 163, .5), transparent); }
.scroll-cue__line::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--ember-hot); animation: drip 2.8s var(--ease) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ---------- Showcase: the embedded film ---------- */
.showcase {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center; justify-items: center; gap: clamp(1.2rem, 3vh, 2rem);
  padding: clamp(64px, 10vh, 120px) var(--gutter);
  background: radial-gradient(ellipse 70% 50% at 50% 55%, #120d0a 0%, var(--ink) 70%);
}
.showcase__title {
  margin: 0; font-weight: 500; font-size: clamp(.8rem, .7rem + .4vw, 1.05rem);
  letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; color: var(--paper-dim);
}
.player {
  position: relative; width: 100%; max-width: 1200px; aspect-ratio: 16 / 9;
  background: #000; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(241, 230, 210, .1), 0 40px 120px rgba(0, 0, 0, .7);
}
.player__facade, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__facade { display: block; cursor: pointer; }
.player__thumb { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82) saturate(.95); transition: filter .5s var(--ease), transform 1.2s var(--ease); }
.player__facade::after { /* gentle darkening toward the edges */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 55%, rgba(7, 6, 5, .5) 100%);
}
.player__play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: clamp(64px, 9vw, 96px); aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(184, 64, 46, .92); color: #fff8ee;
  box-shadow: 0 0 0 1px rgba(241, 230, 210, .35), 0 10px 40px rgba(0, 0, 0, .55);
  transition: transform .4s var(--ease), background-color .4s var(--ease);
}
.player__play svg { width: 42%; height: 42%; margin-left: 6%; }
.player__facade:hover .player__thumb, .player__facade:focus-visible .player__thumb { filter: none; transform: scale(1.02); }
.player__facade:hover .player__play, .player__facade:focus-visible .player__play { transform: translate(-50%, -50%) scale(1.08); background: #cc4a35; }
.player__facade:focus-visible { outline-offset: -4px; }

/* ---------- Footer ---------- */
.foot { padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom)); text-align: center; font-family: Georgia, serif; font-size: .8rem; color: var(--paper-faint); }
.foot p { margin: 0; }

/* ---------- Entrance (only with JS and motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .logo { animation: rise 2s var(--ease) both; }
  .js .hero .date { animation: rise 1.8s var(--ease) .5s both; }
  .js .hero .scroll-cue { animation: fade 1.6s var(--ease) 1.2s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .scroll-cue__line::after { display: none; }
}
