/* ==========================================================================
   RavenSong Theme — Light with Orange Accent
   LOAD ORDER: bem-starter-base.css → theme-ravensong.css

   Uses existing BEM classes from base where possible.
   Adds only RavenSong-specific layout overrides and new elements.
   ========================================================================== */

:root {
  /* == Colors ============================================================= */
  --color-bg: #fafafa;
  --color-bg-elev: #f8f8f8;
  --color-fg: #1a1a1a;
  --color-fg-muted: #555555;
  --color-border: #e5e5e5;

  /* == Brand Palette ====================================================== */
  --brand-500: #ff8555;
  --brand-600: #ff6b35;
  --brand-700: #e55a25;
  --color-primary: var(--brand-600);
  --color-primary-contrast: #ffffff;

  /* == Semantic Colors ==================================================== */
  --color-success: #16a34a;
  --color-warning: #ca8a04;
  --color-danger: #dc2626;
  --color-info: #2196f3;

  /* == Shadows ============================================================ */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.1);
  --panel-shadow: 0 2px 8px rgba(0,0,0,.06);

  /* == Background Gradients =============================================== */
  --bg-gradient: #fafafa;
  --panel-gradient: none;

  /* == Header ============================================================= */
  --header-gradient: #fafafa;
  --header-shadow: 0 1px 3px rgba(0,0,0,.08);

  /* == Special Effects ==================================================== */
  --backdrop-filter: none;
  --logo-filter: none;
  --text-shadow-primary: none;
  --text-shadow-accent: none;
  --hero-title-shadow: none;

  /* == Pills ============================================================== */
  --pill-hover-shadow: 0 4px 12px rgba(255,107,53,.2);
  --pill-active-bg: var(--color-primary);
  --pill-active-shadow: 0 4px 12px rgba(255,107,53,.3);

  /* == Buttons ============================================================ */
  --button-shadow: 0 2px 8px rgba(255,107,53,.25);
  --button-hover-shadow: 0 4px 12px rgba(255,107,53,.35);
  --button-active-shadow: 0 2px 6px rgba(255,107,53,.2);
  --button-secondary-bg: #333333;
  --button-secondary-shadow: none;
  --button-secondary-hover-shadow: 0 4px 12px rgba(0,0,0,.15);

  /* == Code =============================================================== */
  --code-color: #e55a25;
  --code-shadow: none;

  /* == Footer ============================================================= */
  --footer-bg: #fafafa;
  --footer-section-bg: #fafafa;
  --footer-bottom-bg: #f5f5f5;

  /* == Alerts ============================================================= */
  --alert-success-shadow: 0 0 8px rgba(22,163,74,.2);
  --alert-warning-shadow: 0 0 8px rgba(202,138,4,.2);
  --alert-danger-shadow: 0 0 8px rgba(220,38,38,.2);

  /* == RavenSong-specific tokens ========================================== */
  --rs-font: 'Raleway', system-ui, sans-serif;
}

/* ==========================================================================
   Header Overrides
   ========================================================================== */

/* Nav links — match original: Raleway Semibold 18px */
.c-doc-header__link {
  font-family: var(--rs-font);
  font-size: 18px;
  font-weight: 600;
}

/* Active nav link shows orange */
.c-doc-header__link.is-active {
  color: var(--color-primary);
}

/* Social icons row */
.c-doc-header__social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 24px;
}

.c-doc-header__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-fg);
  color: var(--color-bg);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.c-doc-header__social-link:hover {
  opacity: 0.7;
}

.c-doc-header__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 980px) {
  .c-doc-header__social {
    display: none;
  }
}

/* ==========================================================================
   No-Sidebar Layout (hides left nav sidebar for RavenSong pages)
   ========================================================================== */

.c-doc-layout__main.is-no-sidebar {
  grid-template-columns: 1fr;
  gap: 0;
}

.c-doc-layout__main.is-no-sidebar .c-sidebar {
  display: none;
}

/* ==========================================================================
   Hero Overrides (c-hero becomes full-width 2-column grid)
   ========================================================================== */

.c-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 64px);
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.c-hero__title {
  font-family: var(--rs-font);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.15;
}

.c-hero__subtitle {
  font-family: var(--rs-font);
  font-size: 20px;
  font-style: italic;
  line-height: 1.6;
}

.c-hero__actions {
  margin-top: 8px;
}

.c-hero__graphic {
  display: flex;
  justify-content: center;
  align-items: center;
}

.c-hero__graphic img {
  max-width: 360px;
  width: 100%;
  height: auto;
}

@media (max-width: 980px) {
  .c-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .c-hero__actions {
    justify-content: center;
  }
  .c-hero__graphic {
    order: -1;
  }
  .c-hero__graphic img {
    max-width: 240px;
  }
}

/* ==========================================================================
   Feature Cards (c-cards-grid + c-card on homepage)
   ========================================================================== */

.c-hero + .c-cards-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px) clamp(24px, 4vw, 48px);
}

/* Feature cards as links */
a.c-card {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: clamp(20px, 2vw, 32px);
  transition: box-shadow 0.2s ease;
}

a.c-card:hover {
  box-shadow: var(--shadow-md);
}

a.c-card h3 {
  font-family: var(--rs-font);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-fg);
  margin: 0 0 10px;
}

a.c-card p {
  font-family: var(--rs-font);
  font-size: 16px;
  color: var(--color-fg-muted);
  margin: 0 0 12px;
  line-height: 1.6;
}

.c-card__tags {
  font-family: var(--rs-font);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin: 0;
}

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

/* ==========================================================================
   Inner Page Layout (content left + info sidebar right)
   Uses a simple wrapper to create 2-column grid inside content area.
   ========================================================================== */

.c-page-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 48px) clamp(24px, 4vw, 64px);
}

.c-page-layout__content {
  min-width: 0;
}

.c-page-layout__sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

@media (max-width: 980px) {
  .c-page-layout {
    grid-template-columns: 1fr;
  }
  .c-page-layout__sidebar {
    position: static;
    order: -1;
  }
}

/* ==========================================================================
   Page Title Area (uses c-doc-content heading styles, adds subtitle)
   ========================================================================== */

.c-page-title {
  margin-bottom: clamp(24px, 3vw, 48px);
}

.c-page-title h1 {
  font-family: var(--rs-font);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 52px);
  color: var(--color-fg);
  margin: 0 0 8px;
  line-height: 1.15;
}

.c-page-title__subtitle {
  font-family: var(--rs-font);
  color: var(--color-fg-muted);
  font-size: 20px;
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   Content Sections (c-callout reused as section blocks)
   Theme overrides to match RavenSong's visual style.
   ========================================================================== */

.c-doc-content .c-callout {
  background: var(--color-bg-elev);
  border: none;
  border-left: 3px solid var(--color-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: clamp(20px, 2.5vw, 32px) clamp(20px, 2.5vw, 40px);
  margin: 0 0 clamp(20px, 2.5vw, 36px);
}

.c-doc-content .c-callout h3 {
  font-family: var(--rs-font);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 14px;
}

.c-doc-content .c-callout h4 {
  font-family: var(--rs-font);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-fg);
  margin: 24px 0 8px;
}

.c-doc-content .c-callout p {
  font-family: var(--rs-font);
  font-size: 16px;
  line-height: 1.75;
}

/* ==========================================================================
   Info Sidebar Cards (c-card used in right sidebar)
   ========================================================================== */

.c-page-layout__sidebar .c-card {
  text-align: center;
  padding: clamp(20px, 2vw, 28px);
  margin-bottom: 20px;
}

.c-page-layout__sidebar .c-card h4 {
  font-family: var(--rs-font);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-fg);
  margin: 0 0 10px;
}

.c-page-layout__sidebar .c-card p {
  font-family: var(--rs-font);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-fg-muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

.c-page-layout__sidebar .c-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 12px auto 20px;
  object-fit: cover;
}

/* ==========================================================================
   Footer Overrides (centered layout for RavenSong)
   ========================================================================== */

.c-doc-footer {
  background: #fafafa;
}

.c-doc-footer .c-doc-footer__top {
  background: #fafafa;
  border-bottom: none;
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: clamp(24px, 3vw, 48px) clamp(16px, 3vw, 32px);
}

.c-doc-footer .c-doc-footer__top p {
  font-family: var(--rs-font);
  margin: 8px 0;
  font-size: 16px;
  color: var(--color-fg-muted);
}

.c-doc-footer .c-doc-footer__top a {
  color: var(--color-primary);
  text-decoration: none;
}

.c-doc-footer .c-doc-footer__top a:hover {
  text-decoration: underline;
}

.c-doc-footer .c-doc-footer__top .c-doc-footer__tagline {
  font-style: italic;
  margin-bottom: 16px;
}

/* ==========================================================================
   Footer Theme Link Styles
   ========================================================================== */

.c-doc-footer__section-title {
  color: var(--color-fg);
}

.c-doc-footer__section-content {
  color: var(--color-fg-muted);
}

.c-doc-footer__link {
  color: var(--color-primary);
}

.c-doc-footer__link:hover,
.c-doc-footer__link:focus {
  color: var(--brand-700);
}
