/* ============================================================
   Francisco's Paint Company – Main Stylesheet
   Earth-tone professional palette, smooth animations
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  /* Color Palette – Earth Tones */
  --clr-primary: #8b4513; /* Saddle Brown */
  --clr-primary-dark: #6b300e;
  --clr-primary-light: #a0522d;
  --clr-accent: #e8722a; /* Terracotta / warm orange */
  --clr-accent-light: #f09060;
  --clr-gold: #c9943a;

  --clr-dark: #1e0f07;
  --clr-text: #2a1a0e;
  --clr-text-mid: #5c3d25;
  --clr-text-muted: #8b7355;

  --clr-bg: #fdf6ee; /* warm cream */
  --clr-bg-tint: #f5e8d8;
  --clr-bg-card: #fffaf5;
  --clr-border: #e4d0bc;

  --clr-white: #ffffff;
  --clr-success: #2d7a4a;
  --clr-error: #c0392b;

  /* Typography */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44, 20, 5, 0.08), 0 1px 2px rgba(44, 20, 5, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 20, 5, 0.1), 0 2px 6px rgba(44, 20, 5, 0.07);
  --shadow-lg:
    0 10px 40px rgba(44, 20, 5, 0.14), 0 4px 12px rgba(44, 20, 5, 0.08);

  /* Transitions */
  --trans-fast: 150ms ease;
  --trans-normal: 250ms ease;
  --trans-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.page-inner {
  padding-top: var(--nav-height);
}

img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--trans-fast);
}
a:hover {
  color: var(--clr-accent);
}

ul {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--clr-text);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}
h4 {
  font-size: 1.05rem;
}

p {
  margin-bottom: var(--space-md);
}
p:last-child {
  margin-bottom: 0;
}

em {
  font-style: italic;
  color: var(--clr-accent);
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-xl);
}

.section {
  padding-block: var(--space-4xl);
}

.section--tinted {
  background-color: var(--clr-bg-tint);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  background: rgba(232, 114, 42, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--clr-text-mid);
  font-size: 1.05rem;
  max-width: 540px;
  margin-inline: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background var(--trans-normal),
    color var(--trans-normal),
    border-color var(--trans-normal),
    transform var(--trans-fast),
    box-shadow var(--trans-normal);
}
.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
}
.btn--primary:hover {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  color: var(--clr-white);
  box-shadow: 0 4px 16px rgba(139, 69, 19, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn--outline:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}

.btn--outline-light {
  background: transparent;
  color: var(--clr-white);
  border-color: rgba(255, 255, 255, 0.7);
}
.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--clr-white);
  border-color: var(--clr-white);
}

.btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}
.btn--full {
  width: 100%;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition:
    background var(--trans-normal),
    box-shadow var(--trans-normal);
}

.site-header.scrolled,
.site-header--solid {
  background: var(--clr-bg-card);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.4rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-primary);
  line-height: 1;
}

.site-header.scrolled .logo-text,
.site-header--solid .logo-text {
  color: var(--clr-primary);
}

/* transparent header: white logo text */
.site-header:not(.scrolled):not(.site-header--solid) .logo-text {
  color: var(--clr-white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-mid);
  transition: color var(--trans-fast);
}

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

/* transparent header: light nav text */
.site-header:not(.scrolled):not(.site-header--solid)
  .nav-links
  a:not(.nav-cta) {
  color: rgba(255, 255, 255, 0.9);
}

.nav-cta {
  background: var(--clr-primary);
  color: var(--clr-white) !important;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-weight: 600 !important;
}
.nav-cta:hover {
  background: var(--clr-primary-dark);
  color: var(--clr-white) !important;
}

.nav-cta--outline {
  background: transparent !important;
  color: var(--clr-primary) !important;
  border: 2px solid var(--clr-primary);
}
.nav-cta--outline:hover {
  background: var(--clr-primary) !important;
  color: var(--clr-white) !important;
}

.nav-cta.active,
.nav-cta--outline.active {
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--clr-primary);
  border-radius: 2px;
  transition:
    transform var(--trans-normal),
    opacity var(--trans-normal);
}

.site-header:not(.scrolled):not(.site-header--solid) .nav-toggle span {
  background: var(--clr-white);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #6b300e 0%,
    #8b4513 40%,
    #c8793a 75%,
    #e8c09a 100%
  );
  /* Replace with background-image: url(images/hero-bg.jpg); background-size: cover; when you have a real image */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 15, 7, 0.55) 0%,
    rgba(30, 15, 7, 0.4) 60%,
    rgba(30, 15, 7, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-2xl) var(--space-xl);
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: var(--clr-white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--clr-white);
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-title em {
  color: var(--clr-accent-light);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-3xl);
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease 1s both;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  animation: bounce 1.5s ease infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(6px);
  }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition:
    transform var(--trans-normal),
    box-shadow var(--trans-normal),
    border-color var(--trans-normal);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--clr-primary-light);
}

.service-card--cta {
  background: linear-gradient(135deg, var(--clr-bg-tint), var(--clr-bg-card));
  border-color: var(--clr-accent);
  border-style: dashed;
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-xs);
}
.service-card h3 {
  color: var(--clr-text);
}
.service-card p {
  color: var(--clr-text-mid);
  font-size: 0.92rem;
  flex: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--clr-primary);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: var(--space-sm);
  transition:
    gap var(--trans-normal),
    color var(--trans-fast);
}
.service-link:hover {
  gap: 8px;
  color: var(--clr-accent);
}

/* ============================================================
   WHY US
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.why-card {
  background: var(--clr-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--trans-normal),
    box-shadow var(--trans-normal);
}

.why-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.why-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}
.why-card h4 {
  margin-bottom: var(--space-xs);
  color: var(--clr-primary);
}
.why-card p {
  font-size: 0.9rem;
  color: var(--clr-text-mid);
  margin: 0;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-filters {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-mid);
  cursor: pointer;
  transition:
    background var(--trans-fast),
    color var(--trans-fast),
    border-color var(--trans-fast);
  font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
}

.gallery-carousel-wrap {
  position: relative;
}

.gallery-arrow {
  position: absolute;
  top: calc(50% - 24px);
  z-index: 3;
  background: var(--clr-white);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--clr-primary);
  transition:
    background var(--trans-fast),
    color var(--trans-fast);
  padding-bottom: 2px;
}
.gallery-arrow:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}
.gallery-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.gallery-arrow--prev {
  left: -22px;
}
.gallery-arrow--next {
  right: -22px;
}

.gallery-grid {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: var(--space-xs) var(--space-xs) var(--space-md);
}

.gallery-grid::-webkit-scrollbar {
  height: 5px;
}
.gallery-grid::-webkit-scrollbar-track {
  background: var(--clr-bg-tint);
  border-radius: 3px;
}
.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: 3px;
}
.gallery-grid::-webkit-scrollbar-thumb:hover {
  background: var(--clr-text-muted);
}

.gallery-item {
  flex: 0 0 300px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-bg-card);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition:
    transform var(--trans-normal),
    box-shadow var(--trans-normal);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item--wide {
  flex: 0 0 460px;
}

.gallery-item.hidden {
  display: none;
}

.gallery-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--clr-primary);
  color: var(--clr-white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}

.gallery-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.4;
}

.gallery-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-slow);
}

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.05);
}

.gallery-caption {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.88rem;
  color: var(--clr-text-mid);
  border-top: 1px solid var(--clr-border);
}

.gallery-cta {
  text-align: center;
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--clr-border);
}

.gallery-cta p {
  font-size: 1.05rem;
  color: var(--clr-text-mid);
  margin-bottom: var(--space-md);
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 1rem;
  padding: var(--space-3xl) var(--space-md);
}

/* ============================================================
   BEFORE / AFTER SLIDER
   ============================================================ */
.ba-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 220px;
  cursor: col-resize;
  -webkit-user-select: none;
  user-select: none;
}

.ba-after,
.ba-before {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ba-before {
  width: 50%; /* JS sets this live */
  border-right: 3px solid var(--clr-white);
}

.ba-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Before image is sized to the slider container via inline width set by JS */
.ba-before img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%; /* JS overrides this to slider container width */
  object-fit: cover;
  display: block;
  pointer-events: none;
  max-width: none;
}

/* Labels */
.ba-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 var(--space-sm) var(--space-sm);
}

.ba-label {
  background: rgba(30, 15, 7, 0.65);
  color: var(--clr-white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Drag handle */
.ba-handle {
  position: absolute;
  top: 0;
  left: 50%; /* JS sets this live */
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ba-handle svg {
  width: 36px;
  height: 36px;
  background: var(--clr-white);
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  color: var(--clr-primary);
  flex-shrink: 0;
}

/* Hidden accessible range input sits over the whole slider */
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: col-resize;
  margin: 0;
  z-index: 2;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about-img-side {
  position: relative;
}

.about-img-placeholder {
  width: 100%;
  padding-top: 120%;
  background: linear-gradient(
    135deg,
    var(--clr-primary-light),
    var(--clr-primary-dark)
  );
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-img-placeholder span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.about-accent-box {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--clr-accent);
  color: var(--clr-white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-accent-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.about-text-side {
  padding-left: var(--space-lg);
}
.about-text-side .section-tag {
  display: block;
  margin-bottom: var(--space-sm);
}
.about-text-side .section-title {
  margin-bottom: var(--space-lg);
}
.about-text-side p {
  color: var(--clr-text-mid);
}

.about-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(
    135deg,
    var(--clr-primary-dark) 0%,
    var(--clr-primary) 60%,
    var(--clr-accent) 100%
  );
  padding-block: var(--space-4xl);
  text-align: center;
}

.cta-banner h2,
.cta-banner p {
  color: var(--clr-white);
}

.cta-banner h2 {
  margin-bottom: var(--space-sm);
}
.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-xl);
  font-size: 1.05rem;
}

.cta-banner-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-dark);
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-3xl);
  padding-block: var(--space-3xl);
}

.footer-brand .logo-text {
  color: var(--clr-white);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: var(--space-sm);
}

.footer-links h4,
.footer-contact h4 {
  color: var(--clr-white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  transition: color var(--trans-fast);
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--clr-accent-light);
}

.footer-contact p {
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: var(--space-lg);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* ============================================================
   PAGE INNER HERO (appointment / onboarding)
   ============================================================ */
.page-hero {
  background: linear-gradient(
    135deg,
    var(--clr-primary-dark) 0%,
    var(--clr-primary) 100%
  );
  padding-block: var(--space-3xl) var(--space-2xl);
  text-align: center;
}

.page-hero .section-tag {
  margin-bottom: var(--space-sm);
}

.page-hero-title {
  color: var(--clr-white);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: var(--space-sm);
}

.page-hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  max-width: 520px;
  margin-inline: auto;
  font-size: 1rem;
  margin-bottom: 0;
}

/* ============================================================
   FORM PAGES
   ============================================================ */
.form-section {
  background: var(--clr-bg-tint);
}

.form-outer {
  max-width: 740px;
}

.form-outer--wide {
  max-width: var(--max-width);
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-2xl);
  align-items: start;
}

.form-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.form-card-title {
  font-size: 1.4rem;
  margin-bottom: var(--space-xs);
}

.form-card-subtitle {
  color: var(--clr-text-muted);
  font-size: 0.88rem;
  margin-bottom: var(--space-xl);
}

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  transition:
    background var(--trans-normal),
    border-color var(--trans-normal),
    color var(--trans-normal);
}

.step.active .step-num,
.step.done .step-num {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: var(--clr-white);
}

.step-label {
  font-size: 0.72rem;
  color: var(--clr-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--clr-primary);
  font-weight: 600;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--clr-border);
  margin-bottom: 18px;
  transition: background var(--trans-normal);
}

.step-line.done {
  background: var(--clr-primary);
}

/* Form Steps */
.form-step-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-primary);
}

.form-step.hidden {
  display: none;
}

/* Form Fieldsets */
.form-fieldset {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.form-fieldset legend {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-primary);
  padding-inline: 8px;
}

/* Core Form Elements */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--clr-text);
}

.req {
  color: var(--clr-error);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin: 0 0 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--clr-text);
  background: var(--clr-white);
  transition:
    border-color var(--trans-fast),
    box-shadow var(--trans-fast);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.12);
}

input.error,
select.error,
textarea.error {
  border-color: var(--clr-error);
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C3D25' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-error {
  font-size: 0.8rem;
  color: var(--clr-error);
  min-height: 16px;
  display: block;
}

/* Radio & Checkbox */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}

input[type="radio"],
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--clr-primary);
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
}

/* Service Card Checkboxes */
.checkbox-grid--services {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.checkbox-label--service {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-md);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--trans-fast),
    background var(--trans-fast);
  position: relative;
}

.checkbox-label--service input[type="checkbox"] {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
}

.checkbox-label--service:has(input:checked) {
  border-color: var(--clr-primary);
  background: rgba(139, 69, 19, 0.06);
}

.checkbox-label--service:hover {
  border-color: var(--clr-primary-light);
}

.checkbox-icon {
  font-size: 1.6rem;
}
.checkbox-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-text);
}

.form-group--consent {
  padding-top: var(--space-md);
  border-top: 1px solid var(--clr-border);
}

.form-group--consent .checkbox-label {
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--clr-text-mid);
  line-height: 1.5;
}

/* Form Nav (step prev/next) */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--clr-border);
}

.form-submit-row {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--clr-border);
}

.btn-loader {
  display: inline;
}
.btn-text {
  display: inline;
}

/* Sidebar */
.form-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
}

.sidebar-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.sidebar-card--accent {
  background: linear-gradient(
    135deg,
    var(--clr-primary),
    var(--clr-primary-dark)
  );
  border-color: transparent;
}

.sidebar-card--accent h3,
.sidebar-card--accent p {
  color: var(--clr-white);
}

.sidebar-card h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  color: var(--clr-primary);
}

.sidebar-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  counter-reset: step;
}

.sidebar-steps li {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--clr-text-mid);
}

.sidebar-step-num {
  width: 26px;
  height: 26px;
  background: var(--clr-primary);
  color: var(--clr-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-phone {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-white) !important;
  margin-block: var(--space-sm);
}

.sidebar-hours {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7) !important;
  margin: 0;
}

.sidebar-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-services li {
  font-size: 0.88rem;
  color: var(--clr-text-mid);
}

/* Success State */
.form-success {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 560px;
  margin-inline: auto;
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-lg);
}

.form-success h2 {
  margin-bottom: var(--space-md);
  color: var(--clr-success);
}

.form-success p {
  color: var(--clr-text-mid);
}

.success-details {
  background: var(--clr-bg-tint);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-block: var(--space-lg);
  text-align: left;
  font-size: 0.9rem;
}

.success-ref {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}
.success-ref code {
  background: var(--clr-bg-tint);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}

.success-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease both;
}

/* Intersection Observer reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--trans-slow),
    transform var(--trans-slow);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HIDDEN UTILITY
   ============================================================ */
.hidden {
  display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
  .about-container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .about-img-side {
    max-width: 400px;
    margin-inline: auto;
  }
  .about-text-side {
    padding-left: 0;
  }
  .form-layout {
    grid-template-columns: 1fr;
  }
  .form-sidebar {
    position: static;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --space-4xl: 3rem;
  }

  .container {
    padding-inline: var(--space-lg);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--clr-bg-card);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(-110%);
    transition: transform var(--trans-slow);
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1rem;
    color: var(--clr-text) !important;
  }

  .hero-stats {
    gap: var(--space-xl);
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: var(--space-lg);
  }

  .step-label {
    display: none;
  }

  .checkbox-grid--services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
  }
}
