/* ==========================================================================
   FABERCREST INTERNATIONAL — Base styles & design tokens
   Load order: style.css → components.css → responsive.css
   ========================================================================== */

:root {
  /* Brand palette */
  --color-background: #F8F6F0;   /* Warm Ivory */
  --color-primary: #002316;      /* Deep Forest Green */
  --color-accent: #C6A269;       /* Champagne Gold (decorative) */
  --color-text: #292D29;         /* Elegant Charcoal */
  --color-section: #E9E2D4;      /* Sand Beige */
  --color-border: #DED8CC;       /* Warm Gray */
  --color-white: #FFFFFF;

  /* Derived tones (used only where contrast requires it) */
  --color-accent-text: #85652F;  /* darker gold for small text on light backgrounds (AA) */
  --color-primary-soft: #0E3A28;
  --color-muted: #5B605B;
  --color-error: #9B2C2C;
  --color-success: #1F5C3E;

  /* Typography */
  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h1: clamp(1.95rem, 1.35rem + 2.6vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 1.25rem + 1.5vw, 2.4rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);

  /* Layout */
  --container-width: 1200px;
  --container-pad: clamp(1.15rem, 4vw, 2rem);
  --section-space: clamp(4rem, 3rem + 5vw, 7.5rem);
  --header-height: 76px;

  /* Shape & effects */
  --radius-card: 12px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(0, 35, 22, 0.04), 0 8px 24px rgba(0, 35, 22, 0.06);
  --shadow-lift: 0 2px 4px rgba(0, 35, 22, 0.05), 0 18px 40px rgba(0, 35, 22, 0.10);
  --transition: 200ms ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-text);
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important; /* ensure the hidden attribute always wins over component display rules */
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
h4 { font-size: 1.05rem; }

p + p {
  margin-top: 1rem;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.75;
  color: var(--color-text);
  max-width: 62ch;
}

.text-muted {
  color: var(--color-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--color-accent);
}

.eyebrow--center::after {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: var(--color-accent);
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important; /* standard screen-reader-only pattern */
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-background);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: var(--color-background);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-footer :focus-visible,
.section--green :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--color-accent);
}

::selection {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container-width) + var(--container-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: calc(820px + var(--container-pad) * 2);
}

.section {
  padding-block: var(--section-space);
}

.section--sand {
  background: var(--color-section);
}

.section--white {
  background: var(--color-white);
}

.section--green {
  background: var(--color-primary);
  color: var(--color-background);
}

.section--green h2,
.section--green h3 {
  color: var(--color-background);
}

.section--tight {
  padding-block: calc(var(--section-space) * 0.6);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.75rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 + p {
  margin-top: 1.1rem;
}

.section-head--split {
  display: grid;
  gap: 1.25rem;
  max-width: none;
  align-items: end;
}

.grid {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.split {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  align-items: center;
}

.grid.split {
  align-items: stretch;
}

.stack > * + * {
  margin-top: 1rem;
}

main {
  display: block;
}

/* Gold hairline separator */
.rule {
  width: 64px;
  height: 1px;
  margin: 1.5rem 0;
  border: 0;
  background: var(--color-accent);
}

.rule--center {
  margin-inline: auto;
}

/* ---------- Scroll reveal (only when JS + motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms ease, transform 700ms ease;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Spacing utilities ---------- */
.u-mt-md { margin-top: 1.5rem; }
.u-mt-lg { margin-top: 1.75rem; }
.u-mb-sm { margin-bottom: 1rem; }

/* Content that only makes sense when JavaScript is running */
html:not(.js) .js-only {
  display: none;
}
