*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
input, button, textarea, select { font: inherit; }

:root {
  --black: #000000;
  --white: #ffffff;
  --purple: #9900ff;
  --gray-text: rgba(255,255,255,0.5);
  --R: 90px;
}

html, body {
  height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  overflow: hidden;
  cursor: default;
}

/* ── LAYOUT ── */
.page {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── BOUNCING ORB ── */
#bouncing-orb {
  position: fixed;
  width: min(20vw, 20vh);
  height: min(20vw, 20vh);
  z-index: 2;
  pointer-events: auto;
  will-change: transform;
  mix-blend-mode: screen;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* ── COUNTER ── */
.counter-wrap {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.1s forwards;
  white-space: nowrap;
}

.counter-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  background: var(--purple);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

.counter-text {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(11px, 1.1vw, 15px);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.counter-number { color: var(--white); }
.counter-label  { color: var(--gray-text); }

/* ── LOGO (index only) ── */
.logo-svg { transition: none; }
.logo-svg.hue-cycling path { transition: none; }

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.25s forwards;
}

.logo-svg {
  width: min(69vw, 158vh);
  height: auto;
  display: block;
}

/* ── HEADLINE (invite only) ── */
.headline {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 9vw, 120px);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  max-width: 80vw;
}

.headline strong {
  color: var(--white);
  display: block;
}

.headline span {
  color: rgba(255,255,255,0.5);
  display: block;
}

/* ── FORM AREA ── */
.form-area {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  opacity: 0;
  animation: fadeIn 0.6s ease 0.45s forwards;
}

.form-wrap {
  width: min(420px, 80vw);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.invite-wrap {
  width: min(420px, 80vw);
  margin-top: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-row {
  display: flex;
  align-items: stretch;
  background: #333333;
}

.input-row.error {
  animation: shake 0.35s ease;
  outline: 2px solid var(--purple);
}

.email-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(11px, 1.1vw, 15px);
  letter-spacing: -0.03em;
  color: #ffffff;
  padding: 14px 18px;
  caret-color: #ffffff;
}

.email-input::placeholder { color: rgba(255,255,255,0.5); font-weight: 700; }

.submit-btn {
  background: var(--purple);
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(11px, 1.1vw, 15px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
}

.submit-btn:hover    { background: #ffffff; color: #000000; }
.submit-btn:disabled { opacity: 0.45; pointer-events: none; }

.spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

/* ── SUCCESS / SENT STATES ── */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  width: min(420px, 80vw);
}

.success-state.visible {
  display: flex;
  animation: fadeIn 0.7s ease forwards;
}

.success-line {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(11px, 1.1vw, 15px);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--gray-text);
  line-height: 2;
}

.success-line strong { color: var(--white); display: block; }

.invite-success,
.invite-sent {
  margin-top: 20px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(11px, 1.1vw, 15px);
  letter-spacing: -0.03em;
  color: var(--purple);
  text-align: center;
  display: none;
}

.invite-success.visible,
.invite-sent.visible {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

/* ── FOOTER ── */
.footer-tr {
  position: fixed;
  top: 20px;
  right: 24px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9900ff;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 1s ease 0.8s forwards;
  transition: color 0.2s ease;
}

.footer-tr:hover { color: rgba(255,255,255,1.0); }

.footer-tl {
  display: none;
}

.footer {
  position: fixed;
  bottom: 20px;
  left: 24px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  animation: fadeIn 1s ease 0.8s forwards;
}

.footer-bl {
  position: fixed;
  bottom: 20px;
  right: 24px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  animation: fadeIn 1s ease 0.8s forwards;
}

/* ── ABOUT OVERLAY ── */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  overflow-y: auto;
}

.about-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,1.0);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.about-overlay.visible { pointer-events: all; }
.about-overlay.visible::before { opacity: 1; }
.about-overlay.closing::before { opacity: 0 !important; transition: opacity 0.3s ease 0.2s !important; }

.about-content {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  width: 80vw;
  max-width: 80vw;
  min-height: 100vh;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.about-overlay.visible .about-content {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease 0.25s, transform 0.35s ease 0.25s;
}

.about-overlay.closing .about-content {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.about-text p {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.5);
}

.about-text .about-headline {
  color: var(--white);
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 22px);
  font-style: normal;
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .form-wrap,
  .success-state,
  .invite-wrap { width: min(380px, 88vw); }
  .counter-text { font-size: clamp(10px, 3vw, 14px); }
  .email-input  { font-size: clamp(11px, 3vw, 15px); padding: 14px 16px; }
  .submit-btn   { font-size: clamp(11px, 3vw, 15px); padding: 14px 20px; }
  .about-content { width: 80vw; padding: 32px 24px; }
}

@media (max-aspect-ratio: 1/1) {
  .page { padding: 8vw 6vw; }
  .logo-svg { width: min(69vw, 90vw); }
}
