/*
 * base.css
 * ReyBelen Standalone Theme — Foundation Layer
 *
 * Authority: REYBELEN-VISUAL-SYSTEM-ARCHITECTURE.md §02 (Typography)
 *            REYBELEN-COMPONENT-BLUEPRINT-SYSTEM.md §01.3 (Inheritance Model)
 *            PHASE-05-BUILD-EXECUTION-PLAN.md §C2
 *
 * Owns: box-sizing reset, html/body, @font-face, .rb-container,
 *       heading/paragraph/link/image/list/blockquote/table resets,
 *       selection, focus ring, reduced-motion, visually-hidden utility.
 *
 * Does not own: any component, section, nav, hero, footer, or page template styles.
 * No layout @media queries in this file. Exception: @media (prefers-reduced-motion: reduce)
 * at the end of the file — accessibility feature query, not a breakpoint.
 */


/* ── Box-Sizing Reset ────────────────────────────────────────────────────── */

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


/* ── Font Faces ──────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Fraunces';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/fraunces-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  src: url('../fonts/fraunces-300italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/fraunces-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('../fonts/fraunces-400italic.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/dm-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/dm-mono-500.woff2') format('woff2');
}


/* ── HTML / Body ─────────────────────────────────────────────────────────── */

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background-color: var(--rb-bg);
  color: var(--rb-ink);
  font-family: var(--rb-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}


/* ── Container ───────────────────────────────────────────────────────────── */

.rb-container {
  max-width: var(--rb-max-w);
  padding-inline: var(--rb-pad-h);
  margin-inline: auto;
  width: 100%;
}


/* ── Headings ────────────────────────────────────────────────────────────── */

/*
 * Reset only. Sizes, weights, colors, and line-heights
 * are set by each component's owning CSS file.
 */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
}


/* ── Paragraphs ──────────────────────────────────────────────────────────── */

p {
  margin: 0;
  padding: 0;
}


/* ── Links ───────────────────────────────────────────────────────────────── */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: inherit;
}


/* ── Images ──────────────────────────────────────────────────────────────── */

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


/* ── Lists ───────────────────────────────────────────────────────────────── */

/*
 * Reset only. Decorative list styles are component-level concerns.
 */

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}


/* ── Blockquotes ─────────────────────────────────────────────────────────── */

blockquote {
  margin: 0;
  padding: 0;
}


/* ── Tables ──────────────────────────────────────────────────────────────── */

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


/* ── Form Element Baseline ───────────────────────────────────────────────── */

/*
 * Base element resets only.
 * CF7 and Vbout overrides live in forms.css.
 */

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

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

textarea {
  resize: vertical;
}


/* ── Selection ───────────────────────────────────────────────────────────── */

::selection {
  background-color: var(--rb-cognac);
  color: #FFFFFF;
}


/* ── Focus Ring ──────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--rb-cognac);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}


/* ── Visually Hidden ─────────────────────────────────────────────────────── */

/*
 * Hides content visually while preserving it for screen readers and SEO.
 * Used by hero descriptor and entity spans (aria-hidden="true" SEO spans
 * use display:none — this pattern is for content that must remain accessible).
 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ── Reduced Motion ──────────────────────────────────────────────────────── */

@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;
  }
}
