/* ==========================================================================
   GIGGLU — Coming Soon
   Token system derived from the Gigglu logo:
   ruby red top-scoop, dark maroon-brown lettering, warm gold foil,
   blush-pink mid-scoop, vanilla cream, near-black ink for the video scrim.
   ========================================================================== */

:root {
  /* Color tokens */
  --ink:        #170804;   /* near-black ink, video scrim base */
  --maroon-950: #260b04;   /* deepest maroon, footer/bg */
  --maroon-800: #4a1606;   /* deep maroon-brown, letter fill */
  --maroon-600: #6b1f0e;   /* secondary maroon, card surfaces */
  --ruby-600:   #b9303b;   /* scoop dark-red accent */
  --pink-400:   #f4889a;   /* scoop pink accent */
  --gold-200:   #f6e2a6;   /* pale foil highlight */
  --gold-400:   #d9a53d;   /* core gold */
  --gold-600:   #a8691e;   /* deep bronze gold */
  --cream-50:   #fff8ec;   /* vanilla cream, text on dark */

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-script:  "Yellowtail", cursive;
  --font-body:    "Outfit", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --frame-inset: clamp(10px, 2.4vw, 28px);
  --content-max: 640px;
}

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

html {
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--cream-50);
  overflow-x: hidden;
}

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

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

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Stage / video background
   ========================================================================== */

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  height: 100dvh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  isolation: isolate;
  overflow: hidden;
}
.video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 38%, var(--ruby-600) 0%, var(--maroon-800) 38%, var(--ink) 78%);
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Scrim: darkens & tints the footage so foil type stays legible everywhere,
   heavier at the edges and base to root the content. */
.scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 60% at 50% 40%, rgba(23, 8, 4, 0.15) 0%, rgba(23, 8, 4, 0.55) 62%, rgba(23, 8, 4, 0.88) 100%),
    linear-gradient(to bottom, rgba(23, 8, 4, 0.55) 0%, rgba(23, 8, 4, 0.2) 22%, rgba(23, 8, 4, 0.35) 70%, rgba(23, 8, 4, 0.82) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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");
  background-size: 140px 140px;
}

/* ==========================================================================
   Sparkles (echoes the logo's gold sparkle accents)
   ========================================================================== */

.sparkles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.spark {
  position: absolute;
  color: var(--gold-200);
  font-size: 1.1rem;
  opacity: 0;
  text-shadow: 0 0 12px rgba(217, 165, 61, 0.8);
  animation: twinkle 4.5s ease-in-out infinite;
}

.spark--1 { top: 14%; left: 12%; font-size: 1.4rem; animation-delay: 0s; }
.spark--2 { top: 22%; right: 14%; font-size: 1rem;  animation-delay: 1.1s; }
.spark--3 { top: 68%; left: 9%;  font-size: 0.85rem; animation-delay: 2s; }
.spark--4 { top: 76%; right: 11%; font-size: 1.2rem; animation-delay: 0.6s; }
.spark--5 { top: 46%; left: 5%;  font-size: 0.7rem;  animation-delay: 3s; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  50%      { opacity: 0.9; transform: scale(1.05) rotate(20deg); }
}

/* ==========================================================================
   Gilded portal frame — the signature element.
   A thin double gold line inset from the viewport edge with four
   corner finials (echoing the diamond dividers in the logo's tagline),
   turning the whole screen into a window onto the fantasy world.
   ========================================================================== */

.frame {
  position: fixed;
  inset: var(--frame-inset);
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(246, 226, 166, 0.5);
}

/* true second line, set in from the outer one — the "gilded" double rule */
.frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(217, 165, 61, 0.3);
}

/* diamond finials straddling each corner, echoing the logo's tagline divider */
.frame__corner {
  position: absolute;
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, var(--gold-200), var(--gold-400));
  box-shadow: 0 0 9px rgba(217, 165, 61, 0.7);
}

.frame__corner--tl { top: 0; left: 0; transform: translate(-50%, -50%) rotate(45deg); }
.frame__corner--tr { top: 0; right: 0; transform: translate(50%, -50%) rotate(45deg); }
.frame__corner--bl { bottom: 0; left: 0; transform: translate(-50%, 50%) rotate(45deg); }
.frame__corner--br { bottom: 0; right: 0; transform: translate(50%, 50%) rotate(45deg); }

/* ==========================================================================
   Sound toggle
   ========================================================================== */

.sound-toggle {
  position: fixed;
  top: calc(var(--frame-inset) + 18px);
  right: calc(var(--frame-inset) + 18px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(246, 226, 166, 0.35);
  border-radius: 999px;
  background: rgba(23, 8, 4, 0.4);
  backdrop-filter: blur(6px);
  color: var(--gold-200);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.sound-toggle:hover { border-color: var(--gold-400); transform: translateY(-1px); }
.sound-toggle__icon { font-size: 0.95rem; line-height: 1; }

/* ==========================================================================
   Content
   ========================================================================== */

.content {
  position: relative;
  z-index: 3;

  width: 100%;
  max-width: var(--content-max);

  margin: 0 auto;

  padding:
    80px
    clamp(1.25rem, 5vw, 2rem)
    20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  transform: translateY(-35px);
}
/* .logo {
  width: clamp(190px, 32vw, 320px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
} */

.rule {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.1rem 0 0.6rem;
}

.rule__line {
  width: clamp(36px, 8vw, 70px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400));
}

.rule:has(.rule__line + .rule__diamond + .rule__line) .rule__line:last-child {
  background: linear-gradient(90deg, var(--gold-400), transparent);
}

.rule__diamond {
  width: 7px;
  height: 7px;
  background: var(--gold-400);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(217, 165, 61, 0.6);
}

.headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: normal;
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0.2rem 0 0.9rem;
}

.headline__row {
  display: block;
  font-size: clamp(3.2rem, 13vw, 7.2rem);
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 45%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: white;
  text-shadow:
    0 2px 0 rgba(74, 22, 6, 0.5),
    0 8px 24px rgba(23, 8, 4, 0.55);
}

.headline__row:last-child {
  font-style: italic;
  font-weight: 700;
  margin-top: -0.06em;
}

.subtitle {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--cream-50);
  opacity: 0.92;
  max-width: 40ch;
  line-height: 1.5;
  margin-bottom: clamp(1.8rem, 5vh, 2.6rem);
}

.subtitle__script {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 1.5em;
  color: var(--gold-200);
  margin-left: 0.15em;
}

/* ==========================================================================
   Notify form
   ========================================================================== */

.notify { width: 100%; max-width: 440px; }

.notify__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-200);
  opacity: 0.85;
  margin-bottom: 0.7rem;
}

.notify__row {
  display: flex;
  gap: 0.6rem;
  padding: 0.35rem;
  background: rgba(255, 248, 236, 0.07);
  border: 1px solid rgba(217, 165, 61, 0.4);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.notify__row:has(.notify__input:focus-visible) {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(217, 165, 61, 0.18);
}

.notify__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--cream-50);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1.1rem;
}

.notify__input::placeholder { color: rgba(255, 248, 236, 0.45); }
.notify__input:focus { outline: none; }

.notify__button {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--maroon-950);
  background: linear-gradient(180deg, var(--gold-200), var(--gold-400));
  box-shadow: 0 4px 14px rgba(217, 165, 61, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.notify__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 165, 61, 0.5);
  filter: brightness(1.04);
}

.notify__button:active { transform: translateY(0); }

.notify__status {
  min-height: 1.4em;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--gold-200);
}

.notify__status[data-state="error"] { color: var(--pink-400); }

/* ==========================================================================
   Social row & footer
   ========================================================================== */

.social {
  margin-top: clamp(1.8rem, 4vh, 2.4rem);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--cream-50);
  opacity: 0.8;
}

.social__link { transition: color 0.2s ease; }
.social__link:hover { color: var(--gold-200); }
.social__dot { margin: 0 0.6rem; color: var(--gold-600); }

.footer {
  position: relative;
  z-index: 3;

  margin-top: 20px;

  text-align: center;

  font-size: 0.72rem;
  letter-spacing: 0.04em;

  color: rgba(255,248,236,.65);
}
.top-controls {
  position: fixed;
  top: max(env(safe-area-inset-top), 20px);
  left: 20px;
  right: 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  z-index: 999;
}

.header-logo {
  width: 152px;
  height: 152px;

  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.08);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.header-logo img {
  width: 158px;
  height: 158px;
  object-fit: contain;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(30px);
}
@media (max-height: 800px) {
  .content {
    transform: translateY(0px);
  }

  .subtitle {
    margin-bottom: 1rem;
  }

  .social {
    margin-top: 1rem;
  }

  .footer {
    margin-top: 12px;
  }
}
@media (max-width: 768px) {
  .top-controls {
    left: 16px;
    right: 16px;
  }

  .header-logo {
    width: 54px;
    height: 54px;
  }

  .header-logo img {
    width: 36px;
    height: 36px;
  }
  
}

@media (max-width: 480px) {
  .top-controls {
    left: 12px;
    right: 12px;
    top: max(env(safe-area-inset-top), 12px);
  }
.content {
  transform: translateY(20px);
}
  .header-logo {
    width: 68px;
    height: 68px;
  }

  .header-logo img {
    width: 62px;
    height: 62px;
  }
}
/* ==========================================================================
   Responsive tweaks
   ========================================================================== */

@media (max-width: 420px) {
  .notify__row { flex-direction: column; border-radius: 22px; padding: 0.5rem; }
  .notify__button { width: 100%; padding: 0.8rem 1.5rem; }
  .sound-toggle .sound-toggle__label { display: none; }
}

@media (max-height: 680px) {
  .content { padding-top: 1.5rem; padding-bottom: 1rem; }
  .logo { width: clamp(150px, 26vw, 220px); }
  .subtitle { margin-bottom: 1.4rem; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .spark { animation: none; opacity: 0.5; }
  .notify__button, .sound-toggle { transition: none; }
}
