/* ====== Base ====== */
:root{
  --asphalt:#1C1C1C;
  --asphalt-2:#2a2a2a;
  --yellow:#FFD23F;
  --text:#101114;
  --muted:#5d6167;
  --bg:#ffffff;
  --blue:#1E88E5;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.12);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}

.container{
  max-width:1100px;
  margin-inline:auto;
  padding:0 20px;
}

h1,h2,h3{
  font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.2;
  color:#111;
  margin:0 0 10px;
}
.section-title{font-size:clamp(1.4rem,2.5vw,2rem); margin-bottom:18px}

p{margin:0 0 12px}
.muted{color:var(--muted)}

.btn{
  display:inline-block;
  background:var(--yellow);
  color:#111;
  padding:12px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  border:2px solid var(--yellow);
  transition:transform .05s ease, box-shadow .2s ease, background .2s ease;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn-ghost{
  background:transparent;
  border-color:#fff;
  color:#fff;
}
.btn-small{padding:8px 12px; font-size:.95rem}

/* ====== Accessibility ====== */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  position:static; width:auto; height:auto; padding:8px; background:#fff; z-index:1000;
}

/* ====== Header ====== */
.site-header{
  position:sticky; top:0; z-index:50;
  background:#000;
  backdrop-filter: blur(6px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.header-inner{display:flex; align-items:center; justify-content:space-between; min-height:64px}
.logo{
  color:#fff; font-weight:800; text-decoration:none; letter-spacing:.3px; font-family:"Montserrat"; font-size:1.05rem;
}
.logo span{color:var(--yellow)}
.nav{display:flex; gap:18px; align-items:center}
.nav a{color:#fff; text-decoration:none; opacity:.92}
.nav a:hover{opacity:1}

/* Mobile nav (CSS-only toggle) */
.nav-toggle{display:none}
.hamburger{
  display:none; width:36px; height:28px; position:relative; cursor:pointer;
}
.hamburger span{
  position:absolute; left:0; right:0; height:3px; background:#fff; border-radius:2px; transition:transform .25s, top .25s, opacity .25s;
}
.hamburger span:nth-child(1){top:4px}
.hamburger span:nth-child(2){top:12px}
.hamburger span:nth-child(3){top:20px}

/* Make header a positioning context */
.header-inner{ position: relative; }

/* === Tablet & down === */
@media (max-width: 860px){
  /* Show hamburger, keep it above the dropdown */
  .hamburger{ display:block; z-index:60; }

  /* Turn the nav into a dropdown under the header */
  .nav{
    position: absolute;
    top: 100%;         /* sits directly under the header */
    left: 0; right: 0;
    background: var(--asphalt);
    display: flex;
    flex-direction: column;
    padding: 14px 20px;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.12);

    /* hidden by default, no layout shift */
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .22s ease;
  }

  /* Slightly larger tap targets */
  .nav a{ padding: 8px 0; }

  /* We already have a big call button in the hero; hide this to avoid overlap */
  .nav a.phone{ display: none; }

  /* Open state (checkbox hack) */
  .nav-toggle:checked ~ .nav{ transform: scaleY(1); }

  /* Animate hamburger into an “X” */
  .nav-toggle:checked ~ .hamburger span:nth-child(1){ top:12px; transform: rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2){ opacity:0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3){ top:12px; transform: rotate(-45deg); }
}


/* ====== Hero ====== */
.hero{
  position:relative;
  min-height:64vh;
  display:grid;
  place-items:center;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)),
    url('assets/parking-lot.png') center/cover no-repeat;
  color:#fff;
}
.hero-overlay{position:absolute; inset:0; z-index:1;}
.hero-inner{text-align:center; padding:70px 0; z-index: 2;}
.hero h1{font-size:clamp(1.8rem, 4.8vw, 3rem); color:#fff; text-shadow:0 6px 24px rgba(0,0,0,.35)}
.subhead{opacity:.95; margin-bottom:18px}
.cta-row{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}

/* ====== Trust icons ====== */
.trust{background:#fff; padding:26px 0}
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:14px}
.trust-card{background:#fff; border:1px solid #eee; border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); text-align:center}
.trust-card .icon{font-size:28px; margin-bottom:6px}

@media (max-width: 860px){
  .grid-4{grid-template-columns:1fr 1fr}
}
@media (max-width: 520px){
  .grid-4{grid-template-columns:1fr}
}

/* ====== Sections ====== */
.section{padding:54px 0}
.section-alt{background:#fafafa}

/* ====== Service cards ====== */
.cards{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:18px;
}
.card{
  background:#fff; border:1px solid #eee; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
}
.card-media{height:130px; background:var(--asphalt-2) center/cover no-repeat}
.media-seal{background-image:url('assets/sealcoating.jpg')}
.media-striping{background-image:url('assets/line-striping.jpg')}
.media-crack{background-image:url('assets/crack-filling.jpg')}
.media-pothole{background-image:url('assets/pothole.jpg')}
.card-body{padding:14px 16px}

@media (max-width: 980px){
  .cards{grid-template-columns:repeat(2,1fr)}
}
@media (max-width: 560px){
  .cards{grid-template-columns:1fr}
}

/* ====== Gallery ====== */
.gallery{
  display:grid; grid-template-columns:1fr 1fr; gap:16px;
}
.gallery img{width:100%; height:260px; object-fit:cover; border-radius:12px; display:block; box-shadow:var(--shadow)}
.gallery figure{margin:0}
.gallery figcaption{text-align:center; margin-top:6px; color:var(--muted); font-size:.95rem}

@media (max-width: 800px){
  .gallery{grid-template-columns:1fr}
  .gallery img{height:220px}
}

/* ====== Areas ====== */
.map-card{
  display:grid; grid-template-columns: 2fr 1fr; gap:16px; align-items:center;
  background:#fff; border:1px solid #eee; border-radius:var(--radius); padding:16px; box-shadow:var(--shadow)
}
.map{
  height: 500px;
  border-radius: 12px;
  background: url(assets/utah-counties-map.png) center / contain no-repeat;
}

.area-list{margin:0; padding-left:18px}
.area-list li{margin:6px 0}
.small-note {
  grid-column: 1 / -1;   /* spans all columns */
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 860px){
  .map-card{grid-template-columns:1fr}
  .map{height:220px}
}

/* ====== Contact ====== */
.section-cta{background:linear-gradient(180deg,#111,#1f1f1f); color:#fff}
.contact-grid{display:grid; grid-template-columns: 1.1fr 1fr; gap:22px; align-items:start}
.cta-copy p{color:#e8e8e8}
.phone-large a{color:#fff; font-weight:800; text-decoration:none}
.contact-form{
  background:#fff; color:#111;
  border-radius:16px; padding:16px; box-shadow:var(--shadow)
}
.contact-form label{display:block; margin-bottom:12px}
.contact-form label span{display:block; font-weight:600; margin-bottom:6px}
.contact-form input, .contact-form textarea{
  width:100%; border:1px solid #e1e1e6; border-radius:10px; padding:10px 12px; font:inherit;
}
.contact-form button{margin-top:6px}

@media (max-width: 900px){
  .contact-grid{grid-template-columns:1fr}
}

/* ====== Footer ====== */
.site-footer{background:#0f0f10; color:#bbb; padding:26px 0}
.footer-grid{display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap}
.footer-logo{color:#fff; text-decoration:none}
.footer-nav a{color:#bbb; text-decoration:none; margin-right:14px}
.footer-nav a:hover{color:#fff}


/* ====== Responsive Logo Sizing ====== */

/* Reset logo link wrapper */
.logo { line-height: 0; display: flex; align-items: center; }

/* Header logo */
.logo-img{
  display: block;
  height: auto;            /* let aspect ratio drive height */
  width: auto;
  max-height: clamp(24px, 6vw, 44px);   /* scale between ~24–44px depending on viewport */
  max-width: min(70vw, 240px);          /* keep it from overflowing on narrow screens */
}

/* Footer logo can be slightly larger */
.footer .logo-img{
  max-height: 52px;
  height: auto;
  width: auto;
}

/* Tablet adjustments */
@media (max-width: 860px){
  .header-inner{ min-height: 52px; padding-block: 6px; }
  .logo-img{ max-height: clamp(22px, 7vw, 38px); max-width: min(60vw, 200px); }
}

/* Extra small screens */
@media (max-width: 420px){
  .logo-img{ max-height: 26px; max-width: 62vw; }
}


/* Hide Netlify honeypot */
.hidden { display: none !important; }

/* Ensure contact form keeps card styling (in case class got dropped earlier) */
.contact-form{
  background:#fff; color:#111;
  border-radius:16px; padding:16px; box-shadow:var(--shadow);
  width:100%;
}

/* Inputs look consistent even if browser auto-styles */
.contact-form input,
.contact-form textarea{
  width:100%;
  border:1px solid #e1e1e6;
  border-radius:10px;
  padding:10px 12px;
  font:inherit;
  background:#fff;
  color:#111;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus{
  border-color:#b5b9c0;
  box-shadow:0 0 0 3px rgba(30,136,229,.18);
}

/* Labels stack nicely with consistent spacing */
.contact-form label{
  display:block;
  margin-bottom:12px;
}
.contact-form label span{
  display:block;
  font-weight:600;
  margin-bottom:6px;
}

/* Button fills width on small screens */
@media (max-width: 520px){
  .contact-form .btn{ width:100%; }
}

/* Subtle footnote */
.contact-form .form-footnote{
  margin-top:8px;
  font-size:.9rem;
  color:var(--muted);
}
