/* =============================================================
   GOLF LINKS — login.css
   Full-screen luxury login page, matching the site aesthetic
   Warm cream palette · Castelfalfi typography · Terracotta accent
   ============================================================= */

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

:root {
  --cream:      #f5f0e8;
  --cream-lt:   #faf7f2;
  --dark:       #1a1510;
  --text:       #1a1510;
  --text-mid:   #5c5148;
  --text-light: #a8998a;
  --terra:      #8b5e3c;
  --terra-lt:   #c4936a;
  --line:       rgba(26,21,16,0.12);
  --white:      #ffffff;
  --error:      #b94040;
  --error-bg:   rgba(185,64,64,0.07);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans:    'Jost', system-ui, sans-serif;
  --font-body:    'EB Garamond', Georgia, serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── NOISE GRAIN ──────────────────────────────────────────── */
#loginNoise {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.022;
  mix-blend-mode: multiply;
}

/* ── BACK LINK ─────────────────────────────────────────────── */
.login-back {
  position: fixed;
  top: 28px;
  left: 36px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease, gap 0.3s ease;
}
.login-back:hover { color: var(--terra); gap: 12px; }

/* ── LAYOUT ────────────────────────────────────────────────── */
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── BRAND PANEL (left — dark) ─────────────────────────────── */
.login-brand {
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-brand__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 48px;
  gap: 0;
}

/* Decorative cross */
.login-brand__cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.login-brand__cross-h,
.login-brand__cross-v {
  display: block;
  position: absolute;
  background: rgba(196,147,106,0.12);
}
.login-brand__cross-h {
  width: 280px; height: 1px;
  top: 0; left: 50%;
  transform: translateX(-50%);
}
.login-brand__cross-v {
  width: 1px; height: 280px;
  left: 0; top: 50%;
  transform: translateY(-50%);
}

/* Logo */
.login-brand__logo {
  width: 80px;
  height: 80px;
  margin-bottom: 32px;
  animation: fadeUp 0.9s var(--ease-out) 0.1s both;
}
.login-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(10);
  opacity: 0.9;
}

/* Wordmark */
.login-brand__wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  animation: fadeUp 0.9s var(--ease-out) 0.2s both;
}
.login-brand__wordmark-sans {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: 0.55rem;
  letter-spacing: 0.52em;
  padding-right: 0.52em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.login-brand__wordmark-serif {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.2rem;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Tagline / Admin Panel label */
.login-brand__tagline {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--terra-lt);
  margin-bottom: 52px;
  animation: fadeUp 0.9s var(--ease-out) 0.2s both;
}

/* Rule */
.login-brand__rule {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(196,147,106,0.35), transparent);
  margin-bottom: 28px;
  animation: growLine 1s var(--ease-out) 0.5s both;
}
@keyframes growLine { from { height: 0; opacity: 0; } to { height: 60px; opacity: 1; } }

/* Quote */
.login-brand__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255,255,255,0.22);
  line-height: 1.7;
  animation: fadeUp 0.9s var(--ease-out) 0.6s both;
}

/* Terracotta orb */
.login-brand__orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,94,60,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

/* ── FORM PANEL (right — cream) ─────────────────────────────── */
.login-form-panel {
  background: var(--cream-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  border-left: 1px solid var(--line);
}

.login-form-inner {
  width: 100%;
  max-width: 380px;
  animation: fadeUp 0.8s var(--ease-out) 0.25s both;
  transition: transform 0.4s ease;
}

.login-form-header {
  margin-bottom: 40px;
}

.login-form-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 14px;
  display: block;
}

.login-form-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}
.login-form-title__sans {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--text-mid);
  display: block;
}
.login-form-title__serif {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  display: block;
}

.login-form-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
  opacity: 0.9;
}

/* ── ERROR ──────────────────────────────────────────────────── */
.login-error {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid rgba(185,64,64,0.18);
  border-radius: 6px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  margin-bottom: 0;
}
.login-error.is-visible {
  max-height: 60px;
  opacity: 1;
  padding: 10px 14px;
  margin-bottom: 20px;
}

/* ── FORM FIELDS ─────────────────────────────────────────────── */
.login-form { display: flex; flex-direction: column; gap: 22px; }

.login-field { display: flex; flex-direction: column; gap: 8px; }

.login-field__label {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.login-field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field__icon {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  pointer-events: none;
  flex-shrink: 0;
}

.login-field__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 44px 12px 42px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  appearance: none;
}
.login-field__input::placeholder { color: var(--text-light); opacity: 0.65; font-style: italic; }
.login-field__input:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(139,94,60,0.1);
}

.login-field__toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  opacity: 0.4;
  padding: 4px;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
}
.login-field__toggle:hover { opacity: 0.8; }

/* ── SUBMIT BUTTON ──────────────────────────────────────────── */
.login-submit {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--dark);
  border: 1px solid var(--dark);
  border-radius: 4px;
  padding: 16px 32px;
  cursor: pointer;
  transition: background 0.4s ease, gap 0.3s ease, opacity 0.3s ease;
  position: relative;
}
.login-submit:hover:not(:disabled) { background: #2e2820; gap: 18px; }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.login-submit--success {
  background: #2d6a4f !important;
  border-color: #2d6a4f !important;
}

.login-submit__arrow { flex-shrink: 0; }

/* Spinner inside button */
.login-submit__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FORM FOOTER TEXT ────────────────────────────────────────── */
.login-form-footer {
  margin-top: 36px;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 200;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: center;
  opacity: 0.6;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}
.shake { animation: shake 0.45s ease !important; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  html, body { overflow: auto; }
  .login-wrap { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .login-brand {
    padding: 80px 32px 60px;
    min-height: 50vh;
  }
  .login-form-panel {
    padding: 48px 28px 60px;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .login-back { top: 16px; left: 20px; }
  .login-brand__logo { width: 54px; height: 54px; }
}
