/* ECP360 Travel, the portal: dark, cinematic, quiet luxury */

:root {
  --ink: #050608;
  --ink-2: #0a0c10;
  --ink-3: #10131a;
  --gold: #d7bc84;
  --gold-soft: rgba(215, 188, 132, 0.55);
  --gold-faint: rgba(215, 188, 132, 0.16);
  --ivory: #f2ebdc;
  --ivory-soft: rgba(242, 235, 220, 0.62);
  --ivory-faint: rgba(242, 235, 220, 0.28);
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --slow: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* film grain over everything */
.grain {
  position: fixed; inset: -50%;
  z-index: 50; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  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='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  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); }
}

/* ---------- the gate ---------- */

.gate {
  position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 110%, #1a1610 0%, var(--ink) 58%);
}
.gate-light {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 30% at 30% 40%, rgba(215, 188, 132, 0.10), transparent 70%),
    radial-gradient(35% 28% at 72% 62%, rgba(120, 150, 190, 0.07), transparent 70%);
  filter: blur(30px);
  animation: drift 26s var(--slow) infinite alternate;
}
@keyframes drift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.08); } }

.gate-inner { position: relative; width: min(440px, 86vw); text-align: center; animation: rise 1.6s var(--slow) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.mark { font-size: 12px; letter-spacing: 0.62em; padding-left: 0.62em; color: var(--gold); text-transform: uppercase; }
.wordmark {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(72px, 9vw, 128px); line-height: 0.95; letter-spacing: -0.01em; margin: 14px 0 18px;
}
.tagline { font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ivory-soft); }

.gate-form { margin-top: 64px; display: grid; gap: 14px; justify-items: center; }
.gate-label { font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--ivory-faint); }
.gate-input {
  width: 100%; height: 52px; text-align: center; font: 400 18px/1 var(--sans); letter-spacing: 0.32em; color: var(--ivory);
  background: transparent; border: 0; border-bottom: 1px solid var(--gold-faint); outline: none;
  transition: border-color 0.6s var(--slow);
}
.gate-input:focus { border-color: var(--gold-soft); }
.gate-button {
  margin-top: 18px; height: 52px; padding: 0 46px; border-radius: 999px;
  border: 1px solid var(--gold-soft); color: var(--ivory);
  font-size: 12px; letter-spacing: 0.42em; padding-left: calc(46px + 0.42em); text-transform: uppercase;
  background: linear-gradient(180deg, rgba(215, 188, 132, 0.10), rgba(215, 188, 132, 0.02));
  transition: box-shadow 0.6s var(--slow), border-color 0.6s var(--slow), transform 0.6s var(--slow);
}
.gate-button:hover { border-color: var(--gold); box-shadow: 0 0 40px rgba(215, 188, 132, 0.18); transform: translateY(-1px); }
.gate-button:disabled { opacity: 0.5; cursor: default; }
.gate-note { min-height: 20px; font-size: 13px; color: var(--gold); letter-spacing: 0.04em; }

/* ---------- the portal ---------- */

.portal { display: grid; grid-template-columns: 30% 70%; height: 100vh; animation: open 1.4s var(--slow) both; }
@keyframes open { from { opacity: 0; } to { opacity: 1; } }

/* the voice panel, 30% */
.voice-panel {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  padding: 44px 40px 40px;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  border-right: 1px solid rgba(215, 188, 132, 0.10);
}
.voice-brand { display: flex; align-items: baseline; gap: 12px; }
.voice-mark { font-size: 11px; letter-spacing: 0.52em; color: var(--gold); }
.voice-name { font-family: var(--serif); font-style: italic; font-size: 26px; }

.presence { margin-top: 44px; }
.presence canvas { display: block; width: 100%; height: 96px; }
.presence-name { margin-top: 10px; font-family: var(--serif); font-size: 30px; letter-spacing: 0.01em; }
.presence-status {
  margin-top: 6px; font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ivory-faint);
  transition: color 0.8s var(--slow);
}
.is-live .presence-status { color: var(--gold-soft); }

.transcript {
  list-style: none; flex: 1; min-height: 0; margin: 34px 0 28px; padding-top: 30px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 34%);
}
.line {
  font-size: 15px; line-height: 1.55; color: var(--ivory-faint);
  transition: color 0.9s var(--slow), font-size 0.9s var(--slow), opacity 0.9s var(--slow);
  animation: line-in 0.9s var(--slow) both;
}
@keyframes line-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.line.her { font-family: var(--serif); }
.line.caller { text-align: right; color: rgba(215, 188, 132, 0.34); }
.line.is-now.her { color: var(--ivory); font-size: 22px; line-height: 1.42; }
.line.is-now.caller { color: var(--gold); font-size: 17px; }

.live {
  position: relative; height: 66px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, rgba(215, 188, 132, 0.12), rgba(215, 188, 132, 0.02));
  font-size: 12px; letter-spacing: 0.46em; text-transform: uppercase;
  transition: border-color 0.6s var(--slow), box-shadow 0.6s var(--slow), background 0.6s var(--slow);
}
.live:hover { border-color: var(--gold); box-shadow: 0 0 46px rgba(215, 188, 132, 0.16); }
.live:disabled { opacity: 0.55; cursor: default; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.is-live .live { border-color: rgba(242, 235, 220, 0.5); background: linear-gradient(180deg, rgba(242, 235, 220, 0.08), rgba(242, 235, 220, 0.01)); }
.is-live .live-dot { background: #f0d9a6; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.7); } }

/* the workspace, 70% */
.stage-panel { position: relative; min-width: 0; background: #000; }
.stage { position: absolute; inset: 0; overflow: hidden; }
.layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--slow); }
.layer.is-on { opacity: 1; }
.layer video, .layer img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.layer img { animation: drift-in 22s linear both; }
@keyframes drift-in { from { transform: scale(1.04) translate3d(-0.8%, 0.6%, 0); } to { transform: scale(1.16) translate3d(0.8%, -0.6%, 0); } }
.layer iframe {
  position: absolute; inset: 7% 9% 15%; width: 82%; height: 78%; border: 0; background: var(--ink-2);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(215, 188, 132, 0.18);
}
.layer.paper { background: radial-gradient(90% 80% at 50% 40%, #15120d 0%, #050608 70%); }

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 95% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 22%, transparent 58%, rgba(0, 0, 0, 0.78) 100%);
}

.stage.is-quiet .layer.is-on { opacity: 0.16; filter: blur(3px) saturate(0.6); transition: opacity 2.2s var(--slow), filter 2.2s var(--slow); }

.caption {
  position: absolute; left: 64px; bottom: 132px; max-width: 70%;
  display: grid; gap: 12px; opacity: 0; transform: translateY(14px);
  transition: opacity 1.2s var(--slow), transform 1.2s var(--slow);
}
.caption.is-on { opacity: 1; transform: none; }
.caption-kicker { font-size: 11px; letter-spacing: 0.5em; text-transform: uppercase; color: var(--gold); }
.caption-title { font-family: var(--serif); font-size: clamp(40px, 4.6vw, 76px); line-height: 1.02; font-weight: 400; text-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); }

.sound {
  position: absolute; right: 40px; top: 36px; height: 40px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--gold-soft); font-size: 11px; letter-spacing: 0.38em; text-transform: uppercase;
  background: rgba(5, 6, 8, 0.42); backdrop-filter: blur(8px);
}

.strip {
  position: absolute; left: 64px; right: 40px; bottom: 36px; list-style: none;
  display: flex; gap: 12px; justify-content: flex-start; overflow: hidden;
}
.strip li { animation: line-in 0.9s var(--slow) both; }
.strip button {
  display: block; width: 132px; aspect-ratio: 16 / 9; border-radius: 2px; overflow: hidden; position: relative;
  box-shadow: 0 0 0 1px rgba(215, 188, 132, 0.22); opacity: 0.62;
  transition: opacity 0.6s var(--slow), box-shadow 0.6s var(--slow), transform 0.6s var(--slow);
}
.strip button:hover, .strip button.is-on { opacity: 1; box-shadow: 0 0 0 1px var(--gold); transform: translateY(-2px); }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip span {
  position: absolute; left: 8px; right: 8px; bottom: 6px; font-size: 10px; letter-spacing: 0.08em;
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 8px #000;
}

/* the portal is made for the desktop, a narrow window stacks the two panels */
@media (max-width: 900px) {
  html, body { overflow: auto; }
  .portal { grid-template-columns: 1fr; grid-template-rows: 52vh auto; height: auto; }
  .stage-panel { grid-row: 1; height: 52vh; }
  .voice-panel { grid-row: 2; min-height: 70vh; border-right: 0; padding: 32px 24px; }
  .caption { left: 24px; bottom: 96px; }
  .strip { left: 24px; right: 16px; bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .gate-light, .layer img { animation: none; }
}
