/* ============================================================
   GLOBAL.CSS — CSS Variables, Typography, Reset
   actually. platform — March 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- Variables --- */
:root {
  --cream:   #F7F3ED;
  --ink:     #1A1510;
  --accent:  #E85D2F;
  --warm:    #C8873A;
  --sage:    #4A7C6F;
  --mid:     #6B5B4E;
  --light:   #EDE8E0;
  --rule:    #DDD8D0;

  --font-display: 'DM Serif Display', serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --max-width: 1280px;
  --section-padding: 100px 48px;
  --section-padding-mobile: 64px 20px;

  --radius-sm: 4px;
  --radius-md: 8px;

  --transition: 0.2s ease;
  --shadow-card: 0 4px 24px rgba(26,21,16,0.08);
  --shadow-hover: 0 8px 32px rgba(26,21,16,0.14);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden; /* prevent horizontal scroll on all pages */
}
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* belt-and-braces: prevent any element causing mobile scroll */
  width: 100%;
  max-width: 100vw;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Typography Scale --- */
.display {
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 84px);
  letter-spacing: -2px;
  line-height: 1.05;
}
h1, .h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.5vw, 56px);
  letter-spacing: -1.5px;
  line-height: 1.1;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.2;
}
h3, .h3 {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.3;
}
.body-lg { font-size: 17px; line-height: 1.7; }
.body    { font-size: 16px; line-height: 1.65; }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.caption {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* --- Utility --- */
.text-accent  { color: var(--accent); }
.text-warm    { color: var(--warm); }
.text-sage    { color: var(--sage); }
.text-mid     { color: var(--mid); }
.text-cream   { color: var(--cream); }
.text-center  { text-align: center; }
.text-upper   { text-transform: uppercase; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

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

/* --- Section Wrapper --- */
.section {
  padding: var(--section-padding);
  width: 100%;
  overflow-x: hidden;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.section--dark {
  background: var(--ink);
  color: var(--cream);
}
.section--light {
  background: var(--light);
}
.section--accent {
  background: var(--accent);
  color: var(--cream);
}
.section--warm {
  background: var(--warm);
  color: var(--cream);
}

/* --- Section Label --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
}
.section--dark .section-label,
.section--accent .section-label,
.section--warm .section-label {
  color: rgba(247,243,237,0.6);
}

/* --- Divider --- */
.rule { border: none; border-top: 1px solid var(--rule); }

@media (max-width: 768px) {
  .section { padding: var(--section-padding-mobile); }
}
