/*
  Global styles for Metro Property Care

  Sections:
    1. Reset & Variables
    2. Typography & Base
    3. Splash Overlay
    4. Header & Navigation
    5. Hero Section (homepage redesign)
    6. "What Do We Offer" Section
    7. "Who Are We?" Section
    8. Quote Form
    9. Content Sections (shared)
    10. Cards & Grids
    11. Buttons & Links
    12. Support / Trust Strips (subpages)
    13. Footer
    14. Reveal Animations & no-js Fallback
    15. Subpage-specific (page-hero, tiles, categories)
    16. Responsive
*/

/* ========================================================================
   1. Reset & Variables
   ======================================================================== */

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

:root {
  color-scheme: light;
  --color-background: #f7f7f5;
  --color-surface: #ffffff;
  --color-surface-muted: #f1f1ee;
  --color-text-primary: #0b0d10;
  --color-text-secondary: #52525b;
  --color-border: rgba(11, 13, 16, 0.1);
  --color-accent: #66748a;
  --header-height: 64px;
  --max-width: 1120px;
  --section-padding: 96px;
  --motion-fast: 150ms;
  --motion-base: 240ms;
  --motion-slow: 460ms;
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

/* ========================================================================
   2. Typography & Base
   ======================================================================== */

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

main {
  padding-top: var(--header-height);
}

section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================================================
   3. Splash Overlay
   ======================================================================== */

.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0b0d10;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 1;
  transition: opacity 280ms var(--motion-ease);
  pointer-events: none;
  overflow: hidden;
}

.splash-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 55%, rgba(0,0,0,0.4) 100%);
  opacity: 1;
  transition: opacity 280ms var(--motion-ease);
  z-index: 0;
}

.splash-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-overlay.hidden::before {
  opacity: 0;
}

.splash-overlay.hidden .splash-logo {
  animation: none;
}

.splash-logo {
  width: min(85vw, 1100px);
  max-height: 75vh;
  height: auto;
  animation: splash-in 1000ms var(--motion-ease) forwards;
  position: relative;
  z-index: 1;
  will-change: opacity, transform, filter;
}

@keyframes splash-in {
  from { opacity: 0; transform: scale(0.95); filter: blur(10px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0);    }
}

/* ========================================================================
   4. Header & Navigation
   ======================================================================== */

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.5rem;
  background-color: transparent;
  isolation: isolate;
  z-index: 100;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(247, 247, 245, 0.92);
  opacity: 0;
  transition: background-color var(--motion-base) var(--motion-ease),
              opacity var(--motion-base) var(--motion-ease);
  z-index: -1;
}

.site-header.scrolled::before {
  opacity: 1;
}

.logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  transition: color var(--motion-fast) var(--motion-ease);
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

/* Header CTA button */
.header-cta {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.nav-toggle .toggle-icon {
  width: 18px;
  height: 2px;
  background-color: currentColor;
  position: relative;
  display: inline-block;
}

.nav-toggle .toggle-icon::before,
.nav-toggle .toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  transition: transform var(--motion-fast) var(--motion-ease);
}

.nav-toggle .toggle-icon::before {
  transform: translateY(-6px);
}

.nav-toggle .toggle-icon::after {
  transform: translateY(6px);
}

.site-header.nav-open .nav-toggle .toggle-icon {
  background-color: transparent;
}

.site-header.nav-open .nav-toggle .toggle-icon::before {
  transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle .toggle-icon::after {
  transform: rotate(-45deg);
}

/* ========================================================================
   5. Hero Section (homepage redesign)
   ======================================================================== */

.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-image: url("assets/background.png");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(11, 13, 16, 0.55);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
}

.hero-headline {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 2px #ffffff;
  text-stroke: 2px #ffffff;
  /* Fallback for browsers without text-stroke */
  paint-order: stroke fill;
}

/* Fallback for text-stroke: use a text-shadow outline */
@supports not (-webkit-text-stroke: 1px #fff) {
  .hero-headline {
    color: transparent;
    text-shadow:
      -2px -2px 0 #fff,
       2px -2px 0 #fff,
      -2px  2px 0 #fff,
       2px  2px 0 #fff;
  }
}

.hero-divider {
  width: 80px;
  height: 3px;
  background-color: #ffffff;
  margin: 1.5rem auto;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* ========================================================================
   6. "What Do We Offer" Section
   /* Offer Section */
   ======================================================================== */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--max-width);
}

.offer-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(11, 13, 16, 0.04);
  transition: transform var(--motion-base) var(--motion-ease),
              box-shadow var(--motion-base) var(--motion-ease);
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(11, 13, 16, 0.1);
}

.offer-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-surface-muted);
}

.offer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.offer-card h3 {
  margin: 1rem 1.25rem 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.offer-card p {
  margin: 0 1.25rem 1.25rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* ========================================================================
   7. "Who Are We?" Section
   /* About Collage */
   ======================================================================== */

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: var(--max-width);
}

.about-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
}

.collage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background-color: var(--color-surface-muted);
  display: block;
  min-height: 140px;
  aspect-ratio: auto;
}

.collage-img--tall {
  grid-column: 2;
  grid-row: 1 / 3;
}

.about-copy {
  padding-top: 0.5rem;
}

.about-copy p {
  margin: 0 0 1.25rem;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

/* ========================================================================
   8. Quote Form
   ======================================================================== */

.quote-form {
  max-width: 840px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 14px 32px rgba(11, 13, 16, 0.05);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.form-field span {
  color: var(--color-text-primary);
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  font-family: inherit;
  background-color: #ffffff;
  transition: border-color var(--motion-fast) var(--motion-ease);
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(102, 116, 138, 0.6);
}

.form-field textarea {
  resize: vertical;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-footer {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.privacy-text {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* ========================================================================
   9. Content Sections (shared)
   ======================================================================== */

.content-section {
  padding: var(--section-padding) 2.5rem;
  background-color: var(--color-surface);
}

.surface-muted {
  background-color: var(--color-surface-muted);
}

.section-header {
  max-width: 720px;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin: 0 0 1rem;
  font-size: 2.1rem;
  font-weight: 600;
}

.section-header p {
  margin: 0;
  color: var(--color-text-secondary);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.split-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  color: var(--color-text-secondary);
}

/* ========================================================================
   10. Cards & Grids
   ======================================================================== */

.cards-grid,
.standards-grid,
.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 160px;
  box-shadow: 0 12px 32px rgba(11, 13, 16, 0.04);
}

.card-link {
  text-decoration: none;
  color: inherit;
  transition: border-color var(--motion-base) var(--motion-ease);
}

.card-link:hover {
  border-color: rgba(11, 13, 16, 0.2);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: var(--color-text-secondary);
}

.contact-card {
  max-width: 680px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.75rem;
  color: var(--color-text-secondary);
}

/* ========================================================================
   11. Buttons & Links
   ======================================================================== */

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--motion-ease),
              color var(--motion-fast) var(--motion-ease),
              border-color var(--motion-fast) var(--motion-ease),
              opacity var(--motion-fast) var(--motion-ease),
              transform var(--motion-fast) var(--motion-ease);
}

.button-primary {
  background-color: var(--color-accent);
  color: #ffffff;
}

.button-primary:hover {
  opacity: 0.92;
}

.button-primary:active,
.button-secondary:active {
  transform: translateY(1px);
}

.button-secondary {
  border-color: var(--color-border);
  color: var(--color-text-primary);
  background-color: #ffffff;
}

.button-secondary:hover {
  border-color: rgba(11, 13, 16, 0.2);
}

.link-cta {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--motion-fast) var(--motion-ease),
              color var(--motion-fast) var(--motion-ease);
}

.link-cta:hover {
  border-bottom-color: currentColor;
}

.hero-helper {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

/* ========================================================================
   12. Support / Trust Strips (subpages)
   ======================================================================== */

.support-band {
  background-color: var(--color-surface);
}

.support-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.support-inner h2 {
  margin: 0 0 0.75rem;
  font-size: 1.8rem;
}

.support-inner p {
  margin: 0;
  color: var(--color-text-secondary);
}

.support-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trust-strip {
  padding: 3.5rem 2.5rem;
}

.trust-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  background-color: var(--color-surface);
}

.trust-title {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.trust-points {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* ========================================================================
   13. Footer
   ======================================================================== */

.site-footer {
  text-align: center;
  padding: 2.5rem 2rem 2rem;
  background-color: var(--color-background);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.footer-attribution {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(82, 82, 91, 0.7);
}

.footer-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-attribution a {
  text-decoration: none;
  color: inherit;
}

/* ========================================================================
   14. Reveal Animations & no-js Fallback
   ======================================================================== */

.reveal-heading {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-slow) var(--motion-ease),
              transform var(--motion-slow) var(--motion-ease);
}

.reveal-fade {
  opacity: 0;
  transition: opacity var(--motion-base) var(--motion-ease);
}

.reveal-heading.is-visible,
.reveal-fade.is-visible {
  opacity: 1;
}

.reveal-heading.is-visible {
  transform: translateY(0);
}

/* no-js fallback: when JS fails, content is immediately visible */
.no-js .reveal-heading,
.no-js .reveal-fade {
  opacity: 1;
  transform: none;
}

/* ========================================================================
   15. Subpage-specific (page-hero, tiles, categories, checklist)
   ======================================================================== */

.page-hero {
  padding: calc(var(--section-padding) - 32px) 0 48px;
}

.page-hero .section-header {
  margin-bottom: 0;
}

.page-hero p {
  max-width: 720px;
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: 2.4rem;
  font-weight: 600;
}

.tile-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tile-link {
  text-decoration: none;
  height: 100%;
  display: block;
}

.tile-link span {
  color: var(--color-accent);
  font-weight: 600;
}

.category-section {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
}

.category-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
}

.category-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.category-section .category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.checklist {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--color-text-secondary);
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* ========================================================================
   16a. Image Cleanup & Standardization
   ======================================================================== */

.img-responsive {
  display: block;
  width: 100%;
  height: auto;
}

/* ========================================================================
   16b. Responsive
   ======================================================================== */

@media (max-width: 900px) {
  :root {
    --section-padding: 72px;
  }

  .site-header {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(11, 13, 16, 0.08);
    min-width: 220px;
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* Hide header CTA on mobile; it goes into mobile nav */
  .header-cta {
    display: none;
  }

  .hero-section {
    min-height: 70vh;
    padding: 0 1.5rem;
  }

  .hero-headline {
    font-size: clamp(2rem, 8vw, 3.2rem);
    -webkit-text-stroke-width: 1.5px;
  }

  .offer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .support-inner,
  .trust-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 56px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-footer {
    align-items: flex-start;
  }

  .splash-logo {
    width: 92vw;
  }

  .about-collage {
    grid-template-columns: 1fr;
  }

  .collage-img--tall {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .splash-logo {
    animation-name: splash-fade;
    filter: none;
    transform: none;
  }

  .reveal-heading {
    transform: none;
    transition: opacity var(--motion-slow) var(--motion-ease);
  }

  .button-primary:active,
  .button-secondary:active {
    transform: none;
  }
}

@keyframes splash-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
