@import url("variables.css");
@import url("components.css");

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-cream);
  background-image:
    radial-gradient(62rem 42rem at 90% -10%, rgba(194, 163, 97, 0.16), transparent 60%),
    radial-gradient(54rem 40rem at -10% 6%, rgba(126, 158, 136, 0.12), transparent 55%);
  background-attachment: fixed;
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Accessible focus — visible only for keyboard users */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}
::selection { background: rgba(194, 163, 97, 0.32); color: var(--color-navy); }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-navy);
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.5vw, var(--fs-4xl)); }
h2 { font-size: clamp(2rem, 4vw, var(--fs-3xl)); }
h3 { font-size: clamp(1.5rem, 2.6vw, var(--fs-2xl)); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
p { line-height: var(--lh-loose); color: var(--color-text-soft); }
p + p { margin-top: var(--space-4); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);            /* 11px per design system */
  font-weight: var(--fw-medium);        /* 500 per design system */
  letter-spacing: var(--tracking-eyebrow); /* 0.1em per design system */
  text-transform: uppercase;
  color: var(--color-gold-dark);        /* gold-led, AA on cream */
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section-head--center .eyebrow,
.text-center .eyebrow { justify-content: center; }

.lede {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: var(--lh-snug);
  font-style: italic;
  color: var(--color-navy);
  max-width: 56ch;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

.section {
  padding-block: clamp(4rem, 9vw, var(--space-16));
}
.section--tight { padding-block: clamp(3rem, 6vw, var(--space-12)); }
.section--cream { background: var(--color-cream); }
.section--warm { background: var(--color-cream-warm); }
.section--navy { background: var(--color-navy); color: var(--color-cream); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 { color: var(--color-cream); }
.section--navy p { color: rgba(250, 247, 242, 0.78); }
.section--sage { background: var(--color-sage); color: var(--color-cream); }
.section--sage h2, .section--sage h3 { color: var(--color-cream); }
.section--sage p { color: rgba(250, 247, 242, 0.86); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-9);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* Grids */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Force an exact 3-up grid (e.g. 6 cards laid out 3 + 3 rather than 4 + 2) */
@media (min-width: 768px) {
  .grid-3.is-trio { grid-template-columns: repeat(3, 1fr); }
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, var(--space-12));
  align-items: center;
}
.split--reverse > :first-child { order: 2; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.95rem 1.85rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(0) scale(0.99); }
.btn--primary {
  background: var(--color-navy);
  color: var(--color-cream);
  box-shadow: 0 1px 2px rgba(28, 43, 74, 0.2);
}
.btn--primary:hover { background: var(--color-navy-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--gold {
  background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold));
  color: var(--color-navy-deep);
  box-shadow: 0 1px 2px rgba(168, 137, 80, 0.35);
}
.btn--gold:hover {
  background: linear-gradient(180deg, var(--color-gold), var(--color-gold-dark));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--ghost {
  background: transparent;
  color: var(--color-navy);
  border-color: rgba(28, 43, 74, 0.25);
}
.btn--ghost:hover { background: var(--color-navy); color: var(--color-cream); border-color: var(--color-navy); transform: translateY(-2px); }
.btn--ghost-light {
  background: transparent;
  color: var(--color-cream);
  border-color: rgba(250, 247, 242, 0.5);
}
.btn--ghost-light:hover { background: var(--color-cream); color: var(--color-navy); transform: translateY(-2px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  color: var(--color-navy);
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 2px;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.link-arrow::after {
  content: "→";
  transition: transform var(--dur-base) var(--ease-out);
}
.link-arrow:hover { color: var(--color-gold-dark); }
.link-arrow:hover::after { transform: translateX(4px); }

/* Utility */
.text-center { text-align: center; }
.muted { color: var(--color-muted); }
.gold { color: var(--color-gold-dark); }
.sage { color: var(--color-sage-dark); }

.divider {
  position: relative;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-gold), rgba(201, 169, 110, 0));
  margin: var(--space-5) 0;
}
.divider::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  transform: translateY(-50%);
}
.section-head--center .divider {
  margin-inline: auto;
  background: linear-gradient(90deg, rgba(201, 169, 110, 0), var(--color-gold) 50%, rgba(201, 169, 110, 0));
}
.section-head--center .divider::before { left: 50%; transform: translate(-50%, -50%); }

/* Page hero (interior pages) */
.page-hero {
  display: flex;
  align-items: center;
  min-height: clamp(28rem, 46vw, 37.5rem);
  background:
    radial-gradient(120% 120% at 85% -20%, rgba(123, 158, 135, 0.22), transparent 55%),
    linear-gradient(180deg, var(--color-navy), var(--color-navy-deep));
  color: var(--color-cream);
  padding-block: clamp(6rem, 8vw, 7rem) clamp(3.5rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(250, 247, 242, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -40% auto;
  width: 460px; height: 460px;
  background: radial-gradient(circle at center, rgba(123, 158, 135, 0.24), transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; width: 100%; }
.page-hero h1 {
  color: var(--color-cream);
  max-width: 18ch;
  font-size: clamp(2.3rem, 4vw, 3.1rem);
  line-height: 1.1;
}
.page-hero p { color: rgba(250, 247, 242, 0.82); max-width: 56ch; margin-top: var(--space-5); }
.page-hero .eyebrow { color: var(--color-gold-light); }

/* Slim hero for utility pages (FAQs / Privacy / Terms) sitting above an embed */
.page-hero--slim {
  min-height: auto;
  padding-block: clamp(5rem, 8vw, 6.5rem) clamp(2rem, 4vw, 3rem);
}
.page-hero--slim p a { color: var(--color-gold-light); border-bottom: 1px solid currentColor; }
.page-hero--slim p a:hover { color: var(--color-cream); }

/* Breadcrumb / context */
.crumbs {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.6);
  margin-bottom: var(--space-5);
}
.crumbs a:hover { color: var(--color-gold-light); }

/* Mobile */
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .page-hero { padding-block: 7rem 4rem; }
}

@media (max-width: 480px) {
  /* Hero CTAs stack full-width on small phones */
  .hero__ctas { flex-direction: column; gap: var(--space-3); }
  .hero__ctas .btn { width: 100%; justify-content: center; }
  /* Slightly tighter lede on very small screens */
  .hero__lede { font-size: 1rem; }
  /* Section headings breathe a bit less on small screens */
  .section-head { margin-bottom: var(--space-7); }
}
