/*
Theme Name: Zadok Construction
Description: One-page site for Zadok Construction and Remodeling LLC, Lake City, Florida. Built from the Zadok brand style guide (Jost, drafting orange, deep navy).
Author: Skyway Media
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zadok-construction
*/

/* Keep the page clear of the WordPress admin bar when logged in. */
.admin-bar .lightbox { top: 0; }

:root {
  --orange: #FF913A;
  --navy: #001837;
  --navy-deep: #000F24;
  --ink: #0A0A0A;
  --white: #FFFFFF;
  --mist: #C5CEDB;          /* body copy on navy */
  --rule: rgba(255, 255, 255, 0.16);
  --gutter: clamp(22px, 5vw, 72px);
  --max: 1716px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: "Jost", "Century Gothic", "Futura", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.012em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons follow the style guide: orange field, near-black tracked label */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 20px 30px;
  transition: background-color 0.18s ease;
}
.btn:hover { background: #ffa55c; }
.btn-line {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.btn-line:hover { background: rgba(255, 255, 255, 0.08); }

/* Drafting lines: fine orange rules that cross and run past the corner,
   the way the logo's construction marks do. */
.drafted { position: relative; }
.drafted::before {
  content: "";
  position: absolute;
  inset: -30px;
  pointer-events: none;
  background:
    linear-gradient(var(--orange), var(--orange)) 0 16px / 58% 1px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 16px 0 / 1px 58% no-repeat,
    linear-gradient(var(--orange), var(--orange)) 100% calc(100% - 16px) / 42% 1px no-repeat,
    linear-gradient(var(--orange), var(--orange)) calc(100% - 16px) 100% / 1px 42% no-repeat;
}

/* ---------- Header: white bar so the full-colour logo reads cleanly ---------- */
.site-header { background: var(--white); color: var(--navy); }
.site-header .bar {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter);
}
.logo { display: block; line-height: 0; }
.logo img { width: 240px; height: auto; }
.nav { display: flex; align-items: center; gap: 40px; font-size: 22px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--orange); }
.nav .btn { padding: 18px 26px; border-bottom: 0; color: var(--ink); font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(calc(100svh - 168px), 860px);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy);
}
/* Background video sits under the still image; the still fades out once the video is playing. */
.hero-video { position: absolute; inset: 0; z-index: -3; overflow: hidden; container-type: size; }
.hero-video iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw);
  border: 0; pointer-events: none;
}
.hero-photo {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 72% 50%;
  transition: opacity 0.9s ease;
}
.hero.video-on .hero-photo { opacity: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 24, 55, 0.94) 0%, rgba(0, 24, 55, 0.82) 30%, rgba(0, 24, 55, 0.3) 60%, rgba(0, 24, 55, 0) 82%),
    linear-gradient(0deg, var(--navy) 0%, rgba(0, 24, 55, 0) 26%);
}

.hero-body {
  flex: 1; display: flex; align-items: center;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 90px var(--gutter) 110px;
}
.hero-copy { max-width: 640px; }
.hero-copy.drafted::before {
  animation:
    draft 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both,
    redraw 5.5s ease-in-out 1.85s infinite alternate;
}
@keyframes draft {
  from { background-size: 0 1px, 1px 0, 0 1px, 1px 0; }
  to   { background-size: 58% 1px, 1px 58%, 42% 1px, 1px 42%; }
}
/* After the first draw the four lines keep lengthening and shortening against each other. */
@keyframes redraw {
  from { background-size: 58% 1px, 1px 58%, 42% 1px, 1px 42%; }
  to   { background-size: 30% 1px, 1px 86%, 70% 1px, 1px 22%; }
}
h1 { font-size: clamp(44px, 6.1vw, 86px); line-height: 1.03; }
.hero-copy .lede { margin-top: 28px; font-size: clamp(19px, 1.6vw, 22px); color: #E3E8EF; max-width: 30em; }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }
.hero-phone { font-size: 30px; font-weight: 600; text-decoration: none; letter-spacing: 0; }
.hero-phone:hover { color: var(--orange); }

/* ---------- Services ---------- */
.services { padding: clamp(90px, 11vw, 170px) 0 clamp(70px, 9vw, 130px); }
.services-intro { max-width: 760px; margin-bottom: clamp(80px, 9vw, 140px); }
h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.08; }
.services-intro p { margin-top: 24px; color: var(--mist); font-size: 20px; max-width: 32em; }

.service {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}
.service + .service { margin-top: clamp(100px, 12vw, 180px); }
.service.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.service.flip .service-photo { order: 2; }
.service-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.service-text .service-name { font-size: 22px; font-weight: 500; color: var(--orange); margin: 0 0 14px; }
.service h3 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; }
.service-text p { margin-top: 22px; color: var(--mist); max-width: 26em; }
.service-text .more {
  display: inline-block; margin-top: 28px;
  font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--orange); padding-bottom: 4px;
}
.service-text .more:hover { color: var(--orange); }

/* ---------- About (white band) ---------- */
.about { background: var(--white); color: var(--ink); padding: clamp(84px, 10vw, 150px) 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 110px); align-items: end; }
.about h2 { color: var(--navy); }
.about-grid > div > p { margin-top: 26px; font-size: 20px; max-width: 30em; color: #33383f; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--orange); }
.facts li { padding: 20px 0; border-bottom: 1px solid #dcdcdc; font-size: 24px; font-weight: 500; color: var(--navy); }

/* ---------- Recent projects ---------- */
.projects { padding: clamp(90px, 10vw, 150px) 0 clamp(80px, 9vw, 130px); }
.projects-intro { max-width: 760px; margin-bottom: clamp(44px, 5vw, 72px); }
.projects-intro p { margin-top: 20px; color: var(--mist); font-size: 20px; }
.pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 3.4vw, 60px); }
.pair { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.shot { position: relative; }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tag {
  position: absolute; left: 0; bottom: 0;
  background: var(--navy); color: var(--white);
  font-size: 15px; font-weight: 500; padding: 7px 14px;
}
.tag.after { background: var(--orange); color: var(--ink); font-weight: 600; }
.projects h3 { font-size: 28px; font-weight: 500; margin: clamp(64px, 7vw, 104px) 0 28px; }
.finished { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 24px); }
.finished img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Estimate ---------- */
.estimate { background: var(--navy-deep); padding: clamp(90px, 11vw, 160px) 0 clamp(80px, 9vw, 130px); }
.estimate-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(48px, 7vw, 110px); align-items: start; }
.estimate p.lede { margin-top: 24px; color: var(--mist); font-size: 20px; max-width: 26em; }
.ways { list-style: none; margin: 44px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.ways li { padding: 28px 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.way-label { font-size: 22px; font-weight: 500; color: var(--orange); }
.way-value { display: block; font-size: clamp(20px, 2vw, 26px); font-weight: 500; margin-top: 4px; overflow-wrap: anywhere; }
.ways .btn { padding: 16px 24px; }

/* Contact form: the WPForms shortcode renders here once the page is in WordPress */
.form-slot { background: var(--white); color: var(--ink); padding: clamp(24px, 3vw, 44px); }
.form-slot h3 { font-size: 28px; color: var(--navy); margin-bottom: 18px; }
.form-slot.is-placeholder .shortcode {
  display: block; border: 1px dashed #9aa3b0; padding: 28px 22px; text-align: center;
  font-size: 16px; color: #4a5260;
}
.form-slot.is-placeholder .shortcode code { display: block; margin-top: 8px; font-family: inherit; font-weight: 600; color: var(--navy); font-size: 18px; }
.form-slot .wpforms-container { margin: 0; font-family: inherit; }
.form-slot .wpforms-field-label { font-weight: 500; color: var(--navy); font-size: 17px; }
.form-slot .wpforms-container input[type="text"],
.form-slot .wpforms-container input[type="email"],
.form-slot .wpforms-container input[type="tel"],
.form-slot .wpforms-container select,
.form-slot .wpforms-container textarea {
  font-family: inherit; font-size: 17px; border: 1px solid #b9c0ca; border-radius: 0; padding: 12px 14px; max-width: 100%;
}
.form-slot .wpforms-container button[type="submit"] {
  background: var(--orange); color: var(--ink); border: 0; border-radius: 0;
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 20px 30px; height: auto; cursor: pointer;
}
.form-slot .wpforms-container button[type="submit"]:hover { background: #ffa55c; }

footer { background: var(--ink); color: #b9b9b9; font-size: 16px; padding: 44px 0 52px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; }
.foot strong { color: var(--white); font-weight: 500; }

/* ---------- Lightbox ---------- */
.zoomable { cursor: zoom-in; }
.lightbox {
  border: 0; padding: 0; margin: 0; background: rgba(0, 10, 24, 0.96); color: var(--white);
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
}
.lightbox::backdrop { background: rgba(0, 10, 24, 0.9); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: 16px; color: var(--mist); }
.lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 clamp(8px, 6vw, 96px); }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-caption { padding: 16px 24px 24px; text-align: center; font-size: 17px; color: var(--mist); min-height: 66px; }
.lb-btn {
  font: inherit; color: var(--white); background: transparent; border: 1px solid rgba(255, 255, 255, 0.4);
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; padding: 0;
}
.lb-btn:hover { border-color: var(--orange); color: var(--orange); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 24, 55, 0.7); }
.lb-prev { left: clamp(8px, 2vw, 28px); }
.lb-next { right: clamp(8px, 2vw, 28px); }

.callbar { display: none; }

@media (max-width: 1340px) {
  .nav { gap: 26px; }
  .nav .btn { display: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  body { font-size: 17px; padding-bottom: 64px; }
  .nav { display: none; }
  .site-header .bar { padding: 12px var(--gutter); }
  .logo img { width: 200px; }
  .hero { min-height: 0; }
  .hero-photo { object-position: 78% 50%; }
  .hero::after {
    background: linear-gradient(180deg, rgba(0, 24, 55, 0.2) 0%, rgba(0, 24, 55, 0.62) 36%, var(--navy) 80%);
  }
  .hero { min-height: 560px; }
  .hero-body { padding: 120px var(--gutter) 84px; align-items: flex-end; }
  .drafted::before { inset: -18px; }
  .hero-copy.drafted::before { inset: -26px -22px; }
  .service, .about-grid, .estimate-grid { grid-template-columns: minmax(0, 1fr); }
  .service.flip .service-photo { order: 0; }
  .service { gap: 46px; }
  .about-grid { align-items: start; }
  .pairs { grid-template-columns: minmax(0, 1fr); }
  .finished { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tag { font-size: 13px; padding: 5px 10px; }
  .callbar {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: 64px;
    background: var(--orange); color: var(--ink);
    font-weight: 600; font-size: 19px; text-decoration: none;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.28);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .callbar svg { width: 20px; height: 20px; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy.drafted::before { animation: none; }
  .hero-photo { transition: none; }
  .btn { transition: none; }
}

/* Mobile menu (hamburger) */
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .site-header { position: relative; z-index: 20; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 48px; height: 48px; padding: 0 10px; margin-right: -10px;
    background: none; border: 0; color: var(--navy); cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 14px; font-size: 20px;
    background: var(--white); border-top: 1px solid rgba(0, 24, 55, 0.12);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid rgba(0, 24, 55, 0.12); }
  .nav a:nth-last-child(2) { border-bottom-color: transparent; }

  /* Flipped services stack like the others, so every service photo is full width */
  .service.flip { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .menu-toggle span { transition: none; }
}

/* Contact form: Submit button in brand orange */
div.wpforms-container {
  --wpforms-button-background-color: var(--orange) !important;
  --wpforms-button-border-color: var(--orange) !important;
  --wpforms-button-text-color: var(--ink) !important;
}
div.wpforms-container .wpforms-form button.wpforms-submit {
  background-color: var(--orange) !important;
  border-color: var(--orange) !important;
  color: var(--ink) !important;
}
div.wpforms-container .wpforms-form button.wpforms-submit:hover,
div.wpforms-container .wpforms-form button.wpforms-submit:focus-visible { background-color: #FFA55C !important; }
