/* ==========================================================================
   MAAJINS — cinematic title-screen homepage
   Franklin Gothic stack. The hero video is the experience; every other
   element is deliberately quiet so it recedes into the frame.
   ========================================================================== */

:root {
  --overlay-text: #f5f5f0;
  --overlay-muted: rgba(245, 245, 240, 0.62);
  --overlay-border: rgba(245, 245, 240, 0.22);
  --overlay-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);

  --font-display: "Franklin Gothic Medium", "Arial Narrow", Helvetica, Arial, sans-serif;
  --font-body: "Franklin Gothic Book", "Franklin Gothic Medium", Helvetica, Arial, sans-serif;

  --space-1: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --space-2: clamp(0.9rem, 0.7rem + 0.7vw, 1.4rem);
  --space-3: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #050505;
  color: var(--overlay-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--overlay-text);
  color: #050505;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--overlay-text);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------- */
/* Stage                                                                   */
/* ---------------------------------------------------------------------- */

.stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #050505;
}

.hero-video,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-fallback {
  display: none;
}

/* Reduced motion: freeze on the static portrait instead of the loop */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
  .hero-fallback {
    display: block;
  }
}

/* thin scrims so overlay text stays legible regardless of what the
   video is doing underneath it — practical, not decorative */
.hero-scrim {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.hero-scrim--top {
  top: 0;
  height: 24vh;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
}

.hero-scrim--bottom {
  bottom: 0;
  height: 16vh;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

/* ---------------------------------------------------------------------- */
/* Chrome — nav + platform row, low-opacity, brightens on interaction     */
/* ---------------------------------------------------------------------- */

.chrome-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: max(var(--space-2), env(safe-area-inset-top)) max(var(--space-2), env(safe-area-inset-right)) 0
    max(var(--space-2), env(safe-area-inset-left));
  opacity: 0;
  animation: chrome-in 700ms ease forwards;
  animation-delay: 200ms;
}

@keyframes chrome-in {
  to {
    opacity: 1;
  }
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand-mark {
  display: inline-flex;
  width: clamp(2.6rem, 2.2rem + 1.2vw, 3.6rem);
  height: clamp(2.6rem, 2.2rem + 1.2vw, 3.6rem);
  opacity: 0.9;
  filter: drop-shadow(var(--overlay-shadow));
  transition: opacity 200ms ease, transform 200ms ease;
}

.brand-mark:hover,
.brand-mark:focus-visible {
  opacity: 1;
  transform: scale(1.04);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-store {
  font-family: var(--font-display);
  font-size: clamp(0.83rem, 0.76rem + 0.24vw, 0.98rem);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--overlay-muted);
  text-shadow: var(--overlay-shadow);
  position: relative;
  padding-bottom: 2px;
  transition: color 200ms ease;
}

.brand-store::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--overlay-text);
  transition: right 220ms ease;
}

.brand-store:hover,
.brand-store:focus-visible {
  color: var(--overlay-text);
}

.brand-store:hover::after,
.brand-store:focus-visible::after {
  right: 0;
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 0.67rem + 0.18vw, 0.82rem);
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.platform-row__group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
}

.platform-row a {
  color: var(--overlay-muted);
  text-shadow: var(--overlay-shadow);
  transition: color 200ms ease;
}

.platform-row a:hover,
.platform-row a:focus-visible {
  color: var(--overlay-text);
}

.platform-row__divider {
  color: var(--overlay-border);
}

@media (max-width: 560px) {
  /* The links aren't removed on mobile — they're relocated. `position:
     fixed` lifts .platform-row out of .chrome-top's top-anchored flow
     (fixed positioning is always relative to the viewport, regardless of
     an ancestor's own position, as long as no ancestor sets a transform/
     filter — none of ours do) and re-anchors it near the bottom, above
     the mailing-list line, per the requested information architecture.
     Desktop is completely unaffected: this block only applies ≤560px,
     and .platform-row's desktop rules (flow position under .brand-row)
     are untouched above. */
  .platform-row {
    position: fixed;
    left: max(var(--space-2), env(safe-area-inset-left));
    right: max(var(--space-2), env(safe-area-inset-right));
    /* 3.4rem clears up to two wrapped lines of the mailing-list line at
       mobile font sizes, plus a gap, so the two never collide even on
       the smallest/tallest test widths. Deliberately a fixed, generous
       constant rather than a measured value — no JS needed to keep two
       independently-positioned elements from overlapping. */
    bottom: calc(3.4rem + max(var(--space-2), env(safe-area-inset-bottom)));
    margin-top: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    opacity: 0;
    animation: chrome-in 700ms ease forwards;
    animation-delay: 320ms;
  }

  .platform-row__group {
    width: 100%;
    justify-content: center;
  }

  /* The "/" divider separated two groups sitting on one line on desktop;
     on mobile each group is already its own centered line, so the mark
     has nothing left to separate. */
  .platform-row__divider {
    display: none;
  }

  /* The bottom scrim only reached 16vh, sized for the mailing-list line
     alone. It now needs to keep the relocated nav legible too. */
  .hero-scrim--bottom {
    height: 30vh;
  }

  /* A hero shot framed for a wide desktop crop tends to center too low
     once the same image is cover-cropped into a narrow portrait frame.
     Bias upward so the subject stays in frame — tune this against the
     actual footage if it's not quite right. */
  .hero-video,
  .hero-fallback {
    object-position: 50% 22%;
  }
}

/* ---------------------------------------------------------------------- */
/* Status line (bottom)                                                   */
/* ---------------------------------------------------------------------- */

.status-line {
  position: absolute;
  left: max(var(--space-2), env(safe-area-inset-left));
  right: max(var(--space-2), env(safe-area-inset-right));
  bottom: max(var(--space-2), env(safe-area-inset-bottom));
  z-index: 10;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(0.66rem, 0.6rem + 0.2vw, 0.78rem);
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: var(--overlay-muted);
  text-shadow: var(--overlay-shadow);
  opacity: 0;
  animation: chrome-in 700ms ease forwards;
  animation-delay: 420ms;
}

.status-copy {
  margin: 0;
  display: none;
}

.status-copy.is-visible {
  display: block;
}

.status-line a,
.status-cta,
.signup-submit {
  color: var(--overlay-text);
  border-bottom: 1px solid var(--overlay-border);
  transition: border-color 200ms ease;
}

.status-line a:hover,
.status-line a:focus-visible,
.status-cta:hover,
.status-cta:focus-visible,
.signup-submit:hover,
.signup-submit:focus-visible {
  border-color: var(--overlay-text);
}

/* Buttons don't inherit typography the way plain text does — form
   controls carry their own UA-stylesheet font, so this has to be
   explicit or "join the list" / "join" would render in the browser's
   default UI font instead of the site's Franklin Gothic stack. */
.status-cta,
.signup-submit {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

/* ---------------------------------------------------------------------- */
/* Mailing-list signup (replaces the old mailto: link)                    */
/* ---------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.signup-form {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  max-width: 22rem;
  margin: 0 auto;
  /* Reuses the same fade-in the rest of .chrome-top/.status-line already
     use on load — toggling .is-visible on re-triggers it, so revealing
     this view gets the same soft entrance for free. */
  opacity: 0;
  animation: chrome-in 300ms ease forwards;
}

.signup-form.is-visible {
  display: flex;
}

.signup-input {
  flex: 1 1 11rem;
  min-width: 0;
  max-width: 15rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--overlay-border);
  border-radius: 0;
  margin: 0;
  padding: 2px 0;
  color: var(--overlay-text);
  text-shadow: var(--overlay-shadow);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: center;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.signup-input::placeholder {
  color: var(--overlay-muted);
  opacity: 1;
}

.signup-input:focus-visible {
  border-bottom-color: var(--overlay-text);
}

.signup-confirm {
  margin: 0;
  color: var(--overlay-text);
  opacity: 0;
  animation: chrome-in 300ms ease forwards;
}

.signup-error {
  margin: 6px 0 0;
  color: var(--overlay-text);
  font-size: 0.92em;
}
