/**
 * KNDCA Theme Base Styles, Reset & Typography
 * Exact visual alignment with approved reference (kndca-color-harmony.lovable.app)
 *
 * @package KNDCA
 * @version 2.0.0
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.02vw, 17px);
  line-height: 1.68;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.mobile-nav-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  color: var(--primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* CRITICAL FIX: Do NOT set fill: currentColor on svg globally; Lucide icons use stroke="currentColor" fill="none" */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

svg.icon {
  fill: none;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

address {
  font-style: normal;
}

.not-italic {
  font-style: normal;
}

/* ==========================================================================
   Layout Primitives (Exact Reference Metrics)
   ========================================================================== */

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding-block: 96px;
}

.section-tight {
  padding-block: 68px;
}

.alt-bg {
  background: var(--secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dark-band {
  color: var(--primary-foreground);
  background: var(--primary);
}

.dark-band h1,
.dark-band h2,
.dark-band h3,
.dark-band h4 {
  color: var(--primary-foreground);
}

/* ==========================================================================
   Eyebrow, Section Titles & Headings (Exact Reference Metrics)
   ========================================================================== */

.eyebrow {
  color: var(--muted-foreground);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: inline-flex;
}

.eyebrow::before {
  content: "";
  background: var(--gold);
  width: 23px;
  height: 1px;
  display: inline-block;
  flex-shrink: 0;
}

.dark-band .eyebrow,
.hero .eyebrow {
  color: var(--gold);
}

.section-title {
  color: var(--primary);
  max-width: 20ch;
  margin: 10px 0 0;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.dark-band .section-title {
  color: var(--primary-foreground);
}

.section-intro,
.section-lead {
  color: var(--muted-foreground);
  max-width: 58ch;
  margin: 14px 0 0;
  font-size: clamp(16.5px, 1.15vw, 18px);
  line-height: 1.68;
}

/* Reference .section-heading: supports both two-column (heading left + link/intro right) and stacked children */
.section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

/* When .section-heading contains direct .eyebrow + .section-title without a wrapper div, stack cleanly */
.section-heading > .eyebrow {
  flex: 0 0 100%;
  margin-bottom: -10px;
}

.section-heading > .section-title {
  flex: 1 1 auto;
}

.section-heading > .section-intro {
  flex: 0 0 100%;
  margin-top: 4px;
}

.section-heading.text-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-heading.text-center .section-title,
.section-heading.text-center .section-intro {
  margin-inline: auto;
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Accessibility & WordPress Core Classes
   ========================================================================== */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  clip: auto !important;
  clip-path: none;
  color: var(--gold);
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 16px;
  line-height: normal;
  padding: 12px 20px;
  text-decoration: none;
  top: 16px;
  width: auto;
  z-index: 100000;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  clear: both;
  display: block;
  margin-inline: auto;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.wp-caption-text {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

.bypostauthor,
.sticky,
.gallery-caption {
  /* WordPress theme review hooks */
}

/* ==========================================================================
   Scroll Reveal Utility
   ========================================================================== */

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--kndca-stagger, 0ms);
}

.js-enabled .reveal:not(.revealed) {
  opacity: 0;
  transform: translateY(16px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .js-enabled .reveal:not(.revealed) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
.container.text-center .section-title {
    margin: 10px auto;
}
.container.text-center .section-intro {
    margin: 14px auto;
}