/* KD MMA — Signage Loop · Luxury Combat-Sports aesthetic */

:root {
  --bg: #0a0a0a;
  --bg-deep: #050505;
  --burgundy: #86161e;
  --burgundy-dim: #2a0c0e;
  --gold: #c9a961;
  --gold-dim: #8a7340;
  --cream: #f4ecdc;
  --cream-dim: #c9c1b3;
  --text-muted: #6c655a;

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-display);
  overflow: hidden;
  cursor: none;
}

.stage {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, #1a0a0c 0%, #0a0a0a 55%, #050505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- AMBIENT LAYERS ---------- */

/* film grain — animated SVG noise, very subtle */
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.08;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: grainShift 4s steps(8) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -1%); }
  60%  { transform: translate(-1%, 3%); }
  80%  { transform: translate(3%, -2%); }
  100% { transform: translate(0, 0); }
}

/* slow burgundy breath */
.pulse {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(134, 22, 30, 0.18) 0%,
    rgba(134, 22, 30, 0.05) 30%,
    transparent 60%);
  pointer-events: none;
  animation: breath 14s ease-in-out infinite;
}

@keyframes breath {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1.0;  transform: scale(1.08); }
}

/* edge vignette */
.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 35%,
    rgba(0,0,0,0.45) 80%,
    rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

/* ---------- CONTENT ---------- */

.display {
  position: relative;
  z-index: 10;
  max-width: 78%;
  text-align: center;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1);
}

.display.visible { opacity: 1; }

.kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 1.1vw, 22px);
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-bottom: 2.5em;
  text-transform: uppercase;
}

.text {
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--cream);
  margin-bottom: 1.4em;
}

/* Length-responsive sizing */
.display[data-length="short"]  .text { font-size: clamp(48px, 7.5vw, 156px); font-family: var(--font-display); }
.display[data-length="medium"] .text { font-size: clamp(40px, 5.6vw, 112px); font-family: var(--font-display); }
.display[data-length="long"]   .text { font-size: clamp(30px, 3.8vw, 78px);  font-family: var(--font-display); line-height: 1.2; }

/* Serif treatment for philosophy + heritage + bushido */
.display[data-type="philosophy"] .text,
.display[data-type="bushido"]    .text,
.display[data-type="heritage"]   .text {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.display[data-type="philosophy"][data-length="short"]  .text { font-size: clamp(54px, 8vw, 168px); }
.display[data-type="philosophy"][data-length="medium"] .text { font-size: clamp(44px, 6.2vw, 124px); }
.display[data-type="philosophy"][data-length="long"]   .text { font-size: clamp(32px, 4.2vw, 88px); }

/* Training science gets monospace-display feel */
.display[data-type="training"] .text {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.005em;
}

/* Burgundy first-word accent for Karen quotes */
.display[data-type="karen"] .text .word:first-child {
  color: var(--burgundy);
}

.attribution {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 32px);
  color: var(--gold);
  letter-spacing: 0.02em;
}

.attribution::before {
  content: "— ";
  color: var(--gold-dim);
}

.meta {
  margin-top: 0.6em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(12px, 0.95vw, 18px);
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Hide empty fields cleanly */
.kicker:empty,
.attribution:empty,
.meta:empty { display: none; }

/* Attribution-only rule (no preceding dash if no text) */
.attribution:empty::before { content: ""; }

/* ---------- WORD-BY-WORD REVEAL ---------- */

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: wordIn 0.9s cubic-bezier(.2,.7,.2,1) forwards;
  white-space: pre;
}

@keyframes wordIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- WATERMARK ---------- */

.watermark {
  position: absolute;
  bottom: 3.5vh;
  right: 4vw;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4em;
  opacity: 0.28;
}

.watermark .mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 1.5vw, 30px);
  letter-spacing: 0.12em;
  color: var(--cream);
}

.watermark .loc {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(8px, 0.7vw, 12px);
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ---------- RESPONSIVE FOR PORTRAIT TVs ---------- */

@media (orientation: portrait) {
  .display { max-width: 88%; }
  .display[data-length="short"]  .text { font-size: clamp(40px, 9vw, 140px); }
  .display[data-length="medium"] .text { font-size: clamp(32px, 7vw, 100px); }
  .display[data-length="long"]   .text { font-size: clamp(24px, 5vw, 72px); }
}
