/**
 * Theme Name: Tyst Opinion
 * Theme URI: https://opinion.jacobmarinko.com
 * Author: Jacob Marinko
 * Author URI: https://jacobmarinko.com
 * Description: Child theme for Tyst Opinion - Swedish investigative journalism with three editorial voices.
 * Version: 2.0.0
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: tyst-opinion
 * Template: astra
 */

/* ==========================================================================
   TYST OPINION DESIGN TOKENS
   Based on actual prototype files (index.html, artikel-*.html)
   ========================================================================== */

:root {
  /* -------------------------------------------------------------------------
     NEUTRALS (from index.html)
     ------------------------------------------------------------------------- */
  --to-black: #0a0a0a;
  --to-deep: #111111;
  --to-charcoal: #1a1a1a;
  --to-white: #fafafa;
  --to-cream: #fefdfb;

  /* -------------------------------------------------------------------------
     GRAY SCALE
     ------------------------------------------------------------------------- */
  --to-gray-50: #f9f9f9;
  --to-gray-100: #f5f5f5;
  --to-gray-200: #e5e5e5;
  --to-gray-300: #d4d4d4;
  --to-gray-400: #a3a3a3;
  --to-gray-500: #737373;
  --to-gray-600: #525252;
  --to-gray-700: #404040;
  --to-gray-800: #262626;

  /* -------------------------------------------------------------------------
     ACCENT COLORS
     ------------------------------------------------------------------------- */
  --to-red: #dc2626;
  --to-red-dark: #991b1b;
  --to-red-muted: #b91c1c;
  --to-ember: #c41e3a;
  --to-ember-bg: #451a1a;

  /* -------------------------------------------------------------------------
     WARM TONES (Personal Voice - from artikel-personlig.html)
     ------------------------------------------------------------------------- */
  --to-warm-white: #faf8f5;
  --to-sand: #f5f0e8;
  --to-stone: #e8e0d5;
  --to-earth: #3d3529;
  --to-charcoal-warm: #2a2520;
  --to-black-warm: #1a1714;
  --to-gold: #c9a227;
  --to-ochre: #cc7722;
  --to-rust: #a63d2f;
  --to-deep-blue: #1e3a5f;
  --to-forest: #2d4a3e;
  --to-warm-gray: #8a7f72;
  --to-cool-gray: #6b6560;
  --to-faded: #b8a89a;

  /* -------------------------------------------------------------------------
     FILOSOFISK TONES (from artikel-filosofisk.html)
     ------------------------------------------------------------------------- */
  --to-slate: #2a2a2a;
  --to-ash: #3a3a3a;
  --to-smoke: #6a6a6a;
  --to-mist: #8a8a8a;
  --to-cloud: #aaaaaa;
  --to-pearl: #d4d4d4;

  /* -------------------------------------------------------------------------
     TYPOGRAPHY - Adobe Fonts + Fallbacks
     ------------------------------------------------------------------------- */
  --to-font-display: abolition, "Inter", -apple-system, sans-serif;
  --to-font-editorial: bodoni-urw, Georgia, "Times New Roman", serif;
  --to-font-body: itc-avant-garde-gothic-pro, "Inter", -apple-system, sans-serif;
  --to-font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --to-font-serif: Georgia, "Times New Roman", serif;

  /* Font Sizes */
  --to-text-xs: 0.625rem;
  --to-text-sm: 0.75rem;
  --to-text-base: 1rem;
  --to-text-lg: 1.125rem;
  --to-text-xl: 1.25rem;
  --to-text-2xl: 1.5rem;
  --to-text-3xl: 2rem;
  --to-text-4xl: 2.5rem;
  --to-text-5xl: 3rem;

  /* Line Heights */
  --to-leading-tight: 1.1;
  --to-leading-snug: 1.3;
  --to-leading-normal: 1.5;
  --to-leading-relaxed: 1.7;
  --to-leading-loose: 1.9;

  /* Letter Spacing */
  --to-tracking-tight: -0.02em;
  --to-tracking-normal: 0;
  --to-tracking-wide: 0.1em;
  --to-tracking-wider: 0.15em;
  --to-tracking-widest: 0.3em;

  /* Layout */
  --to-max-width-narrow: 600px;
  --to-max-width-article: 680px;
  --to-max-width-content: 720px;
  --to-max-width-featured: 1200px;
  --to-max-width-full: 1400px;
  --to-header-height: 56px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

body {
  font-family: var(--to-font-body);
  background-color: var(--to-black);
  color: var(--to-white);
}

/* ==========================================================================
   HOMEPAGE STYLES (from index.html)
   ========================================================================== */

/* Hero Section */
.to-hero {
  min-height: 100vh;
  background: var(--to-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.to-hero-title {
  font-family: var(--to-font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--to-white);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.to-hero-tagline {
  font-family: var(--to-font-body);
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--to-gray-400);
  margin-bottom: 3rem;
}

.to-hero-quote {
  font-family: var(--to-font-editorial);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: var(--to-gray-400);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Sticky Navigation */
.sticky-nav {
  position: sticky;
  top: var(--to-header-height);
  z-index: 90;
  background: var(--to-white);
  border-bottom: 1px solid var(--to-gray-200);
  padding: 0 2rem;
}

.sticky-nav a {
  padding: 1rem 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--to-gray-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.sticky-nav a:hover {
  color: var(--to-black);
}

.sticky-nav a.active {
  color: var(--to-black);
  border-bottom-color: var(--to-red);
}

/* Featured Hero Article (2-column) */
.featured-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--to-black);
}

.featured-hero-image {
  aspect-ratio: 4/3;
}

.featured-hero-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--to-white);
}

.featured-hero-category {
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--to-red);
  margin-bottom: 1rem;
}

.featured-hero-title {
  font-family: var(--to-font-editorial);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1rem;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--to-gray-200);
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--to-red);
}

.section-title {
  font-family: var(--to-font-editorial);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.article-card-image {
  aspect-ratio: 1;
  background: var(--to-gray-100);
  margin-bottom: 1rem;
}

.article-card-image.dark {
  background: var(--to-black);
}

.article-card-image.red {
  background: var(--to-red);
}

.article-card-title {
  font-family: var(--to-font-editorial);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.article-card-excerpt {
  font-size: 0.8125rem;
  color: var(--to-gray-600);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.article-card-meta {
  font-size: 0.6875rem;
  color: var(--to-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   VOICE: FAKTISK (Fact-checking) - from artikel-faktagranskande.html
   Light background, document-focused, clinical
   ========================================================================== */

.voice-faktisk,
body.voice-faktisk {
  background: var(--to-white);
  color: var(--to-black);
  line-height: 1.6;
}

.voice-faktisk .article-header {
  padding: 8rem 2rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.voice-faktisk .article-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--to-gray-500);
  margin-bottom: 1.5rem;
}

.voice-faktisk .article-category a {
  color: var(--to-red);
  text-decoration: none;
}

.voice-faktisk .article-voice {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--to-gray-100);
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--to-gray-600);
}

.voice-faktisk .article-title {
  font-family: var(--to-font-editorial);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--to-black);
}

.voice-faktisk .article-subtitle {
  font-family: var(--to-font-editorial);
  font-size: 1.25rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--to-gray-600);
  margin-bottom: 2rem;
}

.voice-faktisk .article-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.voice-faktisk .article-content p {
  font-family: var(--to-font-serif);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--to-gray-800);
  margin-bottom: 1.75rem;
}

.voice-faktisk .article-content p.lead {
  font-size: 1.3125rem;
  line-height: 1.7;
  color: var(--to-gray-700);
}

.voice-faktisk .article-content h2 {
  font-family: var(--to-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--to-black);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--to-gray-200);
}

.voice-faktisk .article-content h3 {
  font-family: var(--to-font-editorial);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--to-black);
  margin: 2.5rem 0 1rem;
}

/* Faktisk Blockquote - Document citations */
.voice-faktisk .article-content blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  background: var(--to-gray-50);
  border-left: 3px solid var(--to-gray-300);
}

.voice-faktisk .article-content blockquote p {
  font-family: var(--to-font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--to-gray-700);
  margin-bottom: 0;
}

.voice-faktisk .article-content blockquote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--to-font-body);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.05em;
  color: var(--to-gray-500);
}

/* Faktisk Pull Quote */
.voice-faktisk .pull-quote {
  margin: 3rem -2rem;
  padding: 2rem;
  text-align: center;
}

.voice-faktisk .pull-quote p {
  font-family: var(--to-font-editorial);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--to-black);
}

.voice-faktisk .pull-quote p::before,
.voice-faktisk .pull-quote p::after {
  color: var(--to-red);
}

/* Faktisk Document Embed */
.voice-faktisk .document-embed {
  margin: 2.5rem 0;
  background: var(--to-gray-100);
  border: 1px solid var(--to-gray-200);
}

.voice-faktisk .document-embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--to-gray-800);
  color: var(--to-white);
}

.voice-faktisk .document-embed-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   VOICE: FILOSOFISK (Philosophical) - from artikel-filosofisk.html
   Dark background, contemplative, atmospheric
   ========================================================================== */

.voice-filosofisk,
body.voice-filosofisk {
  font-family: var(--to-font-serif);
  background: var(--to-deep);
  color: var(--to-pearl);
  line-height: 1.7;
}

.voice-filosofisk .article-header {
  padding: 10rem 2rem 5rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.voice-filosofisk .article-category {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--to-font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--to-smoke);
  margin-bottom: 2.5rem;
}

.voice-filosofisk .article-category a {
  color: var(--to-mist);
  text-decoration: none;
}

.voice-filosofisk .article-voice {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--to-charcoal);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  color: var(--to-mist);
  border: 1px solid var(--to-slate);
}

.voice-filosofisk .article-title {
  font-family: var(--to-font-editorial);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 2rem;
  color: var(--to-white);
}

.voice-filosofisk .article-epigraph {
  max-width: 500px;
  margin: 0 auto 3rem;
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--to-cloud);
}

.voice-filosofisk .article-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.voice-filosofisk .article-content p {
  font-size: 1.1875rem;
  line-height: 1.9;
  color: var(--to-pearl);
  margin-bottom: 2rem;
}

.voice-filosofisk .article-content p.lead {
  font-size: 1.375rem;
  line-height: 1.8;
  color: var(--to-white);
  text-align: center;
  margin-bottom: 3rem;
}

/* Filosofisk Section Break */
.voice-filosofisk .section-break {
  text-align: center;
  margin: 4rem 0;
  color: var(--to-ash);
  font-size: 1.5rem;
  letter-spacing: 1em;
}

.voice-filosofisk .article-content h2 {
  font-family: var(--to-font-editorial);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--to-white);
  margin: 4rem 0 2rem;
  text-align: center;
}

.voice-filosofisk .article-content h3 {
  font-family: var(--to-font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--to-smoke);
  margin: 3rem 0 1.5rem;
}

/* Filosofisk Blockquote - Reflective */
.voice-filosofisk .article-content blockquote {
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--to-slate);
  border-bottom: 1px solid var(--to-slate);
  text-align: center;
}

.voice-filosofisk .article-content blockquote p {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--to-cloud);
}

/* Filosofisk Question Callout */
.voice-filosofisk .question-callout {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--to-charcoal);
  border-left: 3px solid var(--to-red-muted);
}

.voice-filosofisk .question-callout p {
  font-style: italic;
  color: var(--to-pearl);
  margin-bottom: 0;
}

/* Filosofisk Contemplation Box */
.voice-filosofisk .contemplation-box {
  margin: 4rem 0;
  padding: 2.5rem 2rem;
  background: var(--to-ember-bg);
  text-align: center;
}

.voice-filosofisk .contemplation-box p {
  color: var(--to-pearl);
}

/* ==========================================================================
   VOICE: PERSONLIG (Personal) - from artikel-personlig.html
   Cream background, warm, journal-like
   ========================================================================== */

.voice-personlig,
body.voice-personlig {
  font-family: var(--to-font-serif);
  background: var(--to-cream);
  color: var(--to-earth);
  line-height: 1.75;
}

/* Personlig Hero Image */
.voice-personlig .article-hero {
  width: 100%;
  height: 85vh;
  min-height: 600px;
  position: relative;
  margin-top: var(--to-header-height);
  overflow: hidden;
}

.voice-personlig .article-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(0deg, rgba(26,23,20,0.95) 0%, rgba(26,23,20,0.7) 50%, transparent 100%);
}

.voice-personlig .article-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.voice-personlig .article-category {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--to-font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--to-faded);
  margin-bottom: 1.5rem;
}

.voice-personlig .article-category a {
  color: var(--to-ochre);
  text-decoration: none;
}

.voice-personlig .article-voice {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(196,30,58,0.2);
  border: 1px solid rgba(196,30,58,0.4);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  color: var(--to-sand);
}

.voice-personlig .article-hero-title {
  font-family: var(--to-font-editorial);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--to-white);
  margin-bottom: 1.5rem;
}

.voice-personlig .article-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.voice-personlig .article-content p {
  font-size: 1.25rem;
  line-height: 1.95;
  color: var(--to-earth);
  margin-bottom: 2rem;
}

.voice-personlig .article-content p.lead {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--to-charcoal-warm);
  margin-bottom: 3rem;
}

/* Personlig Section Break */
.voice-personlig .section-break {
  text-align: center;
  margin: 4rem 0;
  font-size: 1.25rem;
  letter-spacing: 0.5em;
  color: var(--to-stone);
}

.voice-personlig .article-content h2 {
  font-family: var(--to-font-editorial);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--to-black-warm);
  margin: 5rem 0 2rem;
  line-height: 1.3;
}

.voice-personlig .article-content h3 {
  font-family: var(--to-font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--to-warm-gray);
  margin: 4rem 0 1.5rem;
}

/* Personlig Journal Entry */
.voice-personlig .journal-entry {
  margin: 4rem 0;
  padding: 2.5rem;
  background: var(--to-warm-white);
  border: 1px solid var(--to-stone);
}

.voice-personlig .journal-entry-date {
  font-family: var(--to-font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--to-warm-gray);
  margin-bottom: 0.5rem;
}

.voice-personlig .journal-entry-location {
  font-family: var(--to-font-body);
  font-size: 0.75rem;
  color: var(--to-ochre);
  margin-bottom: 1.5rem;
}

/* Personlig Verse Block */
.voice-personlig .verse-block {
  margin: 3rem 0;
  padding: 2rem;
  border-left: 3px solid var(--to-ochre);
  background: linear-gradient(90deg, rgba(204,119,34,0.05) 0%, transparent 100%);
}

.voice-personlig .verse-block p {
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--to-earth);
  margin-bottom: 0;
}

/* Personlig Timestamp */
.voice-personlig .timestamp {
  text-align: center;
  margin: 5rem 0 3rem;
  font-family: var(--to-font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--to-warm-gray);
}

/* Personlig Pull Quotes with Colors */
.voice-personlig .pull-quote {
  margin: 4rem -2rem;
  padding: 3rem 2rem;
  text-align: center;
}

.voice-personlig .pull-quote.ember {
  background: linear-gradient(180deg, rgba(196,30,58,0.08) 0%, transparent 100%);
}

.voice-personlig .pull-quote.ember p::before,
.voice-personlig .pull-quote.ember p::after {
  color: var(--to-ember);
}

.voice-personlig .pull-quote.gold {
  background: linear-gradient(180deg, rgba(201,162,39,0.1) 0%, transparent 100%);
}

.voice-personlig .pull-quote.gold p::before,
.voice-personlig .pull-quote.gold p::after {
  color: var(--to-gold);
}

.voice-personlig .pull-quote.deep-blue {
  background: linear-gradient(180deg, rgba(30,58,95,0.08) 0%, transparent 100%);
}

.voice-personlig .pull-quote.deep-blue p::before,
.voice-personlig .pull-quote.deep-blue p::after {
  color: var(--to-deep-blue);
}

/* Personlig Polaroid Image */
.voice-personlig .image-polaroid {
  margin: 3rem 0;
  padding: 1rem 1rem 3rem;
  background: var(--to-white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  transform: rotate(-1deg);
}

.voice-personlig .image-polaroid img {
  width: 100%;
  display: block;
}

.voice-personlig .image-polaroid figcaption {
  margin-top: 1.5rem;
  font-family: var(--to-font-body);
  font-size: 0.875rem;
  color: var(--to-cool-gray);
  text-align: center;
}

/* ==========================================================================
   HEADER OVERRIDES (Astra)
   ========================================================================== */

.ast-primary-header-bar {
  background-color: var(--to-black) !important;
}

.ast-header-break-point .ast-mobile-header-wrap .ast-primary-header-bar {
  background-color: var(--to-black) !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  :root {
    --to-text-5xl: 2.5rem;
    --to-text-4xl: 2rem;
    --to-text-3xl: 1.75rem;
  }
}
