/* TON Custom Cabinets - homepage concept
   Design language: Industrial Edge (type, spacing, composition, motion only)
   Palette: TON's real brand colors, extracted from their logo (russet #703018,
   near-black brown) and photography (warm plaster neutrals). No em dashes. */

:root {
  /* Backgrounds */
  --bg-dark:      #16100a;
  --bg-dark-2:    #221913;
  --bg-light:     #ece6dc;
  --bg-white:     #f7f3ec;

  /* Accent: TON logo russet */
  --accent:        #703018;
  --accent-hover:  #5a2513;
  --accent-bright: #cf8a58;
  --accent-muted:  rgba(112, 48, 24, 0.14);
  --accent-glow:   rgba(207, 138, 88, 0.32);

  /* Text */
  --text-dark:        #181008;
  --text-body:        #4e453c;
  --text-muted:       #80766a;
  --text-light:       rgba(255, 255, 255, 0.9);
  --text-light-muted: rgba(255, 255, 255, 0.62);

  /* Type */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;

  /* Layout */
  --container:  min(92%, 1180px);
  --nav-height: 74px;
  --radius:     2px;

  /* Motion */
  --ease-mech: cubic-bezier(0.4, 0, 0.6, 1);
}

* { 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(--bg-dark);
  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; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

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

/* ---------- shared type ---------- */
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--text-dark);
  text-transform: uppercase;
}
.h2--light { color: var(--text-light); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.eyebrow--dark { color: var(--accent-bright); }
.eyebrow__tick {
  width: 26px; height: 2px;
  background: currentColor;
  display: inline-block;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.25s var(--ease-mech), border-color 0.25s var(--ease-mech), color 0.25s var(--ease-mech);
  min-height: 44px;
}
.btn__icon {
  width: 8px; height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease-mech);
}
.btn:hover .btn__icon { transform: rotate(45deg) translate(3px, -3px); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-hover); }
.btn--line { border-color: rgba(255,255,255,0.35); color: var(--text-light); }
.btn--line:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.btn--light { background: var(--bg-white); color: var(--text-dark); }
.btn--light:hover { background: #fff; }
.btn--lineLight { border-color: rgba(255,255,255,0.4); color: var(--text-light); text-transform: none; letter-spacing: 0.03em; }
.btn--lineLight:hover { border-color: #fff; }

/* ---------- ruler motif ---------- */
.ruler {
  position: absolute;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--accent-glow) 0, var(--accent-glow) 2px,
    transparent 2px, transparent 12px
  );
}
.ruler--v { width: 10px; top: -18px; bottom: -18px; right: -22px; }
.ruler--h {
  height: 10px; left: -18px; right: -18px; bottom: -22px;
  background-image: repeating-linear-gradient(
    to right,
    var(--accent-glow) 0, var(--accent-glow) 2px,
    transparent 2px, transparent 12px
  );
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  transition: background 0.3s var(--ease-mech), box-shadow 0.3s var(--ease-mech);
}
.nav.is-solid {
  background: rgba(22, 16, 10, 0.96);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
.nav__inner {
  width: var(--container);
  margin-inline: auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__logo {
  height: 46px;
  width: auto;
  filter: brightness(0) invert(1);
}
.nav__links {
  display: flex;
  gap: 1.9rem;
  margin-left: auto;
}
.nav__links a {
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 0.6rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease-mech), border-color 0.2s var(--ease-mech);
}
.nav__links a:hover { color: var(--accent-bright); border-color: var(--accent-bright); }
.nav__cta { flex-shrink: 0; }
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  margin-left: auto;
  z-index: 75;
}
.nav__burger span {
  width: 26px; height: 2px;
  background: var(--text-light);
  transition: transform 0.3s var(--ease-mech), opacity 0.3s var(--ease-mech);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- mobile menu ---------- */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(22, 16, 10, 0.98);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem clamp(1.5rem, 8vw, 4rem) 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-mech), visibility 0.3s var(--ease-mech);
}
.mmenu.is-open { opacity: 1; visibility: visible; }
.mmenu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.mmenu__links a {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 0.35rem 0;
  transition: color 0.2s var(--ease-mech);
}
.mmenu__links a:hover { color: var(--accent-bright); }
.mmenu__rule {
  width: 64px; height: 2px;
  background: var(--accent-bright);
  margin: 1.6rem 0;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(22,16,10,0) 55%, rgba(22,16,10,0.55)),
    radial-gradient(120% 90% at 85% 10%, #2a1e14 0%, var(--bg-dark) 58%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  width: var(--container);
  margin-inline: auto;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: calc(var(--nav-height) + clamp(1.5rem, 4vh, 3rem));
  padding-bottom: clamp(1.5rem, 4vh, 3rem);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.4rem, 8.5vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 1.4rem;
}
.hero__line { display: block; }
.hero__line--accent { color: var(--accent-bright); }
.hero__sub {
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-light-muted);
  margin-bottom: 2rem;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__media { position: relative; }
.hero__frame {
  position: relative;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 10px;
  clip-path: inset(0 100% 0 0);
}
.hero__frame.is-shown {
  animation: frameWipe 0.9s var(--ease-mech) forwards;
}
@keyframes frameWipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.hero__img {
  width: 100%;
  height: clamp(340px, 58vh, 560px);
  object-fit: cover;
  filter: contrast(1.06) saturate(0.96);
}
.specstrip {
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
}
.specstrip__inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  padding: 0.95rem 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-light-muted);
}
.specstrip__sep {
  width: 6px; height: 6px;
  background: var(--accent-bright);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---------- sections ---------- */
.section--light { background: var(--bg-light); color: var(--text-body); }
.section--dark  { background: var(--bg-dark);  color: var(--text-light-muted); }
.section--accent { background: var(--bg-dark-2); }

.story, .services, .projects, .words { padding: clamp(3.4rem, 7vw, 6rem) 0; }

/* story */
.story__head { max-width: 62ch; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.story__lead { margin-top: 1.2rem; font-size: 1.05rem; }
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
  border-top: 2px solid var(--text-dark);
  padding-top: 1.6rem;
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
}
.tl__num {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}
.tl__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.tl__body { font-size: 0.95rem; }
.story__media { position: relative; }
.story__media img {
  width: 100%;
  height: clamp(300px, 48vw, 520px);
  object-fit: cover;
  object-position: center 65%;
}
.story__media figcaption {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.7rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.3rem;
}

/* services */
.services__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.svc { border-top: 1px solid rgba(255,255,255,0.14); }
.svc__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.1rem) 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  transition: background 0.25s var(--ease-mech);
}
.svc__row:hover { background: rgba(255,255,255,0.03); }
.svc__num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--accent-bright);
  line-height: 1;
}
.svc__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  line-height: 1;
}
.svc__body p { max-width: 62ch; }

/* projects index */
.projects__head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 62ch; }
.projects__lead { margin-top: 1rem; }
.pindex {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: start;
}
.pindex__list { border-top: 2px solid var(--text-dark); }
.pindex__item { border-bottom: 1px solid rgba(24,16,8,0.18); }
.pindex__btn {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.05rem 0.4rem 0.85rem;
  text-align: left;
  transition: background 0.2s var(--ease-mech);
}
.pindex__num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.2s var(--ease-mech);
}
.pindex__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dark);
  transition: color 0.2s var(--ease-mech);
}
.pindex__item.is-active .pindex__num,
.pindex__item.is-active .pindex__name { color: var(--accent); }
.pindex__cap {
  max-height: 0;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--text-body);
  padding: 0 0.4rem;
  transition: max-height 0.4s var(--ease-mech), padding 0.4s var(--ease-mech);
}
.pindex__item.is-active .pindex__cap {
  max-height: 8em;
  padding-bottom: 1rem;
}
.pindex__card { display: none; }
.pindex__view {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  height: clamp(360px, 56vh, 540px);
  border: 1px solid rgba(24,16,8,0.25);
  padding: 10px;
  background: var(--bg-white);
}
.pindex__view img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  opacity: 0;
  clip-path: inset(0 0 0 100%);
  transition: none;
}
.pindex__view img.is-active {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.55s var(--ease-mech);
}

/* testimonials */
.words__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.words__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.quote {
  border: 1px solid rgba(255,255,255,0.14);
  border-top: 3px solid var(--accent-bright);
  padding: 1.6rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: rgba(255,255,255,0.02);
}
.quote p { font-size: 0.98rem; color: var(--text-light); }
.quote cite {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-top: auto;
}

/* CTA */
.cta { padding: clamp(3.4rem, 7vw, 6rem) 0; border-top: 1px solid rgba(255,255,255,0.1); }
.cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.cta__sub { color: var(--text-light-muted); margin-top: 1rem; }
.cta__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.cta__addr {
  font-size: 0.9rem;
  color: var(--text-light-muted);
  letter-spacing: 0.04em;
  margin-top: 0.4rem;
}

/* footer */
.footer { background: #100b06; padding: clamp(2.6rem, 5vw, 4rem) 0 0; color: var(--text-light-muted); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__logo { height: 64px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.footer__tag { margin-top: 1rem; font-size: 0.92rem; }
.footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.footer__links a,
.footer__contact a {
  color: var(--text-light-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-block: 0.3rem;
  transition: color 0.2s var(--ease-mech);
  display: inline-block;
}
.footer__contact a { text-transform: none; letter-spacing: 0.03em; display: block; }
.footer__links a:hover, .footer__contact a:hover { color: var(--accent-bright); }
.footer__contact p { font-size: 0.9rem; margin-top: 0.6rem; }
.footer__base { padding: 1.2rem 0 1.6rem; font-size: 0.8rem; }

/* reveal base state (GSAP animates in; visible fallback without JS) */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(28px); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav { background: rgba(22, 16, 10, 0.96); }

  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + 2.2rem);
    gap: 2.2rem;
  }
  .hero { height: auto; min-height: 100svh; }
  .hero__img { height: clamp(260px, 42vh, 420px); }
  .ruler--v { display: none; }

  .timeline { grid-template-columns: repeat(2, 1fr); }

  .pindex { grid-template-columns: 1fr; }
  .pindex__view { display: none; }
  .pindex__card { display: block; margin: 0 0.4rem 1.2rem; }
  .pindex__card img {
    width: 100%;
    height: clamp(220px, 42vw, 360px);
    object-fit: cover;
    border: 1px solid rgba(24,16,8,0.25);
    padding: 6px;
    background: var(--bg-white);
  }
  .pindex__cap { max-height: none; padding-bottom: 0.9rem; }
  .pindex__num, .pindex__name { color: var(--text-dark); }
  .pindex__item.is-active .pindex__num,
  .pindex__item.is-active .pindex__name { color: var(--text-dark); }
  .pindex__btn { cursor: default; }

  .words__grid { grid-template-columns: 1fr; }
  .cta__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .timeline { grid-template-columns: 1fr; }
  .svc__row { grid-template-columns: 56px 1fr; gap: 1rem; }
  .specstrip__inner { justify-content: flex-start; }
  .footer__links a, .footer__contact a { padding-block: 0.65rem; }
  .btn { width: 100%; justify-content: center; }
  .hero__ctas .btn { width: auto; flex: 1 1 auto; }
  .cta__actions .btn { width: 100%; }
}
