:root {
  --verde: #0B4F4A;
  --turquesa: #1A8C82;
  /* The brand's light accent. It is what the inverse logo uses for its peak
     lines and its SOLUTIONS line, so dark surfaces accent with this, not with
     --turquesa, which goes muddy against the navy. */
  --aguamarina: #5EC8C0;
  --dorado: #C4874A;
  --nieve: #F4F1EC;
  --gris-texto: #333333;
  --gris-pie: #888888;
  --gris-claro: #E8F0EF;
  --negro: #0B2A3D;
  --white: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--nieve); color: var(--gris-texto); overflow-x: hidden; }
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; }

/* ── NAV ── */
/* The bar runs dark so the logo reads in its inverse, high-contrast form.
   Everything inside it therefore uses light ink — see the nav rules below. */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 5vw;
  background: rgba(11, 42, 61, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244, 241, 236, 0.10);
}
.nav-brand { display: flex; align-items: center; text-decoration: none; }
/* The lockup is a vertical stack, so it is always sized by height, never width.
   Two axes: ink (logo.svg is dark ink for light backgrounds, logo-inverse.svg
   light ink for dark ones) and crop (the full lockup needs ~72px before its
   SOLUTIONS line is legible, so the nav uses the compact crop instead). */
.brand-mark { display: block; height: 52px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-lang {
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(244, 241, 236, 0.65); text-decoration: none;
  border: 1px solid rgba(244, 241, 236, 0.25); padding: 0.3rem 0.6rem;
  transition: color 0.2s, border-color 0.2s;
}
.nav-lang:hover { color: var(--nieve); border-color: var(--aguamarina); }
.nav-linkedin {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--nieve); text-decoration: none; opacity: 0.6;
  transition: opacity 0.2s;
}
.nav-linkedin:hover { opacity: 1; }
.nav-linkedin svg { width: 18px; height: 18px; fill: currentColor; }
.nav-cta {
  text-transform: uppercase; font-size: 0.8rem; font-weight: 500;
  color: var(--nieve); text-decoration: none;
  border-bottom: 2px solid var(--aguamarina); padding-bottom: 2px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.7; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding: 140px 5vw 80px;
  gap: 4rem;
  overflow: hidden;
  position: relative;
  background-color: var(--nieve);
  background-image:
    radial-gradient(at 10% 10%, rgba(26,140,130,0.04) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(11,79,74,0.04) 0px, transparent 50%);
}

.hero-content { max-width: 600px; z-index: 1; }
.hero-eyebrow {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--turquesa); margin-bottom: 1.5rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 2rem; height: 1.5px;
  background: var(--dorado); flex-shrink: 0;
}

h1 { font-size: clamp(2.8rem, 5vw, 4.2rem); font-weight: 700; color: var(--negro); line-height: 1.1; margin-bottom: 1rem; }
h1 em { font-style: italic; color: var(--verde); font-weight: 400; }

.hero-motto { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-style: italic; color: var(--verde); opacity: 0.7; margin-bottom: 2rem; display: inline-block; }
.hero-sub { font-size: 1.1rem; font-weight: 300; line-height: 1.75; color: var(--negro); margin-bottom: 3rem; }

.hero-actions { display: flex; gap: 1.5rem; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: var(--verde); color: var(--nieve);
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 1rem 2.5rem;
  text-decoration: none; transition: transform 0.2s, background 0.2s;
  border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--turquesa); }
.btn-primary svg { width: 16px; height: 16px; fill: currentColor; }

.btn-wa {
  color: var(--verde); text-decoration: none; font-size: 0.88rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.5rem; opacity: 0.8; transition: opacity 0.2s;
}
.btn-wa:hover { opacity: 1; }
.btn-wa svg { width: 16px; height: 16px; fill: currentColor; }

/* Stat cards */
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; z-index: 1; }

.stat-card {
  background: var(--white);
  border: 1px solid rgba(11,79,74,0.08);
  padding: 2rem;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.6s forwards;
  position: relative;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--dorado); }
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.25s; }
.stat-card:nth-child(3) { animation-delay: 0.4s; }
.stat-card:nth-child(4) { animation-delay: 0.55s; }

.stat-number { font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 700; color: var(--turquesa); margin-bottom: 0.5rem; line-height: 1; }
.stat-label { font-size: 0.92rem; color: var(--verde); line-height: 1.55; opacity: 0.85; font-weight: 400; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ── SECTIONS ── */
section { padding: 6rem 8vw; }
.section-label {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--turquesa); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-label::before {
  content: ''; display: block;
  width: 2rem; height: 1.5px;
  background: var(--dorado); flex-shrink: 0;
}
.problem .section-label::before,
.about .section-label::before { background: var(--dorado); }
.cta-final .section-label::before { background: rgba(244,241,236,0.5); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; color: var(--negro); line-height: 1.15; margin-bottom: 1.5rem; }

/* ── PROBLEM ── */
.problem { background: var(--verde); color: var(--nieve); }
.problem .section-label { color: var(--dorado); }
.problem h2 { color: var(--nieve); }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.problem-item { border-top: 1px solid rgba(244,241,236,0.2); padding-top: 1.75rem; }
.problem-number { font-family: 'Cormorant Garamond', serif; font-size: 3.5rem; font-weight: 700; color: var(--dorado); line-height: 1; margin-bottom: 1rem; }
.problem-item h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; color: var(--nieve); margin-bottom: 0.75rem; line-height: 1.3; }
.problem-item p { font-size: 0.95rem; font-weight: 300; line-height: 1.75; color: rgba(244,241,236,0.75); }

/* ── SOLUTION ── */
.solution { background: var(--nieve); }
.solution-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; margin-top: 3rem; }
.solution-outcomes { display: flex; flex-direction: column; gap: 2rem; }
.outcome-item { display: flex; gap: 1.5rem; align-items: flex-start; padding-bottom: 2rem; border-bottom: 1px solid var(--gris-claro); }
.outcome-item:last-child { border-bottom: none; }
.outcome-icon { width: 44px; height: 44px; flex-shrink: 0; background: var(--gris-claro); display: flex; align-items: center; justify-content: center; color: var(--turquesa); }
.outcome-icon svg { width: 20px; height: 20px; }
.outcome-item h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; color: var(--negro); margin-bottom: 0.4rem; }
.outcome-item p { font-size: 0.95rem; font-weight: 300; line-height: 1.75; color: #555; }
.solution-aside { background: var(--negro); padding: 2.5rem; color: var(--nieve); position: sticky; top: 100px; }
.aside-label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dorado); margin-bottom: 1.25rem; }
.aside-quote { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-style: italic; font-weight: 400; line-height: 1.5; color: var(--nieve); margin-bottom: 2rem; }
.aside-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.aside-list li { font-size: 0.92rem; font-weight: 300; color: rgba(244,241,236,0.75); display: flex; align-items: center; gap: 0.6rem; }
.aside-list li::before { content: ''; width: 16px; height: 1px; background: var(--turquesa); flex-shrink: 0; }

/* ── FOR WHOM ── */
.forwhom { background: var(--gris-claro); }
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.client-card { background: white; padding: 2rem; border-bottom: 3px solid transparent; transition: border-color 0.25s, transform 0.2s; }
.client-card:hover { border-color: var(--turquesa); transform: translateY(-3px); }
.client-tag { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--turquesa); font-weight: 500; margin-bottom: 1rem; }
.client-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; font-weight: 600; color: var(--negro); margin-bottom: 0.75rem; line-height: 1.3; }
.client-card p { font-size: 0.95rem; font-weight: 300; line-height: 1.75; color: #555; margin-bottom: 1.25rem; }
.client-pain { font-size: 0.85rem; color: var(--dorado); font-weight: 500; padding-top: 1rem; border-top: 1px solid var(--gris-claro); }

/* ── HOW IT WORKS ── */
.howitworks { background: var(--nieve); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 3.5rem; position: relative; }
.steps::before { content: ''; position: absolute; top: 2.2rem; left: 15%; right: 15%; height: 1px; background: var(--gris-claro); z-index: 0; }
.step { padding: 0 2rem; position: relative; z-index: 1; text-align: center; }
.step-num { width: 44px; height: 44px; background: var(--verde); color: var(--nieve); font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.step h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 600; color: var(--negro); margin-bottom: 0.75rem; }
.step p { font-size: 0.95rem; font-weight: 300; line-height: 1.75; color: #555; }

/* ── CURRENT PROJECTS ── */
.projects { background: var(--nieve); }
.projects h2 { max-width: 680px; }
.projects-intro { font-size: 1rem; font-weight: 300; line-height: 1.75; color: #555; max-width: 580px; margin-bottom: 3.5rem; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.project-card { background: var(--white); border: 1px solid rgba(11,79,74,0.08); padding: 2.5rem; position: relative; overflow: hidden; }
.project-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--turquesa); }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; gap: 1rem; }
.project-name { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 700; color: var(--negro); line-height: 1.2; }
.project-status { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--turquesa); background: var(--gris-claro); padding: 0.3rem 0.75rem; white-space: nowrap; flex-shrink: 0; }
/* A system already running in production, as opposed to one still being built.
   The base rule sets white-space: nowrap and flex-shrink: 0, so a longer label
   would squeeze .project-name rather than wrap. Allow wrapping here and cap the
   width, so a two-word status ("Live · expanding") stays readable instead. */
.project-status--live { color: var(--nieve); background: var(--verde); white-space: normal; max-width: 8rem; text-align: center; }
.project-sector { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris-pie); margin-bottom: 1rem; }
.project-problem { font-size: 0.95rem; font-weight: 300; line-height: 1.75; color: #555; margin-bottom: 1.5rem; }
.project-building { border-top: 1px solid var(--gris-claro); padding-top: 1.25rem; }
.project-building-label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dorado); margin-bottom: 0.75rem; font-weight: 500; }
.project-building ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.project-building li { font-size: 0.88rem; font-weight: 300; color: var(--negro); display: flex; align-items: flex-start; gap: 0.6rem; line-height: 1.5; }
.project-building li::before { content: ''; width: 16px; height: 1px; background: var(--turquesa); flex-shrink: 0; margin-top: 0.7rem; }

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { padding: 1.75rem; }
  /* Narrow cards leave the status pill and the project name fighting for the
     same row. Let the header wrap so the status drops below the name instead
     of forcing it to break mid-phrase. */
  .project-header { flex-wrap: wrap; gap: 0.75rem; }
  .project-status--live { max-width: none; }
}

/* ── ABOUT TEAM ── */
.about { background: var(--negro); color: var(--nieve); }
.about .section-label { color: var(--dorado); }
.about h2 { color: var(--nieve); font-size: clamp(1.8rem, 2.5vw, 2.4rem); margin-bottom: 0.75rem; }
.about-role { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--turquesa); margin-bottom: 1.5rem; }
.about p { font-size: 0.95rem; font-weight: 300; line-height: 1.8; color: rgba(244,241,236,0.78); margin-bottom: 1rem; max-width: 620px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.about-tag { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244,241,236,0.5); border: 1px solid rgba(244,241,236,0.15); padding: 0.35rem 0.75rem; }

/* ── CTA FINAL ── */
.cta-final { background: var(--turquesa); text-align: center; padding: 7rem 8vw; }
.cta-final .section-label { color: rgba(244,241,236,0.7); }
.cta-final h2 { color: var(--nieve); margin-bottom: 1.25rem; }
.cta-final p { color: rgba(244,241,236,0.85); font-size: 1.05rem; font-weight: 300; margin-bottom: 2.5rem; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.75; }
.btn-primary-light { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--nieve); color: var(--verde); font-family: 'DM Sans', sans-serif; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.9rem 2rem; text-decoration: none; cursor: pointer; border: none; transition: opacity 0.2s, transform 0.15s; }
.btn-primary-light:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── FOOTER ── */
footer { background: var(--negro); padding: 2.5rem 8vw; display: flex; justify-content: space-between; align-items: center; }
.footer-left { display: flex; flex-direction: column; gap: 0.2rem; }
.brand-mark--footer { height: 80px; }
.footer-motto { font-size: 0.65rem; letter-spacing: 0.12em; color: var(--gris-pie); font-style: italic; }
.footer-copy { font-size: 0.78rem; color: var(--gris-pie); text-align: right; line-height: 1.6; }
.footer-copy a { color: var(--gris-pie); text-decoration: none; transition: color 0.2s; }
.footer-copy a:hover { color: var(--nieve); }
.footer-linkedin { display: inline-flex; align-items: center; gap: 0.35rem; vertical-align: middle; }
.footer-linkedin svg { width: 14px; height: 14px; fill: currentColor; vertical-align: middle; }

/* ── CHATBOT ── */
#chat-trigger { position: fixed; bottom: 2rem; right: 2rem; z-index: 200; width: 56px; height: 56px; background: var(--verde); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(11,79,74,0.35); transition: background 0.2s, transform 0.2s; }
#chat-trigger:hover { background: var(--turquesa); transform: scale(1.05); }
#chat-trigger svg { width: 24px; height: 24px; fill: var(--nieve); }
#chat-window { position: fixed; bottom: 5.5rem; right: 2rem; z-index: 200; width: 380px; max-height: 560px; background: white; box-shadow: 0 8px 40px rgba(11,42,61,0.18); display: flex; flex-direction: column; transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none; transition: transform 0.25s ease, opacity 0.25s ease; }
#chat-window.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
.chat-header { background: var(--verde); padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.chat-header-info { display: flex; align-items: center; gap: 0.75rem; }
.chat-avatar { width: 36px; height: 36px; background: var(--turquesa); display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 700; color: white; flex-shrink: 0; }
.chat-header-name { font-size: 0.85rem; font-weight: 500; color: var(--nieve); }
.chat-header-sub { font-size: 0.72rem; color: rgba(244,241,236,0.6); }
.chat-close { background: none; border: none; cursor: pointer; color: rgba(244,241,236,0.6); display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
.chat-close:hover { color: var(--nieve); }
.chat-close svg { width: 18px; height: 18px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; min-height: 280px; max-height: 360px; }
.msg { max-width: 85%; animation: msgIn 0.2s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; }
.msg-bubble { padding: 0.75rem 1rem; font-size: 0.88rem; line-height: 1.6; }
.msg-bot .msg-bubble { background: var(--gris-claro); color: var(--gris-texto); border-radius: 0 8px 8px 8px; }
.msg-user .msg-bubble { background: var(--verde); color: var(--nieve); border-radius: 8px 0 8px 8px; }
.msg-typing .msg-bubble { display: flex; gap: 4px; align-items: center; padding: 0.9rem 1rem; }
.dot { width: 6px; height: 6px; background: var(--gris-pie); border-radius: 50%; animation: pulse 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.chat-input-area { padding: 0.75rem 1rem; border-top: 1px solid var(--gris-claro); display: flex; gap: 0.5rem; align-items: center; }
#chat-input { flex: 1; border: 1px solid var(--gris-claro); padding: 0.6rem 0.9rem; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; color: var(--gris-texto); outline: none; transition: border-color 0.2s; resize: none; }
#chat-input:focus { border-color: var(--turquesa); }
#chat-send { width: 38px; height: 38px; background: var(--verde); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; }
#chat-send:hover { background: var(--turquesa); }
#chat-send:disabled { opacity: 0.55; cursor: default; }
#chat-send svg { width: 16px; height: 16px; fill: white; }
.cal-embed-container { padding: 1rem; background: white; }
.cal-embed-container iframe { width: 100%; height: 400px; border: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero { gap: 2.5rem; padding: 130px 4vw 70px; }
  .hero-content { max-width: 520px; }
  h1 { font-size: 3.2rem; }
  .stat-number { font-size: 2.6rem; }
  section { padding: 5rem 6vw; }
  .solution-layout { gap: 3rem; }
  .problem-grid { gap: 1.5rem; }
  .client-grid { gap: 1.25rem; }
}

@media (max-width: 768px) {
  nav { padding: 1.2rem 5vw; }
  /* Scoped to the nav: the footer has room and keeps its full-lockup size. */
  .nav-brand .brand-mark { height: 46px; }
  .nav-cta { font-size: 0.72rem; }
  .nav-right { gap: 0.9rem; }
  .nav-linkedin { display: none; }
  .nav-lang { font-size: 0.62rem; padding: 0.25rem 0.45rem; }
  .hero { grid-template-columns: 1fr; padding: 110px 6vw 60px; text-align: center; justify-items: center; }
  .hero-content { max-width: 100%; }
  h1 { font-size: clamp(2.4rem, 6vw, 3.2rem); }
  .hero-motto { margin-bottom: 1.5rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; gap: 1rem; }
  .hero-stats { margin-top: 2.5rem; width: 100%; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-card { padding: 1.5rem; }
  .stat-number { font-size: 2.4rem; }
  .stat-label { font-size: 0.88rem; }
  section { padding: 4rem 6vw; }
  h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
  .problem-grid { grid-template-columns: 1fr; gap: 0; }
  .problem-item { padding: 1.5rem 0; border-top: 1px solid rgba(244,241,236,0.2); }
  .problem-number { font-size: 2.5rem; margin-bottom: 0.5rem; }
  .solution-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .solution-aside { position: static; }
  .client-grid { grid-template-columns: 1fr; gap: 1rem; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { display: none; }
  .step { padding: 1.5rem 0; text-align: left; display: flex; gap: 1.25rem; align-items: flex-start; border-bottom: 1px solid var(--gris-claro); }
  .step:last-child { border-bottom: none; }
  .step-num { margin: 0; flex-shrink: 0; width: 40px; height: 40px; font-size: 1rem; }
  .cta-final { padding: 5rem 6vw; }
  footer { flex-direction: column; gap: 1.25rem; padding: 2rem 6vw; text-align: center; }
  .footer-copy { text-align: center; }
  #chat-window { width: calc(100vw - 2rem); right: 1rem; bottom: 5rem; }
  #chat-trigger { bottom: 1.5rem; right: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-brand .brand-mark { height: 40px; }
  .hero { padding: 100px 5vw 50px; }
  h1 { font-size: 2.2rem; line-height: 1.15; }
  .hero-sub { font-size: 0.95rem; }
  .btn-primary { width: 100%; justify-content: center; padding: 1rem 1.5rem; }
  .btn-wa { font-size: 0.85rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card { padding: 1.25rem 1rem; }
  .stat-number { font-size: 2rem; }
  .stat-label { font-size: 0.82rem; }
  section { padding: 3.5rem 5vw; }
  h2 { font-size: 1.85rem; }
  .outcome-item { gap: 1rem; }
  .outcome-icon { width: 38px; height: 38px; }
  .client-card { padding: 1.5rem; }
  .cta-final { padding: 4rem 5vw; }
  .btn-primary-light { width: 100%; justify-content: center; }
  .about-tag { font-size: 0.65rem; padding: 0.3rem 0.6rem; }
}

@media (max-width: 375px) {
  h1 { font-size: 1.95rem; }
  .stat-number { font-size: 1.85rem; }
  .stat-label { font-size: 0.78rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
}


/* ============================================================
   FASE 1 — CTA como enlaces reales, WhatsApp por sección,
   estados de foco visibles
   ============================================================ */

/* .btn-primary y .btn-primary-light ya traen text-decoration:none e
   inline-flex, así que al pasar de <button> a <a> no cambia nada visual.
   Se deja explícito para que no dependa del orden de las reglas. */
a.btn-primary,
a.btn-primary-light { text-decoration: none; }

/* Cierre: calendario como acción principal, WhatsApp como alternativa */
.cta-final-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.btn-wa-light {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(244,241,236,0.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(244,241,236,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-wa-light:hover,
.btn-wa-light:focus-visible {
  color: var(--nieve);
  border-color: var(--nieve);
}

/* Cierre de la sección de proyectos */
.projects-cta {
  margin-top: 3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: #555;
}
.projects-cta a {
  color: var(--turquesa);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(26,140,130,0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.projects-cta a:hover,
.projects-cta a:focus-visible { border-color: var(--turquesa); }

/* Foco visible por teclado. Sin esto, navegar con Tab no muestra
   dónde está el cursor — era uno de los puntos de la Fase 1. */
a:focus-visible,
button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--turquesa);
  outline-offset: 3px;
}
.cta-final a:focus-visible,
.cta-final button:focus-visible { outline-color: var(--nieve); }

@media (max-width: 600px) {
  .cta-final-actions { flex-direction: column; gap: 1.25rem; }
  .cta-final-actions .btn-primary-light { width: 100%; justify-content: center; }
  .projects-cta { margin-top: 2rem; }
}

/* ============================================================
   Aviso de cookies
   ============================================================ */

.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, calc(100% + 2rem));
  z-index: 900;                 /* por debajo de la ventana del chat */
  width: min(880px, calc(100vw - 2.5rem));
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.1rem 1.5rem;
  background: var(--negro);
  border-top: 2px solid var(--turquesa);
  box-shadow: 0 12px 40px rgba(11, 42, 61, 0.28);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.cookie-bar.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.cookie-bar-text {
  margin: 0;
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(244, 241, 236, 0.82);
}

.cookie-bar-text a {
  color: var(--nieve);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 241, 236, 0.4);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color 0.2s;
}

.cookie-bar-text a:hover,
.cookie-bar-text a:focus-visible { border-color: var(--nieve); }

.cookie-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cookie-btn-solid {
  background: var(--turquesa);
  color: var(--nieve);
}
.cookie-btn-solid:hover,
.cookie-btn-solid:focus-visible { background: #23a396; }

.cookie-btn-ghost {
  background: transparent;
  color: rgba(244, 241, 236, 0.72);
  border-color: rgba(244, 241, 236, 0.28);
}
.cookie-btn-ghost:hover,
.cookie-btn-ghost:focus-visible {
  color: var(--nieve);
  border-color: rgba(244, 241, 236, 0.6);
}

.cookie-btn:focus-visible {
  outline: 2px solid var(--nieve);
  outline-offset: 2px;
}

/* El botón del chat vive abajo a la derecha: en pantallas donde el aviso
   llegaría a taparlo, se le deja espacio. */
@media (min-width: 981px) {
  .cookie-bar { width: min(880px, calc(100vw - 8rem)); }
}

@media (max-width: 980px) {
  .cookie-bar {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: translateY(100%);
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-top-width: 2px;
  }
  .cookie-bar.is-visible { transform: translateY(0); }

  .cookie-bar-text { font-size: 0.8rem; }

  .cookie-bar-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; text-align: center; padding: 0.85rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-bar { transition: opacity 0.2s ease; transform: translate(-50%, 0); }
  @media (max-width: 980px) {
    .cookie-bar { transform: none; }
  }
}

/* Enlace de reapertura en el pie */
.footer-cookie-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--gris-pie);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-cookie-link:hover,
.footer-cookie-link:focus-visible { color: var(--nieve); }
/* ============================================================
   Páginas legales (política de datos, términos, aviso legal)
   ============================================================ */

/* El nav es fijo, así que la página necesita despejar su altura,
   igual que hace el hero de la portada. */
.legal {
  padding: 9rem 8vw 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.legal-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(11, 42, 61, 0.1);
}

.legal-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--negro);
  margin: 0 0 0.75rem;
  max-width: 20ch;
}

.legal-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  font-style: italic;
  color: var(--gris-texto);
  margin: 0;
}

/* Ancho de lectura cómodo: alrededor de 70 caracteres por línea */
.legal-body {
  max-width: 68ch;
}

.legal-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 600;
  color: var(--verde);
  line-height: 1.25;
  margin: 2.75rem 0 0.85rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(11, 42, 61, 0.08);
}

.legal-body h2:first-of-type { margin-top: 2rem; }

.legal-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--negro);
  margin: 1.75rem 0 0.6rem;
}

.legal-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--gris-texto);
  margin: 0 0 1rem;
}

.legal-body ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  list-style: none;
}

.legal-body li {
  position: relative;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--gris-texto);
  margin-bottom: 0.6rem;
  padding-left: 0.9rem;
}

.legal-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--turquesa);
}

.legal-body strong { font-weight: 500; color: var(--negro); }

.legal-body a {
  color: var(--turquesa);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 140, 130, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.legal-body a:hover,
.legal-body a:focus-visible { border-color: var(--turquesa); }

.legal-note {
  border-left: 2px solid var(--dorado);
  padding: 0.15rem 0 0.15rem 1rem;
  font-style: italic;
}

/* --- Tablas --- */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 300;
  color: var(--gris-texto);
  background: var(--white);
}

.legal-table th,
.legal-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid rgba(11, 42, 61, 0.1);
  line-height: 1.55;
}

.legal-table thead th {
  background: var(--gris-claro);
  color: var(--verde);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.legal-table-id th[scope="row"] {
  background: #FAFAF8;
  color: var(--negro);
  font-weight: 500;
  width: 38%;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 780px) {
  .legal { padding: 7rem 6vw 3.5rem; }
  .legal-header { margin-bottom: 1.75rem; padding-bottom: 1.5rem; }
  .legal-body h2 { margin-top: 2.25rem; }

  /* Las tablas se desplazan lateralmente en vez de romper la maqueta */
  .legal-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .legal-table th,
  .legal-table td { white-space: normal; min-width: 8rem; }
}

@media print {
  nav, footer, .cookie-bar, #chat-trigger, #chat-window { display: none !important; }
  .legal { padding: 0; max-width: none; }
  .legal-body { max-width: none; }
  .legal-body a { color: inherit; border: 0; }
  .legal-body h2 { page-break-after: avoid; }
  .legal-table { page-break-inside: avoid; }
}
