/* ── Top Nav (landing / content pages) ──────────────────────────── */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 60px;
  background: linear-gradient(to bottom, var(--nav-bg) 60%, transparent);
  backdrop-filter: blur(8px);
  animation: fadeDown .8s ease both;
  transition: background .4s ease, opacity .4s ease;
}

.nav-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-logo img { height: 32px; transition: opacity .3s; }

.nav-links {
  display: flex; gap: 40px; list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .3s;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--cowrie-gold);
  padding: 10px 24px;
  border: none; border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .3s, background .4s, color .4s;
}

.nav-cta:hover { opacity: .85; }

.nav-back {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .3s;
}

.nav-back:hover { color: var(--cowrie-gold); }

/* ── Theme Toggle ────────────────────────────────────────────────── */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--bg-rim);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s, background .3s;
  color: var(--cowrie-gold);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--cowrie-gold);
  background: rgba(var(--ring-base), .08);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ── Logo Swap ───────────────────────────────────────────────────── */
[data-theme="dark"] .logo-light,
[data-theme="light"] .logo-dark { display: none !important; }

[data-theme="dark"] .logo-dark,
[data-theme="light"] .logo-light { display: inline !important; }

/* ── Hamburger Button ───────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px; height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--cowrie-gold);
  border-radius: 1px;
  transition: transform .3s ease, opacity .3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--cowrie-gold);
  padding: 16px 36px;
  border: none; border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity .3s, transform .3s, background .4s, color .4s;
}

.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-ghost {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: transparent;
  padding: 15px 36px;
  border: 1px solid var(--bg-rim);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color .3s, color .3s;
}

.btn-ghost:hover { border-color: var(--cowrie-gold); color: var(--cowrie-gold); }

.btn-start {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg-primary);
  background: var(--cowrie-gold);
  padding: 12px 28px;
  border-radius: 2px;
  transition: opacity .3s, transform .3s;
}

.btn-start:hover { opacity: .88; transform: translateY(-1px); }

/* Dashboard button system */
.btn {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  text-decoration: none;
  border: none;
}

.btn:hover { opacity: .88; transform: translateY(-1px); }

.btn-gold { background: var(--cowrie-gold); color: var(--bg-primary); }
.btn-outline { background: transparent; color: var(--cowrie-gold); border: 1px solid var(--cowrie-gold); }
.btn-teal { background: var(--growth-teal); color: var(--text-primary); }
.btn-sm { font-size: 10px; padding: 6px 14px; }

/* ── Section Labels ──────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--cowrie-gold);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 16px;
}

.section-label::after {
  content: '';
  display: inline-block;
  width: 48px; height: 1px;
  background: var(--cowrie-gold);
  opacity: .5;
}

h2 {
  font-family: var(--font-edit);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

h2 em {
  font-style: italic;
  color: var(--cowrie-gold);
}

/* ── Tags ─────────────────────────────────────────────────────────── */
.tag {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

.tag-gold { background: var(--gold-dark); color: var(--gold-light); border: 0.5px solid var(--cowrie-gold); }
.tag-teal { background: var(--teal-dark); color: var(--teal-bright); border: 0.5px solid var(--growth-teal); }
.tag-grey { background: var(--bg-rim); color: var(--text-subtle); border: 0.5px solid var(--bg-rim2); }

.tag-teal-outline {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--growth-teal);
  border: 1px solid var(--teal-border);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 32px;
}

.tag-teal-outline::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--growth-teal);
}

/* ── Divider ─────────────────────────────────────────────────────── */
.divider {
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--cowrie-gold), transparent);
  margin: 0 auto;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bg-rim);
}

td {
  font-size: 13px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(42,40,36,.5);
  color: var(--text-secondary);
}

tr:hover td { background: rgba(var(--ring-base),.03); }

/* Status dots */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-active  { background: var(--teal-bright); }
.dot-pending { background: var(--cowrie-gold); }
.dot-draft   { background: var(--text-subtle); }

/* ── Panels ──────────────────────────────────────────────────────── */
.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-rim);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}

/* ── Modals ──────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-rim);
  border-radius: 8px;
  padding: 32px;
  width: 520px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  font-family: var(--font-edit);
  font-weight: 300;
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* ── Forms ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--bg-rim);
  padding: 12px 16px;
  border-radius: 3px;
  outline: none;
  transition: border-color .2s;
}

.form-input:focus { border-color: var(--cowrie-gold); }
.form-input::placeholder { color: var(--text-subtle); }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--bg-rim);
  padding: 12px 16px;
  border-radius: 3px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.form-select:focus { border-color: var(--cowrie-gold); }

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--bg-rim);
  padding: 48px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color .4s;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 18px;
  letter-spacing: .35em;
  color: var(--cowrie-gold);
  text-transform: uppercase;
}

.footer-logo img { height: 24px; vertical-align: middle; }

.footer-tagline {
  font-family: var(--font-edit);
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}

.footer-copy {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--text-subtle);
}

/* ── Mobile: top nav ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .top-nav { padding: 20px 32px; }
  footer { padding: 36px 32px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .top-nav {
    padding: 16px 24px;
    flex-wrap: wrap;
  }

  .nav-links,
  .top-nav > .nav-cta {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    order: 3;
    padding: 24px 0 8px;
    border-top: 1px solid var(--bg-rim);
    margin-top: 16px;
  }

  .top-nav > .nav-cta.open {
    display: inline-block;
    width: 100%;
    order: 4;
    text-align: center;
    padding: 14px 24px;
    margin-bottom: 8px;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 32px 24px;
  }

  .divider { height: 48px; }

  .modal { width: 95vw; padding: 24px; }
}
