/* ============================================================
   WESTSHORE ROOFING CO., styles.css
   Palette: Off-white bg, charcoal text, rust/terra-cotta accent
   Type: Inter (single family)
============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F7F5F2;
  --bg-muted:  #EEEBE6;
  --text:      #1E1E1E;
  --muted:     #6B6560;
  --accent:    #B94B2A;
  --accent-dk: #95361B;
  --white:     #FFFFFF;
  --border:    #DDD9D3;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  --radius: 4px;
  --max-w: 1120px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-dk); }

ul { list-style: none; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ---------- Sections ---------- */
.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section--muted {
  background-color: var(--bg-muted);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
  margin-top: 0.75rem;
  margin-bottom: var(--space-lg);
}

/* ---------- Typography ---------- */
h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-dk);
  border-color: var(--accent-dk);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn-outline:hover {
  background-color: var(--text);
  color: var(--white);
}

.btn-lg {
  font-size: 1rem;
  padding: 1rem 2rem;
}

.btn-full { width: 100%; text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-desktop {
  display: none;
  margin-left: auto;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-desktop a:hover { color: var(--accent); }

.header-cta {
  display: none;
  margin-left: 1.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-mobile[hidden] { display: none; }

.nav-mobile a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-mobile .btn { text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-image-wrap {
  position: relative;
  height: 520px;
}

@media (max-width: 600px) {
  .hero-image-wrap { height: 480px; }
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  max-height: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 8, 6, 0.72) 0%,
    rgba(10, 8, 6, 0.45) 55%,
    rgba(10, 8, 6, 0.15) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
  max-width: 640px;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 44ch;
  margin-top: 1.25rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ---------- Trust Bar ---------- */
.trust-bar {
  background-color: var(--text);
  color: var(--white);
  padding: 1.75rem 0;
}

.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 1.25rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
  text-align: center;
  min-width: 130px;
}

.trust-num {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.02em;
}

.trust-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 0.35rem;
}

.trust-divider {
  width: 1px;
  height: 40px;
  background-color: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

@media (max-width: 580px) {
  .trust-divider { display: none; }
  .trust-inner { gap: 1rem; }
  .trust-item { padding: 0 1rem; min-width: 110px; }
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card--plain .service-body {
  padding: 1.75rem 1.5rem;
}

.service-img-wrap {
  overflow: hidden;
}

.service-img-wrap img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.service-card:hover .service-img-wrap img {
  transform: scale(1.03);
}

.service-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.service-body h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.service-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 1rem;
}

.about-text .btn { margin-top: 0.75rem; }

.about-image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
}

.about-image-wrap img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ---------- Area ---------- */
.area-inner {
  max-width: 640px;
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.5rem 0;
}

.area-list li {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--white);
}

.area-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact-text h2 { margin-bottom: 0.75rem; }

.contact-text > p {
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: 1.5rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-details li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.contact-detail-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-details a,
.contact-details span {
  font-size: 0.975rem;
  color: var(--text);
}

.contact-details a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Form */
.contact-form {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.875rem;
  width: 100%;
  transition: border-color 0.15s ease;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); opacity: 0.7; }

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #c0392b;
}

.field-error {
  font-size: 0.78rem;
  color: #c0392b;
  min-height: 1em;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.875rem;
  margin-bottom: 0;
}

.form-note a { color: var(--accent); }

.form-success {
  background-color: #edf7ed;
  border: 1px solid #a3d4a4;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #2e7d32;
}

.form-success p { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--text);
  color: rgba(255,255,255,0.55);
  padding: 3rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
}

.footer-brand .logo-mark {
  background-color: var(--accent);
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.25rem;
}

.footer-address,
.footer-lic,
.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0;
}

/* ---------- Responsive: Tablet 640px+ ---------- */
@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-img-wrap img {
    max-height: 220px;
  }
}

/* ---------- Responsive: Desktop 900px+ ---------- */
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-block; }
  .nav-toggle { display: none; }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .about-image-wrap img {
    max-height: 400px;
  }

  .contact-inner {
    grid-template-columns: 1fr 1fr;
  }
}