/* The ExecDrive · coming soon. Tokens from design/tokens/tokens.css (dark theme, the brand's only mood here). */
@font-face { font-family: "Cinzel"; src: url("/assets/fonts/Cinzel_400Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/CormorantGaramond_400Regular_Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter_400Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter_500Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --onyx: #0b0b0c;
  --carbon: #141416;
  --graphite: #2a2a2e;
  --steel: #8c8f94;
  --platinum: #c9cbcf;
  --mist: #e8e8ea;
  --champagne: #c2a878;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --x: 50%;
  --y: 42%;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--onyx); color: var(--mist); }
body {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Backdrop: the film loop under a heavy veil, a light that follows the pointer, grain. */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: saturate(0.55) contrast(1.05); transition: opacity 2.4s ease; }
.loop.ready { opacity: 0.34; }
.light {
  position: absolute; inset: -10%;
  background:
    radial-gradient(38rem 30rem at var(--x) var(--y), rgba(201, 203, 207, 0.10), transparent 70%),
    radial-gradient(120% 90% at 50% 45%, transparent 35%, rgba(11, 11, 12, 0.82) 78%, var(--onyx) 100%);
}
.grain {
  position: absolute; inset: -50%;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* Stage */
.stage {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  padding: max(56px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left));
  text-align: center;
}
.emblem { width: clamp(132px, 22vmin, 196px); aspect-ratio: 1; margin-bottom: 10px; }
.emblem svg { width: 100%; height: 100%; overflow: visible; }
.emblem .ring { transform-origin: 200px 200px; animation: turn 140s linear infinite; }
.emblem circle { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards; }
.emblem circle:nth-of-type(2) { animation-delay: 0.5s; }
.emblem circle:nth-of-type(3) { animation-delay: 0.8s; }
.emblem .mono, .emblem .ring { opacity: 0; animation-name: fade, turn; animation-duration: 2s, 140s; animation-delay: 1.3s, 0s; animation-timing-function: ease, linear; animation-iteration-count: 1, infinite; animation-fill-mode: forwards, none; }
.emblem .mono { animation: fade 2s ease 1.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes turn { to { transform: rotate(360deg); } }

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  /* A slow light passes over the name. */
  background: linear-gradient(100deg, var(--platinum) 0%, var(--platinum) 42%, #ffffff 50%, var(--platinum) 58%, var(--platinum) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise 1.6s ease 1.6s both, sheen 9s ease-in-out 3.4s infinite;
}
.wordmark .the { font-size: clamp(12px, 1.9vmin, 15px); letter-spacing: 0.62em; margin-right: -0.62em; }
.wordmark .name { font-size: clamp(34px, 7.4vmin, 64px); letter-spacing: 0.14em; margin-right: -0.14em; }
@keyframes sheen { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.whisper {
  margin: 8px 0 0;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(22px, 3.4vmin, 30px); line-height: 1.25;
  color: var(--platinum);
  animation: rise 1.6s ease 2.3s both;
}
.label {
  margin: 0;
  font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--steel);
  animation: rise 1.4s ease 2.9s both;
}
.label .dot { color: var(--champagne); padding: 0 0.4em; }

.play {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 6px 26px 6px 6px;
  border: 1px solid rgba(201, 203, 207, 0.35); border-radius: 999px;
  background: rgba(20, 20, 22, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--mist); font: 500 12px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
  animation: rise 1.4s ease 3.4s both;
}
.play .ring { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--platinum); padding-left: 2px; }
.play:hover { border-color: var(--platinum); background: rgba(42, 42, 46, 0.6); }
.play:active { transform: scale(0.98); }
.play:focus-visible, .close:focus-visible { outline: 2px solid var(--champagne); outline-offset: 4px; }

.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 18px max(24px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel);
  animation: rise 1.4s ease 3.6s both;
}

/* Film */
.film { width: min(1280px, 100vw); max-width: 100vw; max-height: 100svh; padding: 0; border: 0; background: #000; color: var(--mist); overflow: visible; }
.film::backdrop { background: rgba(5, 5, 6, 0.92); backdrop-filter: blur(6px); }
.film video { display: block; width: 100%; max-height: 100svh; aspect-ratio: 16 / 9; background: #000; }
.close {
  position: absolute; top: max(-56px, calc(-1 * env(safe-area-inset-top) - 52px)); right: 8px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(201, 203, 207, 0.35); border-radius: 50%; background: rgba(20, 20, 22, 0.7); color: var(--mist); cursor: pointer;
}
@media (max-width: 760px), (max-height: 520px) { .close { top: 8px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition: none !important; }
  .loop { display: none; }
}

.back { color: var(--platinum); text-decoration: none; border-bottom: 1px solid rgba(201, 203, 207, 0.4); padding-bottom: 4px; }
.back:hover { border-color: var(--platinum); }

@media (max-width: 600px) {
  .foot { justify-content: center; text-align: center; }
}

/* Portrait film on upright phones: the dialog fills the screen. */
@media (orientation: portrait) and (max-width: 820px) {
  .film { width: 100vw; height: 100svh; max-height: 100svh; }
  .film video { width: 100%; height: 100svh; aspect-ratio: auto; object-fit: contain; }
  .close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
}
