/* ============================================
   BASE
   Reset and global typography
   ============================================ */

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: var(--w-regular);
  font-size: var(--t-body);
  line-height: var(--lh-relaxed);
  color: var(--ink);
  background-color: var(--cream);
  font-feature-settings: 'kern', 'liga', 'onum';
  min-height: 100vh;
  overflow-x: hidden;
}

/* ----- Typography elements ----- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--w-light);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  color: var(--ink);
}

h1 {
  font-size: var(--t-h1);
  font-weight: var(--w-light);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--t-h2);
  font-weight: var(--w-light);
  letter-spacing: var(--ls-tight);
}

h3 {
  font-size: var(--t-h3);
  font-weight: var(--w-regular);
}

h4 {
  font-size: var(--t-h4);
  font-weight: var(--w-regular);
}

p {
  font-family: var(--font-body);
  margin-bottom: var(--s-4);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--sage);
  text-decoration: none;
  transition: color var(--d-quick) var(--ease-out);
}

a:hover {
  color: var(--sage-deep);
}

em, i {
  font-style: italic;
}

strong, b {
  font-weight: var(--w-semibold);
}

/* ----- Layout containers ----- */

.container {
  width: 100%;
  max-width: var(--measure-page);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.container--narrow {
  max-width: var(--measure-wide);
}

.container--reading {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

@media (min-width: 768px) {
  .container,
  .container--narrow,
  .container--reading {
    padding: 0 var(--s-6);
  }
}

/* ----- Decorative elements ----- */

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--t-eyebrow);
  font-weight: var(--w-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--sage);
  display: inline-block;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  color: var(--rule);
  font-size: 0.75rem;
  margin: var(--s-7) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 0 0 1.5rem;
  height: 1px;
  background: var(--rule);
}

.divider-mark {
  font-family: var(--font-display);
  color: var(--sage);
  font-size: 0.75rem;
}

/* ----- Sections ----- */

.section {
  padding: var(--s-9) 0;
}

.section--snug {
  padding: var(--s-7) 0;
}

.section--spacious {
  padding: var(--s-11) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--s-10) 0;
  }
  .section--spacious {
    padding: var(--s-12) 0;
  }
}

/* ----- Buttons / CTAs ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  font-family: var(--font-eyebrow);
  font-size: var(--t-tiny);
  font-weight: var(--w-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border: var(--br-thin) solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--d-quick) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}

/* Stretched buttons inside cards may need to wrap on small screens */
@media (max-width: 480px) {
  .btn {
    white-space: normal;
    letter-spacing: var(--ls-wide);
    line-height: 1.3;
  }
}

.btn:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--primary {
  background: var(--umber);
  border-color: var(--umber);
  color: var(--cream);
}

.btn--primary:hover {
  background: var(--umber-deep);
  border-color: var(--umber-deep);
  color: var(--cream);
}

.btn--ghost {
  border-color: var(--rule);
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-eyebrow);
  font-size: var(--t-tiny);
  font-weight: var(--w-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--sage);
  transition: gap var(--d-quick) var(--ease-out);
}

.link-arrow::after {
  content: '→';
  transition: transform var(--d-quick) var(--ease-out);
}

.link-arrow:hover {
  gap: var(--s-3);
  color: var(--sage-deep);
}

.link-arrow:hover::after {
  transform: translateX(2px);
}

/* ----- Pull quote ----- */

.pullquote {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-style: italic;
  line-height: var(--lh-snug);
  color: var(--sage);
  text-align: center;
  max-width: var(--measure-narrow);
  margin: var(--s-9) auto;
  letter-spacing: var(--ls-snug);
}

.pullquote::before { content: '\201C'; }
.pullquote::after { content: '\201D'; }

/* ----- Text utilities ----- */

.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-quiet { color: var(--quiet); }
.text-sage { color: var(--sage); }
.text-italic { font-style: italic; }

.lead {
  font-size: var(--t-lead);
  line-height: var(--lh-relaxed);
  color: var(--muted);
}

/* ----- Visibility utilities ----- */

@media (max-width: 767px) {
  .hide-mobile { display: none; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none; }
}
