/* ===== Design tokens (colores y logo tomados de lavenort.cl) ===== */
:root {
  --teal: #54909b;
  --teal-dark: #054f80;
  --teal-darker: #004571;
  --gold: #8b6d4b;

  --black: #000000;
  --gray-dark: #696969;
  --gray: #8f8f8f;
  --gray-light: #f7f7f7;
  --gray-lighter: #fafafa;
  --white: #ffffff;

  --ink: #12181a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(5, 79, 128, 0.25);
  --shadow-lg: 0 24px 48px -16px rgba(0, 69, 113, 0.3);
  --header-h: 76px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font); font-weight: 800; line-height: 1.15; margin: 0 0 0.6em; color: var(--teal-darker); }
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
p { margin: 0 0 1em; color: var(--gray-dark); text-align: justify; text-justify: inter-word; hyphens: auto; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.container { width: min(1400px, 94%); margin: 0 auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--teal-darker); color: var(--white); padding: 0.75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== Header / Tabs ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 69, 113, 0.08);
  height: var(--header-h);
  display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 38px; height: auto; }
.brand-name { font-weight: 800; font-size: 1.25rem; color: var(--teal-darker); letter-spacing: -0.02em; }

.tabs { display: flex; gap: 0.25rem; margin-left: 1rem; flex: 1; }
.tab-btn {
  border: none; background: transparent; color: var(--gray-dark);
  font-weight: 600; font-size: 0.95rem; padding: 0.6rem 0.9rem; border-radius: 999px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--teal-darker); background: var(--gray-light); }
.tab-btn.is-active { color: var(--white); background: var(--teal); box-shadow: var(--shadow-sm); }
.tab-btn:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }

.header-cta { flex-shrink: 0; }

.menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; flex-shrink: 0;
  margin-left: auto;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--teal-darker); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; border: none; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--teal-darker); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-ghost { background: var(--white); color: var(--teal-darker); border: 1.5px solid rgba(0, 69, 113, 0.2); }
.btn-ghost:hover { border-color: var(--teal); background: var(--gray-light); }
.btn-light { background: var(--white); color: var(--teal-darker); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ===== Tab panels ===== */
.tab-panel { animation: fadeIn 0.45s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.alt-bg { background: var(--gray-lighter); }
.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.78rem;
  color: var(--teal); margin-bottom: 0.75rem;
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 4rem; }
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--gray-lighter); }
.hero-video {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero-video.is-visible { opacity: 0.85; }
.hero-media-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.5) 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 640px; }
.hero-lead { font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.75rem 0 2.5rem; }
.hero-stats { display: flex; gap: 2.25rem; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.9rem; font-weight: 800; color: var(--teal-darker); }
.hero-stats span { font-size: 0.85rem; color: var(--gray-dark); }

/* ===== Grids / Cards ===== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid rgba(0, 69, 113, 0.08); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(84, 144, 155, 0.3); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(84, 144, 155, 0.12); color: var(--teal-darker); margin-bottom: 1rem;
}
.card-icon.accent { background: rgba(139, 109, 75, 0.14); color: var(--gold); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { color: var(--teal-darker); }
.card p { margin: 0; font-size: 0.94rem; }

.card-features { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(0, 69, 113, 0.08); display: grid; gap: 0.5rem; }
.card-features li {
  position: relative; padding-left: 1.3rem; font-size: 0.86rem; color: var(--gray-dark); font-weight: 500;
}
.card-features li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
}

/* ===== Process ===== */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.process-steps li { position: relative; padding-top: 0.5rem; }
.step-n { font-size: 2.2rem; font-weight: 800; color: var(--teal); opacity: 0.35; display: block; margin-bottom: 0.5rem; }
.process-steps h3 { color: var(--teal-darker); }
.process-steps p { font-size: 0.9rem; margin: 0; }

/* ===== CTA band ===== */
.cta-band { background: linear-gradient(120deg, var(--teal-darker), var(--teal-dark) 60%, var(--teal)); }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2, .cta-band p { color: var(--white); }
.cta-band p { opacity: 0.85; margin: 0; }

/* ===== About ===== */
.about-lead { font-size: 1.08rem; max-width: 70ch; }
.about-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.values { margin-top: 3rem; }
.value { padding: 1.5rem; background: var(--gray-lighter); border-radius: var(--radius); }
.value h3 { color: var(--teal-darker); }
.value p { margin: 0; font-size: 0.94rem; }

.timeline { margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem; max-width: 560px; }
.timeline li { display: flex; gap: 1rem; align-items: flex-start; }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--teal); margin-top: 6px; flex-shrink: 0; }
.timeline strong { color: var(--teal-darker); display: block; margin-bottom: 0.2rem; }
.timeline p { margin: 0; font-size: 0.94rem; }

/* ===== Photo gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.gallery-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-item {
  margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 69, 113, 0.08); background: var(--white);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600; color: var(--teal-darker); }

/* ===== Industry grid ===== */
.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.industry-grid li {
  display: flex; align-items: center; gap: 0.75rem; padding: 1.1rem 1.25rem;
  background: var(--white); border: 1px solid rgba(0, 69, 113, 0.08); border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.94rem; color: var(--ink); box-shadow: var(--shadow-sm);
}
.industry-grid svg { width: 22px; height: 22px; color: var(--teal); flex-shrink: 0; }

/* ===== Check list ===== */
.check-list { display: grid; gap: 0.85rem; }
.check-list li {
  position: relative; padding-left: 1.9rem; font-weight: 600; color: var(--ink); font-size: 0.96rem;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4 10-10' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}

/* ===== Compare table ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(0, 69, 113, 0.08); box-shadow: var(--shadow-sm); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--white); }
.compare-table th, .compare-table td { padding: 0.9rem 1.25rem; text-align: center; font-size: 0.92rem; border-bottom: 1px solid rgba(0, 69, 113, 0.08); }
.compare-table thead th { background: var(--gray-lighter); color: var(--teal-darker); font-weight: 700; }
.compare-table th[scope="row"] { text-align: left; font-weight: 600; color: var(--ink); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td.yes { color: var(--teal); font-weight: 800; font-size: 1.05rem; }
.compare-table td:not(.yes) { color: var(--gray); }

/* ===== FAQ accordion ===== */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 780px; }
.faq-item { border: 1px solid rgba(0, 69, 113, 0.1); border-radius: var(--radius-sm); background: var(--white); overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: none; border: none; padding: 1.1rem 1.25rem; font-weight: 700; font-size: 0.98rem; color: var(--teal-darker);
  text-align: left;
}
.faq-question svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.25s var(--ease); color: var(--teal); }
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s var(--ease); }
.faq-answer p { overflow: hidden; margin: 0; padding: 0 1.25rem; font-size: 0.92rem; }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-item.is-open .faq-answer p { padding: 0 1.25rem 1.1rem; }

/* ===== Empresas ===== */
.empresas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
  background: var(--gray-lighter); padding: 2rem; border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.85rem; color: var(--teal-darker); }
.field input, .field textarea {
  border: 1.5px solid rgba(0, 69, 113, 0.15); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem;
  font: inherit; background: var(--white); resize: vertical; transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(84, 144, 155, 0.2);
}
.field input.is-invalid, .field textarea.is-invalid { border-color: #d16a6a; }
.contact-form .btn { grid-column: 1 / -1; justify-self: start; }
.form-success {
  grid-column: 1 / -1; background: rgba(84, 144, 155, 0.15); color: var(--teal-darker);
  padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-weight: 600; margin: 0;
}

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.contact-logo img { width: 56px; height: auto; }
.contact-logo span { font-weight: 800; font-size: 1.4rem; color: var(--teal-darker); letter-spacing: -0.02em; }
.info-item h3 { margin-bottom: 0.2rem; color: var(--teal-darker); }
.info-item a { color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.info-item p { margin: 0; text-align: left; }

.map-section { width: 100%; margin-top: 3rem; position: relative; line-height: 0; }
.map-frame { width: 100%; height: clamp(320px, 40vw, 460px); border: 0; display: block; }
.map-link {
  position: absolute; top: 1rem; right: 1rem; z-index: 1; line-height: normal;
  background: var(--white); color: var(--teal-darker); font-weight: 700; font-size: 0.85rem;
  padding: 0.6rem 1rem; border-radius: 999px; text-decoration: none; box-shadow: var(--shadow-md);
}

/* ===== WhatsApp float + back to top ===== */
.whatsapp-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: var(--white);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  transition: transform 0.2s var(--ease);
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover { transform: scale(1.08); }

.to-top {
  position: fixed; right: 1.5rem; bottom: 6.2rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal-darker); color: var(--white);
  border: none; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { transform: translateY(-3px); }

/* ===== Footer ===== */
.site-footer { background: var(--teal-darker); color: rgba(255, 255, 255, 0.85); padding: 3.5rem 0 2rem; margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.1fr 0.8fr 1.1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.footer-brand span { font-weight: 800; font-size: 1.1rem; color: var(--white); }
.footer-brand p { flex-basis: 100%; margin: 0.5rem 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links button { background: none; border: none; color: inherit; text-align: left; font-size: 0.92rem; padding: 0; }
.footer-links button:hover { color: var(--white); }
.footer-contact { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.92rem; }
.footer-contact a { text-decoration: none; opacity: 0.85; }
.footer-contact a:hover { opacity: 1; }
.footer-contact p { margin: 0; font-size: 0.85rem; text-align: left; color: rgba(255, 255, 255, 0.85); }
.footer-legal { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.88rem; }
.footer-legal a { text-decoration: none; opacity: 0.85; }
.footer-legal a:hover { opacity: 1; }
.footer-legal p { margin: 0.5rem 0 0; font-size: 0.82rem; text-align: left; color: rgba(255, 255, 255, 0.7); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .empresas-grid, .contact-grid, .about-photo-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid, .gallery-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .tabs {
    position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0;
    flex-direction: column; background: var(--white); padding: 0.75rem 5%;
    box-shadow: var(--shadow-md); transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); gap: 0.15rem;
  }
  .tabs.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .tab-btn { width: 100%; text-align: left; border-radius: 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid, .gallery-grid-3, .industry-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
}
