/* =========================================================
   OctoStudio — Coming Soon
   Aesthetic: cosmic editorial · vibrant chromatic glow
   ========================================================= */

:root {
  /* Deep space palette */
  --bg-0: #04050d;
  --bg-1: #080b1f;
  --bg-2: #0d1230;
  --ink: #f4f1ea;
  --ink-soft: #b9b4c7;
  --ink-faint: #6f6a82;
  --rule: rgba(244, 241, 234, 0.12);

  /* Accents pulled from the logo */
  --cyan: #4dd4ff;
  --magenta: #ff3eb5;
  --amber: #ffb347;
  --violet: #8b5cf6;
  --lime: #c8ff5e;

  /* Type */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg-0);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(13px, 0.9vw + 8px, 15px);
  line-height: 1.55;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  /* deep cosmic gradient base */
  background:
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(77, 212, 255, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
}

/* ---------- Atmosphere ---------- */

.nebula {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  width: 60vmin;
  height: 60vmin;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  mix-blend-mode: screen;
  animation: drift 28s ease-in-out infinite;
}
.blob--cyan {
  top: -10%;
  left: -8%;
  background: radial-gradient(circle, var(--cyan), transparent 65%);
  animation-delay: -4s;
}
.blob--magenta {
  bottom: -18%;
  right: -10%;
  background: radial-gradient(circle, var(--magenta), transparent 65%);
  animation-delay: -12s;
  opacity: 0.5;
}
.blob--amber {
  top: 38%;
  left: 55%;
  width: 42vmin;
  height: 42vmin;
  background: radial-gradient(circle, var(--amber), transparent 65%);
  animation-delay: -20s;
  opacity: 0.28;
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(4vw, -3vh, 0) scale(1.08); }
  66% { transform: translate3d(-3vw, 4vh, 0) scale(0.95); }
}

/* Stars — three parallaxed layers using box-shadows */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.layer {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}
.layer::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: #fff;
  top: 0;
  left: 0;
}
.layer--1::before {
  box-shadow:
    24vw 11vh #fff, 53vw 7vh #fff, 78vw 15vh #fff, 9vw 22vh #fff,
    35vw 28vh #fff, 62vw 31vh #fff, 88vw 26vh #fff, 17vw 39vh #fff,
    44vw 42vh #fff, 71vw 47vh #fff, 95vw 52vh #fff, 6vw 58vh #fff,
    29vw 61vh #fff, 51vw 67vh #fff, 73vw 71vh #fff, 12vw 79vh #fff,
    37vw 83vh #fff, 64vw 88vh #fff, 84vw 94vh #fff, 3vw 96vh #fff;
  animation: twinkle 4.2s steps(2, end) infinite;
}
.layer--2::before {
  width: 2px;
  height: 2px;
  background: var(--cyan);
  box-shadow:
    14vw 19vh var(--cyan), 41vw 12vh #fff, 67vw 25vh var(--magenta),
    81vw 38vh #fff, 22vw 49vh var(--cyan), 56vw 55vh #fff,
    74vw 63vh var(--amber), 10vw 71vh #fff, 38vw 76vh var(--magenta),
    60vw 82vh #fff, 90vw 87vh var(--cyan), 47vw 91vh #fff;
  animation: twinkle 6.5s steps(2, end) infinite reverse;
}
.layer--3::before {
  width: 1.5px;
  height: 1.5px;
  background: #fff;
  opacity: 0.6;
  box-shadow:
    7vw 5vh #fff, 31vw 33vh #fff, 49vw 18vh #fff, 69vw 9vh #fff,
    87vw 44vh #fff, 19vw 64vh #fff, 42vw 73vh #fff, 79vw 81vh #fff,
    27vw 89vh #fff, 58vw 97vh #fff;
  animation: twinkle 8s steps(2, end) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Subtle film grain via SVG noise */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Frame ---------- */

.top,
.bottom {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.1rem, 2.4vw, 1.8rem) clamp(1.25rem, 4vw, 3rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule);
}
.bottom {
  border-bottom: 0;
  border-top: 1px solid var(--rule);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.mark__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}
.mark__text {
  color: var(--ink-soft);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.status__pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta);
}
.status__pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--magenta);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.bottom {
  color: var(--ink-faint);
  font-size: 0.68rem;
}
.bottom__center {
  color: var(--ink-soft);
}

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

.stage {
  position: relative;
  z-index: 5;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 clamp(1.5rem, 3vw, 2.4rem);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.1s forwards;
}
.eyebrow__bracket {
  color: var(--cyan);
}

/* Logo hero */
.hero {
  position: relative;
  margin: 0 0 clamp(1.4rem, 3vw, 2rem);
  width: clamp(220px, 38vw, 380px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  opacity: 0;
  animation: rise 1.4s var(--ease) 0.25s forwards;
}
.hero__logo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
  animation: bob 7s ease-in-out infinite;
}
.hero__halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      var(--cyan),
      var(--violet),
      var(--magenta),
      var(--amber),
      var(--lime),
      var(--cyan)
    );
  filter: blur(50px);
  opacity: 0.55;
  z-index: 1;
  animation: spin 22s linear infinite;
}
.hero__halo--inner {
  inset: 6%;
  filter: blur(28px);
  opacity: 0.35;
  animation-direction: reverse;
  animation-duration: 14s;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

/* Wordmark */
.wordmark {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  opacity: 0;
  animation: rise 1.3s var(--ease) 0.45s forwards;
}
.wordmark em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(
    100deg,
    var(--cyan) 0%,
    var(--magenta) 45%,
    var(--amber) 90%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.04em; /* prevent italic clipping */
}

.tagline {
  max-width: 38ch;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "opsz" 32, "SOFT" 80;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  opacity: 0;
  animation: rise 1.3s var(--ease) 0.6s forwards;
}

/* Notify form */
.notify {
  position: relative;
  width: min(100%, 460px);
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  opacity: 0;
  animation: rise 1.3s var(--ease) 0.75s forwards;
}
.notify__label {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.notify__row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rule);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.notify__row:focus-within {
  border-color: rgba(77, 212, 255, 0.6);
  box-shadow:
    0 0 0 4px rgba(77, 212, 255, 0.08),
    0 18px 40px -20px rgba(77, 212, 255, 0.4);
}
.notify__input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}
.notify__input::placeholder {
  color: var(--ink-faint);
}
.notify__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta) 70%, var(--amber));
  color: #08081a;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.notify__btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08) saturate(1.1);
}
.notify__btn:active {
  transform: translateY(0);
}
.notify__btn-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.notify__btn:hover .notify__btn-arrow {
  transform: translate(2px, -2px);
}
/* Visually hidden (a11y label for the email input) */
.notify__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Brevo overrides ----------
   Brevo's sib-styles.css is loaded so that main.js can correctly
   toggle the success/error panels and the button loader state.
   We override the visuals here to keep the cosmic aesthetic. */

#sib-form-container.notify {
  background: transparent;
  text-align: left;
}
#sib-container {
  all: unset;
  display: block;
  width: 100%;
  max-width: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  direction: ltr;
}
#sib-form {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
}

/* Honeypot — keep hidden no matter what */
.input--hidden {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Success / error panels — cosmic skin.
   Brevo's main.js controls show/hide via display, so we never set it. */
.notify__msg {
  margin: 0 0 0.9rem !important;
  padding: 0.85rem 1rem !important;
  border-radius: 14px !important;
  border: 1px solid var(--rule) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono) !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em !important;
  color: var(--ink) !important;
  max-width: none !important;
  text-align: left !important;
  box-shadow: none !important;
}
.notify__msg .sib-form-message-panel__text {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
}
.notify__msg-icon {
  flex: none;
  width: 18px;
  height: 18px;
}
.notify__msg .sib-form-message-panel__inner-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0;
  font-variation-settings: "opsz" 32, "SOFT" 80;
  line-height: 1.4;
  color: inherit;
}
.notify__msg--success {
  border-color: rgba(77, 212, 255, 0.4) !important;
  background: linear-gradient(
    135deg,
    rgba(77, 212, 255, 0.12),
    rgba(139, 92, 246, 0.08)
  ) !important;
  color: var(--cyan) !important;
}
.notify__msg--success .notify__msg-icon {
  fill: var(--cyan);
}
.notify__msg--error {
  border-color: rgba(255, 62, 181, 0.45) !important;
  background: linear-gradient(
    135deg,
    rgba(255, 62, 181, 0.14),
    rgba(255, 179, 71, 0.08)
  ) !important;
  color: var(--magenta) !important;
}
.notify__msg--error .notify__msg-icon {
  fill: var(--magenta);
}

/* Brevo's per-field error label — restyle if it appears */
.entry__error {
  margin-top: 0.6rem !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: 10px !important;
  border-color: rgba(255, 62, 181, 0.45) !important;
  background: rgba(255, 62, 181, 0.08) !important;
  color: var(--magenta) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
}

/* Make sure our pill button beats Brevo's defaults */
button.notify__btn.sib-form-block__button {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #08081a;
  background: linear-gradient(135deg, var(--cyan), var(--magenta) 70%, var(--amber));
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  box-shadow: none;
}

/* Loader spinner (revealed by Brevo when submitting) */
.notify__btn-loader {
  width: 14px;
  height: 14px;
  margin-right: 0.4rem;
  fill: currentColor;
  animation: spin 1.1s linear infinite;
}

/* Make sure our input wins over Brevo's .input rule */
input.notify__input.input {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  box-shadow: none;
}
input.notify__input.input::placeholder {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  text-align: left;
}

/* Readout */
.readout {
  width: min(100%, 720px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
  padding-top: clamp(1.5rem, 3vw, 2.4rem);
  border-top: 1px dashed var(--rule);
  font-family: var(--font-mono);
  text-align: left;
  opacity: 0;
  animation: rise 1.3s var(--ease) 0.9s forwards;
}
.readout__col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.readout__col--right {
  text-align: right;
}
.readout__label {
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.readout__value {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  font-variation-settings: "opsz" 32, "SOFT" 100;
}
.readout__bar {
  position: relative;
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.readout__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--amber));
  border-radius: inherit;
  animation: chart 5.5s ease-in-out infinite;
}
@keyframes chart {
  0% { width: 22%; }
  50% { width: 38%; }
  100% { width: 22%; }
}

/* ---------- Reveal ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .top,
  .bottom {
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    font-size: 0.65rem;
  }
  .bottom__center {
    order: 3;
    flex-basis: 100%;
    text-align: center;
  }
  .readout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .readout__col,
  .readout__col--right {
    align-items: center;
    text-align: center;
  }
  .notify__row {
    border-radius: 18px;
    flex-direction: column;
    padding: 0.6rem;
  }
  .notify__btn {
    justify-content: center;
    padding: 0.85rem 1rem;
  }
}

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