/**
 * AroundManchester.com - Homepage Stylesheet
 * Page-specific styles for index1.html (main homepage)
 * 
 * @charset UTF-8
 * @author AroundManchester.com Development Team
 * @version 1.0
 */

@charset "UTF-8";

/* ===== COMPACT HEADER DESCRIPTION ===== */
.site-header__description {
  line-height: 1.3;
  padding: 4px 12px;
  margin: 4px auto 0;
}

.site-header__description > p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25;
}

/* ===== HOMEPAGE HERO ===== */
.hero {
  background: var(--gradient-primary);
  color: var(--color-white);
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-md);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: var(--shadow-md);
}

.hero__title {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
  margin-bottom: var(--spacing-sm);
}

.hero__text {
  max-width: 720px;
  margin: 0 auto var(--spacing-lg);
  font-size: var(--font-size-lg);
  opacity: 0.9;
}

.hero__countdown {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-lg);
  margin: 0 auto var(--spacing-lg);
  max-width: 500px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: visible;
}

/* SVG container for the border glow path */
.hero__countdown-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  pointer-events: none;
  z-index: 0;
}

.hero__countdown-glow svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The glowing flare that travels along the rectangular path */
.hero__countdown-glow__flare {
  fill: none;
  stroke: url(#countdown-flare-gradient);
  stroke-width: 4;
  stroke-linecap: round;
  filter: url(#countdown-glow-blur);
  /* Total perimeter approx: 2*(500+180) = 1360, use stroke-dasharray to show small segment */
  stroke-dasharray: 80 1280;
  stroke-dashoffset: 0;
  animation: countdown-flare-travel 60s linear infinite;
}

/* Secondary softer trail behind the flare */
.hero__countdown-glow__trail {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 10;
  stroke-linecap: round;
  filter: url(#countdown-glow-blur-soft);
  stroke-dasharray: 120 1240;
  stroke-dashoffset: 20;
  animation: countdown-flare-travel 60s linear infinite;
}

/* Counter-clockwise = negative dashoffset animation */
@keyframes countdown-flare-travel {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -1360;
  }
}

.hero__countdown-label {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0 0 var(--spacing-md);
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.hero__countdown-timer {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

.hero__countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  flex-shrink: 0;
}

.hero__countdown-number {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm) var(--spacing-md);
  min-width: 70px;
  width: 70px;
  display: block;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.hero__countdown-unit-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--spacing-xs);
  opacity: 0.8;
}

.hero__countdown-date {
  font-size: var(--font-size-sm);
  margin: var(--spacing-md) 0 0;
  opacity: 0.85;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.hero__countdown-disclaimer {
  font-size: var(--font-size-xs);
  margin: var(--spacing-xs) 0 0;
  opacity: 0.7;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.hero__audience-prompt {
  font-size: var(--font-size-lg);
  font-weight: 500;
  margin: var(--spacing-lg) 0 var(--spacing-sm);
  opacity: 0.95;
}

.hero__buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

/* ===== FEATURES SECTION ===== */
.features {
  background: var(--color-white);
  padding: var(--spacing-2xl) var(--spacing-md);
  margin: 0 auto var(--spacing-2xl);
  max-width: 1200px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
}

/* ===== STATISTICS SECTION ===== */
.statistics {
  background: var(--bg-section-medium);
  padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-2xl);
  text-align: center;
}

.statistics h2 {
  font-size: var(--font-size-3xl);
  color: var(--color-primary);
}

.statistics__grid {
  margin-top: var(--spacing-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

/* ===== FOUNDER COUNTER SECTION ===== */
.founder-counter {
  background: var(--gradient-secondary);
  color: var(--color-white);
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  margin: 0;
}

.founder-counter__content {
  max-width: 600px;
  margin: 0 auto;
}

.founder-counter__title {
  font-size: var(--font-size-2xl);
  margin: 0 0 var(--spacing-xs);
  font-weight: 700;
}

.founder-counter__subtitle {
  font-size: var(--font-size-base);
  opacity: 0.9;
  margin: 0 0 var(--spacing-lg);
}

.founder-counter__display {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  margin: 0 0 var(--spacing-md);
  backdrop-filter: blur(10px);
}

.founder-counter__numbers {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.founder-counter__current {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.founder-counter__separator {
  font-size: var(--font-size-2xl);
  opacity: 0.7;
}

.founder-counter__total {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  opacity: 0.95;
}

.founder-counter__label {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.founder-counter__progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.founder-counter__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffb300);
  border-radius: var(--radius-full);
  min-width: 4px;
  transition: width 0.5s ease;
}

.founder-counter__cta {
  margin: 0;
}

.founder-counter__cta .button--light {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  border: none;
  font-weight: 600;
  padding: var(--spacing-sm) var(--spacing-xl);
  border-radius: var(--radius-lg);
  text-decoration: none;
  display: inline-block;
  transition: var(--transition-base);
}

.founder-counter__cta .button--light:hover {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* === WCAG 2.2 AA FOCUS INDICATORS === */
/* Homepage focuses on light backgrounds and gradient hero sections */

/* General focus styles */
main :focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

main :focus:not(:focus-visible) {
  outline: none;
}

main :focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Focus on gradient/dark backgrounds (hero, founder-counter) */
.hero :focus-visible,
.founder-counter :focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* District chips focus */
.district-chip:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  z-index: 10;
}

/* Button focus on light backgrounds */
.hero__buttons .button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* === REDUCED MOTION SUPPORT === */
@media (prefers-reduced-motion: reduce) {
  .hero__countdown-glow__flare,
  .hero__countdown-glow__trail {
    animation: none;
  }
  
  .founder-counter__progress-bar {
    transition: none;
  }
  
  .founder-counter__cta .button--light:hover {
    transform: none;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
/*
 * High contrast overrides for homepage-specific elements.
 * Applied when .high-contrast class is on <html> element.
 */

/* Hero section - already covered in theme.css but ensure consistency */
.high-contrast .hero {
  background: #000000;
  border: 3px solid #000000;
}

.high-contrast .hero__title {
  color: #ffffff;
}

.high-contrast .hero__text {
  color: #ffffff;
  opacity: 1;
}

.high-contrast .hero__countdown {
  background: #ffffff;
  border: 3px solid #ffffff;
  backdrop-filter: none;
}

.high-contrast .hero__countdown-glow {
  display: none;
}

.high-contrast .hero__countdown-label {
  color: #000000;
  opacity: 1;
}

.high-contrast .hero__countdown-timer {
  color: #000000;
}

.high-contrast .hero__countdown-unit-label {
  color: #000000;
  opacity: 1;
}

.high-contrast .hero__countdown-number {
  color: #000000;
  background: #f0f0f0;
  border: 1px solid #000000;
}

.high-contrast .hero__countdown-date {
  color: #000000;
  opacity: 1;
}

.high-contrast .hero__countdown-disclaimer {
  color: #333333;
  opacity: 1;
}

.high-contrast .hero__buttons .button {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
}

.high-contrast .hero__buttons .button:hover,
.high-contrast .hero__buttons .button:focus {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

/* Features section */
.high-contrast .features {
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: none;
}

/* Statistics section */
.high-contrast .statistics {
  background: #ffffff;
  border: 2px solid #000000;
}

.high-contrast .statistics h2 {
  color: #000000;
}

.high-contrast .statistics p {
  color: #000000;
}

/* Founder counter section */
.high-contrast .founder-counter {
  background: #000000;
  border: 3px solid #000000;
}

.high-contrast .founder-counter__title {
  color: #ffffff;
}

.high-contrast .founder-counter__subtitle {
  color: #ffffff;
  opacity: 1;
}

.high-contrast .founder-counter__display {
  background: #ffffff;
  border: 2px solid #ffffff;
  backdrop-filter: none;
}

.high-contrast .founder-counter__numbers {
  color: #000000;
}

.high-contrast .founder-counter__current {
  color: #000000;
  text-shadow: none;
}

.high-contrast .founder-counter__separator {
  color: #000000;
  opacity: 1;
}

.high-contrast .founder-counter__total {
  color: #000000;
  opacity: 1;
}

.high-contrast .founder-counter__label {
  color: #000000;
  opacity: 1;
}

.high-contrast .founder-counter__progress {
  background: rgba(255, 255, 255, 0.3);
}

.high-contrast .founder-counter__progress-bar {
  background: #ffffff;
}

.high-contrast .founder-counter__cta .button--light {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
}

.high-contrast .founder-counter__cta .button--light:hover,
.high-contrast .founder-counter__cta .button--light:focus {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  transform: none;
  box-shadow: none;
}

/* High contrast focus indicators for homepage */
.high-contrast main :focus-visible {
  outline: 3px solid #000000 !important;
  outline-offset: 2px !important;
}

.high-contrast .hero :focus-visible,
.high-contrast .founder-counter :focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 2px !important;
}

.high-contrast .hero__audience-prompt {
  color: #ffffff;
  opacity: 1;
}
