@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap');

/* ============================================================
   thesopranos.com — site theme
   All pages link to this file. Do not duplicate CSS inline.

   HERO IMAGE: when a real image is ready, set on .site-hero:
     background-image: url('/images/hero.jpg');
     background-size: cover;
     background-position: center right;
   The dark overlay gradient (::before) stays as-is.
   ============================================================ */

:root {
  --bg:            #0a0a0a;
  --fg:            #e8e8e8;
  --accent:        #C41230;
  --accent-bright: #E0142E;
  --gold:          #C5A028;
  --muted:         #9a9a9a;
  --border:        #1e1e1e;
  --card-bg:       #101010;
  --font-display:  'Oswald', Impact, 'Arial Black', 'Haettenschweiler', sans-serif;
  --font-body:     Georgia, 'Times New Roman', serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: #e6c85c; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
}
.site-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  row-gap: 0.65rem;
  max-width: 82rem;
  margin: 0 auto;
}
.site-nav-rows {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex: 1 1 12rem;
  min-width: 0;
  order: 2;
}
.nav-row-hub a {
  opacity: 0.92;
}
.nav-social {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  color: var(--muted);
  order: 3;
}
.nav-social-item {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
}
.nav-social-item svg {
  display: block;
}
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none !important;
  color: var(--fg);
  flex-shrink: 0;
  order: 1;
}
.site-logo .logo-the {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--fg);
}
.site-logo .logo-main {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.25rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

@media (max-width: 1100px) {
  .site-nav-rows {
    align-items: flex-start;
    flex-basis: 100%;
    order: 3;
  }
  .nav-social {
    order: 2;
    margin-left: auto;
  }
}

/* ---- Hero (homepage only) ---- */
.site-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background-color: #0a0a0a;
  overflow: hidden;
}
.site-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  filter: brightness(0.52) saturate(0.28) contrast(1.15);
  z-index: 0;
}
.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.45) 55%,
    rgba(0,0,0,0.1) 100%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 82rem;
  margin: 0 auto;
  padding: 4rem 1.75rem;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 1.5rem;
}
.hero-rule {
  width: 3rem;
  height: 3px;
  background: var(--accent);
  border: none;
  margin: 0 0 1.25rem;
}
.hero-quote {
  font-style: italic;
  color: var(--accent-bright);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  margin: 0 0 0.2rem;
}
.hero-quote-attr {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem;
}
.hero-desc {
  color: var(--fg);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  max-width: 34rem;
  margin: 0 0 2.25rem;
  opacity: 0.82;
  line-height: 1.65;
}
.hero-cta {
  display: inline-block;
  border: 2px solid var(--fg);
  color: var(--fg) !important;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.8rem 1.9rem;
  text-decoration: none !important;
  transition: background 0.18s, color 0.18s;
}
.hero-cta:hover {
  background: var(--fg);
  color: var(--bg) !important;
}

/* Text-only hero rotation (no images). Second slide hidden when reduced motion. */
.hero-slides {
  position: relative;
  min-height: 22rem;
  margin: 0 0 0.5rem;
}
@media (min-width: 700px) {
  .hero-slides { min-height: 26rem; }
}
.hero-slide {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  max-width: 44rem;
  opacity: 0;
  animation: hero-slide-fade 12s ease-in-out infinite;
}
.hero-slide:nth-child(1) {
  animation-delay: 0s;
}
.hero-slide:nth-child(2) {
  animation-delay: -6s;
}
@keyframes hero-slide-fade {
  0%, 42% { opacity: 1; z-index: 1; }
  48%, 90% { opacity: 0; z-index: 0; }
  96%, 100% { opacity: 1; z-index: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides {
    min-height: 0;
  }
  .hero-slide {
    position: relative;
    opacity: 1 !important;
    animation: none !important;
  }
  .hero-slide:nth-child(2) {
    display: none;
  }
}

/* ---- Homepage 4-col grid ---- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 82rem;
  margin: 0 auto;
}
.home-grid-cell {
  padding: 2rem 1.75rem;
  border-right: 1px solid var(--border);
}
.home-grid-cell:last-child { border-right: none; }
.home-grid-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.home-grid-label svg {
  flex-shrink: 0;
  color: var(--accent);
}
.home-grid-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, #1a1009 0%, #0d0d0d 100%);
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.75rem 0.9rem;
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid #1e1e1e;
  position: relative;
  overflow: hidden;
}
.home-grid-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(196,18,48,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.home-grid-cell h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--fg);
  margin: 0 0 0.35rem;
  text-transform: none;
  letter-spacing: 0;
}
.home-grid-cell p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.home-grid-link {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.home-grid-link:hover { color: var(--accent-bright); text-decoration: none; }
.home-grid-link::after { content: ' ›'; }

/* ---- Inner page main ---- */
main {
  padding: 2rem 1.5rem 4rem;
  max-width: 54rem;
  margin: 0 auto;
}
main.wide { max-width: 78rem; }

/* ---- Headings ---- */
h1.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 1.5rem 0 0.5rem;
  line-height: 1.1;
}
h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 2rem;
}

/* ---- Cards ---- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  margin-top: 1rem;
  background: var(--border);
  border: 1px solid var(--border);
}
.card {
  background: var(--card-bg);
  padding: 1.25rem;
}
.card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: normal;
}
.card .meta { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ---- Ad unit ---- */
.ad-unit { min-height: 90px; margin: 1.5rem 0; }
.ad-unit ins { display: block; }

/* ---- Legacy content ---- */
.legacy-content { overflow-wrap: anywhere; margin-top: 1.25rem; }
.legacy-content img { max-width: 100%; height: auto; }
.legacy-content table { max-width: 100%; }
.legacy-content p { margin: 0.75rem 0; }

/* ---- Legacy archive notice ---- */
.legacy-notice {
  border: 1px solid #3a2020;
  background: #0e0808;
  padding: 0.875rem 1.1rem;
  font-size: 0.875rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
  line-height: 1.55;
}
.legacy-notice strong { color: var(--fg); }

/* ---- Wikipedia-style article chrome (hatnote, section heads, reflist) ---- */
.hatnote {
  font-style: italic;
  border-left: 4px solid #5a708d;
  padding: 0.65rem 1rem 0.65rem 1.1rem;
  margin: 0 0 1.25rem;
  background: #0f1216;
  color: #b8c0cc;
  font-size: 0.9rem;
  line-height: 1.55;
}
.hatnote strong { color: #e8ecf0; font-style: normal; }
.legacy-notice.hatnote {
  border-left: 4px solid #7a3d45;
  background: #0e0808;
  color: var(--muted);
}
h2.wp-h2 {
  font-family: var(--font-body);
  font-size: 1.28rem;
  font-weight: normal;
  color: var(--fg);
  letter-spacing: 0;
  text-transform: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.15em;
  margin-top: 2.25rem;
  margin-bottom: 0.65rem;
}
h2.wp-h2 + ul {
  margin: 0.35rem 0 0;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.reflist { margin-bottom: 1.25rem; }
ol.references {
  list-style-type: decimal;
  margin: 0.35rem 0 0;
  padding-left: 2.25em;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}
ol.references li { margin: 0.35em 0; }
.reference-text { display: inline; }
ol.references li::marker {
  font-weight: 600;
  color: var(--fg);
}

/* ---- Comparison table ---- */
table.compare { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
table.compare th, table.compare td { border: 1px solid #2a2a2a; padding: 0.5rem 0.65rem; text-align: left; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-inner {
  max-width: 82rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-disclaimer { max-width: 42rem; line-height: 1.6; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.1rem; }
.footer-nav a { color: var(--muted); font-size: 0.8rem; }
.footer-nav a:hover { color: var(--fg); text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid-cell:nth-child(even) { border-right: none; }
  .home-grid-cell:nth-child(3),
  .home-grid-cell:nth-child(4) { border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-grid-cell { border-right: none !important; border-top: 1px solid var(--border); }
  .home-grid-cell:first-child { border-top: none; }
  .site-hero { min-height: 65vh; }
  .hero-headline { font-size: clamp(2.75rem, 16vw, 4rem); }
  .site-nav-rows .nav-links { display: none; }
  .nav-social { display: none; }
}
