/* ======================================================================
   EDIT HERE — colours and font
   ====================================================================== */
:root {
  --bg: #0F0E17;            /* same as the video's edges */
  --text: #ECE8F4;
  --text-soft: rgba(236, 232, 244, 0.62);
  --blue: #2B3A9C;
  --purple: #8B3FA6;
  --pink: #F2527A;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }

.hero {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* The scene holds the animation. Its composition follows the animation
   (js/aidentity-intro.js): the head size is 0.42 × min(width, 0.8 × height)
   and everything is centred, so the logo and wordmark always fit.
   On low screens (a phone on its side) the scene leaves a strip at the
   bottom free for "Coming soon". */
.scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--reserve);
  container-type: size;
  --reserve: 0px;
  --hh: calc(0.42 * min(100vw, 80vh));
  --hh: calc(0.42 * min(100cqw, 80cqh));
}

@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .scene { --reserve: 3.25rem; }
  /* let the canvas fade out into the page instead of ending in a hard edge */
  .scene__canvas {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 3rem), transparent);
  }
}

.scene__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.intro-running .scene__canvas { opacity: 1; }
.intro-failed .scene__canvas { display: none; }

/* Still image, only without JavaScript or when the animation can't run.
   It is the final frame of the same animation (1920×1080), scaled so it
   lines up with the live composition; the soft mask hides its edges. */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--hh) * 5.2910);
  height: calc(var(--hh) * 2.9762);
  transform: translate(-50%, -50%);
  display: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect;
}

.no-js .stage,
.intro-failed .stage { display: block; }

.stage__poster {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

/* "Coming soon" sits below "Flip the script." (whose baseline is at
   0.98 × head size below the centre): ideally at 1.2 ×, pulled up to stay
   on screen, but never onto the tagline. */
.cta {
  position: absolute;
  left: 0;
  right: 0;
  top: max(
    calc(50% + var(--hh) * 1.06),
    min(calc(50% + var(--hh) * 1.2),
        calc(100% + var(--reserve) - 4.5rem - env(safe-area-inset-bottom)))
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 0 16px;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1.8s ease, transform 1.8s ease;
  pointer-events: none;
}

.is-revealed .cta {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Without JavaScript the still image is shown: reveal after a moment. */
.no-js .cta {
  animation: reveal 1.8s ease 0.6s both;
  pointer-events: auto;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.cta__line {
  margin: 0;
  font-size: clamp(0.8rem, 0.72rem + 0.3vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  margin-right: -0.32em;   /* keep the spaced text optically centred */
  color: var(--text-soft);
}

.cta__contact {
  position: relative;
  font-size: clamp(0.72rem, 0.68rem + 0.2vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.35rem 0.1rem;
  transition: color 0.4s ease;
}

.cta__contact::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
  opacity: 0.55;
  transform: scaleX(0.4);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.cta__contact:hover,
.cta__contact:focus-visible { color: var(--text); }

.cta__contact:hover::after,
.cta__contact:focus-visible::after { transform: scaleX(1); opacity: 0.9; }

.cta__contact:focus-visible {
  outline: 1px solid rgba(242, 82, 122, 0.6);
  outline-offset: 4px;
  border-radius: 2px;
}

.cta__contact[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .scene__canvas { transition: none; }
  .cta,
  .no-js .cta {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
    pointer-events: auto;
  }
}
