:root {
  --bg: #ffffff;
  --ink: #0a0a12;
  --ink-dim: #5c5c6b;
  --ink-faint: #a8a8b4;
  --orange-deep: #b8350a;
  --orange-mid: #ff5a1f;
  --orange-bright: #ff8a3a;
  --orange-pale: #ffd9b8;
  --orange-hot: #ff2d00;
  --line: rgba(10, 10, 18, 0.08);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  line-height: 1.4;
  min-height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hazy blue blob ────────────────────────── */
.blob {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

@media (max-width: 560px) {
  .blob {
    background: radial-gradient(ellipse 120% 90% at 50% 45%, #ff6a2a 0%, #d85a23 45%, #9a3a12 100%);
  }
}

.blob-layer {
  position: absolute;
  border-radius: 50%;
}

.blob-1 {
  width: 130vmin;
  height: 130vmin;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 45% 40%, var(--orange-deep) 0%, var(--orange-mid) 35%, rgba(255, 90, 31, 0.3) 60%, transparent 75%);
  filter: blur(60px);
  opacity: 0.95;
}

.blob-2 {
  width: 95vmin;
  height: 95vmin;
  top: 42%;
  left: 55%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 50%, var(--orange-bright) 0%, rgba(255, 138, 58, 0.55) 40%, transparent 70%);
  filter: blur(80px);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.blob-3 {
  width: 50vmin;
  height: 50vmin;
  top: 58%;
  left: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #6b1a05 0%, rgba(107, 26, 5, 0.45) 50%, transparent 70%);
  filter: blur(70px);
  opacity: 0.7;
}

.blob-4 {
  width: 150vmin;
  height: 150vmin;
  top: 48%;
  left: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 217, 184, 0.5) 0%, transparent 60%);
  filter: blur(90px);
}

.blob-5 {
  width: 40vmin;
  height: 40vmin;
  top: 38%;
  left: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--orange-hot) 0%, rgba(255, 45, 0, 0.4) 45%, transparent 70%);
  filter: blur(55px);
  opacity: 0.75;
}

.blob-6 {
  width: 55vmin;
  height: 55vmin;
  top: 62%;
  left: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ffae60 0%, rgba(255, 174, 96, 0.35) 50%, transparent 72%);
  filter: blur(75px);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.blob-7 {
  width: 32vmin;
  height: 32vmin;
  top: 46%;
  left: 62%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ff7028 0%, rgba(255, 112, 40, 0.35) 50%, transparent 70%);
  filter: blur(50px);
  opacity: 0.65;
}

.blob-8 {
  width: 38vmin;
  height: 38vmin;
  top: 54%;
  left: 36%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #9a2408 0%, rgba(154, 36, 8, 0.3) 55%, transparent 72%);
  filter: blur(65px);
  opacity: 0.6;
}

/* ── Pixelated grain ───────────────────────── */
.noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.18;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ── Layout ───────────────────────────────── */
.wrap {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 28px 32px;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Hero ─────────────────────────────────── */
.hero {
  margin-top: auto;
  margin-bottom: auto;
  padding: 48px 0;
}

.logo {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: clamp(64px, 13vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 0 2px 40px rgba(120, 30, 5, 0.3);
}

.tagline {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.3;
  color: #ffffff;
  max-width: 420px;
  margin-bottom: 8px;
  text-shadow: 0 1px 20px rgba(120, 30, 5, 0.4);
}

.sub {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 400;
  font-size: clamp(15px, 1.8vw, 17px);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  text-shadow: 0 1px 20px rgba(120, 30, 5, 0.4);
}

/* ── CTA (morphing pill → input) ──────────── */
.cta {
  position: relative;
  height: 52px;
  width: 100%;
  max-width: 420px;
}

.cta-pill {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--orange-deep);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  height: 52px;
  padding: 0 26px;
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 28px rgba(120, 30, 5, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s ease, opacity 0.25s ease;
  white-space: nowrap;
}
.cta-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(120, 30, 5, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.cta-pill:active {
  transform: translateY(0);
}
.cta.submitted .cta-pill {
  cursor: default;
}
.cta.submitted .cta-pill:hover {
  transform: none;
  box-shadow: 0 8px 28px rgba(120, 30, 5, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cta-form {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  width: 100%;
  height: 52px;
  box-shadow: 0 8px 28px rgba(120, 30, 5, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0.4);
  transform-origin: left center;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cta.expanded .cta-pill {
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0.8);
}
.cta.expanded .cta-form {
  opacity: 1;
  pointer-events: auto;
  transform: scaleX(1);
}

#email {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 8px 0 18px;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  min-width: 0;
}
#email::placeholder {
  color: var(--ink-faint);
  font-weight: 400;
}
#email:-webkit-autofill,
#email:-webkit-autofill:hover,
#email:-webkit-autofill:focus,
#email:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}

.cta-send {
  flex-shrink: 0;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange-deep);
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cta-send:hover {
  background: var(--orange-mid);
  transform: translateY(-1px);
}
.cta-send:active {
  transform: translateY(0);
}

.msg {
  position: absolute;
  top: calc(100% + 12px);
  left: 20px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  min-height: 1.2em;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(120, 30, 5, 0.4);
  transition: opacity 0.3s;
}
.msg.err { color: #ffe1e1; }

/* ── Mobile ───────────────────────────────── */
@media (max-width: 560px) {
  html, body { background: #9a3a12; }
  .wrap {
    padding:
      max(28px, env(safe-area-inset-top))
      22px
      max(20px, env(safe-area-inset-bottom));
  }
  .hero { padding: 0; }
  .logo {
    font-size: clamp(96px, 26vw, 168px);
    margin-bottom: 20px;
  }
  .tagline {
    font-size: clamp(20px, 5.2vw, 26px);
    margin-bottom: 8px;
    max-width: 100%;
  }
  .sub {
    font-size: clamp(15px, 4vw, 19px);
    margin-bottom: 26px;
  }
  .cta { max-width: 100%; }
  .blob-1 { width: 180vmax; height: 180vmax; }
  .blob-2 { width: 140vmax; height: 140vmax; }
  .blob-4 { width: 210vmax; height: 210vmax; }
  .blob-3, .blob-5, .blob-6, .blob-7, .blob-8 { width: 100vmax; height: 100vmax; }
}

@media (max-width: 380px) {
  .cta-pill { padding: 0 20px; font-size: 14px; }
  #email { padding: 0 6px 0 16px; }
  .cta-send { width: 38px; height: 38px; }
}

@media (max-height: 500px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
  }
  .wrap {
    height: auto;
    min-height: 100dvh;
    padding: 24px 28px;
  }
  .hero { padding: 16px 0; }
  .logo {
    font-size: clamp(56px, 18vh, 96px);
    margin-bottom: 12px;
  }
  .tagline {
    font-size: clamp(16px, 3.2vh, 20px);
    margin-bottom: 4px;
  }
  .sub {
    font-size: clamp(13px, 2.6vh, 16px);
    margin-bottom: 18px;
  }
}

/* ── Copyright footer ─────────────────────── */
.copyright {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 400;
  color: #0a0a12;
  z-index: 3;
  pointer-events: none;
}

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