/* Global reset and theme */
:root {
  --bg: #0d0b09;
  --bg-soft: #16120d;
  --card: #1c1711;
  --text: #f6f2e8;
  --muted: #c7b59a;
  --brand: #c99a4a;
  --brand-strong: #a9782f;
  --accent: #f2cc89;
  --line: #3a2f1f;
  --success: #d7b172;
  --shadow: 0 20px 45px rgba(4, 8, 17, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(201, 154, 74, 0.16), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(242, 204, 137, 0.12), transparent 38%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.06;
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(760px, 70vw);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(201, 154, 74, 0.15), transparent 65%);
}

body.page-services::before {
  background-image: url("images/logotipo_horizontal.png");
}

body.page-about::before {
  background-image: url("images/logotipo_principal.png");
}

body.page-projects::before {
  background-image: url("images/isotipe.png");
}

body.page-contact::before {
  background-image: url("images/logotipo.png");
}

body.is-entering main {
  opacity: 0;
  transform: translateY(10px);
}

body.is-ready main {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Header and nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(13, 11, 9, 0.82);
  border-bottom: 1px solid rgba(199, 181, 154, 0.16);
  transition: transform 0.28s ease;
}

.site-header.nav-hidden {
  transform: translateY(-100%);
}

.topline {
  border-bottom: 1px solid rgba(199, 181, 154, 0.15);
  background: rgba(19, 14, 10, 0.84);
  color: var(--muted);
  font-size: 0.83rem;
}

.topline-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  flex-wrap: wrap;
}

.topline-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand-mark {
  width: 36px;
  aspect-ratio: 1;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(212, 166, 79, 0.35), rgba(240, 204, 134, 0.2)),
    url("images/isotipe.png") center/cover no-repeat;
  display: grid;
  place-items: center;
  color: transparent;
  font-weight: 900;
  border: 1px solid rgba(240, 204, 134, 0.25);
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-name img {
  height: 26px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links .active {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-strong));
  color: #1d1204;
  box-shadow: 0 12px 26px rgba(169, 120, 47, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(17, 26, 46, 0.5);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-contact {
  border-color: rgba(201, 154, 74, 0.65);
  color: #f7e7c4;
  background: rgba(201, 154, 74, 0.12);
}

.btn-contact:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Page sections */
.hero {
  padding: 80px 0 54px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(14, 10, 8, 0.78), rgba(14, 10, 8, 0.9)),
    url("images/brand_essence_pro.png") center/cover no-repeat;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-logo {
  margin-bottom: 14px;
}

.hero-logo img {
  width: min(420px, 85%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
}

.hero-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  background: rgba(102, 214, 166, 0.12);
  border: 1px solid rgba(102, 214, 166, 0.34);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.1rem);
  line-height: 1.05;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  margin-bottom: 10px;
}

.lead {
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 30px;
}

.hero p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.stat strong {
  display: block;
  font-size: 1.35rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.showcase {
  background: linear-gradient(150deg, rgba(26, 21, 15, 0.95), rgba(19, 14, 10, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.tile {
  border-radius: 14px;
  padding: 16px;
  min-height: 110px;
  background: #21180f;
  border: 1px solid #43311f;
}

.tile h3 {
  font-size: 1rem;
  margin-bottom: 7px;
}

.tile p {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 28px 0 70px;
}

.section-alt {
  background: rgba(10, 12, 20, 0.7);
  border-top: 1px solid rgba(182, 173, 154, 0.15);
  border-bottom: 1px solid rgba(182, 173, 154, 0.15);
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.card h3 {
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.projects {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #0f1830;
}

.project-top {
  height: 120px;
  background: linear-gradient(120deg, #1f3a6d, #334a88, #6549a2);
}

.project-body {
  padding: 16px;
}

.project small {
  color: var(--success);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.quote {
  border-left: 4px solid var(--brand);
  background: rgba(201, 154, 74, 0.08);
  padding: 16px 18px;
  border-radius: 10px;
  color: #dce8ff;
  margin-bottom: 12px;
}

.page-banner {
  padding: 70px 0 36px;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-repeat: no-repeat;
  background-position: center right;
  background-size: min(420px, 45vw);
}

body.page-services .page-banner::before {
  background-image: url("images/logotipo_horizontal.png");
}

body.page-about .page-banner::before {
  background-image: url("images/logotipo_principal.png");
}

body.page-projects .page-banner::before {
  background-image: url("images/isotipe.png");
}

body.page-contact .page-banner::before {
  background-image: url("images/logotipo.png");
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.page-banner p {
  max-width: 70ch;
  color: var(--muted);
}

.cta {
  margin: 22px 0 60px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  background: linear-gradient(120deg, rgba(201, 154, 74, 0.13), rgba(242, 204, 137, 0.1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cta h3 {
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.cta p {
  color: var(--muted);
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
}

.contact-list strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.contact-list a {
  color: var(--brand);
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.contact-card {
  background: #1f1811;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.estimate-form {
  display: grid;
  gap: 10px;
}

.estimate-form label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.estimate-form input,
.estimate-form select,
.estimate-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(10, 14, 25, 0.9);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}

.estimate-form input:focus,
.estimate-form select:focus,
.estimate-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(201, 154, 74, 0.24);
}

.form-note {
  font-size: 0.84rem;
  color: var(--muted);
}

.form-success {
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 700;
}

.service-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.service-item h3 {
  margin-bottom: 8px;
}

.service-item p {
  color: var(--muted);
}

.service-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--brand);
  font-weight: 700;
}

.service-link:hover {
  color: var(--text);
}

.card,
.service-item,
.plan-step,
.tile,
.contact-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}

.card.is-interactive:hover,
.service-item.is-interactive:hover,
.plan-step.is-interactive:hover,
.tile.is-interactive:hover,
.contact-card.is-interactive:hover {
  border-color: rgba(201, 154, 74, 0.5);
  box-shadow: 0 12px 30px rgba(8, 19, 39, 0.45);
}

.plan-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.trust-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.trust-item h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.trust-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

.project-placeholder {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(29, 22, 16, 0.95), rgba(20, 15, 11, 0.95));
  min-height: 180px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.project-placeholder small {
  color: var(--accent);
  font-weight: 700;
}

.project-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid rgba(240, 204, 134, 0.4);
  background: linear-gradient(140deg, rgba(212, 166, 79, 0.22), rgba(212, 166, 79, 0.05));
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f3ddb0;
}

.contact-strong {
  background: linear-gradient(140deg, rgba(201, 154, 74, 0.12), rgba(24, 17, 12, 0.9));
  border: 1px solid rgba(201, 154, 74, 0.35);
  position: relative;
}

.trust-brand {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(240, 204, 134, 0.22);
  border-radius: 14px;
  background: rgba(11, 14, 22, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-brand img {
  width: min(360px, 90%);
  opacity: 0.22;
  object-fit: contain;
}

.plan-step {
  background: rgba(32, 24, 17, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.plan-step strong {
  color: var(--success);
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.is-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.is-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-reveal .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
}

.text-reveal .word {
  display: inline-block;
  white-space: nowrap;
}

.text-reveal .word-space {
  display: inline-block;
}

body.is-ready .text-reveal.impact-rise .char {
  animation: text-char-in 0.45s ease forwards;
  animation-delay: calc(var(--char-index) * 26ms + var(--char-base-delay, 0ms));
}

body.is-ready .text-reveal.impact-wave .char {
  animation: text-wave-in 0.58s ease forwards;
  animation-delay: calc(var(--char-index) * 20ms + var(--char-base-delay, 0ms));
}

body.is-ready .text-reveal.impact-glow .char {
  animation: text-glow-in 0.62s ease forwards;
  animation-delay: calc(var(--char-index) * 22ms + var(--char-base-delay, 0ms));
}

.text-reveal.impact-hover .char {
  transition: transform 0.22s ease, color 0.22s ease, text-shadow 0.22s ease;
}

.text-reveal.impact-hover:hover .char {
  transform: translateY(-2px);
  color: var(--accent);
  text-shadow: 0 0 10px rgba(242, 204, 137, 0.32);
}

@keyframes text-char-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes text-wave-in {
  0% {
    opacity: 0;
    transform: translateY(14px) rotate(-4deg);
  }
  70% {
    opacity: 1;
    transform: translateY(-1px) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes text-glow-in {
  0% {
    opacity: 0;
    transform: translateY(16px);
    text-shadow: 0 0 0 rgba(242, 204, 137, 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 14px rgba(242, 204, 137, 0.24);
  }
}

.to-top-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 24, 48, 0.92);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.to-top-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.to-top-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand);
}

.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;
}

@media (prefers-reduced-motion: reduce) {
  body.is-entering main,
  body.is-ready main,
  .is-reveal,
  .text-reveal .char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}

footer {
  border-top: 1px solid rgba(155, 167, 197, 0.15);
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero-grid,
  .cards,
  .projects,
  .service-list,
  .contact-grid,
  .plan-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .brand-name img {
    height: 22px;
  }
}
