/* ============================================================
   Tracy Window Cleaning Co. — Template Design System
   Generic, photo-driven local-contractor look per
   shared-rules/homepage-structure.md "Visual Reference".
   Navy + gold, boxy buttons, full-bleed photography.
   ============================================================ */

:root {
  --navy: #14243f;
  --navy-light: #1f3a63;
  --gold: #c99a2e;
  --gold-dark: #a67e1f;
  --white: #ffffff;
  --off-white: #f4f6f8;
  --gray: #5b6672;
  --gray-light: #dde2e6;
  --text: #212b36;

  --radius: 4px;
  --shadow: 0 2px 10px rgba(20, 36, 63, 0.12);
  --max-width: 1180px;

  --font-heading: "Oswald", Impact, "Arial Narrow", sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

a {
  color: var(--navy-light);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

p {
  margin: 0 0 1.1em;
}

strong {
  color: var(--navy);
  font-weight: 700;
}

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

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.6em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95em 1.9em;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  background: var(--gold-dark);
}

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

.btn-navy:hover {
  background: var(--navy-light);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

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

.btn-line {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

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

.phone-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.phone-link svg {
  vertical-align: -3px;
  margin-right: 0.35em;
}

/* ---------- Call badge (big icon + CALL NOW pattern) ---------- */
.call-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  background: var(--gold);
  color: var(--navy);
  padding: 0.6em 1.5em 0.6em 0.6em;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.call-badge:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.call-badge .call-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.call-badge .call-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.call-badge .call-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.call-badge .call-number {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.call-badge-sm {
  padding: 0.4em 1.2em 0.4em 0.4em;
}

.call-badge-sm .call-icon {
  width: 36px;
  height: 36px;
}

.call-badge-sm .call-number {
  font-size: 1.02rem;
}

.btn-xl {
  padding: 1.15em 2.4em;
  font-size: 1.1rem;
}

.hero-phone-big {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  color: var(--white);
  text-decoration: none;
  margin: 0.2em 0 1.1em;
  padding: 0.3em 0.9em 0.3em 0.3em;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.hero-phone-big:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--white);
  transform: translateY(-1px);
}

.hero-phone-big .call-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--navy);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg, 2.5rem);
}

.nav-links {
  display: flex;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--gold-dark);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-cta .phone-link {
  color: var(--navy);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero (full-bleed photo) ---------- */
.hero {
  position: relative;
  background: var(--navy) center/cover no-repeat;
  padding: 7rem 0 6rem;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 36, 63, 0.88) 0%, rgba(20, 36, 63, 0.72) 55%, rgba(20, 36, 63, 0.45) 100%);
}

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

.hero-inner {
  max-width: 640px;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8em;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.3em;
}

.hero .tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
}

.hero-phone {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: block;
  margin: 0.4em 0 1.4em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  gap: 1.6rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.hero-badge svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* Page hero for service pages (shorter, same photo treatment) */
.page-hero {
  position: relative;
  background: var(--navy) center/cover no-repeat;
  padding: 4rem 0 3.5rem;
  color: var(--white);
}

.page-hero .hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 36, 63, 0.85) 0%, rgba(20, 36, 63, 0.68) 50%, rgba(20, 36, 63, 0.38) 100%);
}

.inline-photo {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 2.5rem 0;
}

/* For portrait photos placed inline within text: float at a modest
   size and keep the natural aspect ratio instead of force-cropping
   into a landscape strip. Text wraps around it. */
.inline-photo-float {
  float: right;
  width: 42%;
  max-width: 320px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0.3rem 0 1.25rem 1.5rem;
}

@media (max-width: 640px) {
  .inline-photo-float {
    float: none;
    width: 100%;
    max-width: none;
    margin: 1.5rem 0;
  }
}

.page-hero .wrap {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--white);
  max-width: 24ch;
}

.page-hero .eyebrow {
  color: var(--gold);
}

.page-hero .tagline {
  color: rgba(255, 255, 255, 0.85);
  max-width: 60ch;
  font-size: 1.05rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.8em;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0;
}

.section-tight {
  padding: 3rem 0;
}

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

.section-head {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: start;
}

.two-col > div:last-child {
  position: sticky;
  top: 100px;
}

.two-col img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.local-fact {
  clear: both;
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  padding: 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.98rem;
}

.local-fact strong {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 1rem;
  margin-bottom: 0.4em;
  color: var(--navy);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.chip-list li {
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  padding: 0.5em 1em;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.service-card img {
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  width: 100%;
}

.service-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}

.service-card h3 {
  margin-bottom: 0.1em;
}

.service-card p {
  color: var(--gray);
  font-size: 0.98rem;
  margin-bottom: 0;
}

.service-card .card-link {
  margin-top: auto;
  padding-top: 0.6em;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.addon-note {
  margin-top: 1.75rem;
  font-size: 0.95rem;
  color: var(--gray);
  background: var(--off-white);
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1em 1.3em;
  display: block;
}

.addon-note a {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--off-white);
  padding: 4rem 0;
}

.trust-strip .wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: center;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.trust-item .icon {
  color: var(--gold-dark);
}

.trust-item h4 {
  font-size: 1rem;
  margin-bottom: 0.1em;
}

.trust-item p {
  color: var(--gray);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Content list styles ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  display: grid;
  gap: 0.7em;
}

.check-list li {
  display: flex;
  gap: 0.7em;
  align-items: flex-start;
}

.check-list li svg {
  flex-shrink: 0;
  margin-top: 0.25em;
  color: var(--gold-dark);
}

.callout {
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.75rem;
  margin: 2.5rem 0;
}

.callout h3 {
  margin-bottom: 0.4em;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--gray-light);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2em 0;
  font-family: var(--font-heading);
  text-transform: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item .faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--off-white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--gold);
  color: var(--navy);
}

.faq-item .faq-answer {
  padding: 0 0 1.4em;
  color: var(--gray);
  max-width: 68ch;
}

.faq-item .faq-answer p:last-child {
  margin-bottom: 0;
}

/* ---------- Contact form ---------- */
.contact-section {
  background: var(--navy);
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.contact-grid h2 {
  color: var(--white);
}

.contact-grid .tagline {
  color: rgba(255, 255, 255, 0.78);
}

.contact-form {
  background: var(--white);
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
}

.quote-banner {
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  padding: 0.9em 1em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: -2rem -2rem 1.5rem -2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--off-white);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
}

.contact-form .btn {
  width: 100%;
  margin-top: 0.3em;
}

.form-note {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.8em;
  text-align: center;
}

.form-success {
  display: none;
  background: #eaf3ea;
  border: 1.5px solid #4a8f4a;
  color: #2c5c2c;
  border-radius: var(--radius);
  padding: 1em 1.2em;
  font-weight: 700;
  margin-bottom: 1rem;
}

.form-success.visible {
  display: block;
}

.form-error {
  display: none;
  background: #fbeaea;
  border: 1.5px solid #b34a4a;
  color: #7a2c2c;
  border-radius: var(--radius);
  padding: 1em 1.2em;
  font-weight: 700;
  margin-bottom: 1rem;
}

.form-error.visible {
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 4rem 0 1.5rem;
  border-top: 4px solid var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 0.8em;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 1em;
}

.footer-grid p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7em;
}

.footer-grid a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.94rem;
}

.footer-grid a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  flex-wrap: wrap;
  gap: 0.6em;
}

/* ---------- Final CTA band (service pages) ---------- */
.cta-band {
  background: var(--gold);
  padding: 3rem 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--navy);
  margin-bottom: 0.3em;
}

.cta-band .tagline {
  color: var(--navy);
  margin: 0 auto 1.5rem;
}

.cta-band-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-col,
  .contact-grid,
  .footer-grid,
  .trust-strip .wrap {
    grid-template-columns: 1fr;
  }

  /* On a single stacked column, DOM order would bury the form under
     the full text column. Show the form first, sticky positioning
     doesn't apply to a single-column stack anyway. */
  .two-col > div:first-child {
    order: 2;
  }

  .two-col > div:last-child {
    order: 1;
    position: static;
    margin-bottom: 2.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 84px;
    right: 0;
    left: 0;
    height: calc(100vh - 84px);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5rem 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .header-cta {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1rem;
    margin-top: 2rem;
  }

  .menu-toggle {
    display: flex;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 5rem 0 3.5rem;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
