/* ========================================================
   Aluminis SC — Main CSS
   Mobile-first, clean rebuild
   ======================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:   #ffffff;
  --black:   #111111;
  --dark:    #1a1a1a;
  --gray:    #f2f2f0;
  --gray2:   #e8e8e5;
  --text:    #222222;
  --muted:   #888888;
  --accent:  #2c2c2c;
  --nav-h:   72px;
  --max-w:   1260px;
  --pad:     clamp(1.25rem, 5vw, 4rem);
  --r:       4px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap {
  width: min(var(--max-w), 100% - 2rem);
  margin-inline: auto;
}

/* ── HEADER ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(var(--max-w), 100% - 2rem);
  margin-inline: auto;
  gap: 2rem;
}

.site-logo img {
  height: 44px;
  width: auto;
  display: block;
}

/* NAV */
.main-nav { display: none; }

/* Solo el <ul> hijo directo — no los .subnav anidados */
.main-nav > ul {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.main-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
  transition: color 0.15s;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--muted); }

/* Dropdown */
.has-sub { position: relative; }
.subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 180px;
  padding: 0.4rem 0;
  white-space: nowrap;
  z-index: 920;
  list-style: none;
}
.has-sub:hover .subnav { display: block; }
.subnav li a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  color: var(--text);
}
.subnav li a:hover { background: var(--gray); }

/* Burger */
.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 910;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile nav overlay */
.main-nav.open {
  display: block;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  bottom: 0;
  background: var(--white);
  overflow-y: auto;
  z-index: 899;
}
.main-nav.open > ul {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 1rem 1.5rem 2rem;
}
.main-nav.open > ul > li {
  border-bottom: 1px solid var(--gray2);
}
.main-nav.open > ul > li > a {
  display: block;
  padding: 0.9rem 0;
  font-size: 1.05rem;
  font-weight: 500;
}
.main-nav.open .subnav {
  display: block;
  position: static;
  transform: none;
  box-shadow: none;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0 0 0.75rem 0.75rem;
  min-width: 0;
  width: 100%;
}
.main-nav.open .subnav li a {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.hero-slides img.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.60) 0%, rgba(0,0,0,0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem var(--pad);
  max-width: 680px;
  color: var(--white);
}

.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.hero-content p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 480px;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.btn-white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn-white:hover { background: transparent; color: var(--white); }
.btn-dark {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.btn-dark:hover { background: transparent; color: var(--dark); }
.btn-outline-dark {
  background: transparent;
  color: var(--dark);
  border-color: var(--dark);
}
.btn-outline-dark:hover { background: var(--dark); color: var(--white); }

.hero-social {
  position: absolute;
  left: 1.5rem;
  bottom: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 0.8rem;
  transition: background 0.2s;
}
.hero-social a:hover { background: rgba(255,255,255,0.4); }
.hero-social svg { width: 15px; height: 15px; fill: currentColor; }

/* ── ABOUT ───────────────────────────────────────────── */
.about-section {
  padding: clamp(3rem, 8vw, 7rem) 0;
  overflow: hidden;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.about-img { position: relative; overflow: hidden; border-radius: 4px; }
.about-img > img:first-child {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  max-height: 340px;
  display: block;
}
.about-ring { display: none; }
.about-text { display: flex; flex-direction: column; gap: 1.25rem; }
.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-text h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.about-text p { color: #555; font-size: 0.95rem; }

.brand-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.brand-logos img {
  height: 28px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.75);
  transition: filter 0.3s;
}
.brand-logos img:hover { filter: grayscale(0) opacity(1); }

/* ── MISSION ─────────────────────────────────────────── */
.mission-section {
  background: var(--gray);
  padding: clamp(3rem, 8vw, 6rem) 0;
  text-align: center;
}
.mission-section .section-tag { margin-bottom: 1rem; }
.mission-section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}
.mission-section p {
  max-width: 700px;
  margin-inline: auto;
  color: #555;
  font-size: 0.975rem;
}

/* ── COUNTERS ────────────────────────────────────────── */
.counters-section {
  background: var(--gray2);
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.counters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}
.counter-item {}
.counter-number {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1;
  letter-spacing: -0.03em;
}
.counter-suffix { font-size: inherit; }
.counter-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

/* ── ADVISORY ────────────────────────────────────────── */
.advisory-section {
  background: var(--dark);
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  color: var(--white);
}
.advisory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}
.advisory-text h2 {
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.advisory-text p { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.7; }
.advisory-cta { display: flex; justify-content: flex-start; }
.btn-white-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--r);
  transition: all 0.2s;
}
.btn-white-outline:hover { background: var(--white); color: var(--dark); }

/* ── PRODUCTS ────────────────────────────────────────── */
.products-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-header p { color: #666; margin-top: 0.75rem; font-size: 0.95rem; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--gray2);
  border: 1px solid var(--gray2);
  border-radius: 4px;
  overflow: hidden;
}
.product-box {
  background: var(--white);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.2s;
  text-align: center;
}
.product-box:hover { background: var(--gray); }
.product-icon {
  width: 44px;
  height: 44px;
  margin-inline: auto;
}
.product-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--text);
}
.product-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.product-box p { font-size: 0.82rem; color: #666; }

/* ── PORTFOLIO ───────────────────────────────────────── */
.portfolio-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: var(--gray);
  position: relative;
  overflow: hidden;
}
.portfolio-label {
  position: absolute;
  right: -3rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: rgba(0,0,0,0.04);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4/3;
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.portfolio-item:hover img { transform: scale(1.04); }
.portfolio-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  padding: 2rem 1rem 0.9rem;
  color: var(--white);
  transition: opacity 0.3s ease;
}
.portfolio-caption strong { font-size: 0.9rem; font-weight: 600; display: block; }
.portfolio-caption span { font-size: 0.78rem; opacity: 0.8; }

/* ── REVIEWS / CTA ───────────────────────────────────── */
.reviews-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: var(--gray);
}
.reviews-section .section-header { text-align: center; margin-bottom: 2.5rem; }
.reviews-section .section-header p { color: #555; font-size: 0.95rem; }
.reviews-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.review-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.review-stars {
  color: #f59e0b;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}
.review-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 0.75rem;
  font-style: italic;
}
.review-card strong { font-size: 0.85rem; color: var(--muted); }
.review-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.review-btns a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--gray2);
  border-radius: var(--r);
  background: var(--white);
  transition: all 0.2s;
  color: var(--text);
}
.review-btns a:hover { border-color: var(--text); }

/* ── FORM / PRESUPUESTO ──────────────────────────────── */
.presupuesto-section {
  background: var(--white);
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--gray2);
}
.presupuesto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
.presupuesto-text h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.presupuesto-text p { color: #555; font-size: 0.95rem; margin-bottom: 1.5rem; }
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-list li { font-size: 0.9rem; line-height: 1.7; }
.contact-list a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.contact-form-wrap {
  background: var(--gray);
  border-radius: 8px;
  padding: 2rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: flex; flex-direction: column; gap: 0.35rem; }
.form-row label { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray2);
  border-radius: var(--r);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--text); }

/* ── BLOG ────────────────────────────────────────────── */
.blog-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.blog-card {}
.blog-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.blog-card h3 a { transition: color 0.15s; }
.blog-card h3 a:hover { color: var(--muted); }
.blog-card p { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }
.blog-card .read-more {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--text);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.blog-card .read-more:hover { border-color: var(--muted); }

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  width: min(var(--max-w), 100% - 2rem);
  margin-inline: auto;
  padding-bottom: 3rem;
}
.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.footer-tagline { font-size: 0.85rem; line-height: 1.7; max-width: 260px; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.footer-col p, .footer-col a { font-size: 0.85rem; line-height: 1.8; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  width: min(var(--max-w), 100% - 2rem);
  margin-inline: auto;
}
.footer-bottom a { color: inherit; }

/* ═══════════════════════════════════════════════════════
   TABLET ≥ 768px
   ═══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .nav-burger { display: none; }

  .hero-content h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); }

  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-img > img:first-child { max-height: 480px; }
  .about-ring { display: block; position: absolute; bottom: -1.5rem; right: -1.5rem; width: 110px; opacity: 0.5; pointer-events: none; }

  .counters-grid { grid-template-columns: repeat(4, 1fr); }

  .advisory-grid { grid-template-columns: 1fr auto; }
  .advisory-cta { justify-content: flex-end; }

  .products-grid { grid-template-columns: repeat(3, 1fr); }

  .portfolio-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .portfolio-caption { opacity: 0; }
  .portfolio-item:hover .portfolio-caption { opacity: 1; }

  .reviews-cards { grid-template-columns: repeat(3, 1fr); }
  .review-btns { flex-direction: row; flex-wrap: wrap; }

  .presupuesto-grid { grid-template-columns: 1fr 1fr; }

  .blog-grid { grid-template-columns: repeat(3, 1fr); }

  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════
   DESKTOP ≥ 1024px
   ═══════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .hero-content { padding-left: calc(var(--pad) + 1rem); }
  .portfolio-section { padding-right: 5rem; }
}
