/* ============================================================
   Samuel Meredith — shared site styles (Option A · Warm Chocolate)
   Used by Home, Services, Portfolio, About, Contact
   ============================================================ */

:root {
  --cream: #FAF7F2;
  --cream-2: #F2EDE6;
  --ink: #1C1814;
  --ink-soft: #423A30;
  --choco: #2C1F14;
  --choco-deep: #1A1209;
  --terra: #C4622D;
  --terra-hover: #A8521F;
  --sand: #C9B99A;
  --rule: rgba(28,24,20,0.18);
  --rule-cream: rgba(250,247,242,0.22);
  --display: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 760px) { .wrap { padding: 0 24px; } }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
}
.eyebrow.on-dark { color: var(--sand); }

::selection { background: var(--terra); color: var(--cream); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px 56px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 240ms ease, padding 240ms ease, border-color 240ms ease, color 240ms ease;
  border-bottom: 1px solid transparent;
  color: var(--cream);
}
.nav.on-light { color: var(--ink); }
.nav.on-light.scrolled { color: var(--ink); }
.nav.scrolled {
  background: var(--cream);
  color: var(--ink);
  padding: 14px 56px;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 760px) {
  .nav, .nav.scrolled { padding-left: 24px; padding-right: 24px; }
}
.nav__brand {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav__brand em { font-style: italic; font-weight: 400; }
.nav__links {
  display: flex; gap: 36px; align-items: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav__links a {
  opacity: 0.85; transition: opacity 160ms ease;
  position: relative; padding: 6px 0;
}
.nav__links a.is-active { opacity: 1; }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor; transform: scaleX(1);
}
.nav__links a:hover { opacity: 1; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 220ms ease;
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta {
  border: 1px solid currentColor;
  color: inherit;
  background: transparent;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.nav.scrolled .nav__cta { background: var(--terra); color: var(--cream); border-color: var(--terra); }
.nav.scrolled .nav__cta:hover { background: var(--terra-hover); border-color: var(--terra-hover); }
.nav__cta:hover { background: var(--cream); color: var(--choco); }
.nav.on-light .nav__cta { background: var(--terra); color: var(--cream); border-color: var(--terra); }
.nav.on-light .nav__cta:hover { background: var(--terra-hover); border-color: var(--terra-hover); }
/* -- Mobile hamburger toggle --------------------------------------------- */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: inherit;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 280ms ease, opacity 280ms ease;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
}

/* -- Mobile drawer ------------------------------------------------------- */
.nav__drawer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--choco-deep);
  color: var(--cream);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 56px;
  transform: translateX(100%);
  transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.nav__drawer.open { transform: translateX(0); }

.nav__drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 52px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule-cream);
}
.nav__brand--drawer {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cream);
  white-space: nowrap;
}
.nav__brand--drawer em { font-style: italic; font-weight: 400; }

.nav__close {
  background: none;
  border: 1px solid var(--rule-cream);
  color: var(--cream);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease;
  flex-shrink: 0;
}
.nav__close svg { width: 14px; height: 14px; }
.nav__close:hover { background: rgba(250,247,242,0.12); }

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nav__drawer-links a {
  font-family: var(--display);
  font-size: clamp(44px, 13vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--cream);
  opacity: 0.55;
  transition: opacity 160ms ease, color 160ms ease, padding-left 220ms ease;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-cream);
}
.nav__drawer-links a:last-child { border-bottom: none; }
.nav__drawer-links a:hover { opacity: 1; padding-left: 10px; }
.nav__drawer-links a.is-active { opacity: 1; color: var(--terra); }

.nav__drawer-cta { margin-top: 40px; align-self: flex-start; }

.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}
.nav__overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 240ms ease;
}
.btn .arrow { transition: transform 280ms ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { color: var(--cream); border-color: var(--cream); background: transparent; }
.btn--ghost:hover { background: var(--cream); color: var(--choco); }
.btn--terra { background: var(--terra); color: var(--cream); border-color: var(--terra); }
.btn--terra:hover { background: var(--terra-hover); border-color: var(--terra-hover); }
.btn--ink { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--ink:hover { background: var(--choco); border-color: var(--choco); }
.btn--outline-ink { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn--outline-ink:hover { background: var(--ink); color: var(--cream); }
.btn--cream-ghost { color: var(--cream); border-color: var(--cream); background: transparent; }
.btn--cream-ghost:hover { background: var(--cream); color: var(--choco); }

/* ---------- FOOTER ---------- */
.foot {
  background: var(--choco-deep);
  color: var(--sand);
  padding: 80px 0 40px;
}
.foot__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px;
  padding-bottom: 60px;
}
.foot__brand-name {
  font-family: var(--display);
  font-size: 28px;
  color: var(--cream);
  font-weight: 500;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.foot__brand-name em { font-style: italic; font-weight: 400; }
.foot__brand-meta {
  font-size: 13px; line-height: 1.6; color: var(--sand); max-width: 320px;
}
.foot__col h4 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--terra); margin: 0 0 22px; font-weight: 500;
}
.foot__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.foot__col a { color: var(--cream); font-size: 14px; opacity: 0.9; transition: opacity 160ms ease, color 160ms ease; }
.foot__col a:hover { color: var(--terra); opacity: 1; }
.foot__copy {
  border-top: 1px solid var(--rule-cream);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--sand);
  flex-wrap: wrap; gap: 12px;
}
.foot__copy em { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--cream); }
@media (max-width: 760px) {
  .foot__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- REVEAL ON SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- PAGE HEADER (used by Services, Portfolio, About, Contact light variants) ---------- */
.pagehead {
  padding: 180px 0 80px;
  background: var(--cream);
}
.pagehead__row {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 80px; align-items: end;
}
.pagehead__title {
  font-family: var(--display);
  font-size: clamp(54px, 7vw, 116px);
  line-height: 0.96;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  color: var(--ink);
  text-wrap: pretty;
}
.pagehead__title .italic { font-style: italic; }
.pagehead__title .caps {
  font-family: var(--sans);
  text-transform: uppercase;
  font-weight: 500;
  font-size: 0.6em;
  letter-spacing: 0.005em;
}
.pagehead__sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0;
  padding-bottom: 12px;
}
.pagehead__sub em { font-family: var(--display); font-style: italic; font-size: 19px; color: var(--ink); }
@media (max-width: 860px) {
  .pagehead { padding: 130px 0 60px; }
  .pagehead__row { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- FOOTER CTA BAND (reusable choco band) ---------- */
.cta-band {
  background: var(--choco);
  color: var(--cream);
  padding: 130px 0 120px;
  position: relative;
  overflow: hidden;
}
.cta-band__grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px; align-items: end;
}
.cta-band__title {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 96px);
  line-height: 0.96;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 24px 0 0;
  color: var(--cream);
  text-wrap: pretty;
}
.cta-band__title .italic { font-style: italic; }
.cta-band__title .caps { font-family: var(--sans); text-transform: uppercase; font-weight: 500; font-size: 0.58em; letter-spacing: 0.005em; }
.cta-band__body {
  font-size: 16px; line-height: 1.6; color: #E8E0D2; max-width: 380px; margin: 0 0 36px; font-weight: 300;
}
.cta-band__direct {
  font-family: var(--display); font-style: italic; font-size: 18px; color: var(--sand); margin-top: 14px;
}
.cta-band__direct a { color: var(--cream); border-bottom: 1px solid var(--sand); padding-bottom: 2px; }
.cta-band__direct a:hover { border-color: var(--cream); }
.cta-band__corner {
  position: absolute; right: 56px; top: 56px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sand); font-weight: 500;
  display: flex; align-items: center; gap: 12px;
}
.cta-band__corner .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--terra); }
@media (max-width: 860px) {
  .cta-band__grid { grid-template-columns: 1fr; gap: 36px; }
  .cta-band__corner { right: 24px; top: 24px; }
}
