/* ============================================
   ÉLARA ESTÉTICA — Design System
   Site institucional estático (HTML/CSS/JS)
   ============================================ */

/* ----- Tokens (Light) ----- */
:root {
  --background: oklch(0.985 0.008 80);
  --foreground: oklch(0.22 0.02 40);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.22 0.02 40);
  --primary: oklch(0.55 0.08 20);
  --primary-foreground: oklch(0.985 0.008 80);
  --secondary: oklch(0.94 0.02 60);
  --muted: oklch(0.95 0.012 70);
  --muted-foreground: oklch(0.5 0.025 40);
  --accent: oklch(0.85 0.06 75);
  --border: oklch(0.9 0.015 60);
  --input: oklch(0.92 0.012 65);
  --ring: oklch(0.55 0.08 20);
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 6px 20px -8px rgba(0,0,0,.12);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,.18);

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", "Playfair Display", ui-serif, Georgia, serif;
  color-scheme: light;
}

/* ----- Tokens (Dark) ----- */
html.dark {
  --background: oklch(0.16 0.012 40);
  --foreground: oklch(0.96 0.012 80);
  --card: oklch(0.21 0.014 40);
  --card-foreground: oklch(0.96 0.012 80);
  --primary: oklch(0.78 0.07 25);
  --primary-foreground: oklch(0.18 0.015 35);
  --secondary: oklch(0.26 0.018 40);
  --muted: oklch(0.24 0.014 40);
  --muted-foreground: oklch(0.72 0.02 60);
  --accent: oklch(0.72 0.08 75);
  --border: oklch(1 0 0 / 14%);
  --input: oklch(1 0 0 / 14%);
  --ring: oklch(0.78 0.07 25);
  color-scheme: dark;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; border-color: var(--border); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
/* Prevent grid/flex children from forcing horizontal overflow */
section, .container, .grid, .hero-grid, .about-grid, .contact-grid { min-width: 0; }
.grid > *, .hero-grid > *, .about-grid > *, .contact-grid > * { min-width: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
input, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 20%, transparent);
}

h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--foreground);
}

/* ----- Layout ----- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

main { flex: 1; }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  width: 100%;
  background: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em;
}
.brand svg { color: var(--primary); }

.nav-desktop { display: none; align-items: center; gap: 0.25rem; }
.nav-desktop a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 0.375rem;
  transition: color .15s;
}
.nav-desktop a:hover { color: var(--foreground); }
.nav-desktop a.active { color: var(--foreground); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.5rem;
  color: var(--muted-foreground);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--muted); color: var(--foreground); }
.icon-btn .icon-sun { display: none; }
.icon-btn .icon-moon { display: block; }
html.dark .icon-btn .icon-sun { display: block; }
html.dark .icon-btn .icon-moon { display: none; }

.menu-toggle { display: inline-flex; }
.menu-toggle .x { display: none; }
.menu-toggle.open .menu { display: none; }
.menu-toggle.open .x { display: block; }

.nav-mobile { display: none; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.nav-mobile.open { display: block; }
.nav-mobile nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem 1rem; }
.nav-mobile a {
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem; font-weight: 500;
  color: var(--muted-foreground);
}
.nav-mobile a:hover, .nav-mobile a.active { background: var(--muted); color: var(--foreground); }
.nav-mobile .btn { margin-top: 0.5rem; justify-content: center; }

@media (min-width: 768px) {
  .nav-desktop { display: inline-flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
  .header-actions .btn { display: inline-flex; }
}
.header-actions .btn { display: none; }
@media (min-width: 768px) { .header-actions .btn { display: inline-flex; } }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  background: var(--primary);
  color: var(--primary-foreground);
  transition: opacity .15s, transform .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
.btn-lg { padding: 0.75rem 1.4rem; font-size: 1rem; }
.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--muted); opacity: 1; }
.btn-ghost {
  background: transparent;
  color: var(--foreground);
}
.btn-ghost:hover { background: var(--muted); opacity: 1; }
.btn-block { width: 100%; }

/* ----- Card ----- */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.card-hover:hover { box-shadow: var(--shadow-xl); }
.card-body { padding: 1.5rem; }
@media (min-width: 768px) { .card-body { padding: 2rem; } }

/* ----- Sections / utility ----- */
.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }
.section-tight { padding: 3.5rem 0; }
.text-center { text-align: center; }
.muted { color: var(--muted-foreground); }
.eyebrow {
  font-size: 0.75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: inline-block;
}
.h1 { font-size: clamp(1.85rem, 6vw, 3.5rem); word-wrap: break-word; overflow-wrap: break-word; }
.h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); word-wrap: break-word; overflow-wrap: break-word; }
.h3 { font-size: 1.4rem; }
.lead { font-size: 1.05rem; color: var(--muted-foreground); max-width: 42rem; margin: 1.25rem auto 0; padding: 0 0.5rem; }

.badge-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 50%, transparent);
  border-radius: 9999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-foreground);
}
.badge-pill svg { color: var(--primary); }

.tag {
  display: inline-block;
  background: color-mix(in oklab, var(--primary) 12%, transparent);
  color: var(--primary);
  font-size: 0.72rem; font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

.icon-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 12%, transparent);
  color: var(--primary);
}

/* ----- Grids ----- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.gap-lg { gap: 2.5rem; }

/* ----- HERO ----- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  align-items: center;
  padding: 4rem 0;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 4rem; padding: 6rem 0; }
}
.hero h1 { margin-top: 1rem; }
.hero h1 em { color: var(--primary); font-style: italic; }
.hero-text > * + * { margin-top: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.5rem; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; padding-top: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars svg { fill: currentColor; }
.hero-image-wrap { position: relative; }
.hero-image-wrap::before {
  content: ""; position: absolute; inset: -1.5rem; z-index: -1;
  border-radius: 2.5rem;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--primary) 22%, transparent),
    color-mix(in oklab, var(--accent) 30%, transparent),
    transparent);
  filter: blur(40px);
}
.hero-image-wrap img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

/* ----- Features strip ----- */
.features {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: color-mix(in oklab, var(--muted) 35%, transparent);
}
.features .grid-4 { padding: 3.5rem 0; }
.feature h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin: 0.5rem 0; letter-spacing: 0; }
.feature p { font-size: 0.875rem; color: var(--muted-foreground); }

/* ----- Service cards ----- */
.section-head {
  display: flex; flex-direction: column; gap: 1rem;
  align-items: flex-start; justify-content: space-between;
  margin-bottom: 3rem;
}
@media (min-width: 768px) { .section-head { flex-direction: row; align-items: flex-end; } }

.service-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.service-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.service-card:hover img { transform: scale(1.05); }
.service-card h3 { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 0.5rem; }
.service-card p { font-size: 0.9rem; color: var(--muted-foreground); }

/* ----- Service detail (servicos.html) ----- */
.service-block {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}
@media (min-width: 900px) {
  .service-block { grid-template-columns: 1fr 1fr; gap: 3.5rem; margin-bottom: 5rem; }
  .service-block.reverse > .img-wrap { order: 2; }
}
.service-block .img-wrap { position: relative; }
.service-block .img-wrap::before {
  content: ""; position: absolute; inset: -1rem; z-index: -1;
  border-radius: 2.5rem;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--primary) 18%, transparent),
    color-mix(in oklab, var(--accent) 22%, transparent));
  filter: blur(40px);
}
.service-block img {
  aspect-ratio: 1/1; object-fit: cover; width: 100%;
  border-radius: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.service-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.25rem 0; }
.service-list li { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.92rem; }
.service-list svg { color: var(--primary); flex-shrink: 0; margin-top: 4px; }

/* ----- CTA ----- */
.cta {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--primary) 10%, transparent),
    color-mix(in oklab, var(--accent) 10%, transparent),
    transparent);
}
.cta-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  padding: 5rem 0; text-align: center;
}
.cta-inner h2 { max-width: 36rem; }
.cta-inner p { max-width: 32rem; color: var(--muted-foreground); }

/* ----- About page ----- */
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.about-grid .copy > * + * { margin-top: 1rem; }
.about-grid .copy p { color: var(--muted-foreground); }
.about-img-wrap { position: relative; }
.about-img-wrap::before {
  content: ""; position: absolute; inset: -1rem; z-index: -1;
  border-radius: 2.5rem;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--primary) 20%, transparent),
    color-mix(in oklab, var(--accent) 22%, transparent));
  filter: blur(40px);
}
.about-img-wrap img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}
.values-strip {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: color-mix(in oklab, var(--muted) 30%, transparent);
}
.value-card { padding: 1.5rem; }
.value-card h3 { font-family: var(--font-serif); font-size: 1.3rem; margin: 0.75rem 0 0.5rem; }
.value-card p { font-size: 0.9rem; color: var(--muted-foreground); }

/* ----- Portfolio gallery ----- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}
.gallery img {
  aspect-ratio: 1/1; object-fit: cover; width: 100%;
  transition: transform .7s;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.25rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  opacity: 0; transition: opacity .25s;
}
.gallery figure:hover figcaption { opacity: 1; }
.gallery figcaption span {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.7rem; opacity: 0.85;
}
.gallery figcaption p { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; }

/* ----- Blog ----- */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 800px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
.blog-card .img-wrap { aspect-ratio: 16/10; overflow: hidden; }
.blog-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.blog-card:hover img { transform: scale(1.05); }
.blog-card h2 { font-family: var(--font-serif); font-size: 1.4rem; margin: 0.75rem 0 0.5rem; transition: color .15s; }
.blog-card:hover h2 { color: var(--primary); }
.blog-card p { font-size: 0.9rem; color: var(--muted-foreground); }
.blog-meta { display: flex; gap: 1rem; padding-top: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.blog-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ----- Contato ----- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 3fr 2fr; } }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 600px) { .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; } }
.field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.4rem; }
.info-list { display: flex; flex-direction: column; gap: 0.85rem; font-size: 0.9rem; color: var(--muted-foreground); }
.info-list li { display: flex; gap: 0.75rem; align-items: flex-start; }
.info-list svg { color: var(--primary); flex-shrink: 0; margin-top: 4px; }
.map-card iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }

/* ----- Toast ----- */
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 100;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xl);
  max-width: 22rem;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast strong { display: block; margin-bottom: 0.2rem; }
.toast small { color: var(--muted-foreground); }

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: color-mix(in oklab, var(--muted) 25%, transparent);
  margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding: 3rem 0 2rem;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-grid ul { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.875rem; color: var(--muted-foreground); }
.footer-grid a:hover { color: var(--foreground); }
.footer-grid p { font-size: 0.875rem; color: var(--muted-foreground); max-width: 22rem; }
.footer-bottom {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  padding: 1.25rem 0;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  text-align: center;
}
