*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #0c0c0b;
  --accent: #ffffff;
  --fg: #ffffff;
  --fg-muted: rgba(255, 255, 255, 0.72);
  --fg-subtle: rgba(255, 255, 255, 0.55);
  --border-on-photo: rgba(255, 255, 255, 0.38);
  --bg-image-1: url("red eye darkened.png");
  --bg-image-2: url("red eye darkened.png");
  --bg-image-3: url("red eye darkened.png");
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: "DM Mono", monospace;
}

/*  BASE  */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: #120808;
  color: var(--fg);
  font-family: var(--mono);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  position: relative;
}

/*  BACKGROUND — three columns, left to right  */
.bg-panels {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: row;
  pointer-events: none;
}

.bg-panel {
  flex: 1 1 0;
  min-width: 0;
  min-height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.bg-panel-1 {
  background-image: var(--bg-image-1);
}

.bg-panel-2 {
  background-image: var(--bg-image-2);
}

.bg-panel-3 {
  background-image: var(--bg-image-3);
}

/*  GRAIN OVERLAY  */
.grain {
  pointer-events: none;
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.06;
  z-index: 0;
  animation: grain-shift 8s steps(2) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, -2%); }
  50%  { transform: translate(2%, 1%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

/*  PAGE LAYOUT  */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: min(35rem, 100%);
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 4vw, 2rem)
    clamp(1.5rem, 5vw, 2.5rem);
  padding-top: max(
    clamp(1.25rem, 4vw, 2rem),
    env(safe-area-inset-top, 0px)
  );
  padding-left: max(
    clamp(1rem, 4vw, 2rem),
    env(safe-area-inset-left, 0px)
  );
  padding-right: max(
    clamp(1rem, 4vw, 2rem),
    env(safe-area-inset-right, 0px)
  );
  padding-bottom: max(
    clamp(1.5rem, 5vw, 2.5rem),
    env(safe-area-inset-bottom, 0px)
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/*  TOP BAR  */
.top-bar {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: clamp(2.5rem, 8vw, 3.75rem);
  animation: fadeUp 1.8s ease both;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  font-family: var(--mono);
  font-size: clamp(0.6875rem, 0.65rem + 0.35vw, 0.825rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--fg);
}

.top-brand svg {
  width: 2.125rem;
  height: 1.1875rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.top-badge {
  font-family: var(--mono);
  font-size: clamp(0.5rem, 0.48rem + 0.25vw, 0.5625rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid var(--border-on-photo);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.top-badge:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

/*  HERO  */
.hero {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

/* Eyebrow */
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  font-family: var(--mono);
  font-size: clamp(0.5625rem, 0.52rem + 0.3vw, 0.625rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: clamp(1.25rem, 4vw, 1.75rem);
  animation: fadeUp 1.8s 0.5s ease both;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* Headline */
.headline {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.0;
  color: var(--fg);
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.line {
  display: block;
  overflow: hidden;
}

.line-1 {
  font-size: clamp(2.875rem, 1.35rem + 7vw, 5rem);
  animation: slideUp 2.0s 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.line-2 {
  font-size: clamp(3.5rem, 1.5rem + 10vw, 6.875rem);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  line-height: 0.92;
  animation: slideUp 2.0s 1.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.line-3 {
  font-size: clamp(2.875rem, 1.35rem + 7vw, 5rem);
  animation: slideUp 2.0s 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Description */
.description {
  font-family: var(--mono);
  font-size: clamp(0.75rem, 0.7rem + 0.35vw, 0.8125rem);
  font-weight: 300;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
  max-width: min(23.75rem, 100%);
  margin-bottom: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: 0.02em;
  animation: fadeUp 1.8s 1.8s ease both;
}

/* ─── REGISTER AREA ─────────────────────────────────── */
#register-area {
  width: 100%;
  min-width: 0;
  max-width: min(25rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  animation: fadeUp 1.8s 2.1s ease both;
}

/* ─── PRIMARY BUTTON ────────────────────────────────── */
#register-btn {
  position: relative;
  background: #ffffff;
  color: var(--black);
  border: none;
  padding: 0.65rem clamp(1.5rem, 6vw, 2.5rem);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: clamp(0.5625rem, 0.52rem + 0.25vw, 0.625rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 3.375rem;
  height: auto;
  max-width: 100%;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.12);
}

#register-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, transparent 55%);
  pointer-events: none;
}

#register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

#register-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* ─── EMAIL AREA ────────────────────────────────────── */
#email-area {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

#email-input {
  width: 100%;
  min-width: 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  border: 1.5px solid var(--border-on-photo);
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: clamp(0.75rem, 0.72rem + 0.2vw, 0.8125rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  outline: none;
  min-height: 3.375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#email-input::placeholder {
  color: var(--fg-subtle);
}

#email-input:focus {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

#email-input.error {
  border-color: #c94040;
  box-shadow: 0 0 0 3px rgba(201,64,64,0.1);
}

#message-input {
  width: 100%;
  min-width: 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  border: 1.5px solid var(--border-on-photo);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: clamp(0.75rem, 0.72rem + 0.2vw, 0.8125rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  outline: none;
  min-height: 7rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#message-input::placeholder {
  color: var(--fg-subtle);
}

#message-input:focus {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

#submit-btn {
  width: 100%;
  background: #ffffff;
  color: var(--black);
  border: none;
  padding: 0.55rem 1.5rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: clamp(0.5625rem, 0.52rem + 0.25vw, 0.625rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 3rem;
  height: auto;
  transition: transform 0.15s ease, opacity 0.25s ease, box-shadow 0.2s ease;
}

#submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

#submit-btn:active {
  transform: translateY(0);
}

#submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── MESSAGES ──────────────────────────────────────── */
#success-msg {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1rem, 4vw, 2rem);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-on-photo);
  border-radius: 4px;
  color: var(--fg);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#success-msg .checkmark {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  color: var(--accent);
  margin-bottom: 0.25rem;
}

#success-msg .title {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.1rem + 1.5vw, 1.75rem);
  font-weight: 300;
  letter-spacing: 0.06em;
}

#success-msg .subtitle {
  font-family: var(--mono);
  font-size: clamp(0.625rem, 0.58rem + 0.3vw, 0.6875rem);
  font-weight: 300;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  line-height: 1.7;
}

#error-msg {
  display: none;
  font-size: clamp(0.5625rem, 0.52rem + 0.2vw, 0.625rem);
  font-family: var(--mono);
  color: #c94040;
  letter-spacing: 0.06em;
  margin-top: 0.125rem;
}

/* ─── FINE PRINT ────────────────────────────────────── */
.fine-print {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: clamp(0.55rem, 0.5rem + 0.3vw, 0.6rem);
  font-weight: 300;
  color: var(--fg-subtle);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeUp 1.4s 1.9s ease both;
}


/* ─── FOOTER ────────────────────────────────────────── */
.footer {
  margin-top: clamp(1.25rem, 4vw, 2rem);
  font-family: var(--mono);
  font-size: clamp(0.5625rem, 0.52rem + 0.25vw, 0.625rem);
  font-weight: 300;
  color: var(--fg-subtle);
  letter-spacing: 0.06em;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  width: 100%;
  min-width: 0;
  gap: 0.35rem 0.625rem;
  row-gap: 0.5rem;
  animation: fadeUp 1.8s 2.1s ease both;
}

.footer a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer .footer-copy a {
  color: inherit;
}

.footer a:hover {
  color: var(--fg);
}

.footer .sep {
  opacity: 0.4;
}

/* ─── ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-out {
  opacity: 0 !important;
  transform: scale(0.95) translateY(-4px) !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
}

.fade-in {
  animation: fadeUp 0.4s ease both;
}

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 480px) {
  .top-bar {
    margin-bottom: clamp(2rem, 6vw, 3.5rem);
  }
}