/*
Theme Name: Estimator Expert
Theme URI: https://estimatorexpert.com
Author: Estimator Expert
Description: Modern industrial construction estimating theme — matches the Estimator Expert frontend design. Every section is editable from WordPress pages using slugs (see the "Site Content Guide" page).
Version: 1.1.0
License: GPL-2.0-or-later
Text Domain: estimator-expert
Tags: business, custom-menu, featured-images, full-width-template
*/

/* ---------- tokens ---------- */
:root {
  --steel: #1a2433;
  --steel-2: #131b27;
  --accent: #fbbe3f;
  --accent-ink: #1a2433;
  --ink: #16202c;
  --muted: #5d6b7d;
  --line: #e3e7ec;
  --concrete: #f6f4ef;
  --card: #ffffff;
  --radius: 14px;
  --wrap: 1200px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--card);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, .display {
  font-family: "Archivo", "Oswald", "Arial Narrow", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 .6rem;
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--concrete { background: var(--concrete); }
.section--steel { background: var(--steel); color: #eef2f7; }

.label {
  font-family: "Archivo", sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .75rem;
}
.lead { color: var(--muted); font-size: 1.03rem; max-width: 62ch; }
.section--steel .lead { color: rgba(238, 242, 247, .78); }

.tick {
  width: 96px; height: 4px; margin: 14px 0 0;
  background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 20px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 14px 24px;
  font-family: "Archivo", sans-serif;
  font-size: .95rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--accent); cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- top bar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.topbar__inner { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between; padding: 10px 20px; max-width: var(--wrap); margin: 0 auto; }
.topbar a:hover { color: var(--ink); }
.topbar__list { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; }
.navbar { background: var(--steel); color: #eef2f7; }
.navbar__inner { display: flex; align-items: center; gap: 24px; justify-content: space-between; max-width: var(--wrap); margin: 0 auto; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: "Archivo", sans-serif; font-weight: 900; }
.brand__name { font-family: "Archivo", sans-serif; font-weight: 900; text-transform: uppercase; font-size: 1.08rem; line-height: 1.1; }
.brand__sub { display: block; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(238, 242, 247, .6); }

.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; align-items: center; gap: 4px; }
.menu > li { position: relative; }
.menu > li > a {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  font-family: "Archivo", sans-serif; font-size: .84rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.menu > li:hover > a, .menu > li.current-menu-item > a { color: var(--accent); border-bottom-color: var(--accent); }

.submenu {
  position: absolute; top: 100%; left: 0; min-width: 290px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  box-shadow: 0 22px 44px rgba(16, 24, 36, .16);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
  padding: 8px 0;
}
li:hover > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu .submenu { top: -11px; left: 100%; }
.submenu li { position: relative; }
.submenu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: .88rem; }
.submenu a:hover { background: var(--concrete); color: #a1740b; }
.caret { font-size: .6rem; opacity: .6; }

.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .3); color: inherit; padding: 10px 12px; cursor: pointer; }

/* ---------- hero slider ---------- */
.hero { position: relative; overflow: hidden; background: var(--steel); color: #fff; isolation: isolate; }
.hero__slide { background: linear-gradient(135deg, #1a2433, #2b3a52); }
.hero__slide { position: absolute; inset: 0; opacity: 0; transform: scale(1); transition: opacity 1s ease, transform 6s ease-out; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__slide.is-active { opacity: 1; transform: scale(1.06); }
.hero__veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19, 27, 39, .82), rgba(19, 27, 39, .35) 60%, rgba(19, 27, 39, .1)); }
.hero__inner { position: relative; padding: 92px 20px 104px; max-width: var(--wrap); margin: 0 auto; min-height: 520px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__text { color: rgba(255, 255, 255, .84); max-width: 60ch; font-size: 1.05rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .16); }
.hero__bar i { display: block; height: 100%; background: var(--accent); width: 0; }
.hero__bar i.run { animation: heroBar 6s linear forwards; }
@keyframes heroBar { from { width: 0; } to { width: 100%; } }
.hero__dots { position: absolute; right: 20px; bottom: 26px; display: flex; gap: 8px; z-index: 3; }
.hero__dots button { width: 30px; height: 5px; border: 0; background: rgba(255, 255, 255, .35); cursor: pointer; }
.hero__dots button.is-active { background: var(--accent); }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(16, 24, 36, .1); border-color: var(--accent); }
.card__icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-family: "Archivo", sans-serif; font-weight: 900; margin-bottom: 16px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }
.card__num { font-family: "Archivo", sans-serif; font-size: .75rem; font-weight: 800; letter-spacing: .16em; color: var(--accent); }

.tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--steel); color: #fff; min-height: 300px; display: flex; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.06); }
.tile__body { position: relative; margin-top: auto; padding: 24px; background: linear-gradient(transparent, rgba(19, 27, 39, .9)); width: 100%; }
.tile__body h3 { margin: 0; }
.tile__body p { margin: .3rem 0 0; color: rgba(255, 255, 255, .78); font-size: .9rem; }

.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stars { color: var(--accent); letter-spacing: 3px; }
.quote p { font-size: .96rem; }
.quote__who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.avatar { width: 42px; height: 42px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: "Archivo", sans-serif; font-weight: 900; }

.faq { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 18px 22px; font-family: "Archivo", sans-serif; font-weight: 700; text-transform: uppercase; font-size: .92rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: #a1740b; }
.faq p { padding: 0 22px 18px; color: var(--muted); margin: 0; }

/* ---------- cta band ---------- */
.cta { background: var(--accent); color: var(--accent-ink); }
.cta__inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: 40px 20px; max-width: var(--wrap); margin: 0 auto; }
.cta h2 { margin: 0; }

/* ---------- page content ---------- */
.page-hero { background: var(--steel); color: #fff; padding: 64px 0; }
.page-hero h1 { color: #fff; }
.entry { padding: 56px 0; }
.entry-content { max-width: 78ch; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; }
.entry-content ul { padding-left: 1.2rem; color: var(--muted); }
.entry-content li { margin-bottom: .4rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--steel-2); color: rgba(238, 242, 247, .74); padding: 56px 0 24px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .16em; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.site-footer li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 34px; padding-top: 18px; font-size: .82rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--steel); padding: 8px 12px 20px; max-height: 76vh; overflow: auto; }
  .primary-nav.is-open { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu > li > a { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .submenu, .submenu .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--accent); background: rgba(255, 255, 255, .04); color: #eef2f7; display: none; margin: 0 0 6px 12px; }
  .submenu a:hover { background: transparent; color: var(--accent); }
  li.is-open > .submenu { display: block; }
  .navbar__inner { position: relative; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 52px 0; }
  .hero__inner { min-height: 440px; padding: 70px 20px 84px; }
}
