@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --clp-gold: #c9a84c;
  --clp-gold-light: #e8c97a;
  --clp-gold-dim: rgba(201,168,76,0.15);
  --clp-gold-border: rgba(201,168,76,0.35);
  --clp-dark: #0e0d0c;
  --clp-dark2: #161512;
  --clp-dark3: #1c1a16;
  --clp-text: #f0ebe0;
  --clp-muted: rgba(240,235,224,0.45);
  --clp-muted2: rgba(240,235,224,0.22);
  --clp-radius: 4px;
  --clp-font-serif: 'Cormorant Garamond', Georgia, serif;
  --clp-font-sans: 'DM Sans', system-ui, sans-serif;
}

/* ── Gate wrapper ── */
.clp-gate {
  font-family: var(--clp-font-sans);
  margin: 2em 0;
  width: 100%;
  position: relative;
}

/* ── Split layout ── */
.clp-gate-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

/* ── Left panel ── */
.clp-gate-left {
  background: var(--clp-dark);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  overflow: hidden;
}

.clp-gate-left-glow {
  position: absolute;
  top: -80px;
  left: -80px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(201,168,76,0.18) 0%, transparent 65%);
  pointer-events: none;
}

.clp-gate-left-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.5;
  pointer-events: none;
}

.clp-gate-brand-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--clp-gold-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clp-gold);
  margin-bottom: 20px;
  width: fit-content;
  position: relative;
  z-index: 1;
}

.clp-gate-big-title {
  font-family: var(--clp-font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  color: var(--clp-text);
  letter-spacing: 0.05em;
  line-height: 1;
  margin: 0;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}

/* ── Right panel ── */
.clp-gate-right {
  background: var(--clp-dark2);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
}

/* ── Top identity row ── */
.clp-gate-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.clp-gate-id-icon {
  width: 46px;
  height: 46px;
  background: var(--clp-dark3);
  border: 1px solid var(--clp-gold-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clp-gate-id-icon svg {
  width: 20px;
  height: 20px;
}

.clp-gate-id-meta {
  display: flex;
  flex-direction: column;
}

.clp-gate-id-eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clp-gold);
  margin-bottom: 2px;
}

.clp-gate-id-name {
  font-size: 0.9375rem;
  color: var(--clp-text);
  font-weight: 300;
}

/* ── Heading ── */
.clp-gate-heading {
  font-family: var(--clp-font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--clp-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 10px;
  line-height: 1.1;
}

.clp-gate-subtext {
  font-size: 0.875rem;
  color: var(--clp-muted);
  line-height: 1.65;
  margin: 0 0 32px;
}

/* ── Form ── */
.clp-field-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clp-muted);
  margin-bottom: 8px;
  display: block;
}

.clp-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.clp-password-input {
  width: 100%;
  padding: 15px 46px 15px 18px;
  background: var(--clp-dark3);
  border: 1px solid var(--clp-gold-border);
  border-radius: var(--clp-radius);
  color: #ffffff;
  font-family: var(--clp-font-sans);
  font-size: 1.9375rem;
  outline: none;
  transition: all 0.22s;
  box-sizing: border-box;
  letter-spacing: 0.02em;
}

.clp-password-input::placeholder {
  color: var(--clp-muted2);
  font-style: italic;
  letter-spacing: 0;
}

.clp-password-input:focus {
  border-color: var(--clp-gold);
  background: #dfdfdf;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1), inset 0 0 0 1px rgba(201,168,76,0.08);
}

.clp-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clp-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.clp-toggle-pw:hover { color: var(--clp-gold); }
.clp-toggle-pw svg { width: 17px; height: 17px; }

.clp-submit-btn {
  width: 100%;
  padding: 15px 24px;
  background: var(--clp-gold);
  color: #0e0d0c;
  border: none;
  border-radius: var(--clp-radius);
  font-family: var(--clp-font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.22s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.clp-submit-btn:hover {
  background: var(--clp-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.25);
}
.clp-submit-btn:active { transform: translateY(0); }
.clp-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.clp-submit-arrow {
  font-size: 1rem;
  transition: transform 0.2s;
}
.clp-submit-btn:not(:disabled):hover .clp-submit-arrow { transform: translateX(3px); }

/* ── Attempt dots ── */
.clp-attempt-dots {
  display: flex;
  gap: 5px;
  margin-top: 14px;
}

.clp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clp-muted2);
  transition: background 0.3s;
}

.clp-dot.used { background: rgba(201,168,76,0.5); }
.clp-dot.fail { background: rgba(220,80,80,0.7); }

/* ── Error ── */
.clp-error {
  display: none;
  font-size: 0.8rem;
  color: #e07070;
  margin-top: 8px;
  letter-spacing: 0.02em;
}
.clp-error.clp-show { display: block; }

/* ── Unlocked ── */
.clp-content.clp-hidden { display: none !important; }
.clp-content.clp-unlocked { animation: clp-reveal 0.6s cubic-bezier(0.22,1,0.36,1) both; }

@keyframes clp-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .clp-gate-split { grid-template-columns: 1fr; }
  .clp-gate-left { min-height: 200px; padding: 28px; }
  .clp-gate-big-title { font-size: 2.5rem; }
  .clp-gate-right { padding: 32px 28px; }
}

/* ── Admin notice ── */
.clp-admin-notice {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #8a6e20;
}
