/*
 * auth.css — shared stylesheet for all auth / registration pages
 *
 * Modern luxury fintech aesthetic matching Capitap's Navy/Gold/Cream theme.
 * To customize the accent colour on a specific page, set the variable:
 *   :root { --ap-accent: #A87C3A; --ap-accent-rgb: 168,124,58; }
 */

/* ── Defaults ───────────────────────────────────────────── */
:root {
  --ap-accent: #a87c3a;
  --ap-accent-rgb: 168, 124, 58;
  --ap-navy: #0d1b4b;
  --ap-navy-hover: #152660;
  --ap-gold: #a87c3a;
  --ap-gold-hover: #bd8d45;
  --ap-gray: #5a6478;
  --ap-gray-light: #94a3b8;
  --ap-border: #e8e2d6;
  --ap-border-focus: #a87c3a;
  --ap-cream: #f8f4ec;
  --ap-bg: radial-gradient(
    120% 120% at 50% 0%,
    #ffffff 0%,
    #f8f4ec 65%,
    #f0e8d8 100%
  );
  --logo-h: 42px;

  /* ── Typography — keep in sync with design.css ── */
  --font-body: "Inter", sans-serif;
  --font-display: "Poppins", sans-serif;
  --font-serif: "Cormorant Garant", Georgia, serif;
}

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

/* ── Page ───────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--ap-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ap-navy);
  -webkit-font-smoothing: antialiased;
}

.ap-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  position: relative;
}

.ap-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(168, 124, 58, 0.08) 1px,
    transparent 1px
  );
  background-size: 36px 36px;
  pointer-events: none;
}

/* ── Split Container for Modern Auth Layout ─────────────── */
.ap-split-wrap {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.ap-split-hero {
  padding: 20px 16px;
}

.ap-split-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(168, 124, 58, 0.12);
  color: #a87c3a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.ap-split-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  font-weight: 700;
  color: var(--ap-navy);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.ap-split-title em {
  font-style: italic;
  color: var(--ap-gold);
}

.ap-split-desc {
  font-size: 15px;
  color: var(--ap-gray);
  line-height: 1.7;
  margin-bottom: 32px;
}

.ap-split-perks {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ap-split-perk {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ap-perk-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(13, 27, 75, 0.06);
  border: 1px solid rgba(168, 124, 58, 0.18);
  color: var(--ap-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ap-perk-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-navy);
  margin-bottom: 2px;
}
.ap-perk-text p {
  font-size: 12.5px;
  color: var(--ap-gray);
  line-height: 1.5;
}

/* ── Card ───────────────────────────────────────────────── */
.ap-card {
  background: #ffffff;
  border: 1px solid rgba(168, 124, 58, 0.18);
  border-radius: 20px;
  box-shadow:
    0 24px 64px -12px rgba(13, 27, 75, 0.12),
    0 2px 8px rgba(13, 27, 75, 0.04);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ap-card--wide {
  max-width: 880px;
}
.ap-card--narrow {
  max-width: 440px;
}

.ap-card-header {
  padding: 34px 34px 24px;
  border-bottom: 1px solid #f1ece1;
  text-align: center;
  background: linear-gradient(180deg, #fdfbf7 0%, #ffffff 100%);
}

.ap-card-body {
  padding: 30px 34px 36px;
}

/* Flat card (no header/body split) */
.ap-card--flat {
  padding: 38px 34px 42px;
}

/* ── Icon circle ────────────────────────────────────────── */
.ap-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(var(--ap-accent-rgb), 0.1);
  border: 1px solid rgba(var(--ap-accent-rgb), 0.2);
  color: var(--ap-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}

/* ── Step Indicator Badge ───────────────────────────────── */
.ap-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ap-accent);
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(var(--ap-accent-rgb), 0.08);
}

/* ── Eyebrow ────────────────────────────────────────────── */
.ap-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ap-accent);
  margin-bottom: 12px;
}
.ap-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ap-accent);
}

/* ── Heading ────────────────────────────────────────────── */
.ap-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ap-navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.ap-sub {
  font-size: 13.5px;
  color: var(--ap-gray);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Form ───────────────────────────────────────────────── */
.ap-field {
  margin-bottom: 18px;
}

.ap-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

/* Checkbox field (e.g. Terms / NDA consent) */
.ap-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  line-height: 1.55;
  cursor: pointer;
}
.ap-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--ap-accent);
  cursor: pointer;
  border-radius: 4px;
}
.ap-checkbox-label a {
  color: var(--ap-accent);
  font-weight: 600;
  text-decoration: none;
}
.ap-checkbox-label a:hover {
  text-decoration: underline;
}

.ap-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2dcd2;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ap-navy);
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.ap-input:focus {
  border-color: var(--ap-accent);
  box-shadow: 0 0 0 3.5px rgba(var(--ap-accent-rgb), 0.14);
}
.ap-input::placeholder {
  color: #94a3b8;
}

/* Phone input group */
.ap-phone {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ap-phone .ap-cc {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1.5px solid #e2dcd2;
  border-radius: 10px;
  background: #faf7f2;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ap-navy);
  flex-shrink: 0;
  user-select: none;
}
.ap-phone .ap-cc select {
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
  padding: 10px 4px;
}
.ap-phone .ap-input {
  flex: 1;
}

.ap-input--otp {
  text-align: center;
  font-family: var(--font-display), monospace;
  font-size: 26px;
  letter-spacing: 12px;
  font-weight: 700;
  padding: 14px;
  background: #faf7f2;
  border: 1.5px solid #e2dcd2;
  border-radius: 12px;
  color: var(--ap-navy);
}
.ap-input--otp:focus {
  background: #ffffff;
  border-color: var(--ap-accent);
  box-shadow: 0 0 0 3.5px rgba(var(--ap-accent-rgb), 0.14);
}

/* ── Buttons ────────────────────────────────────────────── */
.ap-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #0d1b4b 0%, #152660 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(13, 27, 75, 0.18);
  transition: all 0.18s ease;
}
.ap-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 27, 75, 0.28);
  opacity: 0.98;
}

/* Accent-coloured submit (company=gold/navy, mentor=green, investor=amber) */
.ap-submit--accent {
  background: linear-gradient(
    135deg,
    var(--ap-accent) 0%,
    rgba(var(--ap-accent-rgb), 0.88) 100%
  );
  box-shadow: 0 4px 14px rgba(var(--ap-accent-rgb), 0.25);
}
.ap-submit--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--ap-accent-rgb), 0.35);
  opacity: 0.96;
}

/* ── Alerts ─────────────────────────────────────────────── */
.ap-alert {
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-alert i {
  font-size: 14px;
  flex-shrink: 0;
}

.ap-alert--error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.ap-alert--success {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

/* ── Feedback modal (success/error), shared by every auth-flow page ── */
.ap-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 75, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.ap-modal-card {
  background: #ffffff;
  border: 1px solid rgba(168, 124, 58, 0.18);
  border-radius: 18px;
  box-shadow: 0 24px 64px -12px rgba(13, 27, 75, 0.25);
  width: 100%;
  max-width: 380px;
  padding: 32px 28px;
  text-align: center;
}
.ap-modal-card p {
  font-size: 14.5px;
  color: var(--ap-navy);
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ── Footer links ───────────────────────────────────────── */
.ap-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.ap-links a {
  font-size: 13px;
  color: var(--ap-accent);
  text-decoration: none;
  font-weight: 500;
}
.ap-links a:hover {
  text-decoration: underline;
}

.ap-footer-note {
  font-size: 13px;
  color: var(--ap-gray);
  text-align: center;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #f1ece1;
}
.ap-footer-note a {
  color: var(--ap-accent);
  font-weight: 600;
  text-decoration: none;
}
.ap-footer-note a:hover {
  text-decoration: underline;
}

.ap-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ap-gray-light);
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1ece1;
  text-align: center;
}
.ap-trust i {
  font-size: 12px;
  color: var(--ap-gold);
}

/* ── 2-column layout ────────────────────────────────────── */
.ap-cols {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
}
.ap-inner-divider {
  border: none;
  border-top: 1px dashed #e2dcd2;
  margin: 28px 0;
}
.ap-col-divider {
  background: repeating-linear-gradient(
    to bottom,
    #e2dcd2 0px,
    #e2dcd2 5px,
    transparent 5px,
    transparent 11px
  );
  width: 1px;
}
.ap-col {
  padding: 36px 30px 44px;
}
.ap-col-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 26px;
}

/* ── Social/quick-access buttons ────────────────────────── */
.ap-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ap-social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition:
    opacity 0.15s,
    transform 0.1s;
}
.ap-social-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.ap-sb-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 13px;
}
.ap-btn-linkedin {
  background: #0077b5;
}
.ap-btn-navy {
  background: var(--ap-navy);
}

.ap-social-note {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  margin-top: 20px;
  line-height: 1.6;
}

/* ── Login email col helpers ────────────────────────────── */
.ap-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  gap: 10px;
}
.ap-forgot {
  font-size: 13px;
  color: var(--ap-accent);
  text-decoration: none;
  white-space: nowrap;
}
.ap-forgot:hover {
  text-decoration: underline;
}

.ap-submit--inline {
  width: auto;
  padding: 10px 22px;
  font-size: 13.5px;
  margin-top: 0;
}

/* ── Create account column ──────────────────────────────── */
.ap-create-note {
  font-size: 13px;
  color: var(--ap-gray);
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.6;
}
.ap-get-started {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--ap-navy);
  color: #fff;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 27, 75, 0.18);
  transition: all 0.18s ease;
}
.ap-get-started:hover {
  background: var(--ap-navy-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 27, 75, 0.28);
}

/* ── Logo size — synced with site nav ─── */
.an-logo img {
  height: var(--logo-h);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .ap-split-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .ap-split-hero {
    text-align: center;
    padding: 0;
  }
  .ap-split-badge {
    margin: 0 auto 16px;
  }
  .ap-split-desc {
    margin: 0 auto 24px;
    max-width: 520px;
  }
  .ap-split-perks {
    display: none;
  }
}

@media (max-width: 680px) {
  .ap-cols {
    grid-template-columns: 1fr;
  }
  .ap-col-divider {
    width: auto;
    height: 1px;
    background: repeating-linear-gradient(
      to right,
      #e2dcd2 0px,
      #e2dcd2 5px,
      transparent 5px,
      transparent 11px
    );
  }
  .ap-col {
    padding: 28px 20px;
  }
  .ap-card--flat {
    padding: 32px 20px 36px;
  }
  .ap-card-header {
    padding: 28px 20px 20px;
  }
  .ap-card-body {
    padding: 24px 20px 28px;
  }
  .ap-page {
    padding: 32px 16px 48px;
  }
}
