/* ═══════════════════════════════════════════════════════════════════════════
   Hayabusa Registration System — Stylesheet
   Matches the dark luxury aesthetic of hayabusamanpower.com
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties (mirrors site :root) ──────────────────────────── */
.hbr-wrap, .hbr-wrap * {
  box-sizing: border-box;
}

.hbr-wrap {
  --ink:    #080d14;
  --ink2:   #0e1823;
  --ink3:   #162130;
  --gold:   #c9a84c;
  --gold2:  #e8c97a;
  --gold3:  rgba(201,168,76,.12);
  --red:    #b83232;
  --cream:  #f5f1ea;
  --sand:   #ece6d8;
  --white:  #ffffff;
  --mist:   rgba(255,255,255,.06);
  --mist2:  rgba(255,255,255,.12);
  --gray:   #7a8494;
  --green:  #2ecc71;
  --serif:  'Cormorant Garamond', Georgia, serif;
  --display:'Cinzel', serif;
  --sans:   'DM Sans', sans-serif;
  --ease:   cubic-bezier(.25, .46, .45, .94);

  font-family: var(--sans);
  color: var(--cream);
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ─── Page Header ─────────────────────────────────────────────────────────── */
.hbr-page-header {
  text-align: center;
  margin-bottom: 52px;
  animation: hbrFadeUp .7s var(--ease) both;
}

.hbr-page-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 1.2rem;
}

.hbr-page-eyebrow__line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hbr-page-eyebrow__text {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: uppercase;
}

.hbr-page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}

.hbr-page-title em {
  font-style: italic;
  color: var(--gold2);
}

.hbr-page-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.4);
  font-weight: 300;
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Card ────────────────────────────────────────────────────────────────── */
.hbr-card {
  position: relative;
  background: var(--ink2);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: 4px;
  padding: 52px 48px;
  overflow: hidden;
  animation: hbrFadeUp .8s .1s var(--ease) both;
}

/* Top gold line */
.hbr-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Decorative kanji watermark */
.hbr-card__kanji {
  position: absolute;
  right: -12px;
  bottom: -20px;
  font-family: var(--serif);
  font-size: 14rem;
  font-weight: 300;
  color: rgba(201,168,76,.035);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ─── Form ────────────────────────────────────────────────────────────────── */
.hbr-form {
  position: relative;
  z-index: 1;
}

/* 2-column rows */
.hbr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .hbr-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hbr-card {
    padding: 36px 24px;
  }
  .hbr-card__kanji {
    font-size: 8rem;
  }
}

/* ─── Field Groups ────────────────────────────────────────────────────────── */
.hbr-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hbr-field-group--full {
  margin-bottom: 24px;
}

.hbr-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(201,168,76,.7);
}

.hbr-required {
  color: var(--red);
  margin-left: 2px;
}

/* ─── Input Wrapper ───────────────────────────────────────────────────────── */
.hbr-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.hbr-input-icon {
  position: absolute;
  left: 14px;
  color: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color .2s;
}

.hbr-input {
  width: 100%;
  background: rgba(8,13,20,.6);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 3px;
  color: var(--cream);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 300;
  padding: 13px 44px 13px 44px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  -webkit-appearance: none;
}

.hbr-input::placeholder {
  color: rgba(255,255,255,.2);
  font-weight: 300;
}

.hbr-input:hover {
  border-color: rgba(201,168,76,.3);
}

.hbr-input:focus {
  border-color: var(--gold);
  background: rgba(8,13,20,.8);
  box-shadow: 0 0 0 3px rgba(201,168,76,.08);
}

.hbr-input:focus + * + .hbr-input-icon,
.hbr-input-wrap:focus-within .hbr-input-icon {
  color: var(--gold);
}

/* Valid / Invalid states */
.hbr-input.hbr-valid {
  border-color: rgba(46,204,113,.5);
}

.hbr-input.hbr-invalid {
  border-color: rgba(184,50,50,.7);
  box-shadow: 0 0 0 3px rgba(184,50,50,.08);
}

/* ─── Field Status Icon (✓ / ✗) ───────────────────────────────────────────── */
.hbr-field-status {
  position: absolute;
  right: 14px;
  font-size: .85rem;
  line-height: 1;
  opacity: 0;
  transition: opacity .2s;
}

.hbr-input.hbr-valid  ~ .hbr-field-status::after { content: '✓'; color: var(--green); opacity: 1; }
.hbr-input.hbr-invalid ~ .hbr-field-status::after { content: '✗'; color: var(--red);   opacity: 1; }
.hbr-input.hbr-valid  ~ .hbr-field-status,
.hbr-input.hbr-invalid ~ .hbr-field-status { opacity: 1; }

/* ─── Password toggle button ──────────────────────────────────────────────── */
.hbr-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color .2s;
  z-index: 2;
}

.hbr-toggle-pw:hover { color: var(--gold); }

/* ─── Password Strength Meter ─────────────────────────────────────────────── */
.hbr-strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.hbr-strength-bar {
  display: flex;
  gap: 4px;
  flex: 1;
}

.hbr-strength-seg {
  height: 3px;
  flex: 1;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  transition: background .3s;
}

.hbr-strength-seg.active-0 { background: var(--red); }
.hbr-strength-seg.active-1 { background: #e67e22; }
.hbr-strength-seg.active-2 { background: #f1c40f; }
.hbr-strength-seg.active-3 { background: var(--green); }

.hbr-strength-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  min-width: 44px;
  color: rgba(255,255,255,.4);
  transition: color .3s;
}

/* ─── Password Rules ──────────────────────────────────────────────────────── */
.hbr-pw-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 4px;
}

.hbr-rule {
  font-size: .68rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .05em;
  transition: color .2s;
}

.hbr-rule.hbr-rule-pass {
  color: var(--green);
}

/* ─── Field Hints & Errors ────────────────────────────────────────────────── */
.hbr-field-hint {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  font-weight: 300;
  line-height: 1.5;
}

.hbr-field-hint.success { color: var(--green); }
.hbr-field-hint.error   { color: var(--red);   }

.hbr-field-error {
  font-size: .72rem;
  color: #d44040;
  font-weight: 400;
  min-height: 0;
  overflow: hidden;
  transition: max-height .25s var(--ease), opacity .2s;
  max-height: 0;
  opacity: 0;
}

.hbr-field-error.visible {
  max-height: 60px;
  opacity: 1;
}

/* ─── Checkbox ────────────────────────────────────────────────────────────── */
.hbr-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.hbr-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.hbr-checkbox-custom {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background: rgba(8,13,20,.6);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2px;
  transition: border-color .2s, background .2s;
}

.hbr-checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid var(--ink);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(0);
  transition: transform .15s var(--ease);
  margin-top: -2px;
}

.hbr-checkbox:checked + .hbr-checkbox-custom {
  background: var(--gold);
  border-color: var(--gold);
}

.hbr-checkbox:checked + .hbr-checkbox-custom::after {
  transform: rotate(45deg) scale(1);
}

.hbr-checkbox-label:hover .hbr-checkbox-custom {
  border-color: var(--gold);
}

.hbr-checkbox-text {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  font-weight: 300;
  line-height: 1.6;
}

.hbr-checkbox-text a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.hbr-checkbox-text a:hover {
  border-color: var(--gold);
}

/* ─── reCAPTCHA ───────────────────────────────────────────────────────────── */
.hbr-recaptcha {
  margin-top: 4px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.hbr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: 15px 32px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.hbr-btn--gold {
  background: var(--gold);
  color: var(--ink);
}

.hbr-btn--gold:hover {
  background: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,.25);
}

.hbr-btn--gold:active { transform: translateY(0); }

.hbr-btn--full {
  width: 100%;
  margin-top: 8px;
}

/* Loading state */
.hbr-btn.hbr-loading .hbr-btn__text,
.hbr-btn.hbr-loading .hbr-btn__icon { opacity: 0; }

.hbr-btn.hbr-loading .hbr-btn__spinner { display: block; }

.hbr-btn__spinner {
  display: none;
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(8,13,20,.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: hbrSpin .7s linear infinite;
}

/* ─── Global Notice ───────────────────────────────────────────────────────── */
.hbr-notice-global {
  padding: 16px 20px;
  border-radius: 3px;
  font-size: .88rem;
  line-height: 1.6;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: hbrFadeUp .4s var(--ease) both;
}

/* ─── Notice variants ─────────────────────────────────────────────────────── */
.hbr-notice {
  padding: 14px 18px;
  border-radius: 3px;
  font-size: .88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hbr-notice--success,
.hbr-notice-global.hbr-notice--success {
  background: rgba(46,204,113,.08);
  border: 1px solid rgba(46,204,113,.3);
  color: #2ecc71;
}

.hbr-notice--error,
.hbr-notice-global.hbr-notice--error {
  background: rgba(184,50,50,.1);
  border: 1px solid rgba(184,50,50,.4);
  color: #d44040;
}

.hbr-notice--info,
.hbr-notice-global.hbr-notice--info {
  background: rgba(201,168,76,.08);
  border: 1px solid rgba(201,168,76,.25);
  color: var(--gold2);
}

.hbr-notice--warning {
  background: rgba(230,126,34,.08);
  border: 1px solid rgba(230,126,34,.3);
  color: #e67e22;
  font-size: .82rem;
}

.hbr-notice__icon {
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Login Link ──────────────────────────────────────────────────────────── */
.hbr-login-link {
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.3);
  margin-top: 20px;
  font-weight: 300;
}

.hbr-login-link a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
  transition: color .2s;
}

.hbr-login-link a:hover { color: var(--gold2); }

/* ─── Verify Page ─────────────────────────────────────────────────────────── */
.hbr-verify-wrap {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Animations ──────────────────────────────────────────────────────────── */
@keyframes hbrFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes hbrSpin {
  to { transform: rotate(360deg); }
}

/* ─── Dark theme override for WP default login page ──────────────────────── */
.login #login_error,
.login .message {
  border-left-color: var(--gold);
}
