/* Black Mountain Cabinetry - Homepage Concept
   Design language: Earthy Organic (type, spacing, composition, motion only)
   Palette: extracted from Black Mountain's own assets:
   - ink/summit blacks from their logo (pure black, warmed toward their walnut photography)
   - pine greens sampled from their Swinea project cabinetry
   - linen/parchment neutrals from their kitchen photography
   - timber from the hickory and white oak in their portfolio */

:root {
  /* Backgrounds */
  --ink:        #17130e;
  --ink-2:      #201a13;
  --summit:     #0e0b07;
  --linen:      #f5f1e9;
  --parchment:  #ebe4d7;

  /* Accent: deep pine green from their Swinea cabinetry */
  --pine:       #3f4a38;
  --pine-deep:  #333c2e;
  --pine-muted: rgba(63, 74, 56, 0.16);
  --sage:       #a9b49b;
  --timber:     #c8a87e;

  /* Text */
  --text-dark:  #221c14;
  --text-body:  #4d463c;
  --text-muted: #7d7568;
  --text-light: rgba(245, 241, 233, 0.94);
  --text-light-muted: rgba(245, 241, 233, 0.6);

  /* Type */
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container: min(90%, 1100px);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 14px;
  --nav-height: 84px;

  /* Motion */
  --ease-organic: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-body);
  background: var(--linen);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--text-dark); line-height: 1.18; }

.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--text-light); }
.on-dark p { color: var(--text-light-muted); }

.container { width: var(--container); margin-inline: auto; }

.section { padding-block: var(--section-pad); }
section[id], .section[id] { scroll-margin-top: var(--nav-height); }
.section--parchment { background: var(--parchment); }
.section--ink { background: var(--ink); }
.section--ink-2 { background: var(--ink-2); }
.section--pine { background: var(--pine-deep); }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pine);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.on-dark .eyebrow { color: var(--sage); }

/* Ridge divider motif (from their mountain mark) */
.ridge {
  display: block;
  width: min(140px, 30vw);
  height: auto;
  opacity: 0.5;
  margin-bottom: 1.6rem;
}
.ridge path { stroke: var(--pine); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.on-dark .ridge path { stroke: var(--sage); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.35s var(--ease-organic), color 0.35s var(--ease-organic), border-color 0.35s var(--ease-organic), transform 0.35s var(--ease-organic);
  will-change: transform;
}
.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-organic);
}
.btn:hover .btn__icon { transform: translateX(3px); }
.btn__icon svg { width: 12px; height: 12px; }

.btn--pine { background: var(--pine); color: var(--linen); }
.btn--pine:hover { background: var(--pine-deep); }
.btn--pine .btn__icon { background: rgba(245, 241, 233, 0.14); }
.btn--pine .btn__icon svg { stroke: var(--linen); }

.btn--light { background: var(--linen); color: var(--ink); }
.btn--light:hover { background: var(--parchment); }
.btn--light .btn__icon { background: var(--pine-muted); }
.btn--light .btn__icon svg { stroke: var(--pine); }

.btn--ghost { background: transparent; color: var(--text-light); border-color: rgba(245, 241, 233, 0.35); }
.btn--ghost:hover { border-color: rgba(245, 241, 233, 0.8); }
.btn--ghost .btn__icon { background: rgba(245, 241, 233, 0.12); }
.btn--ghost .btn__icon svg { stroke: var(--linen); }

/* ============ NAV ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  z-index: 90;
  transition: background 0.4s var(--ease-organic), box-shadow 0.4s var(--ease-organic);
}
.nav.is-solid { background: rgba(23, 19, 14, 0.96); box-shadow: 0 1px 0 rgba(245, 241, 233, 0.08); }
.nav__inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__logo img { height: 46px; width: auto; filter: invert(1); }
.nav__links { display: flex; align-items: center; gap: clamp(1.2rem, 2.5vw, 2.2rem); list-style: none; }
.nav__links a:not(.btn) {
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-block: 0.5rem;
  position: relative;
}
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-organic);
}
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__links .btn { padding: 0.65rem 1.3rem; font-size: 0.88rem; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 120;
}
.nav__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--linen);
  transition: transform 0.35s var(--ease-organic), opacity 0.35s var(--ease-organic);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--summit);
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-organic), visibility 0.4s var(--ease-organic);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__links { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-menu__links a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  color: var(--text-light);
  display: inline-block;
  padding-block: 0.55rem;
}
.mobile-menu__divider { height: 1px; background: rgba(245, 241, 233, 0.14); margin-block: 1.6rem; }
.mobile-menu__meta { color: var(--text-light-muted); font-size: 0.95rem; display: flex; flex-direction: column; gap: 0.35rem; }
.mobile-menu__meta a { color: var(--text-light); padding-block: 0.45rem; display: inline-block; }

/* ============ HERO ============ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--summit);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 40%;
  will-change: transform;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 11, 7, 0.55) 0%, rgba(14, 11, 7, 0.18) 40%, rgba(14, 11, 7, 0.82) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  width: var(--container);
  margin-inline: auto;
  padding-bottom: clamp(2.2rem, 5vw, 4rem);
  color: var(--text-light);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.3rem;
}
.hero__eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 4.2rem);
  color: var(--text-light);
  max-width: 21ch;
  margin-bottom: 1.4rem;
}
.hero__sub {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 300;
  color: var(--text-light-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.hero__ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem clamp(1.2rem, 3vw, 2.6rem);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(245, 241, 233, 0.22);
  font-size: 0.9rem;
  color: var(--text-light-muted);
  letter-spacing: 0.04em;
}
.hero__ledger a { color: var(--text-light); font-weight: 600; padding-block: 0.3rem; }

/* ============ STORY ============ */
.story__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.story__grid h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 18ch; }
.story__body p { margin-bottom: 1.2rem; }
.story__body p:last-child { margin-bottom: 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); }
.value-card {
  background: var(--linen);
  border: 1px solid rgba(63, 74, 56, 0.14);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.value-card__num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--pine);
  display: block;
  margin-bottom: 0.9rem;
}
.value-card h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.value-card p { font-size: 0.97rem; }

/* ============ PROJECT LEDGER (signature) ============ */
.ledger-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.ledger-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 22ch; }
.ledger-head p { max-width: 56ch; margin-top: 1rem; }

.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.ledger__list { list-style: none; }
.ledger__item {
  border-top: 1px solid rgba(245, 241, 233, 0.14);
  padding: 1.15rem 0.4rem;
  cursor: pointer;
  outline: none;
  transition: background 0.3s var(--ease-organic), padding-left 0.3s var(--ease-organic);
}
.ledger__item:last-child { border-bottom: 1px solid rgba(245, 241, 233, 0.14); }
.ledger__item:hover, .ledger__item:focus-visible, .ledger__item.is-active { background: rgba(245, 241, 233, 0.045); padding-left: 0.9rem; }
.ledger__item:focus-visible { box-shadow: inset 0 0 0 1px var(--sage); border-radius: 4px; }
.ledger__row { display: flex; align-items: baseline; gap: 1rem; }
.ledger__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--sage);
  flex-shrink: 0;
  width: 2rem;
}
.ledger__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  color: var(--text-light);
  flex-grow: 1;
}
.ledger__gc {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  border: 1px solid rgba(169, 180, 155, 0.4);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.ledger__note {
  color: var(--text-light-muted);
  font-size: 0.96rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  padding-left: 3rem;
  transition: max-height 0.45s var(--ease-organic), opacity 0.45s var(--ease-organic), margin 0.45s var(--ease-organic);
}
.ledger__item:hover .ledger__note,
.ledger__item:focus-visible .ledger__note,
.ledger__item.is-active .ledger__note { max-height: 8em; opacity: 1; margin-top: 0.5rem; }

.ledger__media {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  aspect-ratio: 4 / 4.6;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--summit);
}
.ledger__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease-organic), transform 1.2s var(--ease-organic);
}
.ledger__media img.is-visible { opacity: 1; transform: scale(1); }
.ledger__media-caption {
  position: absolute;
  left: 1rem; bottom: 1rem;
  z-index: 2;
  background: rgba(14, 11, 7, 0.72);
  color: var(--text-light);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.ledger__item-img { display: none; }

/* ============ CABINETRY LINES ============ */
.lines-head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.lines-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 20ch; }
.lines-head p { max-width: 58ch; margin-top: 1rem; }

.line-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: start;
  padding-block: clamp(1.6rem, 3.5vw, 2.4rem);
  border-top: 1px solid rgba(34, 28, 20, 0.16);
}
.line-row:last-of-type { border-bottom: 1px solid rgba(34, 28, 20, 0.16); }
.line-row__num { font-family: var(--font-display); color: var(--pine); font-size: 1rem; padding-top: 0.45rem; }
.line-row h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 0.55rem; }
.line-row p { max-width: 60ch; }
.line-row__tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine);
  background: var(--pine-muted);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
  margin-top: 0.35rem;
}
.lines-foot {
  margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
  font-size: 0.98rem;
  color: var(--text-muted);
}

/* ============ PROCESS ============ */
.process-head { margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.process-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 24ch; }

.process { position: relative; display: grid; gap: clamp(1.8rem, 4vw, 2.6rem); max-width: 780px; }
.process::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(63, 74, 56, 0.3);
}
.step { position: relative; padding-left: 4.2rem; }
.step__marker {
  position: absolute;
  left: 0; top: 0;
  width: 43px; height: 43px;
  border-radius: 50%;
  background: var(--parchment);
  border: 1px solid var(--pine);
  color: var(--pine);
  font-family: var(--font-display);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.step p { max-width: 58ch; }

/* ============ FIELD NOTES ============ */
.notes-head { margin-bottom: clamp(2rem, 4.5vw, 3rem); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.notes-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.8rem); }
.note-card {
  background: rgba(245, 241, 233, 0.04);
  border: 1px solid rgba(245, 241, 233, 0.12);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color 0.35s var(--ease-organic), transform 0.35s var(--ease-organic);
}
.note-card:hover { border-color: rgba(169, 180, 155, 0.55); transform: translateY(-4px); }
.note-card__label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sage); }
.note-card h3 { font-size: 1.2rem; line-height: 1.35; }
.note-card p { font-size: 0.95rem; flex-grow: 1; }
.note-card__more { font-size: 0.88rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); display: inline-flex; align-items: center; gap: 0.5rem; padding-block: 0.3rem; }
.note-card__more svg { width: 12px; height: 12px; stroke: var(--sage); }

/* ============ CTA ============ */
.cta { text-align: center; }
.cta .eyebrow { color: var(--sage); }
.cta h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); max-width: 20ch; margin-inline: auto; }
.cta p { max-width: 50ch; margin: 1.2rem auto 2.2rem; }
.cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-bottom: 2.4rem; }
.cta__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem clamp(1.2rem, 3vw, 2.4rem); font-size: 0.92rem; color: var(--text-light-muted); letter-spacing: 0.04em; }

/* ============ FOOTER ============ */
.footer { background: var(--summit); padding-block: clamp(2.5rem, 6vw, 4rem) 1.8rem; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(245, 241, 233, 0.1);
  margin-bottom: 1.6rem;
}
.footer__brand img { height: 62px; width: auto; filter: invert(1); opacity: 0.95; margin-bottom: 1rem; }
.footer__brand p { color: var(--text-light-muted); font-size: 0.95rem; max-width: 34ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}
.footer ul { list-style: none; }
.footer ul a {
  color: var(--text-light-muted);
  font-size: 0.95rem;
  display: inline-block;
  padding-block: 0.3rem;
  transition: color 0.3s var(--ease-organic);
}
.footer ul a:hover { color: var(--text-light); }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  color: rgba(245, 241, 233, 0.4);
  font-size: 0.85rem;
}

/* ============ 404 ============ */
.error-section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--ink);
  padding-block: calc(var(--nav-height) + 2rem) 4rem;
}
.error-section .container { text-align: center; }
.error__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 12rem);
  color: rgba(169, 180, 155, 0.22);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-section h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--text-light); margin-bottom: 1rem; }
.error-section p { color: var(--text-light-muted); max-width: 46ch; margin: 0 auto 2rem; }

/* ============ REVEAL ANIMATION BASE ============ */
.reveal { opacity: 0; transform: translateY(28px); }
html.no-js .reveal, html.gsap-failed .reveal { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .story__grid { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }

  .ledger { grid-template-columns: 1fr; }
  .ledger__media { display: none; }
  .ledger__item { cursor: default; }
  .ledger__item:hover, .ledger__item.is-active { padding-left: 0.4rem; background: transparent; }
  .ledger__note { max-height: none; opacity: 1; margin-top: 0.5rem; padding-left: 0; }
  .ledger__item-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: calc(var(--radius) - 4px);
    margin: 0.9rem 0 0.3rem;
  }
  .ledger__row { flex-wrap: wrap; gap: 0.5rem 1rem; }

  .line-row { grid-template-columns: auto 1fr; }
  .line-row__tag { grid-column: 2; justify-self: start; }

  .notes { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero:not([style]) {
    height: auto;
    min-height: 100svh;
    padding-top: 7rem;
  }
  .footer ul a { padding-block: 0.65rem; }
  .mobile-menu__meta a { padding-block: 0.65rem; }
  .hero__ledger a { padding-block: 0.55rem; }
}

@media (max-width: 480px) {
  .hero:not([style]) { padding-top: 6rem; }
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .cta__btns { flex-direction: column; align-items: stretch; }
  .cta__btns .btn { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
