/* =============================================================
   GOLF LINKS — gate.css
   Full-screen password gate overlay
   Matches the site's luxury aesthetic: cream, terracotta, dark
   ============================================================= */

/* ── OVERLAY ──────────────────────────────────────────────── */
#siteGate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #1a1510;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Fade-out state */
#siteGate.gate--exit {
  opacity: 0;
  pointer-events: none;
}

/* ── NOISE CANVAS ─────────────────────────────────────────── */
#gateNoise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.55;
}

/* ── INNER LAYOUT ─────────────────────────────────────────── */
.gate-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 32px 20px;
  width: 100%;
  max-width: 480px;
}

/* ── BRAND ────────────────────────────────────────────────── */
.gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: gateSlideDown 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gate-logo-wrap {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(10);
  opacity: 0.9;
}

/* Fallback wordmark if logo doesn't load */
.gate-logo-wrap:not(:has(img[style])):after {
  content: 'GL';
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.8rem;
  color: rgba(245,240,232,0.85);
  letter-spacing: 0.04em;
}

.gate-tagline {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.3);
}

/* Decorative rule lines flanking tagline */
.gate-brand::before,
.gate-brand::after {
  display: none;
}

/* ── CARD ─────────────────────────────────────────────────── */
.gate-card {
  width: 100%;
  background: #f5f0e8;
  border-radius: 16px;
  padding: 44px 44px 36px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 24px 80px rgba(0,0,0,0.55),
    0 8px 24px rgba(0,0,0,0.3);
  animation: gateSlideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Shake on wrong password */
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-9px); }
  30%       { transform: translateX(8px); }
  45%       { transform: translateX(-6px); }
  60%       { transform: translateX(5px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(2px); }
}
.gate-card--shake {
  animation: gateShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

.gate-card__header {
  margin-bottom: 32px;
}

.gate-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 2rem;
  font-weight: 400;
  color: #1a1510;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.gate-card__desc {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: #5c5148;
  line-height: 1.7;
}

/* ── FORM ─────────────────────────────────────────────────── */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gate-field {
  margin-bottom: 20px;
}

.gate-field__label {
  display: block;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5c5148;
  margin-bottom: 9px;
}

.gate-field__wrap {
  position: relative;
}

.gate-field__input {
  width: 100%;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #1a1510;
  background: #ffffff;
  border: 1.5px solid rgba(26,21,16,0.18);
  border-radius: 10px;
  padding: 13px 46px 13px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.04em;
}

.gate-field__input::placeholder {
  color: #c8bfb5;
  letter-spacing: 0.02em;
}

.gate-field__input:focus {
  border-color: #8b5e3c;
  box-shadow: 0 0 0 3px rgba(139,94,60,0.12);
}

.gate-field__input.gate-field__input--error {
  border-color: #b94040;
  box-shadow: 0 0 0 3px rgba(185,64,64,0.1);
}

/* Password toggle */
.gate-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #a8998a;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  line-height: 0;
}
.gate-toggle:hover { color: #5c5148; }

/* ── ERROR ────────────────────────────────────────────────── */
.gate-error {
  height: 0;
  overflow: hidden;
  opacity: 0;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.78rem;
  color: #b94040;
  background: rgba(185,64,64,0.07);
  border: 1px solid rgba(185,64,64,0.18);
  border-radius: 8px;
  padding: 0 14px;
  margin-bottom: 0;
  transition: height 0.25s ease, opacity 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}

.gate-error--visible {
  height: auto;
  opacity: 1;
  padding: 10px 14px;
  margin-bottom: 18px;
}

/* ── SUBMIT BUTTON ────────────────────────────────────────── */
.gate-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f5f0e8;
  background: #1a1510;
  border: none;
  border-radius: 10px;
  padding: 15px 28px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  margin-top: 4px;
}
.gate-submit svg {
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.gate-submit:hover {
  background: #2e2820;
  box-shadow: 0 6px 20px rgba(26,21,16,0.2);
}
.gate-submit:hover svg {
  transform: translateX(4px);
  opacity: 1;
}
.gate-submit:active { transform: scale(0.98); }
.gate-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Terracotta accent line above button */
.gate-submit::before {
  display: none;
}

/* ── NOTE ─────────────────────────────────────────────────── */
.gate-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  color: #a8998a;
  letter-spacing: 0.03em;
}
.gate-note svg { flex-shrink: 0; opacity: 0.6; }

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

@keyframes gateSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── DECORATIVE: thin terracotta top border on card ──────── */
.gate-card::before {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: #8b5e3c;
  border-radius: 2px;
  margin-bottom: 28px;
  opacity: 0.6;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .gate-inner { padding: 24px 16px; gap: 28px; }
  .gate-card { padding: 32px 24px 28px; border-radius: 14px; }
  .gate-card__title { font-size: 1.65rem; }
  .gate-logo-wrap { width: 52px; height: 52px; }
}

@media (max-height: 620px) {
  .gate-inner { gap: 20px; }
  .gate-brand  { gap: 8px; }
  .gate-logo-wrap { width: 44px; height: 44px; }
  .gate-card { padding: 28px 32px 24px; }
  .gate-card__header { margin-bottom: 20px; }
  .gate-card__title { font-size: 1.5rem; }
}
