/* ============================================================
   On Point Design Construction Inc. — base.css
   Design tokens, reset, typography, layout primitives
   Brand: matte flat black + polished copper + warm bone
   ============================================================ */

:root {
  /* ---- Brand color system (exact, non-negotiable) ---- */
  --color-black: #0A0A0A;          /* True flat near-black, matte. Primary dark bg */
  --color-black-rich: #141414;     /* Slightly elevated black for cards on black */
  --color-black-soft: #1C1C1C;     /* Card hover, subtle elevation */
  --color-copper: #B87333;         /* Primary copper — the brand */
  --color-copper-bright: #C68B5C;  /* Highlight copper for hover/active */
  --color-copper-deep: #8B5A2B;    /* Shadow copper / pressed */
  --color-bone: #F5F1EA;           /* Warm off-white content sections */
  --color-bone-soft: #ECE5D8;      /* Subtle bone variation */
  --color-charcoal: #2A2A2A;       /* Text on bone */
  --color-graphite: #4A4A4A;       /* Secondary text on bone */

  /* Copper gradient for metallic luster (logo, accents) */
  --copper-gradient: linear-gradient(135deg, #C68B5C 0%, #B87333 38%, #8B5A2B 72%, #C68B5C 100%);
  --copper-sheen: linear-gradient(120deg, #E0A878 0%, #B87333 45%, #8B5A2B 100%);

  /* ---- Typography ---- */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Manrope', 'Inter', system-ui, sans-serif;

  /* Type scale (fluid) */
  --text-hero: clamp(2.75rem, 8vw, 6rem);     /* hero headlines */
  --text-3xl: clamp(2.25rem, 5vw, 3.75rem);
  --text-2xl: clamp(1.875rem, 4vw, 2.75rem);
  --text-xl: clamp(1.5rem, 2.6vw, 2rem);
  --text-lg: clamp(1.15rem, 1.6vw, 1.375rem);
  --text-base: 1.0625rem;   /* ~17px */
  --text-sm: 0.9375rem;     /* 15px */
  --text-xs: 0.8125rem;     /* 13px */
  --text-tiny: 0.6875rem;   /* 11px — micro labels */

  /* Letter spacing */
  --track-label: 0.22em;    /* all-caps UI labels */
  --track-wide: 0.14em;
  --track-tight: -0.01em;

  /* ---- Spacing ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Section padding */
  --section-y: clamp(4rem, 9vw, 8.5rem);
  --gutter: clamp(1.25rem, 5vw, 4rem);

  /* Layout */
  --max-w: 1240px;
  --max-w-wide: 1440px;
  --max-w-text: 68ch;

  /* Radius */
  --radius-pill: 999px;
  --radius-card: 4px;       /* architectural, sharp-ish */
  --radius-sm: 2px;

  /* Shadows / glows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.18);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.28);
  --glow-copper: 0 8px 28px rgba(184,115,51,0.35);
  --glow-copper-strong: 0 10px 36px rgba(184,115,51,0.45);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-charcoal);
  background: var(--color-bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---- Typography defaults ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: var(--track-tight); }
p { max-width: var(--max-w-text); }

.font-body { font-family: var(--font-body); }

/* All-caps tracked labels (nav, eyebrows, small UI) */
.label, .eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--color-copper);
  margin-bottom: var(--space-6);
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--color-copper);
  display: inline-block;
}

/* Display wordmark voice — used in section heads */
.wordmark-caps {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---- Layout primitives ---- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { width: 100%; max-width: var(--max-w-wide); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

/* Section themes */
.section--dark { background: var(--color-black); color: var(--color-bone); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--color-bone); }
.section--rich { background: var(--color-black-rich); color: var(--color-bone); }
.section--rich h1, .section--rich h2, .section--rich h3, .section--rich h4 { color: var(--color-bone); }
.section--bone { background: var(--color-bone); color: var(--color-charcoal); }
.section--bone-soft { background: var(--color-bone-soft); color: var(--color-charcoal); }

.text-copper { color: var(--color-copper); }
.text-bone { color: var(--color-bone); }
.text-muted { color: var(--color-graphite); }
.section--dark .text-muted, .section--rich .text-muted { color: rgba(245,241,234,0.62); }

.lead { font-size: var(--text-lg); line-height: 1.55; color: var(--color-graphite); }
.section--dark .lead, .section--rich .lead { color: rgba(245,241,234,0.78); }

/* Hairline divider with copper */
.hairline { height: 1px; background: rgba(184,115,51,0.28); border: 0; }
.section--dark .hairline, .section--rich .hairline { background: rgba(184,115,51,0.32); }

/* Grids */
.grid { display: grid; gap: var(--space-8); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* Asymmetric split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
.split--wide-right { grid-template-columns: 0.85fr 1.15fr; }
@media (max-width: 860px) {
  .split, .split--wide-left, .split--wide-right { grid-template-columns: 1fr; gap: var(--space-10); }
  .split .order-first-mobile { order: -1; }
}

/* Section heading block */
.section-head { max-width: 56ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.section-sub { font-size: var(--text-lg); color: var(--color-graphite); line-height: 1.55; }
.section--dark .section-sub, .section--rich .section-sub { color: rgba(245,241,234,0.72); }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--color-copper); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius-card) 0;
  font-size: var(--text-sm); font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Focus states */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-copper-bright);
  outline-offset: 3px;
}

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.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;
}

/* Fade-up animation (toggled by JS) — content visible by default; JS enhances with animation */
.reveal { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
/* Only apply the pre-animation hidden state when JS has flagged the page (html.js-reveal) */
html.js-reveal .reveal { opacity: 0; transform: translateY(24px); }
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1; transform: none; }
}
