/* ============================================================
   MillCon Trim — shared stylesheet (v2: premium/corporate pass)
   Palette: deep red (brand), near-black, warm grey, white, navy
   Typography: Fraunces (headlines, editorial/confident) + Inter (UI/body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --red: #8c1d2c;
  --red-dark: #6e1521;
  --black: #15141a;
  --grey-900: #2b2a2f;
  --grey-600: #605f66;
  --grey-300: #c9c6c0;
  --grey-100: #f4f2ee;
  --white: #ffffff;
  --navy: #1c2a44;

  --font-head: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--grey-900);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--black);
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.6vw, 3.7rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--grey-600); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.9em 1.7em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }

.btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--black); border-color: var(--white); }

.btn-outline.on-light { color: var(--black); border-color: var(--grey-300); }
.btn-outline.on-light:hover { background: var(--black); color: var(--white); border-color: var(--black); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--grey-300);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 98px;
}

.brand { display: flex; align-items: center; gap: 0.65em; }
.brand img { height: 68px; width: auto; }

.main-nav { display: flex; align-items: center; gap: clamp(1.1rem, 2vw, 2.4rem); }

.main-nav a {
  color: var(--grey-900);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4em 0;
  position: relative;
}

.main-nav a.current { color: var(--black); font-weight: 600; }
.main-nav a.current::after, .main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--red);
}
.main-nav a.btn::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--grey-900);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 98px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-300);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem clamp(1.5rem, 4vw, 3rem) 1.2rem;
    display: none;
  }
  .main-nav.open { display: flex; z-index: 60; box-shadow: 0 12px 24px rgba(21,20,26,0.12); }
  .main-nav a { padding: 0.75em 0; width: 100%; }
  .main-nav .btn { margin-top: 0.6em; }
}

/* ---------- Photo hero (full-bleed real photography) ---------- */

.photo-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--white);
}
.photo-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,20,26,0.15) 0%, rgba(21,20,26,0.35) 55%, rgba(21,20,26,0.86) 100%);
}
.photo-hero .container { position: relative; z-index: 2; padding-bottom: clamp(5.5rem, 14vw, 7.5rem); padding-top: clamp(6rem, 12vw, 9rem); }
.photo-hero .hero-eyebrow { color: #e8b4bb; }
.photo-hero h1 { color: var(--white); max-width: 16ch; }
.photo-hero p.lead { color: rgba(255,255,255,0.85); font-size: 1.12rem; max-width: 46ch; }

.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--red);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.7em;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9em; margin-top: 1.7em; }

/* Floating stat card that overlaps the bottom of the hero photo */
.hero-stat-card {
  position: relative;
  z-index: 3;
  background: var(--white);
  margin-top: -2.75rem;
  box-shadow: 0 20px 50px rgba(21,20,26,0.14);
}
@media (max-width: 600px) {
  .hero-stat-card { margin-top: -1.75rem; }
}
.hero-stat-card .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.hero-stat-card .stat { padding: 0 1rem; border-left: 1px solid var(--grey-300); }
.hero-stat-card .stat:first-child { border-left: none; padding-left: 0; }
@media (max-width: 700px) {
  .hero-stat-card .stat { border-left: none; padding: 0.6rem 0; border-top: 1px solid var(--grey-300); }
  .hero-stat-card .stat:first-child { border-top: none; }
}

.stat .num {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.1rem, 3.6vw, 2.7rem);
  color: var(--black);
  line-height: 1;
  margin-bottom: 0.15em;
}
.stat .label { color: var(--grey-600); font-size: 0.92rem; }

/* Simple page hero (no photo) used on interior pages */
.page-hero { background: var(--navy); color: var(--white); padding: clamp(4.5rem, 9vw, 6.5rem) 0 clamp(3rem, 6vw, 4rem); }
.page-hero h1 { color: var(--white); }
.page-hero .hero-eyebrow { color: #b9c3d6; }
.page-hero p.lead { color: rgba(255,255,255,0.82); font-size: 1.08rem; max-width: 52ch; }

/* ---------- Stats bar (legacy, kept for pages without photo hero) ---------- */

.stats-bar { background: var(--grey-100); padding: clamp(2.2rem, 4vw, 3rem) 0; }
.stats-bar .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; text-align: left; }

/* ---------- Generic section ---------- */

.section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.section.on-dark { background: var(--black); color: var(--white); }
.section.on-dark h2 { color: var(--white); }
.section.on-dark p { color: rgba(255,255,255,0.72); }
.section.on-navy { background: var(--navy); color: var(--white); }
.section.on-navy h2 { color: var(--white); }
.section.on-navy p { color: rgba(255,255,255,0.75); }
.section.on-grey { background: var(--grey-100); }

.section-head { max-width: 60ch; margin-bottom: 2.4rem; }

/* ---------- Builder partner strip ---------- */

.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }

.partner-card {
  background: var(--white);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.partner-card img { max-width: 100%; max-height: 52px; object-fit: contain; }
.partner-card.on-dark-logo { background: var(--navy); }

.partner-chip {
  border: 1px solid rgba(255,255,255,0.18);
  padding: 1.15em 1em;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
}

/* ---------- Cards / grids ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.9rem; }

.service-card { border-top: 3px solid var(--red); padding: 1.7rem 1.5rem; background: var(--white); }
.service-card h3 { margin-bottom: 0.45em; }
.service-card p { margin: 0; font-size: 0.96rem; }

/* ---------- Photo blocks (real photo or clean placeholder) ---------- */

.photo-block { aspect-ratio: 4/3; overflow: hidden; }
.photo-block img { width: 100%; height: 100%; object-fit: cover; }

.photo-placeholder {
  background: var(--grey-100);
  border: 1px solid var(--grey-300);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--grey-600);
  font-size: 0.85rem;
  padding: 1rem;
  aspect-ratio: 4/3;
}

/* ---------- Project gallery ---------- */

.project-card { background: var(--white); }
.project-card .photo-block, .project-card .photo-placeholder { aspect-ratio: 1/1; }
.project-card .meta { padding: 1em 0.1em 0; }
.project-card .meta .name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--black); }
.project-card .meta .scope { color: var(--grey-600); font-size: 0.88rem; }

/* ---------- Two column layout ---------- */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

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

.cta-banner { background: var(--red); color: var(--white); text-align: left; }
.cta-banner .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: clamp(2.6rem, 5vw, 3.6rem); padding-bottom: clamp(2.6rem, 5vw, 3.6rem);
}
.cta-banner h2 { color: var(--white); margin: 0; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.3rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

label { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.86rem; margin-bottom: 0.4em; color: var(--grey-900); }

input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 0.75em 0.85em; border: 1px solid var(--grey-300); background: var(--white); color: var(--grey-900);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
textarea { resize: vertical; min-height: 130px; }

/* ---------- Contact info blocks ---------- */

.info-list { display: flex; flex-direction: column; gap: 1.2rem; }
.info-list .item .k { font-family: var(--font-body); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.03em; color: var(--red); margin-bottom: 0.2em; text-transform: uppercase; }
.info-list .item .v { font-size: 1.08rem; color: var(--grey-900); }

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

.site-footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: clamp(2.6rem, 5vw, 3.8rem) 0 1.6rem; }

.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.2rem; padding-bottom: 2.2rem; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-grid h4 { color: var(--white); font-size: 0.88rem; letter-spacing: 0.03em; margin-bottom: 0.85em; font-family: var(--font-body); }
.footer-grid a, .footer-grid p { color: rgba(255,255,255,0.72); font-size: 0.93rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.55em; }

.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; padding-top: 1.5rem; font-size: 0.82rem; }

@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small-note { color: var(--grey-600); font-size: 0.85rem; }
