/* 307 Wyo Services - Custom Styles
   Built on top of Pico CSS
   ========================================== */

/* ==========================================================================
   1. CSS Custom Properties (Brand Colors)
   ========================================================================== */
:root {
  /* Brand Colors - WCAG AA compliant */
  --sheridan-red: #9B1B1B;        /* Adjusted for 4.5:1 contrast on white */
  --sheridan-red-hover: #7A1515;
  --sheridan-red-dark: #B83232;   /* For dark backgrounds - 4.5:1 on charcoal */
  --granite-grey: #374151;        /* Darker grey for body text - 7:1 contrast */
  --charcoal: #1F2937;            /* Darker for better contrast */
  --snow: #F3F4F6;
  --white: #FFFFFF;
  --text-dark: #111827;           /* Near black for maximum readability */

  /* Override Pico defaults - FORCE dark text */
  --pico-primary: var(--sheridan-red);
  --pico-primary-hover: var(--sheridan-red-hover);
  --pico-primary-focus: rgba(155, 27, 27, 0.25);
  --pico-primary-inverse: var(--white);

  /* Override Pico text colors for light theme */
  --pico-color: #111827;
  --pico-text-selection-color: rgba(155, 27, 27, 0.25);
  --pico-muted-color: #374151;
  --pico-muted-border-color: #d1d5db;
  --pico-secondary: #374151;
  --pico-secondary-hover: #1f2937;
  --pico-contrast: #111827;
  --pico-contrast-hover: #000000;

  /* Form colors */
  --pico-form-element-color: #111827;
  --pico-form-element-placeholder-color: #6b7280;

  /* Typography */
  --pico-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-headlines: "Zilla Slab", Georgia, serif;

  /* Layout */
  --site-max-width: 1200px;
  --header-height: 4rem;
}

/* ==========================================================================
   2. Typography - Force dark text colors (override Pico defaults)
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headlines);
  font-weight: 600;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

/* Override Pico's default light gray text - FORCE dark readable text */
body {
  color: var(--text-dark);
}

p, li, span, div {
  color: inherit;
}

main p,
main li,
.container p,
.container li {
  color: var(--text-dark);
}

/* Specific section overrides for body text */
.section-header p,
.service-card p,
.pillar p,
.about-content p,
.content-section p,
.services-section p {
  color: var(--text-dark) !important;
}

/* ==========================================================================
   3. Layout Components
   ========================================================================== */

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sheridan-red);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

header .logo {
  font-family: var(--font-headlines);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sheridan-red);
  text-decoration: none;
}

header .logo:hover {
  color: var(--sheridan-red-hover);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--sheridan-red);
}

/* Click to Call Button */
.cta-call {
  background: var(--sheridan-red);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  white-space: nowrap;
}

.cta-call:hover {
  background: var(--sheridan-red-hover);
  color: var(--white) !important;
}

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

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--snow);
  }

  .nav-links .cta-call {
    margin-top: 0.5rem;
    text-align: center;
  }

  /* Mobile sticky call button */
  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sheridan-red);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 99;
  }

  .mobile-cta:hover {
    background: var(--sheridan-red-hover);
  }

  main {
    padding-bottom: 4rem; /* Space for mobile CTA */
  }
}

@media (min-width: 769px) {
  .mobile-cta {
    display: none;
  }
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Real mountain image with dark overlay for text contrast */
  background:
    linear-gradient(
      to bottom,
      rgba(31, 41, 55, 0.7) 0%,
      rgba(31, 41, 55, 0.6) 50%,
      rgba(155, 27, 27, 0.8) 100%
    ),
    url('/images/hero-mountains-v2.webp') center/cover no-repeat;
  color: var(--white);
  padding: 4rem 1rem;
  overflow: hidden;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #FFFFFF !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

/* Page-specific header backgrounds */
.page-property-management .content-section.alt-bg:first-of-type,
.page-moving .content-section.alt-bg:first-of-type,
.page-about .content-section.alt-bg:first-of-type,
.page-contact .content-section.alt-bg:first-of-type {
  background: linear-gradient(135deg, var(--charcoal) 0%, #1a1a2e 50%, var(--sheridan-red) 100%);
  color: var(--white);
  padding: 4rem 0;
}

.page-property-management .content-section.alt-bg:first-of-type h1,
.page-moving .content-section.alt-bg:first-of-type h1,
.page-about .content-section.alt-bg:first-of-type h1,
.page-contact .content-section.alt-bg:first-of-type h1 {
  color: var(--white);
}

.page-property-management .content-section.alt-bg:first-of-type p,
.page-moving .content-section.alt-bg:first-of-type p,
.page-about .content-section.alt-bg:first-of-type p,
.page-contact .content-section.alt-bg:first-of-type p {
  color: #FFFFFF !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   5. Trust Bar
   ========================================================================== */
.trust-bar {
  background: var(--charcoal);
  color: var(--white);
  padding: 1.5rem 0;
}

.trust-bar .container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.trust-item strong {
  font-family: var(--font-headlines);
  font-size: 1.5rem;
  color: #FFFFFF; /* White for maximum contrast on dark bg */
}

.trust-item span {
  font-size: 0.875rem;
  color: #FFFFFF; /* White for maximum visibility */
}

/* ==========================================================================
   6. Service Cards
   ========================================================================== */
.services-section {
  padding: 4rem 0;
  background: var(--snow);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
  color: var(--sheridan-red);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--granite-grey);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   7. Content Sections
   ========================================================================== */
.content-section {
  padding: 4rem 0;
  background: var(--white);
}

.content-section.alt-bg {
  background: var(--snow);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  max-width: 600px;
  margin: 1rem auto 0;
  color: #111827 !important; /* Force dark text */
  font-size: 1.125rem;
}

/* Service Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pillar {
  padding: 1.5rem;
  background: var(--white);
  border-radius: 0.5rem;
  border-left: 4px solid var(--sheridan-red);
}

.pillar h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.pillar p {
  font-size: 0.9375rem;
  color: var(--granite-grey);
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   8. Forms
   ========================================================================== */
.form-section {
  padding: 4rem 0;
}

/* Tab Navigation */
.form-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--snow);
}

.form-tab {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--granite-grey);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.form-tab:hover {
  color: var(--charcoal);
}

.form-tab.active {
  color: var(--sheridan-red);
  border-bottom-color: var(--sheridan-red);
}

.form-panel {
  display: none;
}

.form-panel.active {
  display: block;
}

/* Form Layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Form Labels - Force dark text */
label,
form label,
.form-section label,
.form-panel label,
.form-grid label {
  color: #111827 !important;
  font-weight: 500;
}

/* Form inputs - better contrast for placeholders */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #6B7280 !important; /* Medium gray - 4.5:1 on white */
  opacity: 1 !important;
}

/* Force form section to have white background and dark text */
.form-section {
  background: var(--white);
}

.form-section,
.form-section * {
  --pico-color: #111827;
}

.form-panel {
  background: var(--white);
}

/* Tab styling - ensure visible */
.form-tab {
  color: #374151 !important;
}

.form-tab.active {
  color: var(--sheridan-red) !important;
}

/* Contact Info */
.contact-info {
  background: var(--snow);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-top: 2rem;
}

.contact-info h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.contact-info p {
  color: var(--text-dark) !important;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.contact-item strong {
  color: var(--text-dark);
}

.contact-item a {
  color: var(--charcoal);
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--sheridan-red);
}

/* ==========================================================================
   9. About Page
   ========================================================================== */
.about-hero {
  position: relative;
  padding: 4rem 0;
  background: var(--snow);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image {
  border-radius: 0.5rem;
  overflow: hidden;
}

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

/* Values List */
.values-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 2rem 0;
}

.values-list li {
  list-style-type: none !important;
  list-style: none !important;
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 1px solid var(--snow);
  color: var(--text-dark) !important;
}

.values-list li::marker {
  content: none;
  display: none;
}

.values-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sheridan-red);
  font-weight: bold;
}

/* About Page text */
.about-content p,
.about-hero p {
  color: var(--text-dark) !important;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */
footer {
  background: var(--charcoal);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

footer a {
  color: #E5E7EB; /* Light grey for good contrast */
  text-decoration: none;
}

footer a:hover {
  color: #F87171; /* Light red on hover */
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-section p {
  color: #FFFFFF !important; /* White text on dark bg */
}

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

.footer-section li {
  margin-bottom: 0.5rem;
  color: #E5E7EB;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #D1D5DB; /* Good contrast on dark bg */
}

/* ==========================================================================
   11. Utility Classes
   ========================================================================== */
.container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   12. Error Pages (404, Offline)
   ========================================================================== */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--sheridan-red);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--granite-grey);
  margin-bottom: 2rem;
}
