/* BriefTen shared styles — Midnight Ink design system */

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

:root {
  --base:          #1b2a37;
  --surface:       #243447;
  --lifted:        #2e4a5e;
  --border:        rgba(168,191,201,0.10);
  --border-strong: rgba(168,191,201,0.35);
  --text:          #a8bfc9;
  --secondary:     rgba(168,191,201,0.50);
  --muted:         rgba(168,191,201,0.35);
  --faint:         rgba(168,191,201,0.25);
  --accent:        #4fa3d1;
  --gold:          #e8c06a;
}

html, body {
  background: var(--base);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

/* ── Wrap ──────────────────────────────────────────────────── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Nav ───────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s;
  opacity: 0;
  animation: fadeUp 0.3s ease 0.1s both;
}

.site-nav.scrolled {
  background: rgba(27, 42, 55, 0.95);
  backdrop-filter: blur(8px);
}

.site-nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.nav-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link {
  font-size: 13px;
  color: rgba(168,191,201,0.45);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.nav-cta {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1b2a37;
  background: var(--text);
  padding: 8px 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.15s;
}

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

/* Avatar (authenticated state) */
.nav-avatar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.nav-avatar-circle {
  width: 32px;
  height: 32px;
  background: var(--lifted);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.nav-avatar-caret {
  font-size: 10px;
  color: var(--secondary);
  transition: transform 0.15s;
  line-height: 1;
}

.nav-avatar.open .nav-avatar-caret { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  min-width: 180px;
  z-index: 200;
}

.nav-avatar.open .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}

.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { color: var(--text); background: var(--lifted); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.3s ease 0.8s both;
}

.footer-top { border-bottom: 1px solid var(--border); }

.footer-top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 48px;
  padding-bottom: 48px;
  gap: 48px;
}

.footer-brand { flex-shrink: 0; }
.footer-brand .logo { margin-bottom: 10px; }

.footer-brand-tag {
  font-size: 12px;
  color: var(--muted);
  padding-left: 42px;
}

.footer-cols { display: flex; gap: 56px; }

.footer-col-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(168,191,201,0.45);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 11px;
  color: var(--faint);
}

.footer-bottom a {
  color: var(--faint);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--text); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1b2a37;
  background: var(--accent);
  padding: 13px 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  background: transparent;
  padding: 13px 28px;
  text-decoration: none;
  display: inline-block;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

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

.btn-plan {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #1b2a37;
  background: var(--accent);
  padding: 8px 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-plan:hover  { opacity: 0.85; }
.btn-plan-gold   { background: var(--gold); }

/* ── Typography helpers ────────────────────────────────────── */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ── Section layout ────────────────────────────────────────── */
.section-wrapper {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1100px;
  margin: 0 auto;
}

.col-label {
  padding: 48px 0 48px 48px;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
}

.col-content { padding: 48px; }

.section-intro {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--secondary);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 36px;
}

/* ── Feature cards ─────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(168,191,201,0.08);
}

.feature-card {
  background: var(--base);
  padding: 28px;
}

.feature-num {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.feature-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(168,191,201,0.45);
  line-height: 1.7;
}

/* ── Pricing cards ─────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(168,191,201,0.08);
  max-width: 680px;
}

.plan          { background: var(--base);   padding: 28px; }
.plan-featured { background: var(--lifted); padding: 28px; }

.plan-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.plan-price {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.plan-featured .plan-price { color: var(--gold); }

.plan-unit {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.plan-features { list-style: none; margin-bottom: 24px; }

.plan-features li {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(168,191,201,0.45);
  line-height: 1.7;
  padding-left: 12px;
  position: relative;
}

.plan-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 10px;
  top: 4px;
}

/* ── Prose (legal + about pages) ───────────────────────────── */
.prose {
  max-width: 720px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--secondary);
}

.prose h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
}

.prose p { margin-bottom: 16px; }

.prose ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.prose ul li { margin-bottom: 6px; }

.prose a { color: var(--accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

/* ── Page hero (inner pages) ───────────────────────────────── */
.page-hero {
  border-bottom: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.3s ease 0.2s both;
}

.page-hero .wrap {
  padding-top: 56px;
  padding-bottom: 48px;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 16px;
  margin-bottom: 16px;
  max-width: 680px;
}

.page-hero-sub {
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.7;
  max-width: 520px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0.04em;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--accent); }

.form-textarea { resize: vertical; min-height: 120px; }

/* ── Newsletter directory cards ────────────────────────────── */
.newsletter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: rgba(168,191,201,0.08);
}

.newsletter-card {
  background: var(--base);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.15s;
}

.newsletter-card:hover { background: var(--surface); }

.newsletter-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.newsletter-card-desc {
  font-size: 13px;
  color: rgba(168,191,201,0.45);
  line-height: 1.6;
  flex: 1;
}

.newsletter-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(168,191,201,0.08);
  padding: 3px 8px;
}

.newsletter-card-cta {
  display: flex;
  justify-content: flex-end;
}

/* ── Filter strip ──────────────────────────────────────────── */
.filter-strip {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.filter-strip .wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.filter-btn:hover,
.filter-btn.active { color: var(--text); border-color: var(--border-strong); }

.filter-search {
  margin-left: auto;
  background: rgba(168,191,201,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 5px 12px;
  width: 180px;
  outline: none;
  transition: border-color 0.15s;
}

.filter-search:focus { border-color: var(--accent); }

/* ── Animation ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .col-label { padding-left: 24px; }
  .col-content { padding: 32px 24px; }
  .section-grid { grid-template-columns: 1fr; }
  .col-label { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; max-width: 100%; }
  .nav-center { display: none; }
  .footer-top .wrap { flex-direction: column; gap: 32px; }
  .footer-cols { flex-wrap: wrap; gap: 32px; }
  .page-hero h1 { font-size: 34px; }
  .filter-search { width: 100%; margin-left: 0; }
}
