/* Vilord Construction — shared stylesheet */

:root {
  --navy: #1b2a3a;
  --navy-dark: #121e29;
  --orange: #d9711f;
  --orange-dark: #b85b13;
  --cream: #f7f4ee;
  --gray: #5a6472;
  --border: #e0dcd2;
  --white: #ffffff;
  --radius: 8px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #2a2f36;
  background: var(--white);
  line-height: 1.6;
}

img,
picture,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--navy);
  margin-top: 0;
}

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

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 12px;
}

.brand {
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--orange);
}

.brand small {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #b9c2cc;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.main-nav {
  display: flex;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--white);
  padding: 10px 14px;
  display: inline-block;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a:focus {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.main-nav a.current {
  background: var(--orange);
}

.main-nav .nav-cta {
  background: var(--orange);
}

.main-nav .nav-cta:hover {
  background: var(--orange-dark);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-nav.open {
    display: block;
  }

  .site-header .wrap {
    flex-wrap: wrap;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 0 18px;
  }

  .main-nav a {
    padding: 12px 14px;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 64px 0;
}

.hero h1 {
  color: var(--white);
  font-size: 2.4rem;
  max-width: 720px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 620px;
  color: #dbe1e8;
}

.hero.small {
  padding: 42px 0;
}

/* Parallax hero (homepage only): a background <img> layered behind the
   existing gradient overlay and foreground content. The overlay keeps
   the heading/CTA readable over a photo instead of a flat color. The
   image is oversized (140% height, -20% top) so the scroll-based
   translateY in hero-parallax.js has room to move without exposing
   empty edges. .hero's own gradient background stays as a fallback
   directly beneath the image (visible if the image is slow to load or
   JS is unavailable to run the parallax script). */
.hero-parallax {
  position: relative;
  overflow: hidden;
}

.hero-parallax .hero-bg {
  position: absolute;
  top: -20%;
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  z-index: 0;
}

.hero-parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27, 42, 58, 0.85) 0%, rgba(18, 30, 41, 0.85) 100%);
  z-index: 1;
}

.hero-parallax .wrap {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero-parallax .hero-bg {
    transform: none !important;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background: var(--orange-dark);
  text-decoration: none;
  color: var(--white);
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn.outline-navy {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}

.btn.outline-navy:hover {
  background: var(--navy);
  color: var(--white);
}

/* ---------- Sections ---------- */

section {
  padding: 56px 0;
}

section.alt {
  background: var(--cream);
}

.section-title {
  text-align: center;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: var(--gray);
  max-width: 620px;
  margin: 0 auto 36px;
}

/* ---------- Service cards / grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.card p {
  color: var(--gray);
  margin-bottom: 14px;
}

.card a.card-link {
  font-weight: 700;
}

/* ---------- Service detail sections (Services page) ---------- */

.service-block {
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.service-block:last-of-type {
  border-bottom: none;
}

.service-block h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.service-block .service-num {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 6px;
}

.placeholder-img {
  background: repeating-linear-gradient(
    45deg,
    #e9e5da,
    #e9e5da 12px,
    #dfd9c9 12px,
    #dfd9c9 24px
  );
  border: 1px dashed #b7ad95;
  border-radius: var(--radius);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7261;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 12px;
  margin-top: 16px;
}

/* ---------- Towns / Service Area ---------- */

.town-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin: 36px 0;
}

.town-card {
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
}

.town-card h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.town-card span {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--orange);
  color: var(--white);
  text-align: center;
  padding: 48px 0;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: #fff3e9;
  max-width: 560px;
  margin: 0 auto 24px;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}

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

.contact-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.contact-card h3 {
  margin-bottom: 6px;
}

.contact-card .big-link {
  font-size: 1.3rem;
  font-weight: 700;
  display: inline-block;
  margin-top: 4px;
}

.quote-callout {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 34px 28px;
  text-align: center;
}

.quote-callout h3 {
  color: var(--white);
}

.quote-callout p {
  color: #dbe1e8;
  margin-bottom: 20px;
}

/* ---------- Placeholder testimonial note ---------- */

.placeholder-note {
  border: 1px dashed #b7ad95;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--gray);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #cfd6dd;
  padding: 40px 0 24px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 10px;
}

.site-footer p,
.site-footer a {
  color: #cfd6dd;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  color: var(--white);
}

.footer-towns {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-towns li {
  margin-bottom: 4px;
}

.footer-bottom {
  border-top: 1px solid #2a3a4a;
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.85rem;
  color: #8b97a3;
  text-align: center;
}

/* ---------- Request a Quote form ---------- */

.quote-form-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  margin-bottom: 20px;
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row-split {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-row-split > div {
    margin-bottom: 20px;
  }
}

.quote-form-wrap label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.quote-form-wrap .req {
  color: var(--orange-dark);
}

.quote-form-wrap .opt {
  font-weight: 400;
  color: var(--gray);
  font-size: 0.85rem;
}

.quote-form-wrap input[type="text"],
.quote-form-wrap input[type="tel"],
.quote-form-wrap input[type="email"],
.quote-form-wrap select,
.quote-form-wrap textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: #2a2f36;
  background: var(--white);
}

.quote-form-wrap input:focus,
.quote-form-wrap select:focus,
.quote-form-wrap textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.form-hint {
  color: var(--gray);
  font-size: 0.9rem;
  margin: -12px 0 20px;
}

.form-alert {
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.form-alert-error {
  background: #fdecea;
  border: 1px solid #e3a49c;
  color: #7a2118;
  font-weight: 600;
}

.form-alert-success {
  background: #e9f5ec;
  border: 1px solid #a6d9b3;
  color: #1e5b2f;
}

.form-alert-success h3 {
  color: #1e5b2f;
  margin-bottom: 6px;
}

/* ---------- Login page (server/views/login.html) ---------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
}

.auth-card h1 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.auth-card p.auth-sub {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.auth-card label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.auth-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 18px;
}

.auth-card .btn {
  width: 100%;
  text-align: center;
}

/* ---------- Dashboard (server/views/dashboard.html) ---------- */

.dash-header {
  background: var(--navy);
  color: var(--white);
}

.dash-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-header .brand {
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
}

.dash-logout-form {
  margin: 0;
}

.dash-state {
  color: var(--gray);
  text-align: center;
  padding: 40px 0;
}

table.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

table.leads-table th,
table.leads-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.92rem;
  vertical-align: top;
}

table.leads-table th {
  background: var(--cream);
  color: var(--navy);
  font-weight: 700;
}

.leads-table-wrap {
  overflow-x: auto;
}

.status-select {
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.notes-cell textarea {
  width: 100%;
  min-width: 180px;
  min-height: 60px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
}

.notes-save-btn {
  margin-top: 6px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.notes-save-btn:hover {
  background: var(--navy-dark);
}

.save-indicator {
  font-size: 0.8rem;
  color: #1e5b2f;
  margin-left: 8px;
}

/* ---------- Misc utility ---------- */

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

ul.plain-list {
  padding-left: 20px;
}

ul.plain-list li {
  margin-bottom: 8px;
}
