/* styles.css — Shared design system. Used by all pages.
   Page-specific rules live in index.css / views.css / article.css. */

/* ─── Design Tokens ─────────────────────────────────── */
:root {
  --ink: #0e0d0b;
  --parchment: #f5f0e8;
  --cream: #faf8f3;
  --gold: #b8924a;
  --gold-light: #d4aa6a;
  --rule: #d6cfc0;
  --muted: #7a7166;
  --accent: #1a3a2a;
  --f-display: "Cormorant Garamond", georgia, serif;
  --f-mono: "DM Mono", "Courier New", monospace;
  --f-body: "Instrument Sans", "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ─── Section Label ─────────────────────────────────── */
.section-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* ─── Buttons ───────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.9rem 2.2rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition:
    background 0.25s,
    transform 0.2s;
}

.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition:
    border-color 0.25s,
    color 0.25s;
}

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

/* ─── Top Navigation ────────────────────────────────── */
nav.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 4rem;
  background: rgb(250 248 243 / 92%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  animation: fadeDown 0.8s ease both;
}

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

.logo-desktop {
  display: block;
  height: 4rem;
  width: auto;
  position: relative;
  top: 5px;
  background: transparent;
}

.logo-mobile {
  display: none;
}

.nav-links {
  display: flex;
  gap: 2.4rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.2s,
    background 0.2s;
  padding: 0.3rem 0.5rem;
}

.nav-links a:hover {
  color: var(--cream);
  background: var(--accent);
}

.nav-links a.active-page {
  color: var(--gold);
}

.nav-cta {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1.4rem;
  text-decoration: none;
  transition: background 0.25s;
}

.nav-cta:hover {
  background: var(--gold);
}

/* ─── Hamburger Button (mobile only) ────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 110;
  order: 3;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile Dropdown Menu ──────────────────────────── */
#mobileMenu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgb(250 248 243 / 97%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  z-index: 99;
  padding-top: 70px;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  pointer-events: none;
}

#mobileMenu.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

#mobileMenu ul {
  list-style: none;
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#mobileMenu ul li a {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  transition:
    color 0.2s,
    padding-left 0.2s;
}

#mobileMenu ul li:last-child a {
  border-bottom: none;
}

#mobileMenu ul li a:hover {
  color: var(--ink);
  padding-left: 0.5rem;
}

/* ─── Practice Area Ticker ──────────────────────────── */
.ticker {
  background: var(--ink);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  animation: ticker 25s linear infinite;
}

.ticker-item {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 50%);
  padding: 0;
}

.ticker-item span {
  color: var(--gold);
  margin: 0 3rem;
}

/* ─── Insight Cards ─────────────────────────────────── */
.insight-card {
  background: var(--parchment);
  padding: 2.5rem;
  transition: background 0.25s;
  cursor: pointer;
}

/* Hover state — inverts the card to dark */
.insight-card:hover {
  background: var(--ink);
  color: var(--cream);
}

.insight-card:hover .insight-tag,
.insight-card:hover .insight-date {
  color: var(--gold-light);
  border-color: rgb(184 146 74 / 30%);
}

.insight-card:hover .insight-title {
  color: var(--cream);
}

.insight-card:hover .insight-excerpt {
  color: rgb(245 240 232 / 60%);
}

.insight-card:hover .read-link {
  color: var(--gold-light);
}

/* Card elements — default (non-hover) colours explicitly set here
   so that cards used as <a> elements don't inherit browser link blue */
.insight-tag {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgb(184 146 74 / 30%);
  padding: 0.2rem 0.6rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  transition:
    color 0.25s,
    border-color 0.25s;
}

.insight-title {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.8rem;
  transition: color 0.25s;
}

.insight-card .insight-title {
  color: var(--ink);
}

.insight-card.featured .insight-title {
  font-size: 1.8rem;
}

.insight-excerpt {
  font-size: 0.85rem;
  line-height: 1.75;
  text-align: justify;
  margin-bottom: 1.2rem;
  transition: color 0.25s;
}

.insight-card .insight-excerpt {
  color: var(--muted);
}

.read-link {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.25s;
}

.insight-card .read-link {
  color: var(--gold);
}

.insight-date {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  transition:
    color 0.25s,
    border-color 0.25s;
}

/* ─── Insights Grid (shared — used on homepage and views page) ── */
.insights-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2px;
}

/* ─── Category Browse Strip ─────────────────────────── */
.category-browse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 2px;
}

.category-browse .filter-label {
  margin-right: 0.4rem;
}

.category-browse .filter-btn {
  text-decoration: none;
  display: inline-block;
}

/* ─── Filter Bar ────────────────────────────────────── */
.filter-bar {
  padding: 1.8rem 4rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: var(--parchment);
}

.filter-label {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.6rem;
}

.filter-btn {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  background: transparent;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ─── Footer ────────────────────────────────────────── */
footer {
  background: var(--ink);
  padding: 3rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--f-display);
  font-size: 1.2rem;
  color: rgb(255 255 255 / 80%);
}

.footer-logo span {
  color: var(--gold);
}

.footer-disclaimer {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgb(255 255 255 / 25%);
  max-width: 500px;
  line-height: 1.6;
  text-align: justify;
}

.footer-copy {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgb(255 255 255 / 30%);
  text-align: right;
}

/* ─── Keyframe Animations ───────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ─── Scroll Reveal ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Shared Mobile Overrides (@768px) ──────────────── */
@media (width <= 768px) {
  nav.topnav {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
    height: 3.5rem;
    width: auto;
  }

  footer {
    padding: 2.5rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copy {
    text-align: left;
  }
}

/* Global accessible focus */
  a:focus-visible,
  button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
