/* =============================================================================
   main.css — PITCHD Global Styles
   Import in every HTML page:
   <link rel="stylesheet" href="assets/css/main.css">
   ============================================================================= */

/* ── GOOGLE FONTS ────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── CSS VARIABLES ───────────────────────────────────────────────────────────── */
:root {
  /* Brand colours */
  --gold:           #C9A84C;
  --gold-light:     #E2C47A;
  --gold-dim:       rgba(201, 168, 76, 0.12);
  --gold-dim-strong:rgba(201, 168, 76, 0.20);

  /* Backgrounds */
  --bg:             #0E0E0E;
  --bg-2:           #161616;
  --bg-3:           #1F1F1F;
  --bg-4:           #2A2A2A;
  --bg-5:           #333333;

  /* Text */
  --text:           #F0EDE6;
  --text-muted:     #8A8680;
  --text-dim:       #4A4744;

  /* Borders */
  --border-gold:    rgba(201, 168, 76, 0.20);
  --border-sub:     rgba(255, 255, 255, 0.06);
  --border-subtle:  rgba(255, 255, 255, 0.04);

  /* Semantic */
  --success:        #1D9E75;
  --danger:         #E24B4A;
  --warning:        #BA7517;
  --info:           #378ADD;

  /* Typography */
  --font-display:   'Cormorant Garamond', serif;
  --font-body:      'DM Sans', sans-serif;

  /* Spacing */
  --nav-height:     68px;
  --container:      1100px;
  --radius:         2px;
  --radius-md:      4px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: var(--font-body); }

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────────────── */
.font-display  { font-family: var(--font-display); }
.font-body     { font-family: var(--font-body); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
}

.text-gold     { color: var(--gold); }
.text-muted    { color: var(--text-muted); }
.text-dim      { color: var(--text-dim); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }

.label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── LAYOUT ───────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.page-wrap {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ── NAVIGATION ───────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(14, 14, 14, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-logo-sub {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-left: 8px;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-link:hover  { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--gold); }

.nav-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Avatar dropdown */
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  cursor: pointer;
  margin-left: 8px;
  position: relative;
  transition: background 0.2s;
}
.nav-avatar:hover { background: var(--gold-dim-strong); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  min-width: 180px;
  z-index: 200;
  display: none;
  flex-direction: column;
}
.dropdown-menu.open { display: flex; }

.dropdown-item {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.15s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 300;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover      { color: var(--text); background: var(--bg-3); }
.dropdown-item.danger     { color: var(--danger); }
.dropdown-item.danger:hover { background: rgba(226,75,74,0.08); }

.dropdown-divider {
  height: 1px;
  background: var(--border-gold);
  margin: 4px 0;
}

/* ── BUTTONS ───────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
}
.btn-primary:hover:not(:disabled) { background: var(--gold-light); border-color: var(--gold-light); }

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}
.btn-ghost:hover:not(:disabled) { background: var(--gold-dim); border-color: var(--gold); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--bg-5);
}
.btn-outline:hover:not(:disabled) { color: var(--text); border-color: var(--text-dim); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(226,75,74,0.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(226,75,74,0.08); }

.btn-sm  { font-size: 10px; padding: 7px 16px; }
.btn-lg  { font-size: 13px; padding: 14px 36px; }
.btn-full { width: 100%; }

/* ── FORMS ─────────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--bg-5);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  padding: 11px 14px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus  { border-color: var(--gold); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-dim); }
.form-textarea { resize: vertical; line-height: 1.6; }
.form-select option { background: var(--bg-3); }

.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 44px; }

.input-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}
.input-action:hover { opacity: 1; }

.form-error   { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.form-success { font-size: 12px; color: var(--success); margin-top: 6px; display: none; }
.form-error.show,
.form-success.show { display: block; }

/* Password strength */
.strength-wrap  { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.strength-bar   { flex: 1; height: 3px; background: var(--bg-4); border-radius: 2px; overflow: hidden; }
.strength-fill  { height: 100%; border-radius: 2px; width: 0; transition: width 0.3s, background 0.3s; }
.strength-label { font-size: 11px; min-width: 44px; transition: color 0.3s; }

/* Role selector */
.role-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.role-btn {
  background: var(--bg-3);
  border: 1px solid var(--bg-5);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.role-btn small {
  display: block;
  font-size: 10px;
  opacity: 0.6;
  margin-top: 3px;
  font-weight: 300;
}
.role-btn:hover,
.role-btn.selected {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

/* ── MODAL ─────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  width: 100%;
  max-width: 440px;
  padding: 48px;
  position: relative;
  transform: translateY(12px);
  transition: transform 0.25s;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 32px;
}
.modal-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 0;
  cursor: pointer;
  margin-bottom: -1px;
  transition: all 0.2s;
}
.modal-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.modal-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-dim);
}
.modal-switch a {
  color: var(--gold);
  cursor: pointer;
}

.back-link {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 24px;
  display: inline-block;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  font-family: var(--font-body);
}
.back-link:hover { color: var(--text); }

/* ── CARDS ─────────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border-sub);
  padding: 24px;
  border-radius: var(--radius);
}
.card-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* ── BADGES & TAGS ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius);
}
.badge-gold    { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-looking { background: rgba(55,138,221,0.12); color: #378ADD; border: 1px solid rgba(55,138,221,0.2); }
.badge-offering{ background: rgba(29,158,117,0.12); color: #1D9E75; border: 1px solid rgba(29,158,117,0.2); }
.badge-general { background: var(--bg-3); color: var(--text-dim); border: 1px solid var(--bg-5); }

.tag {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--bg-3);
  border: 1px solid var(--bg-5);
  padding: 3px 10px;
  border-radius: var(--radius);
}

/* ── DIVIDER ───────────────────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
}
.divider-line { flex: 1; height: 1px; background: var(--border-gold); opacity: 0.4; }
.divider-text { font-size: 10px; letter-spacing: 0.2em; color: var(--text-dim); text-transform: uppercase; }

/* ── SECTION TITLE ─────────────────────────────────────────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title-label::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gold);
  opacity: 0.5;
  display: block;
  border-radius: 2px;
}

/* ── EMPTY STATE ───────────────────────────────────────────────────────────────── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-2);
  border: 1px dashed var(--bg-5);
}
.empty-state p { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }

/* ── ANIMATIONS ────────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-up   { animation: fadeUp 0.6s ease both; }
.fade-up-2 { animation: fadeUp 0.6s ease both 0.1s; }
.fade-up-3 { animation: fadeUp 0.6s ease both 0.2s; }

.pulse     { animation: pulse 2s ease-in-out infinite; }

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--bg-4);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* ── NOISE TEXTURE ─────────────────────────────────────────────────────────────── */
.noise::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' 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");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── SCROLLBAR ─────────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── UTILITY ───────────────────────────────────────────────────────────────────── */
.d-none  { display: none !important; }
.d-flex  { display: flex; }
.d-grid  { display: grid; }
.gap-8   { gap: 8px; }
.gap-16  { gap: 16px; }
.gap-24  { gap: 24px; }
.mt-8    { margin-top: 8px; }
.mt-16   { margin-top: 16px; }
.mt-24   { margin-top: 24px; }
.mb-8    { margin-bottom: 8px; }
.mb-16   { margin-bottom: 16px; }
.mb-24   { margin-bottom: 24px; }
.p-16    { padding: 16px; }
.p-24    { padding: 24px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.w-full  { width: 100%; }

/* ── RESPONSIVE ────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  .modal { margin: 20px; padding: 32px 24px; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 600px) {
  .hide-sm { display: none !important; }
  .btn-lg  { padding: 12px 24px; font-size: 12px; }
}
