/* styles.css - shared for home + secondary pages */

:root {
  --bg: #071018;
  --bg-2: #0c1721;
  --text: #eef4fb;
  --muted: #a7b6c8;
  --accent: #d3b27a;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 24px 60px rgba(0,0,0,0.38);
  --radius: 26px;
}

body.light {
  --bg: #f3f6fa;
  --bg-2: #e7edf4;
  --text: #0b1a2a;
  --muted: #5f7388;
  --accent: #c6a867;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 18px 40px rgba(0,0,0,0.12);
}

body.light .card {
  color: #ffffff;
}

body.light .card h3,
body.light .card p,
body.light .card .tag,
body.light .card .card-cta {
  color: #ffffff;
}

body.light .card .card-cta {
  color: #f3d8a6; /* dorado */
}

.card h3,
.card p {
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

* {
  box-sizing: border-box;
  transition:
    background 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    filter 0.4s ease,
    opacity 0.4s ease,
    transform 0.4s ease;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(140,184,217,0.16), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(124, 188, 224, 0.16), transparent 34%),
    radial-gradient(circle at 82% 68%, rgba(86, 145, 212, 0.14), transparent 38%),
    radial-gradient(circle at 52% 52%, rgba(66, 124, 192, 0.10), transparent 56%),
    radial-gradient(circle at 30% 78%, rgba(154, 198, 226, 0.08), transparent 30%);
  filter: blur(72px);
  opacity: 0.82;
  z-index: 0;
}

body.light::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(132, 182, 222, 0.22), transparent 34%),
    radial-gradient(circle at 82% 68%, rgba(112, 162, 214, 0.18), transparent 38%),
    radial-gradient(circle at 52% 52%, rgba(92, 142, 202, 0.14), transparent 56%),
    radial-gradient(circle at 30% 78%, rgba(176, 208, 232, 0.10), transparent 30%);
  filter: blur(76px);
  opacity: 0.68;
}

body.theme-switching {
  overflow: hidden;
}

body.theme-switching .hero,
body.theme-switching .grid,
body.theme-switching .mini-grid,
body.theme-switching .footer-note,
body.theme-switching .section-head {
  filter: blur(8px);
  opacity: 0.82;
  transform: scale(0.995);
}

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

.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 54px;
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 360px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  background: #09131c;
}

.hero:has(.hero-image):not(:has(.hero-video)) {
  min-height: 220px;
}

.hero-brand {
  position: absolute;
  right: max(40px, calc((100vw - 1320px) / 2 + 40px));
  top: 50%;
  transform: translateY(-50%);
  height: 220px;
  opacity: 1;
  pointer-events: none;
  filter: blur(0px);
  z-index: 1;
}

.hero:has(.hero-image):not(:has(.hero-video)) .hero-brand {
  height: 150px;
}

.hero-video,
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-video {
  transform: scale(1.06) translateY(0px);
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,16,24,0.78) 0%, rgba(7,16,24,0.46) 45%, rgba(7,16,24,0.18) 100%);
}

.hero:has(.hero-image):not(:has(.hero-video))::after {
  background: linear-gradient(90deg, rgba(7,16,24,0.82) 0%, rgba(7,16,24,0.56) 48%, rgba(7,16,24,0.24) 100%);
}

body.light .hero::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.4) 45%, rgba(255,255,255,0.1) 100%);
}

body.light .hero:has(.hero-image):not(:has(.hero-video))::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.50) 48%, rgba(255,255,255,0.16) 100%);
}

.hero-content {
  position: relative;
  margin-left: -65px;
  z-index: 2;
  width: min(680px, 100%);
  padding: 54px 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero:has(.hero-image):not(:has(.hero-video)) .hero-content {
  margin-left: -65px;
  width: min(760px, 100%);
  padding: 42px 44px;
  gap: 14px;
}

.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #d9e6f2;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.hero:has(.hero-image):not(:has(.hero-video)) h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0.03em;
}

body.light .hero h1 {
  color: #0b1a2a;
}

body.light .hero p,
body.light .hero p span,
body.light #desc {
  color: #2a3b4d;
}

body.light .eyebrow {
  color: #2a3b4d;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
}

.hero p {
  margin: 0;
  color: #d4dfeb;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
}

.hero:has(.hero-image):not(:has(.hero-video)) p {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 680px;
}

.hero-logos {
  display: flex;
  gap: 75px;
  align-items: center;
  margin-top: 15px;
}

.hero-logo {
  height: 70px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.hero:has(.hero-image):not(:has(.hero-video)) .hero-actions {
  margin-top: 4px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid transparent;
}

.hero-btn.primary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 760px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #111;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(211,178,122,0.42);
  box-shadow: 0 28px 70px rgba(0,0,0,0.46);
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 6s ease;
}

.card:hover img {
  transform: scale(1.08);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,9,14,0.08) 12%, rgba(4,9,14,0.2) 45%, rgba(4,9,14,0.88) 100%);
}

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

.card-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag {
  align-self: flex-start;
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dbe8f4;
  backdrop-filter: blur(10px);
}

.card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.card p {
  margin: 0;
  color: #c8d5e2;
  font-size: 0.95rem;
  line-height: 1.55;
}

.card-cta {
  margin-top: 8px;
  color: #f3d8a6;
  font-weight: 700;
  font-size: 0.92rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.mini-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.feature-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 1.5rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.mini-card h4 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.94rem;
}

.footer-note {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(10px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body.light .hero-btn.secondary {
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.15);
  color: #0b1a2a;
  box-shadow: var(--shadow);
}

.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 3px;
  margin-bottom: -50px;
  flex-wrap: wrap;
  position: relative;
  z-index: 6;
}

.filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.filter-btn.active {
  background: var(--accent);
  color: #111;
  border-color: transparent;
}

.logo-fin-secundario {
  display: block;
  height: 70px;
  width: auto;
  margin: 10px auto 0;
}

/* ===== Hero responsive fix ===== */

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

@media (max-width: 1024px) {
  .hero-content {
    margin-left: 0;
    width: min(760px, 100%);
    padding: 40px 28px;
  }

  .hero:has(.hero-image):not(:has(.hero-video)) .hero-content {
    margin-left: 0;
    width: min(760px, 100%);
    padding: 34px 28px;
  }

  .hero h1 {
    font-size: clamp(2rem, 4.8vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: 0.02em;
    max-width: 100%;
  }

  .hero p {
    max-width: 100%;
  }

  .hero-logos {
    gap: 28px;
    flex-wrap: wrap;
  }

  .hero-logo {
    height: 58px;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 18px 14px 40px;
  }

  .hero {
    min-height: auto;
    border-radius: 0;
  }

  .hero:has(.hero-image):not(:has(.hero-video)) {
    min-height: 220px;
  }

  .hero-brand {
    height: 120px;
    right: 12px;
    opacity: 0.06;
  }

  .hero:has(.hero-image):not(:has(.hero-video)) .hero-brand {
    height: 90px;
  }

  .hero-content {
    margin-left: 0;
    width: 100%;
    padding: 30px 18px;
    gap: 12px;
  }

  .hero:has(.hero-image):not(:has(.hero-video)) .hero-content {
    margin-left: 0;
    width: 100%;
    padding: 26px 18px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: 0.01em;
    text-wrap: balance;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 100%;
  }

  .hero-logos {
    gap: 18px;
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .hero-logo {
    height: 46px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btn {
    width: 100%;
  }

  .grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 14px 12px 34px;
  }

  .hero-content {
    padding: 24px 14px;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
    line-height: 1.15;
  }

  .hero-logo {
    height: 40px;
  }

  .eyebrow {
    font-size: 0.72rem;
    padding: 8px 12px;
  }
}

@media (max-width: 1024px) {
  .hero-brand {
    display: none;
  }
}

/* ===== Hero floating controls ===== */

.hero-top-controls,
.hero-socials {
  position: absolute;
  right: max(40px, calc((100vw - 1320px) / 2 + 40px));
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-top-controls {
  top: 40px;
}

.hero-top-controls-home {
  top: 90px;
}

.hero-socials {
  bottom: 90px;
}

/* Tablet */
@media (max-width: 1024px) {
  .hero-top-controls,
  .hero-top-controls-home {
    top: 16px;
    right: 16px;
    gap: 8px;
  }

  .hero-socials {
    right: 16px;
    bottom: 16px;
    gap: 8px;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .hero-top-controls,
  .hero-top-controls-home {
    top: 12px;
    right: 12px;
    gap: 6px;
  }

  .hero-socials {
    position: static;
    margin-top: 14px;
    justify-content: center;
    padding: 0 18px 18px;
  }

  .hero .wrap {
    position: relative;
    z-index: 2;
  }
}

.hero-socials-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 15px;

  display: flex;
  gap: 10px;
  z-index: 5;
}
