/* =========================================================
   FEATURES.CSS (FULL REWRITE)
   - Features main page + story pages
   - NO-CROP image behavior (contain + letterboxing)
   - Keeps same header/nav structure + mobile menu
   ========================================================= */

/* =======================
   THEME TOKENS
======================= */
:root{
  --bg: #0b0d10;
  --panel: #11151b;
  --panel-2:#0f1318;
  --text: #e7edf5;
  --muted:#a9b4c2;
  --line: #212a35;
  --accent:#2f8f5b;     /* green */
  --accent-2:#c9b26b;   /* gold */

  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --shadow-soft: 0 12px 30px rgba(0,0,0,.25);

  --radius: 18px;
  --radius-sm: 12px;

  --max: 1180px;
}

/* =======================
   BASE
======================= */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(47,143,91,.18), transparent 55%),
    radial-gradient(900px 700px at 95% 10%, rgba(201,178,107,.12), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height:1.55;
}

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }
img{ max-width:100%; height:auto; display:block; }

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* =======================
   HEADER / NAV
======================= */
.site-header{
  position: sticky;
  top:0;
  z-index:1000;
  background: rgba(11,13,16,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(33,42,53,.70);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:16px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 240px;
  text-decoration:none;
}
.brand:hover{ text-decoration:none; }

.brand-logo{
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  flex: 0 0 auto;
}

.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.brand-text .top{
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 14px;
  color: rgba(231,237,245,.85);
}
.brand-text .title{
  font-weight: 900;
  font-size: 22px;
}
.brand-text .title span{ color: var(--accent-2); }

.header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

/* MAIN NAV */
.nav{
  display:flex;
  align-items:center;
  gap: 10px;
}
.nav a{
  display:inline-flex;
  align-items:center;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  border:1px solid transparent;
  color: rgba(231,237,245,.92);
  transition: transform .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
}
.nav a:hover{
  text-decoration:none;
  transform: translateY(-1px);
  background: rgba(47,143,91,.16);
  border-color: rgba(47,143,91,.38);
  color: var(--text);
}
.nav a.active{
  background: rgba(201,178,107,.14);
  border-color: rgba(201,178,107,.40);
  color: var(--text);
}

/* MOBILE NAV (CSS-only toggle) */
#nav-toggle{ display:none; }

.hamburger{
  display:none;
  width:44px;
  height:44px;
  border-radius: 14px;
  border: 1px solid rgba(33,42,53,.90);
  background: rgba(17,21,27,.85);
  cursor:pointer;
  align-items:center;
  justify-content:center;
}
.hamburger span{
  display:block;
  width:18px;
  height:2px;
  background: rgba(231,237,245,.85);
  position: relative;
}
.hamburger span::before,
.hamburger span::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background: rgba(231,237,245,.85);
}
.hamburger span::before{ top:-6px; }
.hamburger span::after{ top:6px; }

@media (max-width: 980px){
  .brand-logo{ width:40px; height:40px; }
  .hamburger{ display:flex; }

  .nav{
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    display:none;
    flex-direction:column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 20px 16px;
    background: rgba(11,13,16,.92);
    border-bottom: 1px solid rgba(33,42,53,.75);
  }

  .nav a{ justify-content: space-between; }
  #nav-toggle:checked ~ .nav{ display:flex; }
}

/* =======================
   IMAGE HERO BASE (NO CROP)
   - We use contain + ::before overlay
======================= */
.hero-bg{
  position: relative;
  background-color: rgba(15,19,24,.85);
  background-image: var(--hero-img);
  background-size: contain;     /* <-- NO CROP */
  background-repeat: no-repeat;
  background-position: center;
}

.hero-bg::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,13,16,.55), rgba(11,13,16,.90));
}

/* =======================
   PAGE HERO (Features main)
======================= */
.page-hero{
  --hero-img: none;
  padding: 44px 0 34px;
  border-bottom: 1px solid rgba(33,42,53,.55);

  position: relative;
  background-color: rgba(15,19,24,.85);
  background-image: var(--hero-img);
  background-size: contain;     /* <-- NO CROP */
  background-repeat: no-repeat;
  background-position: center;
}

.page-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,13,16,.65), rgba(11,13,16,.92));
}

.hero-inner{
  position: relative; /* above overlay */
  padding: 6px 0;
}

.hero-kicker{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(33,42,53,.80);
  background: rgba(17,21,27,.75);
  color: rgba(231,237,245,.86);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
}

.page-hero h1{
  margin: 14px 0 8px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.page-hero p{
  margin: 0;
  color: rgba(169,180,194,.95);
  max-width: 70ch;
}

/* =======================
   PDF DOWNLOAD BUTTON
======================= */
.story-download{
  margin-top: 12px;
}

.btn.btn-gold{
  background: rgba(201,178,107,.22);
  border-color: rgba(201,178,107,.55);
  color: rgba(231,237,245,.98);
}

.btn.btn-gold:hover{
  background: rgba(201,178,107,.30);
  border-color: rgba(201,178,107,.75);
}

/* =======================
   SECTIONS / HEADERS
======================= */
.section{ padding: 28px 0 46px; }

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2{
  margin:0;
  font-size: 22px;
}

.section-head p{
  margin:6px 0 0;
  color: rgba(169,180,194,.92);
}

/* =======================
   FEATURED STORY (NO CROP)
======================= */
.featured-story{
  --featured-img: none;
  margin: 18px 0 22px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(33,42,53,.75);
  box-shadow: var(--shadow);

  position: relative;
  background-color: rgba(15,19,24,.85);
  background-image: var(--featured-img);
  background-size: contain;     /* <-- NO CROP */
  background-repeat: no-repeat;
  background-position: center;
  min-height: 380px;
}

.featured-story::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(11,13,16,.78), rgba(11,13,16,.25));
}

.featured-overlay{
  position: relative; /* above overlay */
  width: 100%;
  height: 100%;
  padding: 26px 0;
  display: flex;
  align-items: flex-end;
}

.featured-inner{
  max-width: 760px;
}

.featured-tag{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
  border: 1px solid rgba(201,178,107,.45);
  background: rgba(201,178,107,.14);
  color: rgba(231,237,245,.95);
}

.featured-title{
  margin: 12px 0 10px;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.featured-lede{
  margin: 0 0 14px;
  color: rgba(231,237,245,.90);
  max-width: 70ch;
}

.featured-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  color: rgba(231,237,245,.86);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 16px;
}

.featured-meta .dot{
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(169,180,194,.70);
}

.featured-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Mobile overlay shift */
@media (max-width: 980px){
  .featured-story{
    min-height: 420px;
  }
  .featured-story::before{
    background: linear-gradient(180deg, rgba(11,13,16,.86), rgba(11,13,16,.35));
  }
  .featured-overlay{
    padding: 22px 0;
  }
  .featured-inner{ max-width: 100%; }
}

/* =======================
   FULL WIDTH TEXT BLOCK
======================= */
.full-width{
  margin: 18px 0 24px;
  max-width: 92ch;      /* ideal reading width */
}

/* optional: true edge-to-edge inside container */
.full-width.wide{
  max-width: none;
}

/* =======================
   GRID / CARDS
======================= */
.grid{
  display:grid;
  gap: 18px;
}

.grid.cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 980px){
  .grid.cols-3{ grid-template-columns: 1fr; }
}

.card{
  border-radius: var(--radius);
  background: rgba(17,21,27,.88);
  border: 1px solid rgba(33,42,53,.75);
  box-shadow: var(--shadow-soft);
  overflow:hidden;
}

.card-body{ padding: 16px 16px 18px; }

.feature-card .thumb-link{ display:block; }

/* ✅ NO-CROP THUMBNAILS
   - The image will fit fully, with letterboxing in the container */
.thumb-img{
  width: 100%;
  height: 500px;              /* fixed thumbnail height */
  object-fit: contain;         /* <-- NO CROP */
  background: rgba(15,19,24,.85);
  border-bottom: 1px solid rgba(33,42,53,.65);
  padding: 10px;               /* creates a clean “photo mat” */
}

@media (max-width: 980px){
  .thumb-img{ height: 240px; }
}

.card-title{
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.lede{
  margin: 0 0 14px;
  color: rgba(169,180,194,.92);
}

.meta{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: rgba(169,180,194,.92);
  font-size: 13px;
}

/* =======================
   RELATED FEATURES STRIP
======================= */
.related{
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(33,42,53,.55);
}

.related-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.related-head h3{
  margin:0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.related-all{
  font-weight: 800;
  color: rgba(169,180,194,.92);
  text-decoration: none;
}
.related-all:hover{
  color: var(--text);
  text-decoration: none;
}

.related-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

@media (max-width: 980px){
  .related-grid{ grid-template-columns: 1fr; }
}

.related-card{
  display:flex;
  gap: 12px;
  border-radius: var(--radius);
  background: rgba(17,21,27,.88);
  border: 1px solid rgba(33,42,53,.75);
  box-shadow: var(--shadow-soft);
  overflow:hidden;
  text-decoration:none;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.related-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,.40);
  border-color: rgba(201,178,107,.35);
}

.related-thumb{
  width: 120px;
  flex: 0 0 120px;
  background: rgba(15,19,24,.85);
  border-right: 1px solid rgba(33,42,53,.65);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px;
}

.related-thumb img{
  width:100%;
  height:100%;
  object-fit: contain; /* no cropping */
}

.related-body{
  padding: 12px 12px 12px 0;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.related-title{
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.related-meta{
  color: rgba(169,180,194,.92);
  font-size: 13px;
  font-weight: 800;
}

/* small pills for related cards */
.related-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 10px;
  background: rgba(47,143,91,.16);
  border: 1px solid rgba(47,143,91,.38);
  color: rgba(231,237,245,.95);
}
.related-pill.blue{
  background: rgba(64,127,197,.14);
  border-color: rgba(64,127,197,.32);
}
.related-pill.gold{
  background: rgba(201,178,107,.14);
  border-color: rgba(201,178,107,.40);
}

/* =======================
   PILLS / BUTTONS
======================= */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 11px;
  border: 1px solid rgba(33,42,53,.80);
}

.pill.green{
  background: rgba(47,143,91,.16);
  border-color: rgba(47,143,91,.38);
  color: rgba(231,237,245,.95);
}
.pill.blue{
  background: rgba(64,127,197,.14);
  border-color: rgba(64,127,197,.32);
  color: rgba(231,237,245,.95);
}
.pill.gold{
  background: rgba(201,178,107,.14);
  border-color: rgba(201,178,107,.40);
  color: rgba(231,237,245,.95);
}

.actions{ margin-top: 14px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(33,42,53,.85);
  background: rgba(15,19,24,.85);
  color: var(--text);
  font-weight: 800;
  text-decoration:none;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover{
  text-decoration:none;
  transform: translateY(-1px);
  background: rgba(47,143,91,.14);
  border-color: rgba(47,143,91,.40);
}

.btn.ghost{
  background: rgba(17,21,27,.60);
  border-color: rgba(33,42,53,.90);
}

.btn.ghost:hover{
  background: rgba(47,143,91,.14);
  border-color: rgba(47,143,91,.40);
}

.sep{
  border: none;
  border-top: 1px solid rgba(33,42,53,.55);
  margin: 26px 0;
}

.callout .muted{ color: rgba(169,180,194,.92); }
.callout code{ color: rgba(231,237,245,.92); }

/* =======================
   STORY PAGES (heroes no-crop too)
======================= */
.story-wrap{
  padding: 22px 0 52px;
}

.breadcrumbs{
  display:flex;
  gap:10px;
  align-items:center;
  color: rgba(169,180,194,.92);
  font-weight: 700;
  font-size: 14px;
  margin: 8px 0 14px;
}

.breadcrumbs a{ color: rgba(169,180,194,.92); }
.breadcrumbs a:hover{ color: var(--text); text-decoration:none; }
.breadcrumbs .sep{ opacity:.55; }

.story-hero{
  --hero-img: none;
  border: 1px solid rgba(33,42,53,.70);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;

  position: relative;
  background-color: rgba(15,19,24,.85);
  background-image: var(--hero-img);
  background-size: contain;      /* <-- NO CROP */
  background-repeat: no-repeat;
  background-position: center;
  min-height: 250px;
}

.story-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(11,13,16,.35), rgba(11,13,16,.85));
}

.story-hero-inner{
  position: relative;
  padding: 26px 22px 22px;
}

.story-title{
  margin: 10px 0 10px;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.story-subtitle{
  margin: 0 0 12px;
  color: rgba(169,180,194,.95);
  max-width: 80ch;
}

.story-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  align-items:center;
  color: rgba(231,237,245,.88);
  font-weight: 800;
  font-size: 13px;
}

.story-meta .dot{
  width: 4px; height:4px; border-radius:999px;
  background: rgba(169,180,194,.70);
}

.prose{
  margin-top: 18px;
  background: rgba(17,21,27,.70);
  border: 1px solid rgba(33,42,53,.70);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px 8px;
}

.prose p{
  margin: 0 0 14px;
  color: rgba(231,237,245,.92);
}

.prose h2{
  margin: 22px 0 12px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.prose ul{
  margin: 0 0 14px 20px;
  color: rgba(231,237,245,.92);
}

.prose li{ margin: 6px 0; }

.figure{
  margin: 16px 0 18px;
  border-radius: var(--radius-sm);
  overflow:hidden;
  border: 1px solid rgba(33,42,53,.70);
  background: rgba(15,19,24,.70);
}

.figure img{
  width:100%;
  height: 320px;
  object-fit: contain;          /* <-- NO CROP */
  background: rgba(15,19,24,.70);
}

.figure figcaption{
  padding: 10px 12px;
  color: rgba(169,180,194,.92);
  font-size: 13px;
}

.pullquote{
  margin: 18px 0 18px;
  padding: 14px 14px;
  border-left: 4px solid rgba(201,178,107,.70);
  background: rgba(201,178,107,.10);
  border-radius: 12px;
  color: rgba(231,237,245,.92);
  font-weight: 700;
}

.full-width{
  margin: 16px 0 22px;
}

/* =======================
   FOOTER
======================= */
.site-footer{
  border-top: 1px solid rgba(33,42,53,.70);
  background: rgba(11,13,16,.85);
}

.footer-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
}

.small{ color: rgba(169,180,194,.92); font-size: 13px; }

.footer-links{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a{ color: rgba(169,180,194,.92); }
.footer-links a:hover{ color: var(--text); text-decoration:none; }

@media (max-width: 720px){
  .footer-inner{ flex-direction:column; align-items:flex-start; }
}