/* =========================================
   IronClad Exteriors — styles.css (FULL)
   Single-source hero + no duplicate overrides
   ========================================= */

/* Import Oswald font */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap');

/* Root variables */
:root{
  --bg:#f6f7f9;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --border:rgba(15,23,42,.12);
  --shadow:0 10px 30px rgba(2,6,23,.08);
  --red:#d3171f;
  --red2:#ff2a2a;
  --radius:16px;
  --max:1160px;

  /* Z-Index */
  --z-backdrop: 998;
  --z-header: 999;
  --z-toggle: 2001;
  --z-drawer: 2000;
  --z-dropdown: 970;

  --focus: 0 0 0 4px rgba(211,23,31,.14);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;overflow-x:hidden;}

body{
  font-family:'Oswald', sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,video{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
a:hover{opacity:1}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:none;
  box-shadow: var(--focus);
  border-radius: 12px;
}

.container{max-width:var(--max);margin:0 auto;padding:0 20px}
.muted{color:var(--muted)}

/* Hide honeypot field */
.hp-field,
input[name="bot-field"],
label[for="bot-field"]{
  display:none !important;
  visibility:hidden;
  height:0;
  width:0;
  opacity:0;
  position:absolute;
  z-index:-1;
}

/* Typography */
h1,h2,h3{
  margin:0 0 10px 0;
  line-height:1.1;
  text-transform:uppercase;
}
h1{ font-size: clamp(1.75rem, 2vw + 1.5rem, 2.75rem); }
h2{ font-size: clamp(1.25rem, 1.4vw + 1rem, 2.1rem); }
h3{ font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.6rem); }
p{margin:0 0 12px 0}

.card-title{
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.03em;
}

/* ---------------- Topbar ---------------- */
.topbar{
  background:#0b1220;
  color:#e2e8f0;
  font-size:13px;
  position:relative;
  z-index:1001;
}
.topbar-inner{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:10px 0;
}
.topbar a{color:#e2e8f0}
.topbar-phones{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.topbar .sep{opacity:.45}

/* ---------------- Header / Brand ---------------- */
.site-header{
  position:sticky;
  top:0;
  z-index:var(--z-header);
  background:rgba(246,247,249,.98);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
}
.brand{display:flex;align-items:center;gap:12px}
.logo-wrap{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.logo{height:96px;width:auto}

/* ---------------- Buttons ---------------- */
.btn, .btn-primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:11px 16px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--red),var(--red2));
  color:#fff;
  font-weight:800;
  border:0;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(211,23,31,.22);
  transition:transform .12s ease,box-shadow .12s ease;
  font-family:'Oswald', sans-serif;
  text-transform:uppercase;
  letter-spacing:0.05em;
}
.btn:hover, .btn-primary:hover{transform:translateY(-1px)}
.btn:active, .btn-primary:active{transform:translateY(0)}
.btn-small{padding:9px 12px;font-size:13px}

/* CTA sizing for hero */
.btn-cta{
  font-size:1.3rem;
  padding:16px 40px;
  box-shadow:0 10px 30px rgba(0,0,0,0.5);
}

/* Desktop nav CTA */
.nav .nav-cta.btn{
  background: linear-gradient(90deg,var(--red),var(--red2));
  color:#fff;
  border:0;
  box-shadow:0 10px 20px rgba(211,23,31,0.25);
  width:auto;
  margin-top:0;
  padding:10px 20px;
  font-size:13px;
}
.nav .nav-cta.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(211,23,31,0.3);
}

/* ---------------- Nav (Desktop) ---------------- */
.nav-toggle{
  display:none;
  width:46px;
  height:46px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  border-radius:14px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:6px;
  position:relative;
  z-index:var(--z-toggle);
  cursor:pointer;
}
.nav-toggle span{
  width:22px;
  height:2px;
  background:#0f172a;
  border-radius:2px;
}

.nav{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-end;
}

.nav > a,
.nav .nav-link{
  font-size:14px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid transparent;
  background:transparent;
  font-weight:650;
  text-transform:uppercase;
  letter-spacing:0.02em;
}
.nav > a:hover,
.nav .nav-link:hover{
  background:rgba(15,23,42,.04);
}
.nav > a.active,
.nav .nav-link.active{
  border-color:rgba(211,23,31,.25);
  background:rgba(211,23,31,.06);
}

/* Dropdown (desktop) */
.nav-item{position:relative;display:flex;align-items:center}
.dropdown{
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  min-width:240px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:0 18px 45px rgba(0,0,0,.12);
  padding:8px;
  display:none;
  z-index:var(--z-dropdown);
}
.dropdown a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  font-weight:650;
}
.dropdown a:hover{background:rgba(15,23,42,.06)}
.has-dd:hover .dropdown,
.has-dd:focus-within .dropdown{display:block}

/* ---------------- Backdrop ---------------- */
.nav-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:var(--z-backdrop);
}
body.nav-open{overflow:hidden}
body.nav-open .nav-backdrop{
  opacity:1;
  pointer-events:auto;
}

/* ---------------- Main / Sections ---------------- */
main{padding-bottom:40px}
.section{padding:56px 0}
.section.tight{padding:38px 0}

/* Center helper */
.about-hero, .roofing-hero, .construction-hero{ text-align:center; }

/* About page main heading - Local Roots, Clear Communication, etc. */
.hero-main-heading{
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: 24px;
}

.hero-main-heading > div{
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 8px 0;
}
/* Cards */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.card.soft{
  background: rgba(255,255,255,.92);
}

/* Bio images */
.bio-photo{
  display:block;
  max-width:280px;
  width:100%;
  height:320px;
  object-fit:cover;
  object-position:top;
  border-radius:12px;
  margin:0 auto 12px auto;
  box-shadow:0 4px 12px rgba(0,0,0,0.1);
}

/* Grids */
.grid{ display:grid; gap:20px; }
.grid.two{ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three{ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Gallery helpers */
.gallery{ display:flex; gap:16px; flex-wrap:wrap; }
.recent-card{ padding:12px; }
.recent-image{ width: clamp(280px, 92vw, 860px); height:auto; margin:0 auto; display:block; }

/* Gallery image sizing - make all images uniform */
.gallery .card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px 12px 0 0;
    display: block;
}

/* For projects.html main gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Ensure cards don't stretch unevenly - ONLY in gallery */
.gallery .card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

/* Gallery text styling - ONLY affects gallery cards */
.gallery .card h3 {
    font-size: 1rem !important;
    margin: 0 0 4px !important;
}

.gallery .card .muted {
    font-size: 0.9rem;
    margin: 0;
}

/* Text area consistency - ONLY in gallery */
.gallery .card > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px;
}

/* Jobflow image */
.jobflow{ display:flex; justify-content:center; padding:18px; }
.jobflow img{ width: clamp(280px, 92vw, 860px); height:auto; }

/* =========================
   HERO (index.html)
========================= */

.hero.hero-clean{
  --hero-gap: 12px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  min-height: clamp(560px, 76svh, 840px);
}

.hero.hero-clean .hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.hero.hero-clean .hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0,0,0,.30);
}

.hero.hero-clean .hero-content{
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--hero-gap);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 22px;
}

.hero.hero-clean .hero-mark,
.hero.hero-clean .hero-rotating-text,
.hero.hero-clean .hero-final-message,
.hero.hero-clean .hero-main-cta{
  margin: 0;
}

.hero.hero-clean{
  --logo-gap-adjust: -86px;
}

.hero.hero-clean .hero-rotating-text{
  margin-top: var(--logo-gap-adjust);
}

.hero.hero-clean .hero-mark{
  height: clamp(390px, 50vh, 720px);
  width: auto;
  max-width: min(1200px, 96vw);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.7));
}

.hero.hero-clean .hero-rotating-text{
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 3px 6px 16px rgba(0,0,0,0.85);
  min-height: 1.3em;
  max-width: min(900px, 92vw);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  white-space: nowrap;
}

.hero.hero-clean .hero-rotating-text span{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: rotateWord 24s infinite;
  white-space: nowrap;
}

.hero.hero-clean .hero-rotating-text span:nth-child(1){animation-delay:0s;}
.hero.hero-clean .hero-rotating-text span:nth-child(2){animation-delay:3s;}
.hero.hero-clean .hero-rotating-text span:nth-child(3){animation-delay:6s;}
.hero.hero-clean .hero-rotating-text span:nth-child(4){animation-delay:9s;}
.hero.hero-clean .hero-rotating-text span:nth-child(5){animation-delay:12s;}
.hero.hero-clean .hero-rotating-text span:nth-child(6){animation-delay:15s;}
.hero.hero-clean .hero-rotating-text span:nth-child(7){animation-delay:18s;}
.hero.hero-clean .hero-rotating-text span:nth-child(8){animation-delay:21s;}

@keyframes rotateWord{
  0%,12.5%{opacity:1;}
  12.5%,100%{opacity:0;}
}

.hero-tagline{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hero-gap);
}

.hero-final-message{
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 3px 6px 16px rgba(0,0,0,0.8);
}

/* Global red divider */
.header-sep{
  display:block;
  width:120px;
  height:5px;
  background:var(--red);
  border-radius:999px;
  margin:14px auto;
}

.hero.hero-clean .header-sep{
  display: block;
  width: 120px;
  height: 5px;
  background: var(--red);
  border-radius: 999px;
  margin: 0;
}

/* ================= Service page headings ================= */
.construction-hero-title{
  white-space:normal;
  text-align:center;
  font-size: clamp(1.8rem, 5vw, 4rem);
  line-height:1.1;
  width:100%;
  display:block;
  margin-bottom:24px;
}

.roofing-hero-title{
  white-space:normal;
  text-align:center;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height:1.1;
  width:100%;
  display:block;
  margin-bottom:20px;
}

/* ================= Contact page ================= */
.contact-page{ padding:40px 0; }
.contact-head{ text-align:center; margin-bottom:30px; }

.contact-grid{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap:24px;
  align-items:start;
}
.contact-side{ position:sticky; top:90px; }

.quick-actions{ display:flex; flex-direction:column; gap:16px; }
.qa{ width:100%; }

.qa-btn{
  width:100%;
  list-style:none;
  cursor:pointer;
  background: linear-gradient(90deg,var(--red),var(--red2));
  color:white;
  padding:12px;
  border-radius:999px;
  text-align:center;
  font-weight:700;
  text-transform:uppercase;
  box-shadow:0 10px 20px rgba(211,23,31,0.2);
}
.qa-btn::-webkit-details-marker{ display:none; }

.qa-menu{
  margin-top:10px;
  background:white;
  border:1px solid var(--border);
  border-radius:12px;
  padding:8px;
  box-shadow:0 10px 30px rgba(0,0,0,0.05);
}
.qa-item{
  display:block;
  padding:10px;
  border-radius:8px;
  text-align:center;
  font-weight:600;
}
.qa-item:hover{ background:#f1f5f9; color:var(--red); }

.fields{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.field.full{ grid-column: 1 / -1; }
.field label{
  font-size:0.9rem;
  font-weight:600;
  text-transform:uppercase;
  color:var(--muted);
}
.field input, .field select, .field textarea{
  width:100%;
  padding:12px;
  border:1px solid var(--border);
  border-radius:8px;
  font-family:inherit;
  background:#fff;
}
.form-actions{ margin-top:24px; }

.form-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

.form-actions .btn-primary{
  align-self:center;
}

.form-actions .fineprint{
  align-self:center;
  text-align:center;
  max-width: 520px;
}

/* ================= Social icons / footer ================= */
.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(246,247,249,.98);
  padding: 28px 0;
}

.footer-inner{
  display:flex;
  flex-direction:column-reverse;
  align-items:center;
  justify-content:center;
  gap:12px;
}
.footer-inner span{
  width:100%;
  text-align:center;
}

.icon-row{
  display:flex;
  justify-content:center;
  gap:12px;
}

.icon-btn{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--red);
  border: 1px solid var(--red);
  color: white;
  border-radius:50%;
  transition:all 0.2s;
}

@media (min-width: 901px){
  .icon-btn:hover{
    background:white;
    color:var(--red);
    border-color:var(--red);
    transform: translateY(-2px);
  }
}

.icon-btn svg,
.icon-btn svg path{
  width:20px;
  height:20px;
  fill: currentColor;
  stroke:none;
}

.mini-card .mini-title{
  width: 100%;
  text-align: center;
}

.contact-socials{
  margin-top: 8px;
}

/* ================= Mobile & Tablet Responsive (<=900px) ================= */
@media (max-width: 900px){
  .nav-toggle{ display:flex; }

  .nav{
    position:fixed;
    top:0;
    right:0;
    width:280px;
    height:100vh;
    height:100dvh;
    background:#ffffff;
    flex-direction:column;
    justify-content:flex-start;
    padding:100px 24px 40px 24px;
    gap:10px;
    box-shadow:-10px 0 40px rgba(0,0,0,0.2);
    z-index:var(--z-drawer);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y:auto;
  }
  body.nav-open .nav{ transform: translateX(0); }

  .nav > a,
  .nav .nav-link{
    font-size:1.4rem;
    font-weight:700;
    width:100%;
    padding:12px 0;
    border-bottom:1px solid rgba(0,0,0,0.05);
    border-radius:0;
    text-align:left;
    display:block;
  }

  .dropdown{ display:none !important; }
  .nav-item{ display:block; width:100%; }

  .nav .nav-cta.btn{
    margin-top:24px !important;
    width:100% !important;
    text-align:center;
    background: linear-gradient(90deg,var(--red),var(--red2)) !important;
    color:white !important;
    border:none !important;
    padding:14px !important;
    font-size:1.2rem !important;
    box-shadow:0 10px 20px rgba(211,23,31,0.3) !important;
    display:flex !important;
    justify-content:center !important;
  }

  .grid.two, .grid.three{ grid-template-columns: 1fr; }

  .header-inner{ padding-left:10px; padding-right:10px; }

  .topbar-inner{
    flex-direction:column;
    gap:6px;
    justify-content:center;
    text-align:center;
    padding:10px;
    height:auto;
  }
  .topbar-phones{ justify-content:center; width:100%; }

  .logo{ height:100px; }

  /* cards centered on mobile */
  .card{
    text-align:center;
    display:flex;
    flex-direction:column;
    align-items:center;
  }
  .card h3{
    text-align:center;
    width:100%;
  }
  .card p,
  .card .muted{
    text-align:center;
    width:100%;
  }
  .card .btn,
  .card .btn-small{
    margin-left:auto;
    margin-right:auto;
    display:inline-flex;
  }

  /* Contact page: left align on mobile */
  .contact-page .card,
  .request-form{
    text-align:left;
    align-items:stretch;
  }
  .contact-page .card h1,
  .contact-page .card h2,
  .contact-page .card h3,
  .contact-page .card p,
  .contact-page .card label,
  .contact-page .card input,
  .contact-page .card select,
  .contact-page .card textarea{
    text-align:left;
  }

  .contact-grid{ grid-template-columns: 1fr; }
  .contact-side{ order:-1; position:static; margin-bottom:20px; }
  .fields{ grid-template-columns: 1fr; }
}

/* ================= Mobile Small Screens (<=700px) ================= */
@media (max-width: 700px){
  .hero.hero-clean .hero-bg{
    object-fit: cover;
    object-position: center center;
  }

  .hero.hero-clean .hero-mark{
    height: clamp(260px, 36vh, 430px);
    max-width: 96vw;
  }

  .hero.hero-clean .hero-rotating-text{
    font-size: clamp(1.9rem, 8vw, 3.3rem);
    min-height: 1.05em;
  }

  .btn-cta{
    font-size: 1.1rem;
    padding: 14px 30px;
  }

  .gallery .card img {
    height: 220px;
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }

  .header-inner{
    padding: 6px 10px;
  }

  .logo-wrap{
    padding: 4px 8px;
    border-radius: 14px;
  }

  .logo{
    height: 100px;
    width: auto;
  }

  .site-header{
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* ===============================================
   ABOUT PAGE BIO NAMES - CAMERON & BUCK
   MUST BE LAST TO OVERRIDE MOBILE CARD RULES
   =============================================== */
.about-hero .grid.two .card h3{
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  line-height: 1.2 !important;
  margin: 12px 0 16px 0 !important;
  text-align: center !important;
}

@media (max-width: 900px){
  .about-hero .grid.two .card h3{
    font-size: 2rem !important;
  }
}

@media (max-width: 600px){
  .about-hero .grid.two .card h3{
    font-size: 1.7rem !important;
  }
}
