/* ============================================================
   BRAINWORK — Base CSS v3  (Warm Linen)
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--c-text);
  background-color: var(--c-bg);
  overflow-x: hidden;
}

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

ul[role='list'], ol[role='list'] { list-style: none; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.15;
  color: var(--c-text);
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 68ch;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

table { border-collapse: collapse; width: 100%; }

::selection {
  background: var(--c-gold-light);
  color: var(--c-text);
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Utilities ── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-6), 4vw, var(--sp-12));
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

/* ── Section rhythm ── */
.section {
  padding-block: clamp(var(--sp-16), 8vw, var(--sp-32));
}

.section--sm {
  padding-block: clamp(var(--sp-10), 5vw, var(--sp-20));
}

.section--lg {
  padding-block: clamp(var(--sp-20), 10vw, var(--sp-32));
}

/* ── Dark section override — invert to dark bg ── */
.section--dark {
  background-color: var(--c-bg-dark);
  color: var(--c-text-light);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--c-text-light);
}

.section--dark p,
.section--dark li {
  color: var(--c-text-light-dim);
}

.section--ink {
  background-color: var(--c-bg-ink);
  color: var(--c-text-light);
}

/* ── Offset sections for alternating rhythm ── */
.section--offset {
  background-color: var(--c-bg-1);
}

.section--offset-2 {
  background-color: var(--c-bg-2);
}

/* ── Gold rule decorations ── */
.gold-rule {
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--c-gold);
  border-radius: var(--radius-full);
  margin-block-end: var(--sp-6);
}

/* ── Section eyebrow label ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold-dark);
  margin-block-end: var(--sp-4);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--c-gold);
}

/* ── Heading group ── */
.section-header {
  margin-block-end: clamp(var(--sp-10), 4vw, var(--sp-16));
}

.section-header--center {
  text-align: center;
  align-items: center;
}

.section-header--center .eyebrow {
  justify-content: center;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.1;
  margin-block-end: var(--sp-4);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--c-text-dim);
  line-height: 1.6;
  max-width: 56ch;
}

/* dark variants */
.section--dark .section-title,
.section--ink .section-title {
  color: var(--c-text-light);
}

.section--dark .section-subtitle,
.section--ink .section-subtitle {
  color: var(--c-text-light-dim);
}

.section--dark .eyebrow,
.section--ink .eyebrow {
  color: var(--c-gold);
}

/* ── Aspect-ratio helpers ── */
.aspect-16-9  { aspect-ratio: 16/9; }
.aspect-4-3   { aspect-ratio: 4/3; }
.aspect-3-2   { aspect-ratio: 3/2; }
.aspect-1-1   { aspect-ratio: 1/1; }

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
