/* ============================================
   AI Coaching for Academics — Design System
   Mobile-first responsive stylesheet
   ============================================ */


/* ============================================
   1. Custom Properties
   ============================================ */
:root {
  /* --- Colors --- */
  --color-primary: #4A7C7E;
  --color-primary-dark: #3A6264;
  --color-primary-light: #5E9496;
  --color-accent: #B8860B;
  --color-accent-light: #D4A843;
  --color-accent-subtle: #E6F0F0;
  --color-text: #2C3E50;
  --color-text-light: #5A6B7D;
  --color-text-inverse: #E8E6E3;
  --color-text-inverse-muted: #9AA8B8;
  --color-bg-white: #FAFAF8;
  --color-bg-cream: #F7F5F2;
  --color-bg-dark: #1A2332;
  --color-bg-dark-card: rgba(255, 255, 255, 0.04);
  --color-border: #E8DDD3;
  --color-border-light: #F0EBE4;

  /* --- Typography --- */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 2.5rem;

  /* --- Spacing (8px grid) --- */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* --- Layout --- */
  --max-width: 1120px;
  --max-width-narrow: 42rem;
  --nav-height: 64px;

  /* --- Transitions --- */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --transition-slow: 0.6s ease;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(44, 62, 80, 0.06);
  --shadow-md: 0 4px 12px rgba(44, 62, 80, 0.08);
  --shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.1);
  --shadow-hover: 0 12px 32px rgba(44, 62, 80, 0.13);
}


/* ============================================
   2. Reset & Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}


/* ============================================
   3. Typography
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--text-md);
  font-weight: 500;
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}


/* ============================================
   4. Links
   ============================================ */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Animated underline sliding in from left */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.link-underline:hover::after {
  width: 100%;
}


/* ============================================
   5. Utility Classes
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

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

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


/* ============================================
   6. Scroll-Triggered Fade-In Animations
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }


/* ============================================
   7. Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary:active {
  transform: translateY(0);
}

.btn--small {
  font-size: var(--text-xs);
  padding: 0.6rem 1.25rem;
}

.btn--on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}


/* ============================================
   8. Navigation — Sticky Header
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: transparent;
  transition:
    background var(--transition-base),
    box-shadow var(--transition-base),
    padding var(--transition-base);
}

.nav.scrolled {
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo / Name — left side */
.nav__brand {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.nav__brand:hover {
  color: var(--color-primary);
}

/* Desktop nav links — right side, hidden on mobile */
.nav__links {
  display: none;
  gap: var(--space-10);
  align-items: center;
}

.nav__links a {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav__links a:hover {
  color: var(--color-text);
}

.nav__links a:hover::after {
  width: 100%;
}

/* CTA button in nav */
.nav__cta {
  margin-left: var(--space-4);
}

/* Hamburger toggle — visible on mobile */
.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  z-index: 101;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-fast);
  border-radius: 1px;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu overlay */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 248, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99;
  padding-top: var(--space-20);
}

.nav__mobile.is-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
}

.nav__mobile a {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav__mobile a:hover {
  color: var(--color-primary);
}


/* ============================================
   9. Hero Section
   ============================================ */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
  background: var(--color-bg-white);
  position: relative;
}

.hero__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
}

/* Photo circle — shown above text on mobile */
.hero__photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--color-bg-cream);
  border: 3px solid var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
  order: -1;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__content {
  text-align: center;
  max-width: 640px;
}

/* Decorative thin rule above subtitle */
.hero__rule {
  width: 48px;
  height: 1.5px;
  background: var(--color-primary);
  margin: 0 auto var(--space-6);
  border: none;
}

.hero__subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

/* Thin decorative rules flanking the subtitle */
.hero__subtitle::before,
.hero__subtitle::after {
  content: '';
  flex: 0 0 32px;
  height: 1px;
  background: var(--color-border);
}

.hero__heading {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
  letter-spacing: -0.015em;
}

.hero__tagline {
  font-size: var(--text-md);
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: var(--space-10);
}

.hero__rule-bottom {
  width: 48px;
  height: 1.5px;
  background: var(--color-border);
  margin: 0 auto var(--space-10);
  border: none;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-light);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.45;
  animation: scrollBounce 2s ease infinite;
}

.hero__scroll-hint svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}


/* ============================================
   10. Section Defaults
   ============================================ */
.section {
  padding: var(--space-20) 0;
}

.section--cream {
  background: var(--color-bg-cream);
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #fff;
}

.section--dark p {
  color: var(--color-text-inverse-muted);
}

.section__header {
  margin-bottom: var(--space-12);
}

.section__header h2 {
  position: relative;
  display: inline-block;
}

.section__header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2.5px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section--dark .section__header h2::after {
  background: var(--color-accent);
}

.section__subtitle {
  color: var(--color-text-light);
  font-size: var(--text-base);
  margin-top: var(--space-4);
  max-width: 600px;
}

.section--dark .section__subtitle {
  color: var(--color-text-inverse-muted);
}


/* ============================================
   11. About / Introduction
   ============================================ */
.intro__grid {
  display: grid;
  gap: var(--space-12);
}

.intro__text {
  max-width: var(--max-width-narrow);
}

.intro__text p {
  font-size: var(--text-base);
  color: var(--color-text-light);
}

.intro__text p:first-child {
  color: var(--color-text);
  font-size: var(--text-md);
}

/* Pull-quote styling */
.pull-quote {
  border-left: 3px solid var(--color-primary);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
  font-style: italic;
}

/* Credential badges */
.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent-subtle);
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.credential-badge svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}


/* ============================================
   12. Services Grid
   ============================================ */
.services__intro {
  max-width: 700px;
  margin-bottom: var(--space-12);
  color: var(--color-text-light);
  font-size: var(--text-base);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.services__grid .service-card {
  width: 100%;
}

/* --- Service Card --- */
.service-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.service-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  cursor: pointer;
  user-select: none;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  -webkit-user-select: none;
}

.service-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
}

.service-card__info {
  flex: 1;
  min-width: 0;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.5;
}

.service-card__count {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-accent-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  margin-top: var(--space-2);
}

/* Chevron rotation */
.service-card__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
  transition: transform var(--transition-base);
}

.service-card.is-open .service-card__chevron {
  transform: rotate(180deg);
}

/* Accordion body — expand/collapse with max-height */
.service-card__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.service-card__body-inner {
  padding: 0 var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border-light);
}

.service-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.service-item:last-child {
  border-bottom: none;
}

.service-item__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.service-item__number {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
}

.service-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-top: 0.35rem;
  line-height: 1.6;
}

/* Service details — always visible (no nested accordion) */
.service-item__details {
  max-height: none;
  overflow: visible;
}

.service-item__details-inner {
  padding-top: var(--space-3);
}

.service-item__details ul {
  list-style: none;
  padding: 0;
}

.service-item__details li {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.55;
}

.service-item__details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary-light);
}

.service-item__toggle {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition-fast);
}

.service-item__toggle:hover {
  color: var(--color-primary-dark);
}

.service-item__toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.service-item__toggle.is-open svg {
  transform: rotate(180deg);
}


/* ============================================
   13. How I Work (Dark Section)
   ============================================ */
.approach__grid {
  display: grid;
  gap: var(--space-10);
}

.approach__item {
  display: flex;
  gap: var(--space-6);
}

.approach__marker {
  flex-shrink: 0;
  width: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  min-height: 60px;
}

.approach__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--color-bg-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-accent);
}

.approach__icon svg {
  width: 22px;
  height: 22px;
}

.approach__text h3 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.approach__text p {
  font-size: var(--text-sm);
  line-height: 1.7;
}


/* ============================================
   14. Contact Section
   ============================================ */
.contact__grid {
  display: grid;
  gap: var(--space-12);
}

.contact__text h3 {
  margin-bottom: var(--space-4);
}

.contact__text p {
  color: var(--color-text-light);
  font-size: var(--text-base);
}

.contact__info {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact__info-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.contact__info-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* --- Contact Form --- */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}

/* Bottom-border-only input style */
.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-3) 0;
  border: none;
  border-bottom: 1.5px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-bottom-color: var(--color-primary);
  box-shadow: 0 2px 0 0 var(--color-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.5;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Form validation states */
.form-group--error input,
.form-group--error textarea,
.form-group--error select {
  border-bottom-color: #c0392b;
}

.form-group--error input:focus,
.form-group--error textarea:focus {
  box-shadow: 0 2px 0 0 #c0392b;
}

.form-group__error {
  font-size: var(--text-xs);
  color: #c0392b;
  margin-top: var(--space-1);
}

.form-group--success input,
.form-group--success textarea {
  border-bottom-color: var(--color-primary);
}

/* --- Newsletter Card --- */
.newsletter {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--color-accent-subtle);
  border-radius: 10px;
}

.newsletter h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.newsletter p {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.newsletter__form {
  display: flex;
  gap: var(--space-2);
}

.newsletter__form input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.newsletter__form input:focus {
  border-color: var(--color-primary);
}

.newsletter__form button {
  white-space: nowrap;
}


/* ============================================
   15. Footer
   ============================================ */
.footer {
  padding: var(--space-12) 0 var(--space-8);
  background: var(--color-bg-dark);
  color: var(--color-text-inverse-muted);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-items: center;
  text-align: center;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: center;
}

.footer__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-inverse-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__nav a:hover {
  color: #fff;
}

.footer__colophon {
  font-size: var(--text-xs);
  color: var(--color-text-inverse-muted);
  opacity: 0.6;
  line-height: 1.6;
}

.footer__colophon a {
  color: var(--color-text-inverse-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__colophon a:hover {
  color: #fff;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
}


/* ============================================
   16. Responsive — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  :root {
    --nav-height: 72px;
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }

  .hero__heading {
    font-size: var(--text-4xl);
  }

  .hero__tagline {
    font-size: var(--text-lg);
  }

  .hero__photo {
    width: 220px;
    height: 220px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .approach__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}


/* ============================================
   17. Responsive — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  /* Show desktop nav, hide hamburger */
  .nav__links {
    display: flex;
  }

  .nav__toggle {
    display: none;
  }

  .section {
    padding: var(--space-24) 0;
  }

  .hero__layout {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }

  .hero__content {
    text-align: left;
    max-width: 560px;
  }

  .hero__subtitle {
    justify-content: flex-start;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__photo {
    width: 280px;
    height: 280px;
    order: 1;
  }

  .hero__rule {
    margin-left: 0;
  }

  .hero__rule-bottom {
    margin-left: 0;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .approach__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ============================================
   18. Responsive — Wide (1280px+)
   ============================================ */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-8);
  }
}


/* ============================================
   19. Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}


/* ============================================
   20. Print Stylesheet
   ============================================ */
@media print {
  .nav,
  .hero__scroll-hint,
  .hero__photo,
  .nav__mobile,
  .btn,
  .contact__form,
  .newsletter,
  .footer__nav,
  .service-item__toggle {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
    line-height: 1.5;
  }

  h1, h2, h3, h4 {
    color: #000;
    page-break-after: avoid;
  }

  .section {
    padding: 1.5rem 0;
    background: #fff !important;
    color: #000 !important;
  }

  .section--dark {
    background: #fff !important;
  }

  .section--dark h2,
  .section--dark h3,
  .section--dark p {
    color: #000 !important;
  }

  .service-card {
    border: 1px solid #ccc;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .service-card__body {
    max-height: none !important;
    overflow: visible !important;
  }

  .service-item__details {
    max-height: none !important;
    overflow: visible !important;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }

  .footer {
    background: #fff !important;
    color: #000 !important;
  }
}

/* ============================================
   21. Chat Widget
   ============================================ */
.chat-toggle {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.chat-toggle:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

.chat-toggle svg {
  width: 24px;
  height: 24px;
}

.chat-panel {
  display: none;
  position: fixed;
  bottom: calc(var(--space-6) + 68px);
  right: var(--space-6);
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel.is-open {
  display: flex;
}

.chat-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header h4 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
}

.chat-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  padding: var(--space-1);
}

.chat-close:hover {
  color: var(--color-text);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-msg {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.chat-msg--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--bot {
  align-self: flex-start;
  background: var(--color-bg-cream);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.chat-msg--typing {
  align-self: flex-start;
  background: var(--color-bg-cream);
  color: var(--color-text-light);
  font-style: italic;
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  outline: none;
  background: var(--color-bg-white);
  color: var(--color-text);
}

.chat-input-area input:focus {
  border-color: var(--color-primary);
}

.chat-input-area button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition-fast);
}

.chat-input-area button:hover {
  background: var(--color-primary-dark);
}

@media print {
  .chat-toggle,
  .chat-panel {
    display: none !important;
  }
}
