/* Salt City Cabinetry & Remodeling - Homepage Concept
   Design language: Bold Contrast (type/spacing/composition/motion only)
   Palette: Salt City's real colors, extracted from their live CSS variables
   (pine green accent #47624f, burnt amber secondary #b45f06, cream #f4e7da,
   charcoal base #2e2e3d), deepened within family where contrast requires. */

:root {
  /* Darks: their pine green family, deepened to near-black */
  --ink:        #0c110d;
  --ink-2:      #121a14;
  --ink-3:      #1a241c;

  /* Their exact greens (site CSS --accent ramp) */
  --pine:       #47624f;
  --pine-deep:  #394e3f;
  --pine-dark:  #2b3b2f;

  /* Their exact ambers (site CSS --secondary ramp) */
  --amber:        #b45f06;
  --amber-deep:   #904c05;
  --amber-bright: #ef922a;
  --amber-muted:  rgba(180, 95, 6, 0.28);

  /* Their exact lights (site CSS --secondary-light ramp) */
  --cream:      #f4e7da;
  --cream-2:    #fbf7f3;

  /* Their charcoal text color */
  --char:       #2e2e3d;
  --text-body:  #4c4c5a;

  --t-light:      rgba(255, 255, 255, 0.87);
  --t-light-mut:  rgba(255, 255, 255, 0.72);
  --line-light:   rgba(255, 255, 255, 0.14);
  --line-dark:    rgba(46, 46, 61, 0.16);

  --font: 'Outfit', -apple-system, sans-serif;

  --container:      min(90%, 1100px);
  --container-wide: min(93%, 1280px);
  --nav-h: 76px;

  --ease-snap:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: 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);
  font-weight: 300;
  background: var(--ink);
  color: var(--t-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

::selection { background: var(--amber); color: #fff; }

/* ---------- Type scale: Bold Contrast, extreme ---------- */

.display-xl {
  font-size: clamp(2.6rem, 8.5vw, 6.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.display-l {
  font-size: clamp(2rem, 5.4vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.display-m {
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(0.72rem, 1vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--amber-bright);
  flex-shrink: 0;
}

.on-light .eyebrow { color: var(--amber-deep); }
.on-dark  .eyebrow { color: var(--amber-bright); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  transition: background 0.3s var(--ease-smooth), color 0.3s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-snap);
  will-change: transform;
}

.btn svg { width: 17px; height: 17px; flex-shrink: 0; transition: transform 0.3s var(--ease-snap); }
.btn:hover svg { transform: translateX(4px); }

.btn--amber { background: var(--amber); color: #fff; }
.btn--amber:hover { background: var(--amber-bright); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--pine); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.nav.scrolled {
  background: rgba(12, 17, 13, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-light);
}

.nav__inner {
  width: var(--container-wide);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__brand { display: flex; align-items: center; gap: 0.8rem; }

.nav__logo {
  width: auto;
  height: 44px;
  max-width: 70px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav__name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #fff;
}
.nav__name span { display: block; font-weight: 300; font-size: 0.68rem; letter-spacing: 0.22em; color: var(--t-light-mut); }

.nav__links { display: flex; align-items: center; gap: 2rem; }

.nav__link {
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--t-light);
  position: relative;
  padding: 0.4rem 0;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--amber-bright);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-smooth);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__cta { padding: 0.7rem 1.35rem; font-size: 0.8rem; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 96; /* above the mobile menu overlay so the X stays clickable */
}
.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease-snap), opacity 0.25s ease;
}
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mmenu.open { opacity: 1; visibility: visible; }

.mmenu__link {
  display: block;
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #fff;
  padding: 0.55rem 0;
  line-height: 1.05;
  transition: color 0.25s ease;
}
.mmenu__link:hover { color: var(--amber-bright); }

.mmenu__divider { height: 1px; background: var(--line-light); margin: 1.6rem 0; }

.mmenu__meta { color: var(--t-light-mut); font-size: 0.95rem; line-height: 1.9; }
.mmenu__meta a { color: var(--amber-bright); font-weight: 500; padding-block: 0.4rem; display: inline-block; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(12, 17, 13, 0.95) 0%, rgba(12, 17, 13, 0.80) 42%, rgba(12, 17, 13, 0.70) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: var(--container-wide);
  margin-inline: auto;
  padding-bottom: clamp(3rem, 7vh, 5.5rem);
}

.hero__eyebrow { margin-bottom: 1.2rem; color: var(--amber-bright); }

.hero__title { color: #fff; max-width: 13ch; }
.hero__title .amber { color: var(--amber-bright); }

.hero__sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 300;
  color: var(--t-light);
}

.hero__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Locations marquee (signature) ---------- */

.marquee {
  background: var(--amber);
  overflow: hidden;
  padding: 0.85rem 0;
  position: relative;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 42s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee__item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  padding-right: 2.2rem;
}
.marquee__item::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--ink);
  margin-right: 2.2rem;
  transform: rotate(45deg);
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

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

.section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }
.container { width: var(--container); margin-inline: auto; }
.container-wide { width: var(--container-wide); margin-inline: auto; }

.on-light { background: var(--cream); color: var(--text-body); }
.on-light h2, .on-light h3 { color: var(--char); }

.on-cream2 { background: var(--cream-2); color: var(--text-body); }
.on-cream2 h2, .on-cream2 h3 { color: var(--char); }

.on-dark { background: var(--ink); color: var(--t-light); }
.on-dark h2, .on-dark h3 { color: #fff; }

.on-pine { background: var(--pine-dark); color: var(--t-light); }
.on-pine h2, .on-pine h3 { color: #fff; }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head .eyebrow { margin-bottom: 0.9rem; }

/* ---------- Story / origin ---------- */

.story__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.story__title { max-width: 12ch; }
.story__title .amber { color: var(--amber-bright); }

.story__copy p { margin-bottom: 1.2rem; font-size: clamp(0.98rem, 1.3vw, 1.1rem); color: var(--t-light); }
.story__copy p:last-child { margin-bottom: 0; }

.story__kicker {
  margin-top: 1.8rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--amber-bright);
  font-size: 1.05rem;
  font-weight: 400;
  color: #fff;
  max-width: 42ch;
}

/* ---------- Services: asymmetric photo tiles ---------- */

.services__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}

.tile {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  display: block;
  background: var(--ink-3);
  min-height: 340px;
}

.tile--7 { grid-column: span 7; }
.tile--5 { grid-column: span 5; }

.tile__img {
  position: absolute;
  inset: 0;
}
.tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-smooth);
}
.tile:hover .tile__img img { transform: scale(1.06); }

.tile__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 17, 13, 0.90) 0%, rgba(12, 17, 13, 0.55) 55%, rgba(12, 17, 13, 0.62) 100%);
  transition: background 0.4s ease;
}
.tile:hover .tile__img::after {
  background: linear-gradient(to top, rgba(144, 76, 5, 0.85) 0%, rgba(12, 17, 13, 0.55) 60%, rgba(12, 17, 13, 0.48) 100%);
}

.tile__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.tile__num {
  position: absolute;
  top: clamp(1rem, 2vw, 1.4rem);
  left: clamp(1.1rem, 2vw, 1.6rem);
  z-index: 2;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: #ffffff;
}

.tile .tile__title,
.on-light .tile .tile__title {
  color: #fff;
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.05;
}

.tile__desc {
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 300;
  max-width: 46ch;
}

.tile__arrow {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.4s var(--ease-snap);
}
.tile__arrow svg { width: 18px; height: 18px; stroke: #fff; }
.tile:hover .tile__arrow { background: var(--ink); border-color: var(--ink); transform: rotate(45deg); }

/* ---------- Team ---------- */

.team__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.founder {
  background: rgba(12, 17, 13, 0.35);
  border: 1px solid var(--line-light);
  border-radius: 4px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
}

.founder__mono {
  width: 64px;
  height: 64px;
  border: 2px solid var(--amber-bright);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--amber-bright);
  margin-bottom: 1.4rem;
}

.founder__name {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
}

.founder__role {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-bright);
}

.founder__bio {
  margin-top: 1.1rem;
  font-size: 0.98rem;
  color: var(--t-light);
}

.founder__quote {
  margin-top: auto;
  padding-top: 1.4rem;
}
.founder__quote p {
  border-top: 1px solid var(--line-light);
  padding-top: 1.3rem;
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
}
.founder__quote p::before { content: "\201C"; color: var(--amber-bright); margin-right: 2px; }
.founder__quote p::after { content: "\201D"; color: var(--amber-bright); margin-left: 2px; }

/* ---------- Gallery mosaic ---------- */

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 230px;
  gap: clamp(0.8rem, 1.4vw, 1.2rem);
}

.gcard {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-3);
}
.gcard--tall { grid-row: span 2; }

.gcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-smooth);
}
.gcard:hover img { transform: scale(1.07); }

.gcard__label {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  background: rgba(12, 17, 13, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(ellipse at 30% 40%, rgba(71, 98, 79, 0.5) 0%, transparent 55%),
              radial-gradient(ellipse at 75% 70%, rgba(180, 95, 6, 0.24) 0%, transparent 50%);
  pointer-events: none;
}

.cta__inner { position: relative; z-index: 2; text-align: center; }

.cta__title { max-width: 16ch; margin-inline: auto; }
.cta__title .amber { color: var(--amber-bright); }

.cta__sub {
  margin: 1.2rem auto 0;
  max-width: 46ch;
  color: var(--t-light);
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
}

.cta__btns {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.cta__hours {
  margin-top: 1.8rem;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-light-mut);
}

/* ---------- Footer ---------- */

.footer {
  background: #080c09;
  border-top: 1px solid var(--line-light);
  padding: clamp(2.8rem, 5vw, 4rem) 0 1.8rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line-light);
}

.footer__brand-logo {
  width: auto;
  height: 52px;
  max-width: 80px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.footer__tag { color: var(--t-light-mut); font-size: 0.92rem; max-width: 30ch; }

.footer__head {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-bright);
  margin-bottom: 1rem;
}

.footer__list li a,
.footer__list li span {
  display: inline-block;
  color: var(--t-light-mut);
  font-size: 0.92rem;
  padding-block: 0.3rem;
  transition: color 0.25s ease;
}
.footer__list li a:hover { color: #fff; }

.footer__bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- 404 ---------- */

.error-section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 2rem) 0 3rem;
}
.error-section::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(ellipse at 50% 45%, rgba(71, 98, 79, 0.45) 0%, transparent 55%);
  pointer-events: none;
}
.error__inner { position: relative; z-index: 2; width: var(--container); margin-inline: auto; }
.error__code {
  font-size: clamp(6rem, 22vw, 15rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--amber-muted);
}
.error__title { color: #fff; margin-top: 0.4rem; }
.error__body { margin: 1.2rem auto 2rem; max-width: 44ch; color: var(--t-light); }

/* ---------- Reveal (GSAP hooks) ---------- */

.reveal { opacity: 0; }
.no-js .reveal, html.no-gsap .reveal { opacity: 1; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .nav__links { gap: 1.4rem; }
}

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

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

  .tile--7, .tile--5 { grid-column: span 12; }
  .tile { min-height: 300px; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 210px; }

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

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: 6rem;
  }
}

@media (max-width: 560px) {
  .hero__ctas .btn { width: 100%; justify-content: center; }
  .cta__btns { flex-direction: column; align-items: stretch; }
  .cta__btns .btn { justify-content: center; }

  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gcard--tall { grid-row: span 1; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__list li a { padding-block: 0.65rem; }
  .tile { min-height: 260px; }
}

@media (max-width: 480px) {
  .hero { padding-top: 5rem; }
}

/* ---------- Mobile drawer close control ---------- */
/* The burger doubles as the close (X), but the nav's own z-index traps it in a
   stacking context below the drawer, so it is painted over and cannot be tapped.
   This control lives inside the drawer, so it is always visible and always hits. */
#mmenu .mnav-close {
  position: absolute;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: 0.85rem;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: rgb(255, 255, 255);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
#mmenu .mnav-close::before,
#mmenu .mnav-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 1.5px;
  margin: -0.75px 0 0 -10.5px;
  background: currentColor;
  border-radius: 2px;
}
#mmenu .mnav-close::before { transform: rotate(45deg); }
#mmenu .mnav-close::after { transform: rotate(-45deg); }
#mmenu .mnav-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
