/* ============================================================
   Ducci Theme — main.css
   Paleta corporativa: navy + warm gold + neutrals
   ============================================================ */

:root {
  --navy:        #0A2540;
  --navy-deep:   #061A30;
  --navy-light:  #1A3556;
  --gold:        #C49B3D;
  --gold-light:  #D9B45F;
  --grey-900:    #1F242C;
  --grey-700:    #404a55;
  --grey-500:    #6B7480;
  --grey-300:    #C8CDD3;
  --grey-100:    #F2F4F7;
  --bg:          #ffffff;
  --bg-soft:     #FAFBFC;

  --shadow-sm:   0 1px 2px rgba(10,37,64,.04), 0 1px 3px rgba(10,37,64,.06);
  --shadow-md:   0 4px 6px rgba(10,37,64,.05), 0 10px 15px rgba(10,37,64,.08);
  --shadow-lg:   0 10px 20px rgba(10,37,64,.08), 0 25px 50px rgba(10,37,64,.12);

  --radius:      8px;
  --radius-lg:   16px;
  --container:   1200px;
  --transition:  0.3s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
}
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

.eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ─── Layout helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 6rem 0; }
.section-tight { padding: 4rem 0; }
.section-soft  { background: var(--bg-soft); }
.section-dark  { background: var(--navy); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark .eyebrow { color: var(--gold-light); }

.section-header { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.section-header p { color: var(--grey-500); font-size: 1.125rem; margin-top: 1rem; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: #fff !important;
}
.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--navy) !important;
  border: 1.5px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff !important;
}
.btn-light {
  background: #fff;
  color: var(--navy) !important;
}
.btn-light:hover { background: var(--gold-light); color: var(--navy) !important; }

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--grey-100);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 80px;
}
.brand {
  display: flex; align-items: center; gap: .85rem;
  color: var(--navy);
}
.brand:hover { color: var(--navy); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--navy); color: #fff;
  border-radius: 6px;
  font-weight: 800; font-size: 1rem;
  letter-spacing: -.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.0625rem; font-weight: 700; }
.brand-text span    { font-size: .8125rem; color: var(--grey-500); font-weight: 500; }

.nav-main { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; align-items: center; gap: 2rem; }
.nav-list a {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--grey-700);
  position: relative;
}
.nav-list a:hover, .nav-list .current-menu-item a { color: var(--navy); }
.nav-list .current-menu-item a::after,
.nav-list a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -28px;
  height: 3px; background: var(--gold);
}
.nav-cta { padding: .65rem 1.25rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); transition: all var(--transition);
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  color: #fff;
  overflow: hidden;
}

/* Hero clásico (página interior) — fondo único con overlay */
.hero:not(.hero-slideshow)::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(10,37,64,.92) 0%, rgba(10,37,64,.65) 100%),
    var(--hero-bg, url('../img/hero.jpg')) center/cover;
  z-index: 0;
}

/* Hero slideshow del Home — múltiples slides con crossfade + Ken Burns */
.hero-slideshow .hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: hero-cross 30s infinite ease-in-out;
  /* Cada slide tarda 30s en completar el ciclo, con delay escalonado */
  z-index: 0;
  transform-origin: center;
}
@keyframes hero-cross {
  0%   { opacity: 0; transform: scale(1.0); }
  4%   { opacity: 1; transform: scale(1.04); }
  20%  { opacity: 1; transform: scale(1.10); }
  24%  { opacity: 0; transform: scale(1.10); }
  100% { opacity: 0; transform: scale(1.0); }
}

/* Overlay oscuro de lectura */
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(6,26,48,.88) 0%, rgba(10,37,64,.55) 60%, rgba(10,37,64,.78) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 4rem 0;
}
.hero h1 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero-h1-accent {
  color: var(--gold-light);
  display: inline-block;
  position: relative;
}
.hero p {
  font-size: 1.2rem;
  opacity: 0.92;
  margin-bottom: 2.5rem;
  max-width: 640px;
  line-height: 1.55;
}
.hero .eyebrow { color: var(--gold-light); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cta .btn-primary { background: var(--gold); }
.hero-cta .btn-primary:hover { background: var(--gold-light); }

/* Strip de obras destacadas debajo del CTA */
.hero-strip {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-strip-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.hero-strip-thumbs {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.hero-thumb {
  display: block;
  width: 84px; height: 60px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255,255,255,.2);
  transition: all var(--transition);
  cursor: pointer;
}
.hero-thumb:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

@media (max-width: 768px) {
  .hero { min-height: 80vh; }
  .hero h1 { font-size: clamp(2rem, 7vw, 2.75rem); }
  .hero p { font-size: 1.0625rem; }
  .hero-strip { gap: 1rem; }
  .hero-strip-label { width: 100%; }
  .hero-thumb { width: 64px; height: 48px; }
}

/* ─── Stats / Numbers ─────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  padding: 3rem 2rem;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-100);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.02em;
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--grey-500);
  font-weight: 500;
}

/* ─── Cards / Services ────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-100);
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}
.card-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--navy);
  color: var(--gold-light);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.card h3 { margin-bottom: .75rem; font-size: 1.25rem; }
.card p { color: var(--grey-700); }

/* ─── Project gallery ─────────────────────────────────────── */
.project-filters {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  margin-bottom: 3rem;
}
.project-filters button {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--grey-300);
  background: #fff;
  color: var(--grey-700);
  font-weight: 500;
  font-size: .875rem;
  transition: all var(--transition);
}
.project-filters button:hover { border-color: var(--navy); color: var(--navy); }
.project-filters button.active {
  background: var(--navy); border-color: var(--navy); color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.project-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--grey-100);
}
.project-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.project-item:hover img { transform: scale(1.05); }
.project-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(180deg, transparent 40%, rgba(10,37,64,.88) 100%);
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-item:hover .project-overlay { opacity: 1; }
.project-overlay .cat {
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold-light);
  margin-bottom: .35rem;
}
.project-overlay h4 { color: #fff; margin: 0; font-size: 1.125rem; }
.project-overlay p { font-size: .85rem; opacity: .85; margin-top: .35rem; }

/* ─── About / Team ────────────────────────────────────────── */
.about-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-split .eyebrow { color: var(--gold); }
.about-split .image-stack {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.about-split .image-stack img {
  width: 100%; height: 100%; object-fit: cover;
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 2rem;
}
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: var(--grey-300);
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.5rem; top: 6px;
  width: 18px; height: 18px;
  background: var(--gold); border: 4px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item h4 { margin-bottom: .25rem; }
.timeline-item .year { color: var(--gold); font-weight: 700; font-size: .875rem; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: #fff;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--grey-100);
  text-align: center;
  transition: all var(--transition);
}
.team-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.team-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy); color: var(--gold-light);
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.25rem;
  margin: 0 auto 1rem;
}
.team-card h4 { font-size: 1rem; margin-bottom: .25rem; }
.team-card p { font-size: .85rem; color: var(--grey-500); }

/* ─── Service Steps ───────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.step {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
  position: relative;
}
.step-num {
  position: absolute; right: 1.5rem; top: 1.5rem;
  font-size: 3rem; font-weight: 800;
  color: var(--grey-100);
  line-height: 1;
}
.step h4 { font-size: 1.0625rem; margin-bottom: .5rem; }
.step p { font-size: .9375rem; color: var(--grey-700); }

/* ─── Contact ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info-item {
  display: flex; gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--grey-100);
}
.contact-info-item:last-child { border-bottom: 0; }
.contact-info-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--navy); color: var(--gold-light);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.25rem;
}
.contact-info h4 { font-size: 1rem; margin-bottom: .25rem; }
.contact-info p, .contact-info a { color: var(--grey-700); font-size: .95rem; }

.contact-form {
  background: var(--bg-soft);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-100);
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-bottom: 1rem;
}
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-size: .85rem; font-weight: 500;
  margin-bottom: .35rem;
  color: var(--grey-700);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--grey-300);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  transition: border-color var(--transition);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.alert-success { background: #DEF7EC; color: #03543F; }
.alert-error   { background: #FDE8E8; color: #9B1C1C; }

/* ─── Page hero (sub-pages) ───────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 7rem 0 5rem;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 1rem; }
.page-hero p { font-size: 1.125rem; opacity: 0.85; max-width: 640px; margin: 0 auto; }

/* ─── CTA banner ──────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 4rem auto;
  max-width: var(--container);
}
.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p { opacity: 0.85; margin-bottom: 2rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* ─── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3rem;
}
.footer-col h3 { color: #fff; font-size: 1.25rem; margin-bottom: .75rem; }
.footer-col h4 {
  color: var(--gold-light);
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer-col p, .footer-col a, .footer-col li { color: rgba(255,255,255,.7); font-size: .9375rem; }
.footer-col li { padding: .25rem 0; }
.footer-col a:hover { color: var(--gold-light); }
.footer-brand .brand-mark {
  background: var(--gold); color: var(--navy-deep);
  margin-bottom: 1rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .about-split, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .hero { min-height: 70vh; }
  .nav-toggle { display: flex; }
  .nav-main {
    position: fixed; inset: 80px 0 0 0;
    background: #fff;
    flex-direction: column;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    align-items: flex-start;
    gap: 1rem;
  }
  .nav-main.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 1rem; align-items: flex-start; width: 100%; }
  .nav-list a { font-size: 1.125rem; }
  .nav-list a::after { display: none; }
  .nav-cta { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Animations ──────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
