/* Nashville Cabinet Company, homepage concept.
   Design language: Nordic Minimal (type, spacing, composition, motion).
   Palette: Nashville Cabinet Company's own brand colors, extracted from
   their shop-sign logo (rust orange, black script, warm off-white) and
   their project photography. No em dashes anywhere. */

:root {
  /* Backgrounds */
  --snow:        #fafaf8;
  --cloud:       #f2efe9;
  --graphite:    #1b1a18;
  --slate:       #262421;

  /* Accent, from their logo's rust orange panel */
  --accent:        #b04a0f;
  --accent-deep:   #8c3a08;
  --accent-bright: #d9824e;
  --accent-muted:  rgba(176, 74, 15, 0.14);

  /* Text */
  --text-dark:        #201e1b;
  --text-body:        #4c4842;
  --text-muted:       #8f8b85;
  --text-light:       rgba(250, 250, 248, 0.94);
  --text-light-muted: rgba(250, 250, 248, 0.62);

  /* Type */
  --font-display: 'DM Serif Display', serif;
  --font-body: 'DM Sans', sans-serif;

  /* Layout */
  --container: min(90%, 1100px);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-body);
  background: var(--snow);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: var(--container); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.12;
}
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); max-width: 24ch; }
h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }

section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-light { background: var(--snow); }
.section-dark { background: var(--graphite); }
.section-dark h2, .section-dark h3 { color: var(--text-light); }
.section-dark p { color: var(--text-light-muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 1.2rem;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--accent); }
.eyebrow--light { color: var(--text-light); }
.eyebrow--light::before { background: var(--accent-bright); }
.eyebrow--accent { color: var(--accent-bright); }
.eyebrow--accent::before { background: var(--accent-bright); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.9rem 1.8rem; border-radius: 100px;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 400;
  letter-spacing: 0.03em; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
              border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn--solid { background: var(--accent); color: #fdfbf8; }
.btn--solid:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn--ghost { border-color: rgba(32, 30, 27, 0.3); color: var(--text-dark); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn--ghost-light { border-color: rgba(250, 250, 248, 0.4); color: var(--text-light); }
.btn--ghost-light:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.btn--sm { padding: 0.6rem 1.3rem; font-size: 0.84rem; }
.btn__dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(253, 251, 248, 0.18);
}
.text-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.4rem; font-size: 0.88rem; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-deep); text-decoration: none;
  border-bottom: 1px solid var(--accent-muted);
  padding-bottom: 0.3rem;
  transition: border-color 0.35s var(--ease), gap 0.35s var(--ease);
}
.text-link:hover { border-color: var(--accent); gap: 0.8rem; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav__inner {
  width: var(--container); margin-inline: auto;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav.is-solid { background: rgba(250, 250, 248, 0.96); box-shadow: 0 1px 0 rgba(32, 30, 27, 0.08); }

.wordmark { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.wordmark__script { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--text-light); transition: color 0.4s var(--ease); }
.wordmark__block { font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--text-light-muted); transition: color 0.4s var(--ease); }
.nav.is-solid .wordmark__script { color: var(--text-dark); }
.nav.is-solid .wordmark__block { color: var(--accent-deep); }
.wordmark--light .wordmark__script { color: var(--text-light); }
.wordmark--light .wordmark__block { color: var(--accent-bright); }

.nav__links { display: flex; align-items: center; gap: 1.9rem; }
.nav__links a:not(.btn) {
  font-size: 0.88rem; font-weight: 400; text-decoration: none;
  color: var(--text-light); transition: color 0.35s var(--ease);
}
.nav.is-solid .nav__links a:not(.btn) { color: var(--text-dark); }
.nav__links a:not(.btn):hover { color: var(--accent-bright); }
.nav.is-solid .nav__links a:not(.btn):hover { color: var(--accent-deep); }

.burger {
  display: none; position: relative; z-index: 80;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
}
.burger span {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--text-light); transition: transform 0.35s var(--ease), top 0.35s var(--ease), background 0.35s var(--ease);
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.nav.is-solid .burger span { background: var(--text-dark); }
body.menu-open .burger span { background: var(--text-light); }
body.menu-open .burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--graphite);
  display: flex; flex-direction: column; justify-content: center; gap: 3rem;
  padding: calc(var(--nav-h) + 1rem) var(--gutter) 3rem;
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-menu__links a {
  font-family: var(--font-display); font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--text-light); text-decoration: none;
  padding-block: 0.45rem;
  border-bottom: 1px solid rgba(250, 250, 248, 0.1);
}
.mobile-menu__links a:hover { color: var(--accent-bright); }
.mobile-menu__foot .btn { width: 100%; justify-content: center; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  height: 100vh; height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 0 clamp(3rem, 7vw, 5.5rem);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 112%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 14, 12, 0.82) 0%, rgba(15, 14, 12, 0.35) 45%, rgba(15, 14, 12, 0.3) 100%);
}
.hero__content { position: relative; z-index: 2; }
.hero__title {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  color: var(--text-light); max-width: 18ch;
}
.hero-sub {
  margin-top: 1.3rem; max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-light-muted);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

/* Intro */
.intro__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.intro__copy p + p { margin-top: 1.1rem; }
.intro__since {
  display: flex; align-items: baseline; gap: 1rem;
  margin-top: 2.2rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(32, 30, 27, 0.12);
}
.intro__since-num { font-family: var(--font-display); font-size: 2.4rem; color: var(--accent-deep); line-height: 1; }
.intro__since-label { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.intro__media { margin-top: clamp(2.5rem, 5vw, 4rem); }
.intro__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Services */
.services { background: var(--cloud); }
.service {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  margin-top: clamp(2.8rem, 6vw, 4.5rem);
}
.service__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service--flip .service__media { order: 2; }
.service--flip .service__body { order: 1; }
.service__num {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem; color: var(--accent-deep);
  display: block; margin-bottom: 0.7rem;
}
.service__body h3 { margin-bottom: 1rem; }
.service__body p + p { margin-top: 1rem; }
.service__list { font-size: 0.94rem; color: var(--text-muted); }

/* Index (signature) */
.index__grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
}
.index__list { list-style: none; }
.index__item button {
  display: flex; align-items: baseline; gap: 1.2rem;
  width: 100%; text-align: left; background: transparent; border: 0;
  border-bottom: 1px solid rgba(250, 250, 248, 0.12);
  padding: clamp(0.9rem, 2vw, 1.25rem) 0.25rem;
  cursor: pointer;
  transition: padding-left 0.4s var(--ease);
}
.index__item button:hover { padding-left: 0.8rem; }
.index__num {
  font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--accent-bright); font-family: var(--font-body);
}
.index__name {
  font-family: var(--font-display); font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  color: var(--text-light-muted);
  transition: color 0.4s var(--ease);
}
.index__item.is-active .index__name { color: var(--text-light); }
.index__item.is-active button { border-bottom-color: var(--accent); }
.index__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
}
.index__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.index__media img.is-active { opacity: 1; }

/* Gallery */
.gallery__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}
.gallery__hint {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap; padding-bottom: 0.5rem;
}
.gallery__rail {
  display: flex; gap: clamp(1rem, 2vw, 1.5rem);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: max(calc((100vw - 1100px) / 2), 5vw);
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
  scroll-padding-inline: max(calc((100vw - 1100px) / 2), 5vw);
}
.gallery__rail::-webkit-scrollbar { display: none; }
.gallery__rail figure {
  flex: 0 0 auto; scroll-snap-align: start;
}
.gallery__rail img {
  height: clamp(300px, 42vw, 460px); width: auto;
}

/* Reviews */
.reviews__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.2rem, 5vw, 3.2rem);
}
.review {
  border-top: 1px solid rgba(250, 250, 248, 0.14);
  padding-top: 1.6rem;
}
.review p { font-size: 1.02rem; color: var(--text-light); }
.review cite {
  display: block; margin-top: 1.3rem;
  font-style: normal; font-size: 0.8rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-bright);
}

/* Owner */
.owner__grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.owner__media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.owner__body h2 { margin-bottom: 1.1rem; }
.owner__body p + p { margin-top: 1rem; }

/* CTA */
.cta { background: var(--slate); }
.cta__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta h2 { color: var(--text-light); max-width: 22ch; }
.cta__sub { margin-top: 1rem; color: var(--text-light-muted); max-width: 44ch; }
.cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 2.2rem; }
.cta .eyebrow { margin-inline: auto; }

/* Footer */
.footer { background: var(--graphite); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250, 250, 248, 0.1);
}
.footer__brand p { margin-top: 1rem; font-size: 0.9rem; color: var(--text-light-muted); max-width: 30ch; }
.footer__col h4 {
  font-family: var(--font-body); font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 0.9rem;
}
.footer__col p { font-size: 0.92rem; color: var(--text-light-muted); }
.footer__col a {
  display: block; font-size: 0.92rem; text-decoration: none;
  color: var(--text-light-muted); padding-block: 0.2rem;
  transition: color 0.35s var(--ease);
}
.footer__col a:hover { color: var(--accent-bright); }
.footer__legal {
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between;
  padding-top: 1.6rem; font-size: 0.8rem; color: rgba(250, 250, 248, 0.45);
}
.footer__legal a { color: rgba(250, 250, 248, 0.6); text-decoration: none; }
.footer__legal a:hover { color: var(--accent-bright); }

/* 404 */
.error-section {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  background: var(--graphite);
  padding-top: var(--nav-h);
}
.error-section .container { text-align: center; display: flex; flex-direction: column; align-items: center; }
.error__code {
  font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem);
  color: var(--accent-muted); line-height: 1;
  -webkit-text-stroke: 1px rgba(217, 130, 78, 0.5);
}
.error__title { color: var(--text-light); margin-top: 0.6rem; font-size: clamp(1.8rem, 4vw, 2.6rem); font-family: var(--font-display); font-weight: 400; }
.error__body { margin-top: 1rem; color: var(--text-light-muted); max-width: 42ch; }
.error-section .btn { margin-top: 2rem; }

/* Reveal (fade only, per Nordic Minimal) */
.reveal { opacity: 0; }
.no-js .reveal, .reveal.is-visible { opacity: 1; }

/* Responsive */
@media (max-width: 1024px) {
  .nav__links { gap: 1.3rem; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .intro__grid, .service, .service--flip, .index__grid, .owner__grid { grid-template-columns: 1fr; }
  .service--flip .service__media { order: 0; }
  .service--flip .service__body { order: 1; }
  .reviews__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .index__media { order: -1; }
}

@media (max-width: 768px) {
  .hero {
    height: auto; min-height: 100svh;
    padding-top: 6rem;
  }
  .gallery__rail img { height: clamp(260px, 52vw, 340px); }
}

@media (max-width: 768px) {
  .text-link { padding-block: 0.65rem; }
}

@media (max-width: 480px) {
  .hero { padding-top: 5rem; }
  .hero__ctas .btn, .cta__btns .btn { width: 100%; justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__col a { padding-block: 0.65rem; }
  .footer__legal { justify-content: center; text-align: center; }
}
