/* ============================================================
   START TO FINISH EPOXY — STYLESHEET
   Mobile-first. Warm, local, approachable.
   ============================================================ */

/* ------------------------------------------------------------
   DESIGN TOKENS
   Change these to retheme the whole site.
------------------------------------------------------------ */
:root {
  /* Colors */
  --color-amber:       #C4621D;   /* primary accent — deep amber/terracotta */
  --color-amber-dark:  #A34F16;   /* hover state */
  --color-amber-light: #F2D9C4;   /* tints, backgrounds */
  --color-stone:       #3D2B1F;   /* near-black text, warm not cold */
  --color-stone-mid:   #6B4F3A;   /* secondary text */
  --color-stone-light: #9C7B65;   /* muted text, hints */
  --color-cream:       #FAF7F4;   /* page background */
  --color-white:       #FFFFFF;
  --color-surface:     #F2EDE8;   /* alternate section bg */
  --color-border:      #E0D5CC;   /* subtle dividers */
  --color-success:     #3A7D44;

  /* Typography */
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

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

  /* Layout */
  --max-width: 1100px;
  --radius:    8px;
  --radius-lg: 16px;

  /* Transitions */
  --transition: 200ms ease;
}

/* ------------------------------------------------------------
   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);
  color: var(--color-stone);
  background: var(--color-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ------------------------------------------------------------
   TYPOGRAPHY
------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-stone);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { max-width: 65ch; }

/* ------------------------------------------------------------
   LAYOUT UTILITIES
------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

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

.section-alt {
  background: var(--color-surface);
}

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

.section-header h2 {
  margin-bottom: var(--space-xs);
}

.section-sub {
  color: var(--color-stone-mid);
  font-size: 1.05rem;
  max-width: 55ch;
  margin-inline: auto;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--color-amber);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

/* ------------------------------------------------------------
   BUTTONS
------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.75em 1.5em;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  border: 2px solid transparent;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-amber);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--color-amber);
  color: var(--color-white);
  border-color: var(--color-amber);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--color-amber-dark);
  border-color: var(--color-amber-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.7);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: rgba(255,255,255,0.15);
}

/* call-or-text qualifier inside hero phone button */
.btn-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  gap: 0;
}
.btn-phone-qualifier {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* call-or-text qualifier in footer */
.footer-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
  gap: 1px;
}
.footer-phone-qualifier {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.6;
}

.btn-small {
  padding: 0.5em 1em;
  font-size: 0.9rem;
  background: var(--color-stone);
  color: #ffffff !important;
  border-color: var(--color-stone);
}
.btn-small:hover {
  background: var(--color-stone-mid);
  border-color: var(--color-stone-mid);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ------------------------------------------------------------
   HEADER / NAV
------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 244, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-shrink: 0;
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
}

.logo-mark {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--color-stone);
}

.logo-accent {
  color: var(--color-amber);
}

.logo-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-stone);
}

@media (max-width: 400px) {
  .logo-text { display: none; }
}

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

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-stone-mid);
  transition: color var(--transition);
}

.site-nav a:hover { color: var(--color-amber); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-stone);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-xs);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 0.6em 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav a:last-child { border-bottom: none; }

  .site-nav .btn-small {
    margin-top: var(--space-xs);
    text-align: center;
    justify-content: center;
  }
}

/* ------------------------------------------------------------
   HERO — video background
------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1a1008; /* fallback color while video loads */
}

/* The video fills the section like a background image */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.25) 100%);
}

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

.hero-eyebrow {
  color: var(--color-amber-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.hero-headline {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  max-width: 55ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: var(--space-sm);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.45em 0.9em;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}

.hero-badge--clickable {
  position: relative;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.hero-badge--clickable:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Financing popup */
.financing-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--color-stone);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  white-space: normal;
  width: 220px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  text-align: center;
  z-index: 200;
}

/* Arrow pointing down */
.financing-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

.financing-popup.open {
  display: block;
}

.financing-popup-link {
  display: inline-block;
  margin-top: 0.5em;
  color: var(--color-amber);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
}

/* ------------------------------------------------------------
   FLAKES CANVAS
   Sits behind all page content (z-index: 0).
   Main content is z-index: 1, so the canvas never overlaps text,
   images, or cards. Section backgrounds are slightly transparent
   so flakes show through as a subtle background texture.
------------------------------------------------------------ */
#flakes-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Page content sits above the canvas */
main {
  position: relative;
  z-index: 1;
}

.site-footer {
  position: relative;
  z-index: 1;
}

/* Section backgrounds at 78% opacity — flakes show through the 22% gap.
   Raise this number (toward 1.0) to hide flakes more, lower it to show more. */
.section {
  background-color: rgba(250, 247, 244, 0.78);
}

.section-alt {
  background-color: rgba(242, 237, 232, 0.78);
}

/* Hero is fully opaque — the video fills it completely */
.hero {
  background-color: #1a1008;
}

/* ------------------------------------------------------------
   SERVICES — photo-background cards with hover reveal
------------------------------------------------------------ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-sm);
}

.service-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  cursor: default;
}

/* Background image — set per card via --card-bg inline style */
.service-card::before {
  content: '';
  position: absolute;
  inset: -4px; /* slightly oversize to prevent blur edge bleed */
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;
  filter: brightness(0.60);
  transition: filter 0.55s ease, transform 0.55s ease;
  transform: scale(1.03);
  z-index: 0;
}

/* Gradient scrim — stronger at bottom so title always reads */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 55%,
    transparent 100%
  );
  transition: background 0.55s ease;
  z-index: 1;
}

/* On hover: image darkens and blurs more, full overlay deepens */
.service-card:hover::before {
  filter: brightness(0.25) blur(7px);
  transform: scale(1.08);
}

.service-card:hover::after {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* Title: always visible at the bottom of the card */
.card-title {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease;
  margin: 0;
  text-align: center;
}

.service-card:hover .card-title {
  transform: translateY(-6px);
}

/* Body text: hidden at rest, fades in on hover */
.card-body {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 100%;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  text-align: center;
  transition:
    opacity    0.4s ease 0.1s,
    transform  0.4s ease 0.1s,
    max-height 0.45s ease,
    margin-top 0.4s ease;
}

.service-card:hover .card-body {
  opacity: 1;
  max-height: 220px;
  transform: translateY(0);
  margin-top: 0.6em;
}

/* On touch/mobile devices there's no hover, so always show the body text
   centered both vertically and horizontally in the card */
@media (hover: none) {
  .service-card {
    justify-content: center;
    align-items: center;
  }

  .card-title {
    transform: none;
  }

  .card-body {
    opacity: 1;
    max-height: 220px;
    transform: translateY(0);
    margin-top: 0.6em;
  }

  /* Also deepen the overlay so text stays readable without hover darkening */
  .service-card::after {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.45) 100%
    );
  }
}

/* Hide the flake pile on mobile — doesn't translate well on touch */
@media (max-width: 680px) {
  #flake-pile-container {
    display: none;
  }
}

/* Reduce hero height on mobile so more of the video is visible */
@media (max-width: 680px) {
  .hero {
    min-height: 70vh;
  }
}

/* ------------------------------------------------------------
   SCROLL-IN ANIMATIONS
   Elements start invisible and slide up slightly.
   JS adds .visible when they enter the viewport.
   Stagger delay is set per-element via --stagger custom property.
------------------------------------------------------------ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity  0.55s ease var(--stagger, 0ms),
    transform 0.55s ease var(--stagger, 0ms);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------
   COST ESTIMATOR
------------------------------------------------------------ */
.estimator-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 640px;
  margin-inline: auto;
}

/* Preset buttons */
.size-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.75em 0.5em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-cream);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  font-family: var(--font-body);
  color: var(--color-stone);
}

.preset-btn strong {
  font-size: 1rem;
}

.preset-btn span {
  font-size: 0.75rem;
  color: var(--color-stone-light);
}

.preset-btn:hover,
.preset-btn.active {
  border-color: var(--color-amber);
  background: var(--color-amber-light);
  color: var(--color-amber-dark);
}

.preset-btn.active span {
  color: var(--color-amber-dark);
}

.preset-btn:focus-visible {
  outline: 3px solid var(--color-amber);
  outline-offset: 2px;
}

/* Input group */
.estimator-input-group {
  margin-bottom: var(--space-md);
}

.estimator-input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.input-row input {
  flex: 1;
  max-width: 180px;
  padding: 0.65em 0.75em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-family: var(--font-body);
  color: var(--color-stone);
  background: var(--color-cream);
  transition: border-color var(--transition);
}

.input-row input:focus {
  outline: none;
  border-color: var(--color-amber);
}

.input-unit {
  color: var(--color-stone-mid);
  font-size: 0.9rem;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--color-stone-light);
  margin-top: 0.3em;
}

/* Estimate result */
.estimate-result {
  background: var(--color-amber-light);
  border: 1px solid rgba(196, 98, 29, 0.25);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  text-align: center;
}

.estimate-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-stone-mid);
  margin-bottom: 0.3em;
}

.estimate-range {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-amber-dark);
  font-weight: bold;
  margin-bottom: var(--space-xs);
}

.estimate-disclaimer {
  font-size: 0.8rem;
  color: var(--color-stone-mid);
  max-width: 50ch;
  margin-inline: auto;
}

.estimator-cta {
  text-align: center;
  margin-top: var(--space-md);
}

/* ------------------------------------------------------------
   QUOTE FORM
------------------------------------------------------------ */
.quote-form {
  max-width: 580px;
  margin-inline: auto;
}

/* Honeypot — hidden from humans */
.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: var(--space-sm);
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.required {
  color: var(--color-amber);
  margin-left: 2px;
}

.optional {
  color: var(--color-stone-light);
  font-weight: 400;
  font-size: 0.85em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.65em 0.75em;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-stone);
  background: var(--color-white);
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-amber);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: #c0392b;
}

.form-group textarea {
  resize: vertical;
}

/* Success message */
.form-success {
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
  padding: var(--space-lg);
  background: #eaf7ec;
  border: 1px solid #a8d5b0;
  border-radius: var(--radius-lg);
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-success);
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  margin-bottom: var(--space-sm);
}

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

.form-success p {
  color: var(--color-stone-mid);
  max-width: 40ch;
  margin-inline: auto;
}

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

@media (max-width: 700px) {
  .about-inner { grid-template-columns: 1fr; }
}

.about-image-placeholder {
  aspect-ratio: 4 / 5;
  background: var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  color: var(--color-stone-light);
  font-size: 0.9rem;
  border: 2px dashed var(--color-stone-light);
  text-align: center;
  padding: var(--space-md);
}

.about-image-placeholder span {
  font-size: 3rem;
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-lg);
  display: block;
  aspect-ratio: 4 / 5;
}

.about-text h2 {
  margin-bottom: var(--space-sm);
}

.about-text p {
  color: var(--color-stone-mid);
  margin-bottom: var(--space-sm);
}

.about-list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.about-list li {
  font-weight: 600;
  color: var(--color-stone);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------
   REVIEWS
------------------------------------------------------------ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.review-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  position: relative;
}

.review-card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--color-amber-light);
  position: absolute;
  top: var(--space-sm);
  left: var(--space-md);
  line-height: 1;
  user-select: none;
}

.review-card blockquote {
  padding-top: var(--space-md);
}

.review-card blockquote p {
  color: var(--color-stone-mid);
  font-size: 0.97rem;
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.review-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-card figcaption strong {
  color: var(--color-stone);
  font-size: 0.9rem;
}

.review-card figcaption span {
  color: var(--color-stone-light);
  font-size: 0.8rem;
}

/* Star rating visual */
.review-card::after {
  content: '★★★★★';
  display: block;
  color: var(--color-amber);
  font-size: 0.9rem;
  margin-top: 0.5em;
  letter-spacing: 2px;
}

/* ------------------------------------------------------------
   BEFORE/AFTER GALLERY
------------------------------------------------------------ */
.gallery-hero {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 2-column grid: left column = all Befores, right = all Afters */
.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

@media (max-width: 600px) {
  /* On phones, stack each pair vertically */
  .before-after-grid {
    grid-template-columns: 1fr;
  }
}

.ba-pair {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-border);
}

.ba-pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
}

.ba-label {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  padding: 0.25em 0.7em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 1;
}

.ba-label-before {
  background: rgba(0,0,0,0.55);
  color: #fff;
}

.ba-label-after {
  background: var(--color-amber);
  color: #fff;
}

.gallery-closeup {
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
}

.gallery-closeup img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  font-size: 0.9rem;
  color: var(--color-stone-mid);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  max-width: 100%;
}

/* ------------------------------------------------------------
   OUR PROCESS SECTION
------------------------------------------------------------ */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.process-step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Reverse layout: text left, photo right */
.process-step-row--reverse {
  direction: rtl;
}
.process-step-row--reverse > * {
  direction: ltr;
}

@media (max-width: 700px) {
  .process-step-row,
  .process-step-row--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--space-md);
  }
  /* Always show image on top on mobile */
  .process-step-row--reverse .process-step-img {
    order: -1;
  }
}

.process-step-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.process-step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.process-step-text {
  position: relative;
  padding-left: calc(var(--space-md) + 44px);
}

.process-step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-amber);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.process-step-text h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5em;
  color: var(--color-stone);
}

.process-step-text p {
  color: var(--color-stone-mid);
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ------------------------------------------------------------
   FLAKE OPTIONS SECTION
------------------------------------------------------------ */

/* Process steps */
.flake-process {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.flake-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.flake-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-amber);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.flake-step h3 {
  margin-bottom: 0.3em;
  font-size: 1.1rem;
}

.flake-step p {
  color: var(--color-stone-mid);
  font-size: 0.95rem;
  max-width: 58ch;
}

/* Flake image grid */
.flake-gallery {
  margin-bottom: var(--space-xl);
}

.flake-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 860px) {
  .flake-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .flake-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.flake-swatch {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  transition: box-shadow var(--transition), transform var(--transition);
}

.flake-swatch:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.flake-swatch img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.flake-swatch span {
  display: block;
  text-align: center;
  padding: 0.5em 0.4em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-stone);
  letter-spacing: 0.02em;
}

/* Visualizer CTA */
.flake-visualizer-cta {
  text-align: center;
  max-width: 52ch;
  margin-inline: auto;
}

.flake-visualizer-cta p {
  color: var(--color-stone-mid);
  margin-bottom: var(--space-md);
  max-width: 52ch;
  margin-inline: auto;
}

/* ------------------------------------------------------------
   FLAKE PILE
------------------------------------------------------------ */
#flake-pile-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 180px;
  background-color: rgba(250, 247, 244, 0.78);
  overflow: hidden;
}

#flake-pile-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------
   FOOTER
------------------------------------------------------------ */
.site-footer {
  background: var(--color-stone);
  color: rgba(255,255,255,0.8);
  padding-top: var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-lg) var(--space-xl);
  align-items: start;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 680px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-logo-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  /* Logo has its own dark gray background, so it shows naturally
     against the dark footer without any filter needed. */
}

.footer-brand .logo-mark {
  font-size: 1.6rem;
  color: var(--color-white);
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.footer-contact a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-contact a:hover { color: var(--color-amber-light); }

.footer-area p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  max-width: 32ch;
}

.footer-bottom {
  padding-block: var(--space-sm);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ------------------------------------------------------------
   FINISH REVEAL — flip circle + sliding details panel
------------------------------------------------------------ */
.gallery-hero--annotated {
  position: relative;
}

/* Outer wrapper — flex row, right-anchored */
.finish-reveal {
  display: none; /* hidden on mobile — overlaps the After photo */
}

@media (min-width: 640px) {
.finish-reveal {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

/* ---- Medallion circle ---- */
.finish-medallion {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  perspective: 600px;
  position: relative;
  order: 2; /* circle always on right */
}

/* Pulse ring */
.finish-medallion::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(196, 98, 29, 0.6);
  animation: medallion-pulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes medallion-pulse {
  0%   { transform: scale(0.9); opacity: 0.8; }
  70%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

.finish-reveal.open .finish-medallion::before {
  animation: none;
  opacity: 0;
}

/* 3D flip */
.finish-medallion-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.finish-reveal.open .finish-medallion-inner {
  transform: rotateY(180deg);
}

/* Shared face */
.finish-medallion-front,
.finish-medallion-back {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Front */
.finish-medallion-front {
  background: var(--color-amber);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  padding: 12px;
  gap: 0;
}

.finish-medallion-front span {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* Back — close-up photo */
.finish-medallion-back {
  transform: rotateY(180deg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

.finish-medallion-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Details panel ---- */
.finish-details-panel {
  order: 1;
  overflow: hidden;
  width: 0;
  opacity: 0;
  background: rgba(30, 18, 10, 0.88);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  height: 116px;
  white-space: nowrap;
  transition:
    width  0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
    opacity 0.4s ease 0.35s,
    padding 0.5s ease 0.25s;
  position: relative;
}

.finish-reveal.open .finish-details-panel {
  width: 200px;
  opacity: 1;
  padding: 24px var(--space-md) 12px;
}

.finish-details-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.finish-details-close:hover { color: #fff; }

.finish-details-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  margin-bottom: 4px;
  max-width: 100%;
}

.finish-details-line {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  max-width: 100%;
}

.finish-details-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
  max-width: 100%;
}

/* ------------------------------------------------------------
   PROMO RIBBON — diagonal corner banner
------------------------------------------------------------ */
.promo-ribbon {
  position: fixed;
  top: 52px;
  right: -52px;
  width: 240px;
  background: var(--color-amber);
  color: #fff;
  text-align: center;
  transform: rotate(45deg);
  z-index: 101;
  padding: 12px 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-ribbon span {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.promo-ribbon-sub {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  opacity: 0.95;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

/* ------------------------------------------------------------
   ACCESSIBILITY — skip link
------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 0.5em 1em;
  background: var(--color-amber);
  color: white;
  z-index: 9999;
  font-weight: bold;
}

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