/* ==========================================================================
   Generic Static Website — Design System
   All theme values (color, radius, font) are set at runtime via CSS variables
   from content.json → theme. Editing this file is not required for rebranding.
   ========================================================================== */

:root {
  /* Fallback defaults; overridden by theme JSON */
  --color-primary: #0F766E;
  --color-secondary: #1E293B;
  --color-accent: #F97316;
  --color-bg: #FFFFFF;
  --color-surface: #F8FAFC;
  --color-text: #111827;
  --color-muted: #6B7280;
  --color-border: #E5E7EB;
  --radius: 14px;
  --radius-lg: 22px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, .10);

  --container: 1200px;
  --nav-h: 72px;
}

/* --------------------------------------------------------------- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font); color: var(--color-secondary); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1em; color: var(--color-text); }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--color-secondary); color: #fff; padding: 10px 14px;
  border-radius: 8px; z-index: 1000;
}
.skip-link:focus { left: 8px; }
:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--color-primary) 60%, white);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------------------------------------ Layout ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
section:nth-of-type(even) { background: var(--color-surface); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 600;
  color: var(--color-primary); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 12px;
}
.section-head p { color: var(--color-muted); font-size: 1.05rem; }

.layout { display: grid; grid-template-columns: 1fr; }
@media (min-width: 1200px) {
  .layout.has-sidebar { grid-template-columns: minmax(0,1fr) 300px; gap: 24px; max-width: calc(var(--container) + 324px); margin: 0 auto; padding: 0 24px; }
  .layout.has-sidebar .main-content { min-width: 0; }
}

/* ------------------------------------------------------------ Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 22px; font-weight: 600; font-size: .95rem;
  border-radius: var(--radius); border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  position: relative; overflow: hidden;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: color-mix(in oklab, var(--color-primary) 88%, black); }
.btn-secondary { background: transparent; color: var(--color-secondary); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-surface); }
.btn-accent { background: var(--color-accent); color: #fff; }

/* Ripple */
.btn::after {
  content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.35);
  transform: scale(0); border-radius: 50%; opacity: 0; pointer-events: none;
  transition: transform .5s ease, opacity .6s ease;
}
.btn:active::after { transform: scale(2.5); opacity: 1; transition: 0s; }

/* ------------------------------------------------------------ Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--color-secondary); font-size: 1.1rem; }
.nav .brand img { height: 36px; width: auto; }
.nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.nav ul a {
  padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: .95rem;
  color: var(--color-secondary); transition: background .15s ease, color .15s ease;
}
.nav ul a:hover { background: var(--color-surface); color: var(--color-primary); }
.nav .header-cta { display: inline-flex; }

.menu-btn {
  display: none; background: transparent; border: 1px solid var(--color-border);
  border-radius: 10px; padding: 8px 12px; color: var(--color-secondary);
}
@media (max-width: 900px) {
  .nav ul, .nav .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .nav.open ul {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--color-border); padding: 14px 24px; gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav.open .header-cta { display: inline-flex; position: absolute; top: calc(var(--nav-h) + 8px); right: 24px; }
}

/* -------------------------------------------------------------- Hero ---- */
.hero { padding: 96px 0 72px; }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero .eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in oklab, var(--color-primary) 12%, white);
  color: var(--color-primary); font-size: .82rem; font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: 18px; }
.hero p.lead { font-size: 1.1rem; color: var(--color-muted); margin-bottom: 28px; max-width: 56ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .hero-image {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--color-surface);
}
.hero .hero-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
}

/* ------------------------------------------------------------- About ---- */
.about .container { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.about .about-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; background: var(--color-surface); }
.about .about-image img { width: 100%; height: 100%; object-fit: cover; }
.about ul.highlights { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.about ul.highlights li {
  padding-left: 30px; position: relative; color: var(--color-secondary); font-weight: 500;
}
.about ul.highlights li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 18px; height: 18px;
  border-radius: 50%; background: color-mix(in oklab, var(--color-primary) 15%, white);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F766E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}
@media (max-width: 900px) { .about .container { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- Services --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: color-mix(in oklab, var(--color-primary) 12%, white);
  color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; color: var(--color-secondary); }
.card p { color: var(--color-muted); margin: 0; font-size: .95rem; }

/* Features (same base but on surface) */
.features { }
.features .card { background: #fff; }

/* -------------------------------------------------------------- Stats --- */
.stats { background: var(--color-secondary); color: #fff; }
.stats h2, .stats .section-head p { color: #fff; }
.stats .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; text-align: center; }
.stats .stat .value { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; color: var(--color-accent); letter-spacing: -.02em; }
.stats .stat .label { color: rgba(255,255,255,.75); font-size: .95rem; margin-top: 4px; }

/* ------------------------------------------------------------ Gallery --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gallery-grid a {
  display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4/3;
  background: var(--color-surface); box-shadow: var(--shadow-sm);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

/* -------------------------------------------------------- Testimonials -- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.testimonial {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.testimonial::before {
  content: "“"; font-family: Georgia, serif; font-size: 4.4rem; line-height: 1;
  position: absolute; top: 8px; right: 18px; color: color-mix(in oklab, var(--color-primary) 18%, white);
}
.testimonial p { color: var(--color-text); font-size: 1rem; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.testimonial .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in oklab, var(--color-primary) 15%, white);
  color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.testimonial .name { font-weight: 600; color: var(--color-secondary); }
.testimonial .role { color: var(--color-muted); font-size: .85rem; }

/* --------------------------------------------------------------- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600;
  color: var(--color-secondary); display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-weight: 400; font-size: 1.4rem; color: var(--color-primary);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .answer { padding: 0 22px 20px; color: var(--color-muted); }

/* ----------------------------------------------------------- Contact ---- */
.contact .container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .contact .container { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 16px; }
.contact-info .item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff;
}
.contact-info .item .icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: color-mix(in oklab, var(--color-primary) 12%, white);
  color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center;
}
.contact-info .item .label { font-size: .8rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-info .item .value { font-weight: 600; color: var(--color-secondary); }
.contact-info .map {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border);
  aspect-ratio: 16/10; background: var(--color-surface);
}
.contact-info .map iframe { width: 100%; height: 100%; border: 0; }

.contact-form {
  background: #fff; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
}
.contact-form label { display: block; font-size: .88rem; font-weight: 600; margin: 0 0 6px; color: var(--color-secondary); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border);
  border-radius: 10px; font: inherit; margin-bottom: 16px; background: #fff; color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 20%, transparent);
  outline: none;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .form-status { margin-top: 10px; font-size: .9rem; color: var(--color-primary); min-height: 1.2em; }

/* -------------------------------------------------------------- Footer -- */
.site-footer { background: var(--color-secondary); color: #cbd5e1; padding: 64px 0 24px; margin-top: 0; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr)); gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-grid p { color: #94a3b8; font-size: .95rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: #cbd5e1; font-size: .95rem; transition: color .15s ease; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; padding-top: 20px; gap: 12px;
  font-size: .85rem; color: #94a3b8; flex-wrap: wrap;
}
.socials { display: flex; gap: 8px; }
.socials a {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border-radius: 10px; transition: background .15s ease;
}
.socials a:hover { background: rgba(255,255,255,.14); }
.socials svg { width: 18px; height: 18px; }

/* --------------------------------------------------- Floating buttons --- */
.floating-actions { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); border: none;
  transition: transform .15s ease, background .2s ease;
}
.fab:hover { transform: scale(1.07); }
.fab.whatsapp { background: #25D366; }
.fab.call { background: var(--color-accent); }
.fab.top { background: var(--color-secondary); }
.fab.hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }
.fab svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------- Ads ---- */
.ad-slot { display: none; }
.ad-slot.active { display: block; }
.ad-top, .ad-footer {
  background: var(--color-surface); border-block: 1px solid var(--color-border);
  padding: 14px; text-align: center; color: var(--color-muted); font-size: .8rem;
}
.ad-sidebar {
  position: sticky; top: calc(var(--nav-h) + 24px); align-self: start;
  background: var(--color-surface); border: 1px dashed var(--color-border);
  border-radius: var(--radius); padding: 24px 14px; text-align: center;
  color: var(--color-muted); font-size: .8rem; min-height: 400px;
}
@media (max-width: 1199px) { .ad-sidebar.active { display: none; } }

/* -------------------------------------------------------- Animations --- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp .7s ease both; }
.reveal-fade.in { animation: fadeIn .8s ease both; }
.reveal-scale.in { animation: scaleIn .5s ease both; }

.hover-lift { transition: transform .2s ease, box-shadow .2s ease; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
