/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/
/* =============================================================
   OpticsSphere — Homepage Styles
   Palette:
     Void Black  #0D1117   — base background
     Gunmetal    #1A2332   — card/surface
     Brass       #C8A96E   — warm metallic accent
     Lens Blue   #4A9EBF   — precision CTA accent
     Parchment   #F0EDE8   — body text on dark
     Steel       #8A96A0   — muted text
   Typography: Barlow Condensed (display) + Inter (body)
   Scoped to .os-* — zero collisions with GeneratePress
   ============================================================= */

/* ---- GOOGLE FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ---- TOKENS ---- */
:root {
  --os-void:        #111820;
  --os-gunmetal:    #1e2e42;
  --os-gunmetal-2:  #263548;
  --os-brass:       #C8A96E;
  --os-brass-light: #dfc99a;
  --os-blue:        #4A9EBF;
  --os-blue-light:  #6ab8d4;
  --os-parchment:   #F0EDE8;
  --os-steel:       #a8b4be;
  --os-border:      rgba(255,255,255,0.11);
  --os-white:       #ffffff;

  --os-font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --os-font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --os-container: 1220px;
  --os-gap:       22px;
  --os-radius:    6px;
  --os-radius-lg: 10px;
  --os-shadow:    0 4px 24px rgba(0,0,0,0.35);
  --os-trans:     0.2s ease;
}

/* ---- BASE ---- */
.os-home {
  font-family: var(--os-font-body);
  background: var(--os-void);
  color: var(--os-parchment);
}

.os-container {
  max-width: var(--os-container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---- BUTTONS ---- */
.os-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--os-font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--os-radius);
  text-decoration: none;
  transition: all var(--os-trans);
  cursor: pointer;
}

.os-btn--primary {
  background: var(--os-brass);
  color: var(--os-void);
  border: 2px solid var(--os-brass);
}
.os-btn--primary:hover {
  background: var(--os-brass-light);
  border-color: var(--os-brass-light);
  transform: translateY(-1px);
}

.os-btn--ghost {
  background: transparent;
  color: var(--os-parchment);
  border: 2px solid rgba(240,237,232,0.35);
}
.os-btn--ghost:hover {
  border-color: var(--os-parchment);
  background: rgba(240,237,232,0.06);
}

/* ---- SECTION HEADERS ---- */
.os-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 10px;
}

.os-section-title {
  font-family: var(--os-font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--os-parchment);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Dark title text inside white sections */
.os-latest .os-section-title,
.os-strip .os-section-title {
  color: #1a1a2e;
}
.os-strip:nth-of-type(even) .os-section-title {
  color: var(--os-parchment);
}
.os-latest .os-all-link,
.os-strip .os-all-link {
  color: var(--os-trail, #6B4E2E);
}
.os-strip:nth-of-type(even) .os-all-link { color: var(--os-brass); }

/* Brass accent bar before each title */
.os-title-mark {
  display: inline-block;
  width: 4px;
  height: 26px;
  background: var(--os-brass);
  border-radius: 2px;
  flex-shrink: 0;
}

.os-all-link {
  font-family: var(--os-font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--os-brass);
  text-decoration: none;
  transition: color var(--os-trans);
}
.os-all-link:hover { color: var(--os-brass-light); }

/* =============================================================
   HERO
   ============================================================= */
.os-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--os-void);
}

.os-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
}

.os-hero__bg--fallback {
  background: linear-gradient(135deg, #0d1620 0%, #1e2e42 60%, #162030 100%);
}

.os-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(7, 11, 16, 0.92) 0%,
    rgba(7, 11, 16, 0.70) 50%,
    rgba(7, 11, 16, 0.25) 100%
  );
}

/* Signature reticle SVG */
.os-reticle {
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-50%);
  width: min(520px, 60vw);
  height: auto;
  color: #ffffff;
  opacity: 0.22;
  animation: os-reticle-spin 60s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes os-reticle-spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .os-reticle { animation: none; }
}

.os-hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--os-void));
  z-index: 2;
  pointer-events: none;
}

.os-hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-block: 80px;
  width: 100%;
}

.os-hero__content { flex: 1; max-width: 580px; }

/* Eyebrow */
.os-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--os-font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--os-brass);
  margin: 0 0 18px;
}

.os-eyebrow-line {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--os-brass);
  flex-shrink: 0;
}

.os-hero__heading {
  font-family: var(--os-font-display);
  font-size: clamp(42px, 6.5vw, 80px);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.02;
  color: var(--os-white);
  margin: 0 0 20px;
}

.os-hero__heading em {
  font-style: normal;
  color: var(--os-brass);
  display: block;
}

.os-hero__sub {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(240,237,232,0.72);
  margin: 0 0 30px;
  max-width: 480px;
}

.os-hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Stats panel */
.os-hero__specs {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  background: rgba(26,35,50,0.7);
  backdrop-filter: blur(8px);
}

.os-spec {
  padding: 20px 36px;
  text-align: center;
  width: 160px;
}

.os-spec__num {
  display: block;
  font-family: var(--os-font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--os-brass);
  line-height: 1;
  margin-bottom: 4px;
}

.os-spec__unit {
  font-size: 24px;
}

.os-spec__label {
  display: block;
  font-family: var(--os-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--os-steel);
}

.os-spec__sep {
  width: 80%;
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0 auto;
}

/* =============================================================
   CATEGORY GRID
   ============================================================= */
.os-cats {
  padding-block: 64px;
  background: var(--os-void);
}

.os-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.os-cat-card {
  position: relative;
  display: block;
  aspect-ratio: 3/2;
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  text-decoration: none;
  background: var(--os-gunmetal);
  border: 1px solid var(--os-border);
  transition: transform var(--os-trans), box-shadow var(--os-trans);
}

.os-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--os-shadow);
}

.os-cat-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.os-cat-card:hover .os-cat-card__bg { transform: scale(1.06); }

.os-cat-card__bg--empty {
  background: linear-gradient(135deg, var(--os-gunmetal) 0%, #1a2d42 100%);
}

.os-cat-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(7,11,16,0.88) 0%,
    rgba(7,11,16,0.40) 50%,
    rgba(7,11,16,0.10) 100%
  );
  transition: background var(--os-trans);
}
.os-cat-card:hover .os-cat-card__overlay {
  background: linear-gradient(
    to top,
    rgba(7,11,16,0.92) 0%,
    rgba(7,11,16,0.50) 50%,
    rgba(7,11,16,0.15) 100%
  );
}

.os-cat-card__inner {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1;
  text-align: center;
}

.os-cat-card__icon {
  width: 52px;
  height: 52px;
  color: var(--os-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200,169,110,0.12);
  border: 1px solid rgba(200,169,110,0.25);
  border-radius: 50%;
  padding: 12px;
  flex-shrink: 0;
  transition: background var(--os-trans), transform var(--os-trans);
}
.os-cat-card__icon svg { width: 100%; height: 100%; }
.os-cat-card:hover .os-cat-card__icon {
  background: rgba(200,169,110,0.22);
  transform: scale(1.1);
}

.os-cat-card__name {
  font-family: var(--os-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--os-white);
  line-height: 1.2;
}

.os-cat-card__count {
  font-size: 10px;
  color: var(--os-steel);
  letter-spacing: 0.04em;
}

/* =============================================================
   TRUST BAR
   ============================================================= */
.os-trust {
  background: var(--os-gunmetal);
  border-top: 1px solid var(--os-border);
  border-bottom: 1px solid var(--os-border);
  padding-block: 36px;
}

.os-trust__row {
  display: flex;
  align-items: center;
}

.os-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  padding-inline: 28px;
}
.os-trust__item:first-child { padding-left: 0; }
.os-trust__item:last-child  { padding-right: 0; }

.os-trust__icon {
  width: 32px;
  height: 32px;
  color: var(--os-brass);
  flex-shrink: 0;
  margin-top: 2px;
}
.os-trust__icon svg { width: 100%; height: 100%; }

.os-trust__text strong {
  display: block;
  font-family: var(--os-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--os-parchment);
  margin-bottom: 4px;
}

.os-trust__text p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--os-steel);
  margin: 0;
}

.os-trust__sep {
  width: 1px;
  height: 50px;
  background: var(--os-border);
  flex-shrink: 0;
}

/* =============================================================
   MAGAZINE GRID — Latest Reviews
   ============================================================= */
.os-latest {
  padding-block: 64px;
  background: #ffffff;
}

.os-mag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--os-gap);
}

.os-mag-card {
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--os-trans), transform var(--os-trans), box-shadow var(--os-trans);
}
.os-mag-card:hover {
  border-color: var(--os-brass);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}

/* Lead card: spans 2 cols, 2 rows */
.os-mag-card--lead {
  grid-row: 1 / 3;
  grid-column: 1 / 3;
}

.os-mag-card__img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}
.os-mag-card--lead .os-mag-card__img-wrap {
  aspect-ratio: 4/3;
  flex: 1;
}

.os-mag-card__img--empty {
  background: #e8edf2;
  min-height: 180px;
}

.os-mag-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.os-mag-card:hover .os-mag-card__img { transform: scale(1.04); }

.os-mag-card__body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
}
.os-mag-card--lead .os-mag-card__body { padding: 22px 26px 26px; }

.os-mag-card__cat {
  display: inline-block;
  font-family: var(--os-font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--os-brass);
  text-decoration: none;
  margin-bottom: 10px;
}
.os-mag-card__cat:hover { color: var(--os-brass-light); }

.os-mag-card__title {
  font-family: var(--os-font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin: 0 0 8px;
}
.os-mag-card--lead .os-mag-card__title { font-size: clamp(18px, 2vw, 24px); margin-bottom: 12px; }
.os-mag-card__title a { color: #1a1a2e; text-decoration: none; }
.os-mag-card__title a:hover { color: var(--os-brass); }

.os-mag-card__excerpt {
  font-size: 13px;
  line-height: 1.7;
  color: #5a6472;
  margin: 0 0 12px;
  flex: 1;
}

.os-mag-card__date {
  font-size: 11px;
  color: #8a96a0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e2e6ea;
  display: block;
}

/* =============================================================
   CATEGORY SPOTLIGHT STRIPS
   ============================================================= */
.os-strip {
  padding-block: 52px;
  border-top: 1px solid #e2e6ea;
  background: #ffffff;
}
.os-strip:nth-of-type(even) {
  background: var(--os-void);
  border-top-color: var(--os-border);
}

.os-strip__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--os-gap);
  align-items: start;
}

.os-strip-card {
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: var(--os-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--os-trans), transform var(--os-trans), box-shadow var(--os-trans);
}
.os-strip-card:hover {
  border-color: var(--os-brass);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
/* Cards inside dark strip stay dark */
.os-strip:nth-of-type(even) .os-strip-card {
  background: var(--os-gunmetal);
  border-color: var(--os-border);
}
.os-strip:nth-of-type(even) .os-strip-card:hover {
  border-color: rgba(200,169,110,0.3);
  box-shadow: var(--os-shadow);
}

.os-strip-card__img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.os-strip-card__img--empty {
  background: #e8edf2;
  min-height: 90px;
}
.os-strip:nth-of-type(even) .os-strip-card__img--empty {
  background: var(--os-gunmetal-2);
}

.os-strip-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.os-strip-card:hover .os-strip-card__img { transform: scale(1.05); }

.os-strip-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.os-strip-card--wide .os-strip-card__body { padding: 16px 20px 20px; }

.os-strip-card__title {
  font-family: var(--os-font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin: 0;
}
.os-strip-card--wide .os-strip-card__title { font-size: 16px; }
.os-strip-card__title a { color: #1a1a2e; text-decoration: none; }
.os-strip-card__title a:hover { color: var(--os-brass); }
.os-strip:nth-of-type(even) .os-strip-card__title a { color: var(--os-parchment); }
.os-strip:nth-of-type(even) .os-strip-card__title a:hover { color: var(--os-white); }

.os-strip-card__excerpt {
  font-size: 12px;
  line-height: 1.6;
  color: #5a6472;
  margin: 0;
}
.os-strip:nth-of-type(even) .os-strip-card__excerpt { color: var(--os-steel); }

.os-strip-card__date {
  font-size: 10px;
  color: #8a96a0;
  letter-spacing: 0.04em;
  display: block;
  margin-top: auto;
}
.os-strip:nth-of-type(even) .os-strip-card__date { color: var(--os-steel); }

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

/* 1024px */
@media (max-width: 1024px) {
  .os-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .os-strip__grid { grid-template-columns: 1fr 1fr; }
  .os-trust__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .os-trust__sep { display: none; }
  .os-trust__item { padding-inline: 0; }
}

/* 860px */
@media (max-width: 860px) {
  .os-hero__inner { flex-direction: column; align-items: flex-start; gap: 28px; padding-block: 60px; }
  .os-hero__specs { flex-direction: row; width: 100%; border-radius: var(--os-radius); }
  .os-spec { flex: 1; padding: 16px 12px; }
  .os-spec__sep { width: 1px; height: auto; margin: 8px 0; }
  .os-reticle { opacity: 0.07; right: -10%; }

  .os-mag-grid { grid-template-columns: 1fr 1fr; }
  .os-mag-card--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    flex-direction: row;
  }
  .os-mag-card--lead .os-mag-card__img-wrap {
    width: 45%;
    aspect-ratio: auto;
    flex-shrink: 0;
    flex: none;
  }

  .os-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .os-strip__grid { grid-template-columns: 1fr 1fr; }
}

/* 600px */
@media (max-width: 600px) {
  .os-hero { min-height: 480px; }
  .os-hero__heading { font-size: 38px; }
  .os-hero__specs { flex-direction: column; }
  .os-spec__sep { width: 80%; height: 1px; margin: 0 auto; }

  .os-cat-grid { grid-template-columns: 1fr 1fr; }

  .os-mag-grid { grid-template-columns: 1fr; }
  .os-mag-card--lead { flex-direction: column; }
  .os-mag-card--lead .os-mag-card__img-wrap { width: 100%; aspect-ratio: 16/9; }

  .os-strip__grid { grid-template-columns: 1fr; }

  .os-trust__row { grid-template-columns: 1fr; }
}