/* ============================================================
   JMG BUILD CO.  ·  Grounded contemporary / design-build studio
   Display: Bricolage Grotesque · Body: Figtree
   ============================================================ */

:root {
  --stone:   #f2f0e9;   /* warm off-white base        */
  --panel:   #e8e4d9;   /* panel                      */
  --ink:     #21241f;   /* charcoal (green-black)     */
  --muted:   #6c6c63;   /* neutral gray-taupe         */
  --line:    #d6d1c4;   /* hairline                   */
  --pine:    #2f4736;   /* deep evergreen accent      */
  --pine-2:  #3b5a45;
  --sand:    #c2b9a6;
  --maxw: 1220px;
  --pad: clamp(22px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Figtree", system-ui, sans-serif;
  background: var(--stone);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- shared type ---------- */
.label, .eyebrow {
  font-family: "Figtree", sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--pine);
  display: inline-flex; align-items: center; gap: .5em;
}
.eyebrow { color: var(--muted); }
.plus { color: var(--pine); font-weight: 700; }
.eyebrow .plus { color: var(--pine); }

.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-top: .5em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .94rem; font-weight: 600;
  padding: .85em 1.5em; border-radius: 6px;
  border: 1.5px solid transparent;
  transition: transform .2s ease, background .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--pine); color: #f4f3ec; }
.btn--solid:hover { background: var(--pine-2); transform: translateY(-2px); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--stone); transform: translateY(-2px); }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem var(--pad);
  background: rgba(242,240,233,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand__mark { height: 38px; width: auto; }
/* crisp, recolorable mark (masked) — used in header + footer */
.brand__logo {
  display: block; width: 46px; height: 40px;
  background: var(--ink);
  -webkit-mask: url("assets/logo.png") center / contain no-repeat;
          mask: url("assets/logo.png") center / contain no-repeat;
}
.t-over .site-header .brand__logo { background: #f4f2ec; }
.t-over.is-scrolled .site-header .brand__logo { background: var(--ink); }
.brand__type {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.9rem; }
.nav a { font-size: .92rem; font-weight: 500; position: relative; }
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px;
  background: var(--pine); transition: width .25s;
}
.nav a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: .55em 1.1em; border-radius: 6px; background: var(--ink); color: var(--stone);
  font-weight: 600; transition: background .2s;
}
.nav__cta:hover { background: var(--pine); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; }
.mobile-menu:not([hidden]) {
  position: sticky; top: 63px; z-index: 49;
  display: flex; flex-direction: column;
  padding: .5rem var(--pad) 1.4rem;
  background: var(--stone); border-bottom: 1px solid var(--line);
}
.mobile-menu a { padding: .85rem 0; font-size: 1.02rem; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu__call { color: var(--pine) !important; border-bottom: none !important; }

/* ============ HERO ============ */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 6vw, 84px) var(--pad) clamp(48px, 7vw, 90px);
}
.hero__head { border-bottom: 1px solid var(--line); padding-bottom: clamp(28px, 4vw, 48px); }
.hero__title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: clamp(2.8rem, 7.5vw, 5.6rem);
  line-height: .98; letter-spacing: -.035em;
  margin: .5em 0;
}
.hero__row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem;
}
.hero__sub { color: var(--muted); max-width: 44ch; font-size: clamp(1rem, 1.4vw, 1.15rem); }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.hero__media {
  margin-top: clamp(28px, 4vw, 48px);
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden; border-radius: 10px;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__tags {
  position: absolute; left: 0; bottom: 0;
  display: flex; gap: 1px; background: var(--line);
}
.hero__tags span {
  background: rgba(242,240,233,.94); backdrop-filter: blur(4px);
  padding: .6rem 1.1rem; font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
}

/* ---- hero variant: large logo centerpiece ---- */
.hero--logo { text-align: center; }
.hero--logo .hero__head { border-bottom: 1px solid var(--line); padding-bottom: clamp(32px, 5vw, 56px); }
.hero__logo {
  width: min(440px, 78vw);
  aspect-ratio: 538 / 470;
  margin: 0 auto clamp(10px, 2vw, 22px);
  background: var(--ink);
  -webkit-mask: url("assets/logo.png") center / contain no-repeat;
          mask: url("assets/logo.png") center / contain no-repeat;
}
.hero__logo--pine { background: var(--pine); }
.hero--logo .hero__tag {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 1rem;
}
.hero--logo .hero__tag em { color: var(--pine); font-style: normal; }
.hero--logo .hero__sub { margin: 0 auto 1.6rem; }
.hero--logo .hero__actions { justify-content: center; }

/* ---- hero variant: content over full-bleed photo ---- */
.hero--over {
  position: relative;
  min-height: clamp(600px, 90vh, 940px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(40px, 8vh, 120px) var(--pad);
  overflow: hidden;
}
.hero--over .hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero--over .hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero--over .hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,22,18,.42) 0%, rgba(20,22,18,.30) 38%, rgba(20,22,18,.72) 100%),
    radial-gradient(120% 80% at 50% 45%, transparent 30%, rgba(20,22,18,.45) 100%);
}
.hero--over .hero__inner { position: relative; z-index: 2; max-width: 760px; }
.hero--over .eyebrow { color: #e7e3d8; }
.hero--over .eyebrow .plus { color: #b7c9b6; }
.hero__logo--over {
  width: min(440px, 80vw);
  aspect-ratio: 538 / 470;
  margin: 1rem auto clamp(8px, 2vw, 18px);
  background: var(--stone);
  -webkit-mask: url("assets/logo.png") center / contain no-repeat;
          mask: url("assets/logo.png") center / contain no-repeat;
  filter: drop-shadow(0 12px 34px rgba(0,0,0,.45));
}
.hero--over .hero__tag {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2.3rem); letter-spacing: -.01em;
  color: #f4f2ec; margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.hero--over .hero__tag em { color: #c4d4c0; font-style: normal; }
.hero--over .hero__sub {
  color: #e2ded3; max-width: 46ch; margin: 0 auto 1.8rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.hero--over .hero__actions { justify-content: center; }
.hero--over .btn--outline { border-color: rgba(244,242,236,.85); color: #f4f2ec; }
.hero--over .btn--outline:hover { background: #f4f2ec; color: var(--ink); }
/* transparent header sitting over the photo */
.t-over .site-header {
  background: linear-gradient(180deg, rgba(18,20,16,.55) 0%, rgba(18,20,16,.18) 60%, transparent 100%);
  border-bottom-color: transparent;
}
.t-over .site-header .brand__type,
.t-over .site-header .nav a:not(.nav__cta) { color: #f4f2ec; }
.t-over .site-header .nav a:not(.nav__cta)::after { background: #f4f2ec; }
.t-over .site-header .nav__cta { background: #f4f2ec; color: var(--ink); border-color: #f4f2ec; }
.t-over .site-header .brand__mark { filter: invert(1) brightness(1.4); }
.t-over .site-header .nav-toggle span { background: #f4f2ec; }
.t-over.is-scrolled .site-header {
  background: rgba(242,240,233,.92); backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.t-over.is-scrolled .site-header .brand__type,
.t-over.is-scrolled .site-header .nav a:not(.nav__cta) { color: var(--ink); }
.t-over.is-scrolled .site-header .nav__cta { background: var(--pine); color: #f4f2ec; border-color: var(--pine); }
.t-over.is-scrolled .site-header .brand__mark { filter: none; }
.t-over.is-scrolled .site-header .nav-toggle span { background: var(--ink); }

/* ============ SERVICES ============ */
.services { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 8vw, 110px) var(--pad); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.card {
  display: flex; flex-direction: column;
  background: #fbfaf5;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -34px rgba(33,36,31,.5); border-color: var(--sand); }
.card__media { aspect-ratio: 3 / 2; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: clamp(1.3rem, 2vw, 1.9rem); display: flex; flex-direction: column; flex: 1; }
.card__num {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: .9rem; color: var(--pine);
  border: 1.5px solid var(--pine); border-radius: 5px;
  width: 2.1em; height: 2.1em; display: grid; place-items: center;
  margin-bottom: 1rem;
}
.card__title {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 600;
  font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.1;
  letter-spacing: -.01em; margin-bottom: .6rem;
}
.card__body > p { color: var(--muted); font-size: .96rem; margin-bottom: 1.2rem; }
.card__list { list-style: none; display: grid; gap: .55rem; margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.card__list li { position: relative; padding-left: 1.4rem; font-size: .92rem; }
.card__list li::before {
  content: "+"; position: absolute; left: 0; top: -.05em;
  color: var(--pine); font-weight: 700;
}

/* ============ WORK ============ */
.work { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) clamp(56px, 8vw, 110px); }
.work__feature { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; }
.work__feature img { width: 100%; height: 100%; object-fit: cover; }
.work__feature figcaption {
  position: absolute; left: 1.3rem; bottom: 1.3rem;
  background: rgba(242,240,233,.94); padding: .7rem 1.1rem; border-radius: 8px; backdrop-filter: blur(5px);
}
.work__feature figcaption p { font-family: "Bricolage Grotesque", sans-serif; font-weight: 600; font-size: 1.05rem; margin-top: .15rem; }
.work__note { margin-top: 1.2rem; color: var(--muted); font-size: .92rem; }

/* ============ CONTACT ============ */
.contact { background: var(--ink); color: var(--stone); }
.contact__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(60px, 9vw, 128px) var(--pad);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.contact .label { color: #9db5a3; }
.contact .plus { color: #9db5a3; }
.contact__title {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.03; letter-spacing: -.025em; margin: .5rem 0 1.2rem;
}
.contact__copy { color: #cdc9bd; max-width: 44ch; margin-bottom: 1.4rem; }
.contact__meta { color: #948f84; font-size: .85rem; letter-spacing: .03em; }
.contact__actions { display: grid; gap: .8rem; }
.cta {
  display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(242,240,233,.16); border-radius: 9px;
  transition: background .2s, border-color .2s, transform .2s;
}
.cta:hover { background: rgba(242,240,233,.05); border-color: var(--pine-2); transform: translateX(5px); }
.cta__k { text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 600; color: #9db5a3; }
.cta__v { font-family: "Bricolage Grotesque", sans-serif; font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.cta__a { color: #9db5a3; font-size: 1.2rem; transition: transform .2s; }
.cta:hover .cta__a { transform: translateX(4px); }

/* ============ FOOTER ============ */
.site-footer { padding: clamp(2.4rem, 5vw, 3.6rem) var(--pad) 1.5rem; }
.site-footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  padding-bottom: 1.6rem; border-bottom: 1px solid var(--line);
}
.nav--footer { margin-left: 0; gap: 1.5rem; }
.nav--footer a { font-size: .88rem; color: var(--muted); }
.site-footer__legal { max-width: var(--maxw); margin: 1.2rem auto 0; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay:.08s } .reveal[data-d="2"]{ transition-delay:.16s } .reveal[data-d="3"]{ transition-delay:.24s }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px){
  .grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .contact__inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .hero__row { flex-direction: column; align-items: flex-start; }
}
