/*
 * staging.erikchristensen.digital — Gate Page Styles
 * Design tokens mirror erikchristensen.digital
 */

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

:root {
  --bg:      #060810;
  --fg:      #ede9e1;
  --fg-dim:  #c2bcb3;
  --accent:  #c9a05a;
  --border:  rgba(201, 160, 90, 0.12);
  --mono:    'JetBrains Mono', monospace;
  --serif:   'Cormorant Garamond', serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 300;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Grain overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.04;
  pointer-events: none;
  z-index: 100;
}

/* ── Stars ── */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--dur, 3s) var(--delay, 0s) ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: var(--min, 0.1); }
  to   { opacity: var(--max, 0.8); }
}

/* ── Horizon glow ── */
.horizon {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 35vh;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(201, 160, 90, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Gate layout ── */
.gate {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  gap: 0;
}

/* ── Staging label ── */
.gate-subdomain {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  color: var(--fg-dim);
  letter-spacing: -0.01em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.1em;
}

.gate-subdomain::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.9; }
}

/* ── Domain name ── */
.gate-domain {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 7rem);
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 0.9;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ── Password form ── */
.gate-form {
  display: flex;
  align-items: baseline;
  border-bottom: 1px solid rgba(201, 160, 90, 0.35);
  padding-bottom: 2px;
  width: clamp(240px, 35vw, 320px);
  transition: border-color 0.2s;
}

.gate-form:focus-within {
  border-color: rgba(201, 160, 90, 0.75);
}

.gate-form input[type="password"] {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(201, 160, 90, 0.9);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  padding: 6px 0;
  outline: none;
  caret-color: var(--accent);
  letter-spacing: 0.1em;
}

.gate-form input[type="password"]::placeholder {
  color: rgba(201, 160, 90, 0.35);
  letter-spacing: 0.05em;
}

.gate-form button {
  background: none;
  border: none;
  color: rgba(201, 160, 90, 0.55);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  padding: 6px 0 6px 14px;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}

.gate-form button:hover { color: var(--accent); }

/* ── Error message ── */
.gate-error {
  margin-top: 0.75rem;
  font-size: 11px;
  font-weight: 300;
  color: rgba(201, 160, 90, 0.55);
  letter-spacing: 0.06em;
  min-height: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.gate-error.visible { opacity: 1; }
