/* ============================================================
   PRODIGI — Teaser Website
   Brand: Space Grotesk (display) · Inter (body)
   Palette: #3FA9F5 · #7AC943 · #FF931E · #FF1D25 · #FF7BAC
   ============================================================ */

/* ── 0. RESET & CUSTOM PROPERTIES ─────────────────────────── */

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

:root {
  /* Brand colours */
  --clr-blue:    #3FA9F5;
  --clr-green:   #7AC943;
  --clr-orange:  #FF931E;
  --clr-red:     #FF1D25;
  --clr-pink:    #FF7BAC;
  --clr-purple:    #FF008C;
  --clr-cyan:   #00FFFF;

  /* Neutrals */
  --clr-bg:      #0A0A0F;
  --clr-surface: rgba(255,255,255,.04);
  --clr-border:  rgba(255,255,255,.09);
  --clr-white:   #FFFFFF;
  --clr-muted:   rgba(255,255,255,.45);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  .5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3rem;
  --space-xl:  5rem;

  /* Transitions */
  --ease-out-expo: cubic-bezier(.16,1,.3,1);
  --ease-in-out:   cubic-bezier(.4,0,.2,1);
  --dur-fast:  200ms;
  --dur-med:   400ms;
  --dur-slow:  700ms;

  /* Layout */
  --max-w: 780px;
}

/* ── 1. BASE ───────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--clr-bg);
  color: var(--clr-white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── 2. CANVAS BACKGROUND ──────────────────────────────────── */

#canvas-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── 3. NOISE OVERLAY ──────────────────────────────────────── */

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── 4. LAYOUT WRAPPER ─────────────────────────────────────── */

.wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: var(--space-md) var(--space-md);
}

/* ── 5. HEADER ─────────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-md);
}

.header__monogram {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(63,169,245,.5));
  animation: floatY 4s ease-in-out infinite;
}

/* Language switcher */
.header__lang {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.lang-sep {
  color: var(--clr-muted);
  font-size: .8rem;
}

.lang-btn {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding: .35rem .65rem;
  border-radius: 99px;
  border: 1px solid transparent;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}

.lang-btn--active,
.lang-btn:hover {
  color: var(--clr-white);
  border-color: var(--clr-border);
}

/* ── 6. HERO ───────────────────────────────────────────────── */

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-lg) 0;
  overflow: hidden;
}

/* Decorative colour orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  animation: orbFadeIn 1.2s var(--ease-out-expo) forwards;
  pointer-events: none;
}

.orb--blue {
  width: 520px; height: 520px;
  top: -15%; left: -12%;
  background: radial-gradient(circle, rgba(63,169,245,.55) 0%, transparent 70%);
  animation-delay: .2s;
}
.orb--green {
  width: 420px; height: 420px;
  bottom: -20%; right: -10%;
  background: radial-gradient(circle, rgba(122,201,67,.45) 0%, transparent 70%);
  animation-delay: .5s;
}
.orb--orange {
  width: 350px; height: 350px;
  top: 40%; right: 5%;
  background: radial-gradient(circle, rgba(255,147,30,.35) 0%, transparent 70%);
  animation-delay: .8s;
}
.orb--red {
  width: 280px; height: 280px;
  bottom: 10%; left: 10%;
  background: radial-gradient(circle, rgba(255,29,37,.25) 0%, transparent 70%);
  animation-delay: 1s;
}
.orb--purple {
  width: 520px; height: 520px;
  top: -15%; left: -12%;
  background: radial-gradient(circle, rgba(255,0,140,.55) 0%, transparent 70%);
  animation-delay: .2s;
}
.orb--cyan {
  width: 420px; height: 420px;
  bottom: -20%; right: -10%;
  background: radial-gradient(circle, rgba(0,255,255,.45) 0%, transparent 70%);
  animation-delay: .5s;
}

/* Hero content stack */
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}

/* Logo */
.hero__logo-wrap {
  margin-bottom: .25rem;
  animation: logoReveal var(--dur-slow) var(--ease-out-expo) both;
  animation-delay: .15s;
}

.hero__logo {
  width: min(480px, 82vw);
  height: auto;
  filter: drop-shadow(0 0 32px rgba(63,169,245,.35));
}

/* Headline */
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  display: flex;
  flex-direction: column;
  gap: .1em;
  animation: slideUp var(--dur-slow) var(--ease-out-expo) both;
  animation-delay: .3s;
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  background: linear-gradient(
    135deg,
    /* var(--clr-blue)   0%,
    var(--clr-green)  25%,
    var(--clr-orange) 50%,
    var(--clr-red)    75%,
    var(--clr-pink)  100% */
    var(--clr-purple) 0%,
    var(--clr-cyan) 50%,
    var(--clr-purple) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    slideUp var(--dur-slow) var(--ease-out-expo) both,
    gradientShift 5s linear infinite;
  animation-delay: .4s, 0s;
}

.hero__sub {
  font-family: var(--font-body);
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  font-weight: 300;
  color: var(--clr-muted);
  line-height: 1.7;
  max-width: 520px;
  animation: slideUp var(--dur-slow) var(--ease-out-expo) both;
  animation-delay: .5s;
}

/* ── 7. COUNTDOWN ──────────────────────────────────────────── */

.countdown {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2.5vw, 2rem);
  animation: slideUp var(--dur-slow) var(--ease-out-expo) both;
  animation-delay: .65s;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}

.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  /* Glass card */
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  padding: .5em .65em;
  min-width: 2.4ch;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out-expo);
}

.countdown__num::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,.06) 0%,
    transparent 60%
  );
  pointer-events: none;
}

/* Flip animation trigger */
.countdown__num.flip {
  animation: flipNum .35s var(--ease-out-expo);
}

.countdown__sep {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 300;
  color: var(--clr-muted);
  line-height: 1;
  margin-bottom: 1.8rem; /* align with numbers */
}

.countdown__lbl {
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-muted);
}

/* ── 8. EMAIL FORM ─────────────────────────────────────────── */

.form-wrap {
  width: 100%;
  max-width: 480px;
  animation: slideUp var(--dur-slow) var(--ease-out-expo) both;
  animation-delay: .8s;
}

.email-form__field {
  display: flex;
  gap: 0;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--dur-med);
}

.email-form__field:focus-within {
  border-color: rgba(63,169,245,.5);
  box-shadow: 0 0 0 3px rgba(63,169,245,.12);
}

.email-form__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 400;
  color: var(--clr-white);
}

.email-form__input::placeholder {
  color: var(--clr-muted);
}

.email-form__btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .85rem 1.4rem;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-bg);
  background: linear-gradient(
    135deg,
    var(--clr-purple)  0%,
    var(--clr-cyan) 100%
  );
  background-size: 200% auto;
  border-radius: 10px;
  margin: 5px;
  transition:
    background-position var(--dur-med) var(--ease-in-out),
    transform var(--dur-fast) var(--ease-out-expo),
    box-shadow var(--dur-med);
  white-space: nowrap;
}

.email-form__btn:hover {
  background-position: right center;
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(63,169,245,.35);
}

.email-form__btn:active {
  transform: scale(.97);
}

.email-form__btn-icon {
  transition: transform var(--dur-fast) var(--ease-out-expo);
}

.email-form__btn:hover .email-form__btn-icon {
  transform: translateX(4px);
}

.email-form__note {
  margin-top: .7rem;
  font-size: .78rem;
  color: var(--clr-muted);
  text-align: center;
}

/* ── 9. FORM SUCCESS STATE ─────────────────────────────────── */

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.75rem;
  background: rgba(122,201,67,.08);
  border: 1px solid rgba(122,201,67,.25);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  animation: popIn var(--dur-slow) var(--ease-out-expo);
}

.form-success[hidden] {
  display: none;
}

.form-success__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(122,201,67,.15);
  border: 1px solid rgba(122,201,67,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--clr-green);
  animation: bounceIn .5s var(--ease-out-expo);
}

.form-success__msg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--clr-white);
  text-align: center;
}

/* ── 10. FOOTER ────────────────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--clr-border);
  animation: slideUp var(--dur-slow) var(--ease-out-expo) both;
  animation-delay: 1s;
}

.footer__copy {
  font-size: .8rem;
  color: var(--clr-muted);
  font-weight: 400;
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer__social-link {
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--clr-border);
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-out-expo);
}

.footer__social-link:hover {
  color: var(--clr-white);
  border-color: rgba(255,255,255,.25);
  transform: translateY(-2px);
}

/* ── 11. KEYFRAME ANIMATIONS ───────────────────────────────── */

@keyframes orbFadeIn {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes logoReveal {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(.96);
    filter: drop-shadow(0 0 0px rgba(63,169,245,0));
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 32px rgba(63,169,245,.35));
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes flipNum {
  0%   { transform: scaleY(1); }
  40%  { transform: scaleY(.85); opacity: .7; }
  100% { transform: scaleY(1); opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

@keyframes bounceIn {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ── 12. RESPONSIVE ────────────────────────────────────────── */

@media (max-width: 600px) {
  .wrapper {
    padding: var(--space-sm) var(--space-sm);
  }

  .hero {
    padding: var(--space-md) 0;
  }

  .countdown {
    gap: .6rem;
  }

  .countdown__num {
    padding: .45em .5em;
    border-radius: 10px;
    min-width: 2.2ch;
  }

  .countdown__sep {
    display: none;
  }

  .countdown__unit::after {
    content: ':';
    position: absolute;
    right: -.45rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    color: var(--clr-muted);
  }

  .email-form__field {
    flex-direction: column;
    border-radius: 14px;
  }

  .email-form__btn {
    justify-content: center;
    border-radius: 10px;
    margin: 5px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .orb--blue   { width: 300px; height: 300px; }
  .orb--green  { width: 260px; height: 260px; }
  .orb--orange { width: 200px; height: 200px; }
  .orb--red    { width: 160px; height: 160px; }
  .orb--purple { width: 300px; height: 300px; }
  .orb--cyan   { width: 260px; height: 260px; }
}

/* ── 13. REDUCED MOTION ────────────────────────────────────── */

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