@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ===== Brand settings: change these to restyle the whole site ===== */
:root {
  --accent: #0000d1;        /* logo blue */
  --accent-dark: #00009e;
  --accent-light: #8f8fff;  /* blue that reads on dark backgrounds */
  --ink: #111318;           /* main text */
  --muted: #5b6168;         /* secondary text */
  --line: #e4e4e1;          /* borders */
  --bg: #ffffff;
  --bg-alt: #f3f4f9;        /* light section background */
  --dark: #0b0c10;          /* logo black: hero/footer */
  --max: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Apple-style type: Apple devices show SF Pro (their system font);
   everyone else gets Inter, a free look-alike loaded at the top of this file. */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .logo {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h1 { letter-spacing: -0.03em; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ===== Header / Nav ===== */
.site-header {
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img { height: 84px; width: auto; }
.nav { display: flex; gap: 28px; list-style: none; }
.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.75;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { opacity: 1; color: var(--accent); }
.nav a.active { opacity: 1; color: var(--accent); border-bottom-color: var(--accent); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  background:
    linear-gradient(120deg, rgba(11,12,16,0.88) 35%, rgba(0,0,158,0.5)),
    var(--hero, url("images/hero-house.jpg")) center 60% / cover no-repeat,
    var(--dark);
  color: #fff;
  padding: 130px 0 120px;
  position: relative;
  overflow: hidden;
}
/* Optional highlight-reel video behind the headline (set in /admin → Home) */
.hero.has-video { background: var(--dark); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(11,12,16,0.85) 35%, rgba(0,0,158,0.45)); }
.hero .container { position: relative; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; max-width: 720px; }
/* Home: the h1 (city keywords for Google) is styled as the small line; the slogan below looks like the headline */
.hero h1.eyebrow { font-size: 0.8rem; line-height: 1.6; letter-spacing: 0.12em; max-width: none; }
.hero p.hero-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; max-width: 720px;
  font-weight: 600; letter-spacing: -0.03em; opacity: 1; margin: 0;
}
.hero p { font-size: 1.15rem; opacity: 0.85; max-width: 560px; margin: 18px 0 32px; }

.page-hero { background: linear-gradient(120deg, var(--dark) 45%, var(--accent-dark)); color: #fff; padding: 64px 0 56px; }
.hero .eyebrow, .page-hero .eyebrow { color: var(--accent-light); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { opacity: 0.8; margin-top: 8px; max-width: 600px; }
/* Page banner with a photo behind it (set the photo with --photo on the section) */
.page-hero.has-photo {
  background:
    linear-gradient(120deg, rgba(11,12,16,0.88) 40%, rgba(0,0,158,0.55)),
    var(--photo) center var(--pos, 55%) / cover no-repeat,
    var(--dark);
  padding: 96px 0 88px;
}

/* ===== Our Work gallery (Home) ===== */
/* Big photo top-left (2x2), two stacked on the right, three across the bottom */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; gap: 12px; }
.work-grid figure { margin: 0; position: relative; overflow: hidden; border-radius: 6px; background: var(--bg-alt); }
.work-grid figure:first-child { grid-column: span 2; grid-row: span 2; }
.work-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.work-grid figure:hover img { transform: scale(1.04); }
.work-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(11,12,16,0.8));
  color: #fff; font-weight: 600; font-size: 0.9rem;
}

/* Card with a photo across the top (Home: Residential / Commercial) */
.card-photo { padding: 0; overflow: hidden; }
.card-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-photo h3 { margin: 22px 28px 8px; }
.card-photo p { margin: 0 28px 28px; }

/* Before & after video (Home) */
.feature-video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 6px; background: var(--dark); object-fit: cover; }

/* ===== Projects page ===== */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.video-card { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.video-card-wide { grid-column: span 2; }
.video-card video { width: 100%; aspect-ratio: 16 / 9; display: block; background: var(--dark); object-fit: cover; }
.video-card figcaption { padding: 14px 18px 16px; font-weight: 600; border-top: 3px solid var(--accent); }
.tag {
  display: inline-block; margin-right: 10px; padding: 2px 8px; border-radius: 3px;
  background: var(--bg-alt); color: var(--accent-dark);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; vertical-align: 2px;
}
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.photo-grid figure { margin: 0; position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 4 / 3; background: var(--line); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.photo-grid figure:hover img { transform: scale(1.04); }
.photo-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(11,12,16,0.8)); color: #fff; font-weight: 600; font-size: 0.88rem;
}

/* ===== Our story (About) ===== */
.story { max-width: 720px; }

/* ===== Meet the Castillos (About) ===== */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.person { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; }
.person-body { padding: 20px 24px 24px; border-top: 4px solid var(--accent); }
.person-body h3 { font-size: 1.25rem; }
.person-body a { color: var(--accent); font-weight: 600; text-decoration: none; }
.person-body a:hover { text-decoration: underline; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  margin-left: 10px;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ===== Sections ===== */
section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.9rem; margin-bottom: 10px; }
.section-sub { color: var(--muted); max-width: 620px; margin-bottom: 40px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 48px; align-items: start; }
.grid-2-even { grid-template-columns: repeat(2, 1fr); }

/* Compact list of every service (Home page) */
.service-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 20px; }
.service-tags li {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 500;
}
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  padding: 28px;
  border-radius: 4px;
}
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { color: var(--muted); }
.card ul { color: var(--muted); padding-left: 18px; margin-top: 12px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: 2.4rem; color: var(--accent-dark); }
.stat span { color: var(--muted); }

.cta { background: var(--accent); color: #fff; text-align: center; padding: 64px 0; }
.cta h2 { font-size: 1.8rem; margin-bottom: 18px; }
.cta .btn { background: var(--dark); color: #fff; }
.cta .btn:hover { background: #fff; color: var(--accent); }

.placeholder-img {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, #e6e8f2 0 16px, #eff0f7 16px 32px);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== Contact ===== */
.contact-list { list-style: none; }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list a { text-decoration: none; color: var(--accent); font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.contact-list strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

form { display: grid; gap: 16px; }
label { font-weight: 600; font-size: 0.9rem; display: grid; gap: 6px; }
input, textarea, select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
textarea { min-height: 140px; resize: vertical; }
/* Quote form: spam trap (hidden from people) + sent / error message */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 12px 14px; border-radius: 4px; font-weight: 500; }
.form-status.ok { background: #e7f6ec; color: #0a6b34; }
.form-status.err { background: #fde8e7; color: #b3261e; }
button.btn:disabled { opacity: 0.7; cursor: wait; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); border-top: 4px solid var(--accent); color: rgba(255,255,255,0.7); padding: 40px 0; font-size: 0.9rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ===== Mobile ===== */
@media (max-width: 800px) {
  .menu-toggle { display: block; }
  .site-header .container { height: 72px; }
  .logo img { height: 54px; }
  .nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a { display: block; padding: 12px 0; }
  .grid-3, .grid-2, .grid-2-even, .stats { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; gap: 18px; }
  .video-card-wide { grid-column: auto; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  /* Phone: big photo full width, then pairs, last photo full width */
  .work-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 240px; grid-auto-rows: 160px; }
  .work-grid figure:first-child { grid-column: span 2; grid-row: span 1; }
  .work-grid figure:last-child { grid-column: span 2; }
  .people { grid-template-columns: 1fr; max-width: 420px; }
  .hero { padding: 96px 0 88px; }
  section { padding: 56px 0; }
  .btn-outline { margin: 12px 0 0; }
}

/* ===== Slideshow (About page) =====
   To use real photos, replace each <div class="slide placeholder-img">…</div>
   with <img class="slide" src="images/your-photo.jpg" alt="Short description">  */
.slideshow {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-alt);
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.slideshow .slide.active { opacity: 1; }
.slideshow .placeholder-img { aspect-ratio: auto; border-radius: 0; font-size: 1rem; }
.slide-dots {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.slide-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.slide-dots button.active { background: #fff; transform: scale(1.2); }
@media (prefers-reduced-motion: reduce) {
  .slideshow .slide { transition: none; }
}