/* ============================================================
   ABU PAINTING — SITE STYLES
   ------------------------------------------------------------
   Section map (in DOM order):
     1.  Design tokens
     2.  Base & typography
     3.  Utilities
     4.  Header & navigation
     5.  Flash messages
     6.  Hero
     7.  Trust band (marquee)
     8.  Sections (shared)
     9.  Testimonials
     10. Design tool & chat
     11. FAQ
     12. Footer
     13. Visualizer (recolor tool)
     14. Reduced motion
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Fonts */
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;

  /* Brand accents */
  --teal: #35c8c2;
  --blue: #1f5fc4;
  --orange: #e0913f;
  --orange-dark: #c97a28;
  --green: #6abf4b;
  --green-dark: #4e9b33;
  --whatsapp: #25d366;

  /* Body & footer scheme */
  --ink: #0f1b2d;          /* near-navy body text — authority */
  --muted: #5a6473;        /* secondary text */
  --bg: #f7f9fc;           /* warm off-white page background */
  --card: #ffffff;
  --line: #e4e8ef;         /* hairline borders */
  --footer-bg: #0f1b2d;    /* deep navy footer */

  /* Elevation */
  --shadow-sm: 0 4px 14px rgba(15, 27, 45, .07);
  --shadow-md: 0 12px 30px rgba(15, 27, 45, .10);
  --shadow-lg: 0 18px 40px rgba(15, 27, 45, .16);
  --radius: 14px;

  /* Hero/header gradient — do not recolour */
  --hero: linear-gradient(90deg, rgba(42, 78, 155, 1) 0%, rgba(66, 126, 164, 1) 27%, rgba(87, 199, 133, 1) 50%, rgba(107, 210, 183, 1) 76%, rgba(237, 221, 83, 1) 100%);
}


/* ============================================================
   2. BASE & TYPOGRAPHY
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3, h4, .brand-name {
  font-family: var(--font-head);
  letter-spacing: -0.01em;
}
img { max-width: 100%; }
a { color: var(--blue); }


/* ============================================================
   3. UTILITIES
   ============================================================ */
.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;
}


/* ============================================================
   4. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: #fff;
  position: relative; z-index: 10;
}
.header-overlay {
  background: var(--hero);
  margin-bottom: -4.5rem;
  color: #fff;
}
.header-overlay .site-nav { background: transparent; }

.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; }
.brand-icon { width: 1.5rem; height: 1.5rem; }
.brand-name { font-weight: 600; font-size: 1.05rem; }

.nav-toggle {
  margin-left: auto;
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 2px solid currentColor; border-radius: 8px;
  padding: 9px 8px; cursor: pointer; color: inherit;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav: its own row under the brand. Collapsed height is zero;
   opening it grows the header, which flows the hero content downward
   via the overlay's negative margin. */
.site-nav {
  order: 3;
  flex-basis: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height .3s ease, opacity .25s ease, margin-top .3s ease;
}
.site-nav.open { max-height: 60vh; opacity: 1; margin-top: 1rem; }
.site-nav a {
  padding: .5rem 0; font-weight: 600; text-decoration: none;
  color: inherit;
}
.site-nav a:hover { opacity: .75; }
body:not(.page-home),
body:not(:has(.header-overlay)) { color: var(--green-dark) !important; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-header { flex-wrap: nowrap; }
  .site-nav {
    order: 0; flex-basis: auto; margin-left: auto; margin-top: 0;
    flex-direction: row; align-items: center; gap: .25rem;
    max-height: none; opacity: 1; overflow: visible;
  }
  .site-nav a { padding: .5rem .75rem; border-radius: 8px; }
  .site-nav a:hover { background: rgba(255, 255, 255, .15); opacity: 1; }
  .header-overlay .site-nav a { color: #fff; }
  body:not(:has(.header-overlay)) .site-nav a { color: var(--ink); }
}


/* ============================================================
   5. FLASH MESSAGES
   ============================================================ */
.flash-stack { max-width: 1100px; margin: 1rem auto 0; padding: 0 1rem; }
.flash {
  padding: .8rem 1.1rem; margin-bottom: .5rem;
  border-radius: 10px; border-left: 4px solid var(--blue);
  background: #fff;
}
.flash-error { border-left-color: #c0392b; }
.flash-success { border-left-color: var(--green); }


/* ============================================================
   6. HERO
   ============================================================ */
.hero {
  background: var(--hero) fixed;
  color: #fff;
  padding-top: 6rem;
}
.hero-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  align-items: center;
}
@media (min-width: 800px) { .hero-inner { grid-template-columns: 1.1fr .9fr; } }

.hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  color: var(--orange);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

/* Rotating subheadings — cycles one line at a time, CSS only.
   To add/remove lines, update --sub-count and the :nth-child delays. */
.hero-rotator {
  --sub-count: 3;
  --sub-hold: 2.4s;
  position: relative;
  margin: 0 0 1.75rem;
  min-height: 1.6em;
}
.hero-sub {
  margin: 0;
  font-size: 1.05rem;
  position: absolute; top: 0; left: 0; right: 0;
  opacity: 0;
  animation: heroSubCycle calc(var(--sub-hold) * var(--sub-count)) infinite;
}
.hero-sub:nth-child(1) { animation-delay: calc(var(--sub-hold) * 0); }
.hero-sub:nth-child(2) { animation-delay: calc(var(--sub-hold) * 1); }
.hero-sub:nth-child(3) { animation-delay: calc(var(--sub-hold) * 2); }
@keyframes heroSubCycle {
  0%   { opacity: 0;   transform: translateY(8px); }
  8%   { opacity: .95; transform: translateY(0); }
  33%  { opacity: .95; transform: translateY(0); }
  41%  { opacity: 0;   transform: translateY(-8px); }
  100% { opacity: 0;   transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-sub { animation: none; transition: opacity .3s; }
  .hero-sub:not(:first-child) { opacity: 0; }
  .hero-sub:first-child { opacity: .95; position: relative; }
}

.hero-photo { display: flex; justify-content: center; }

.hero-carousel {
  width: min(380px, 90%);
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transform: rotate(3deg);
  transition: transform .3s ease;
}
.hero-carousel:hover { transform: rotate(0deg) scale(1.02); }
.hero-carousel-img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.hero-carousel .carousel-indicators { margin-bottom: .5rem; }
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 9px; height: 9px; margin: 0 4px;
  border: none; border-radius: 50%;
  background-color: #fff; opacity: .5;
}
.hero-carousel .carousel-indicators .active { opacity: 1; background-color: var(--orange); }
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next { width: 12%; opacity: .7; transition: opacity .2s ease; }
.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next { opacity: 1; }


/* ============================================================
   7. TRUST BAND (MARQUEE)
   ============================================================ */
.trust-band {
  background: linear-gradient(90deg, #c8f0c0, #9fd3f0 55%, #b3a8e8);
  padding: .8rem 1rem;
  color: #fff; font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}
.marquee__inner {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee__group { display: flex; }
.marquee__group span {
  margin: 0 1.5rem;
  padding: 4px 16px 4px 12px;
  white-space: nowrap;
  border-radius: 6px;
  color: #fff; font-size: 1.2rem;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ============================================================
   8. SECTIONS (SHARED)
   ============================================================ */
.section { max-width: 1100px; margin: 0 auto; padding: 3rem 1rem; }
.section h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin: 0 0 .5rem; }
.heading-orange { color: var(--orange); }
.section-lead { max-width: 620px; margin: 0 0 1rem; color: var(--muted); }
.lead-orange { margin: 0 0 1.5rem; color: var(--orange); }


/* ============================================================
   9. TESTIMONIALS
   ============================================================ */
#testimonials { padding: 3rem 1rem; }

.testimonial-scroller {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 4px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.testimonial-scroller::-webkit-scrollbar { width: 8px; height: 8px; }
.testimonial-scroller::-webkit-scrollbar-track { background: #f0f2f6; border-radius: 10px; }
.testimonial-scroller::-webkit-scrollbar-thumb { border-radius: 20px; background: #b6bdc9; }
.testimonial-scroller::-webkit-scrollbar-thumb:hover { background: var(--blue); }

.testimonial-card {
  position: relative;
  flex: 0 0 min(350px, 85vw);
  display: flex;
  padding: 32px;
  border-radius: 16px;
  background-color: var(--card);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  color: var(--ink);
  line-height: 1.6;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
}
.testimonial-card .content {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; height: 100%;
  justify-content: space-between;
}
.testimonial-card .header strong { font-family: var(--font-head); }
.testimonial-card .footer { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.testimonial-card .quotes { width: 48px; height: 48px; fill: var(--blue); }
.testimonial-card .para { font-size: 16px; color: var(--muted); }

.testimonial-fallback {
  max-width: 540px;
  margin: 0 auto;
}
.testimonial-fallback .testimonial-card {
  width: 100%;
  flex: 1 1 100%;
}

@media (min-width: 900px) {
  .testimonial-scroller {
    padding-bottom: 28px;
  }
}



/* ============================================================
   10. DESIGN TOOL & CHAT
   ============================================================ */
.tool-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 900px) { .tool-grid { grid-template-columns: 1.2fr .8fr; } }

.tool-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  padding: 2.5rem 2rem;
  background: #eef8e8; border: 2px solid var(--green); border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-decoration: none; text-align: center; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tool-panel svg { width: 64px; height: 64px; color: var(--green-dark); }
.tool-panel-title { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; }
.tool-panel-sub { max-width: 34ch; color: var(--muted); }
.tool-panel .cta-pill-green { margin-top: .75rem; }

.chat-card {
  padding: 1.5rem;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.chat-card h3 { margin: 0 0 1rem; font-size: 1.2rem; }
.chat-card input, .chat-card textarea,
.viz-card input[type="text"], .viz-card input[type="email"], .viz-card input[type="file"] {
  width: 100%; margin-bottom: .8rem; padding: .7rem .9rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #f0f2f6; font: inherit; color: var(--ink);
}
.chat-card input:focus, .chat-card textarea:focus { outline: 2px solid var(--blue); background: #fff; }
.chat-card textarea { resize: vertical; }
.chat-note { margin: .6rem 0 0; font-size: .8rem; color: var(--muted); }


/* ---- CTA buttons (shared) ---- */
.cta-pill {
  display: inline-block;
  padding: .7rem 1.6rem;
  background: #fff; color: var(--orange);
  border: none; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .26); }
.cta-pill-green { background: var(--green); color: #fff; }

.cta-whatsapp {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.4rem;
  background: #f0f2f6; color: var(--orange);
  border: none; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease;
}
.cta-whatsapp:hover { transform: translateY(-2px); }
.cta-whatsapp svg { width: 22px; height: 22px; color: var(--whatsapp); }


/* ============================================================
   11. FAQ
   ============================================================ */
.faq-heading { display: flex; align-items: center; justify-content: center; gap: .5rem; text-align: center; }
.faq-heading svg { width: 1.3rem; height: 1.3rem; color: var(--muted); }
.faq-list { max-width: 640px; margin: 1.5rem auto 0; display: grid; gap: .8rem; }
.faq-item {
  padding: .2rem 1.1rem;
  background: var(--card); border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 0;
  font-weight: 500; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 1rem; color: var(--muted); }


/* ============================================================
   12. FOOTER
   ============================================================ */
.site-footer {
  margin-top: 3rem;
  background: var(--footer-bg); color: #cfd6e2;
  border-top: 3px solid transparent;
  border-image: var(--hero) 1;
}
.site-footer h3 { margin: 1.5rem 0 .5rem; color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .25rem 0; }
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  display: grid; gap: 1rem 4rem; grid-template-columns: 1fr;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-contact { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; }
.footer-contact svg { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
.footer-contact a { color: #cfd6e2; }
.footer-base {
  max-width: 1100px; margin: 0 auto;
  padding: 1.1rem 1rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem;
}


/* ============================================================
   13. VISUALIZER (RECOLOR TOOL)
   ============================================================ */

/* Palette popover */
.palette-popover {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(20, 24, 30, .45);
}
.palette-inner {
  width: 100%; max-width: 420px; max-height: 85vh;
  padding: 1.25rem;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  overflow-y: auto;
}
.palette-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.palette-head button { background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.palette-family { margin: .8rem 0 .35rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.swatch-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch {
  width: 40px; height: 40px;
  background: var(--sw); border: 1px solid rgba(0, 0, 0, .15); border-radius: 10px;
  cursor: pointer; transition: transform .12s ease;
}
.swatch:hover { transform: scale(1.12); outline: 2px solid var(--blue); }
.palette-custom { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.1rem; font-size: .9rem; }
.palette-custom input[type="color"] { width: 44px; height: 36px; padding: 2px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.btn-small {
  padding: .45rem .9rem;
  background: var(--blue); border: none; border-radius: 8px;
  font: inherit; font-size: .85rem; color: #fff; cursor: pointer;
} */


/* ============================================================
   14. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}