/* ============================================================
   MAIN.CSS — Design Tokens, Reset, Typography, Utilities
   Home Cleaning Centers of Indiana
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Dancing+Script:wght@600;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --primary:        #1B6B3A;
  --primary-light:  #2ECC71;
  --primary-dark:   #0F4023;
  --primary-soft:   #E8F5EE;
  --accent:         #F5A623;
  --accent-hover:   #E8941A;
  --accent-soft:    #FEF6E4;
  --neutral-dark:   #1A1A2E;
  --neutral-mid:    #4A5568;
  --neutral-light:  #718096;
  --neutral-100:    #F7F8FA;
  --neutral-200:    #EDF0F3;
  --neutral-300:    #E2E8F0;
  --white:          #FFFFFF;
  --black:          #0D0D0D;

  /* Glassmorphism */
  --glass-bg:       rgba(255,255,255,0.12);
  --glass-bg-heavy: rgba(255,255,255,0.22);
  --glass-border:   rgba(255,255,255,0.25);
  --glass-shadow:   0 8px 32px rgba(0,0,0,0.18);

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.14);
  --shadow-2xl: 0 24px 64px rgba(0,0,0,0.18);
  --shadow-deep: 0 2px 4px rgba(0,0,0,.05), 0 8px 16px rgba(0,0,0,.08), 0 24px 48px rgba(0,0,0,.10);
  --shadow-green: 0 8px 32px rgba(27,107,58,0.25);
  --shadow-accent: 0 8px 32px rgba(245,166,35,0.35);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-script:  'Dancing Script', cursive;

  /* Font Sizes — fluid with clamp() */
  --text-xs:   clamp(0.70rem, 1vw,  0.75rem);
  --text-sm:   clamp(0.82rem, 1.2vw, 0.875rem);
  --text-base: clamp(0.95rem, 1.5vw, 1rem);
  --text-md:   clamp(1.05rem, 1.8vw, 1.125rem);
  --text-lg:   clamp(1.15rem, 2vw,   1.25rem);
  --text-xl:   clamp(1.3rem,  2.5vw, 1.5rem);
  --text-2xl:  clamp(1.5rem,  3vw,   1.875rem);
  --text-3xl:  clamp(1.8rem,  3.5vw, 2.25rem);
  --text-4xl:  clamp(2rem,    4vw,   2.75rem);
  --text-5xl:  clamp(2.4rem,  5vw,   3.5rem);
  --text-6xl:  clamp(2.8rem,  6vw,   4.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max:  1280px;
  --container-wide: 1440px;
  --nav-height:     80px;
  --topbar-height:  44px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.45s ease;
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── CSS Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--neutral-dark);
  background-color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

body.mobile-menu-open {
  overflow: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; border: none; background: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--neutral-dark);
}

h1 { font-size: var(--text-5xl); font-weight: 700; }
h2 { font-size: var(--text-4xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl);  font-weight: 600; }
h5 { font-size: var(--text-lg);  font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

p { color: var(--neutral-mid); line-height: 1.8; }

/* ── Accessibility ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--primary);
  color: var(--white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 10000;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: var(--space-4); }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--wide {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ── Section Base ── */
.section {
  padding-block: var(--space-20);
}

.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-32); }
.section--dark { background: var(--neutral-dark); color: var(--white); }
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--white); }
.section--dark p  { color: rgba(255,255,255,0.75); }
.section--green { background: var(--primary); color: var(--white); }
.section--green h2, .section--green h3 { color: var(--white); }
.section--green p { color: rgba(255,255,255,0.85); }
.section--soft  { background: var(--neutral-100); }
.section--soft2 { background: var(--primary-soft); }

/* ── Section Labels & Headings ── */
.section-eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.section-eyebrow--white {
  color: var(--accent);
  background: rgba(255,255,255,0.15);
}

.section-heading {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.section-heading--center { text-align: center; }
.section-heading--white  { color: var(--white); }

.section-subheading {
  font-size: var(--text-lg);
  color: var(--neutral-light);
  max-width: 640px;
  line-height: 1.75;
}

.section-subheading--center {
  text-align: center;
  margin-inline: auto;
}

.section-subheading--white { color: rgba(255,255,255,0.8); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

/* ── Dividers (Wave SVG) ── */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -2px;
}
.wave-divider svg { display: block; width: 100%; }

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
  z-index: 99999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 100px;
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  font-size: 1.2rem;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ── Utility Classes ── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-white   { color: var(--white) !important; }
.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent) !important; }

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.font-display { font-family: var(--font-display); }
.font-script  { font-family: var(--font-script); }

.bg-primary   { background-color: var(--primary); }
.bg-accent    { background-color: var(--accent); }
.bg-soft      { background-color: var(--neutral-100); }
.bg-white     { background-color: var(--white); }

.d-flex       { display: flex; }
.d-grid       { display: grid; }
.d-block      { display: block; }
.d-none       { display: none; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-12); align-items: center; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-12); align-items: center; }

/* ── Responsive Grid ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2, .grid-2-1, .grid-1-2 {
    grid-template-columns: 1fr;
  }
  .section { padding-block: var(--space-12); }
  .section--lg { padding-block: var(--space-16); }
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-6);
}
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb-sep { opacity: 0.5; }
.breadcrumb-current { color: var(--white); font-weight: 500; }

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: calc(var(--nav-height) + var(--topbar-height) + var(--space-16)) 0 var(--space-16);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1920&auto=format&fit=crop') center/cover no-repeat;
  opacity: 0.12;
}

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

.page-hero h1 {
  color: var(--white);
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.page-hero p {
  color: rgba(255,255,255,0.85);
  font-size: var(--text-lg);
  max-width: 600px;
  margin-inline: auto;
}
