:root {
  --ink: #183238;
  --teal-dark: #173f47;
  --teal: #23636a;
  --teal-muted: #6e9191;
  --paper: #f6f3ed;
  --surface: #fffdf9;
  --line: #ded9cf;
  --coral: #c46c4e;
  --footer-copy: #c6d5d1;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; margin-inline: auto; object-fit: contain; object-position: center; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 8px 12px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { height: 74px; background: var(--surface); border-bottom: 1px solid #e4e0d7; }
.header-inner { width: min(1240px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; gap: 48px; }
.brand { display: flex; align-items: center; gap: 10px; color: #536a6c; font-size: 12px; font-weight: 600; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.seal { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--teal-dark); font: 700 12px Georgia, serif; }
.main-menu { display: flex; gap: 30px; }
.main-menu a { color: #31575b; font-size: 14px; }
.main-menu .active { color: var(--teal-dark); font-weight: 700; }
.menu-toggle { display: none; }

main { width: min(1240px, calc(100% - 56px)); margin: auto; }
.hero { min-height: 620px; display: grid; grid-template-columns: minmax(0, .75fr) minmax(520px, 1.25fr); align-items: center; gap: clamp(32px, 5vw, 72px); padding: 84px 0; }
.eyebrow { margin: 0 0 14px; color: var(--teal-muted); font: 500 11px/1.4 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { color: var(--teal-dark); font-family: "Playfair Display", Georgia, serif; }
h1 { max-width: 600px; margin: 0; font-size: clamp(54px, 6.2vw, 88px); line-height: .98; letter-spacing: -.045em; }
h1 em { color: var(--coral); }
.lede { max-width: 590px; margin: 28px 0 34px; color: #536366; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.primary-action { display: inline-flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 5px; color: var(--surface); background: var(--teal-dark); font-weight: 700; }
.primary-action:hover { background: #22545c; text-decoration: none; }
.primary-action span { color: #e09a80; font-size: 20px; }

.image-placeholder { position: relative; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 5px; color: #527477; background: linear-gradient(145deg, #edf3ef, #e1ebe7); border: 1px solid #c8d8d2; border-radius: 8px; }
.image-placeholder::after { content: ""; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 36px 36px; }
.image-placeholder > * { z-index: 1; }
.image-placeholder > span { color: var(--teal-dark); font-family: "Playfair Display", Georgia, serif; font-size: 24px; font-weight: 700; }
.image-placeholder small { font: 11px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }

.hero-image {
  width: 100%;
  min-height: 460px;
  justify-self: center;
  box-shadow: 0 22px 55px rgba(23, 63, 71, .14);
  animation: hero-image-float 5s ease-in-out infinite;
  will-change: transform;
}

@keyframes hero-image-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.placeholder-window { position: absolute; z-index: 2; top: 0; left: 0; display: flex; gap: 6px; width: 100%; padding: 13px; border-bottom: 1px solid #c8d8d2; background: rgba(255, 253, 249, .75); }
.placeholder-window span { width: 8px; height: 8px; border-radius: 50%; background: #9db5b0; }
.placeholder-window span:first-child { background: var(--coral); }

.intro { width: 100vw; margin-left: calc(50% - 50vw); padding: 112px max(28px, calc((100vw - 820px) / 2)); text-align: center; background: var(--surface); border-block: 1px solid #e6e1d8; }
.intro h2, .section-heading h2 { margin: 0; font-size: clamp(36px, 4.2vw, 54px); line-height: 1.08; letter-spacing: -.025em; }
.intro > p:last-child { margin: 28px auto 0; color: #536366; font-size: 18px; line-height: 1.75; }

.platform { padding: 112px 0 126px; }
.section-heading { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.screenshot-list { max-width: 980px; margin: auto; display: grid; gap: 72px; }
figure { margin: 0; }
.screenshot { aspect-ratio: 16 / 8; min-height: 320px; box-shadow: 0 15px 38px rgba(20, 45, 48, .09); }
.screenshot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
figcaption { margin-top: 15px; color: #617779; font-size: 14px; text-align: center; }

.article-main { width: 100%; }
.blog-article { padding: clamp(72px, 9vw, 120px) 24px clamp(88px, 11vw, 150px); background: var(--surface); }
.article-header, .article-body { width: min(100%, 720px); margin-inline: auto; }
.article-header { text-align: center; }
.article-header h1 { max-width: 760px; margin-inline: auto; font-size: clamp(42px, 6vw, 68px); line-height: 1.08; }
.article-meta { margin: 24px 0 0; color: #6a7c7e; font: 500 12px/1.5 "DM Mono", monospace; }
.article-body { margin-top: clamp(48px, 6vw, 72px); color: #40585b; font-family: Georgia, "Times New Roman", serif; font-size: clamp(18px, 2vw, 20px); line-height: 1.85; text-align: left; }
.article-body p { margin: 0 0 1.65em; }
.article-body h2 { margin: 2em 0 .75em; font-size: clamp(28px, 4vw, 36px); line-height: 1.2; }
.article-figure { width: min(100%, 640px); margin: 2.5em auto; }
.article-image { width: 100%; aspect-ratio: 16 / 9; }

.articles-main { min-height: calc(100vh - 74px); padding: clamp(72px, 9vw, 112px) 0 clamp(88px, 11vw, 136px); }
.articles-header { margin-bottom: clamp(48px, 6vw, 68px); text-align: center; }
.articles-header h1 { max-width: none; margin-inline: auto; text-align: center; }
.articles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; width: min(100%, 980px); margin-inline: auto; }
.article-card { padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--coral); }
.article-card h2 { margin: 0 0 14px; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; }
.article-card h2 a { color: var(--teal-dark); }
.article-card p { margin: 0; color: #536366; font-size: 16px; line-height: 1.7; }

.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px max(24px, calc((100vw - 1240px) / 2)); color: var(--footer-copy); background: var(--teal-dark); font-size: 12px; text-align: left; }
.site-footer strong { display: block; margin-bottom: 8px; color: var(--surface); font-size: 16px; }
.site-footer p { max-width: 760px; margin: 5px 0; line-height: 1.5; }
.site-footer a { color: var(--surface); font-weight: 700; text-decoration: underline; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px; }
.site-footer nav a { padding: 8px 10px; border: 1px solid rgba(198, 213, 209, .45); border-radius: 5px; text-decoration: none; }
.site-footer nav a:hover { background: rgba(255, 255, 255, .08); }

@media (max-width: 820px) {
  .header-inner { width: calc(100% - 36px); }
  .menu-toggle { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; color: var(--teal-dark); background: transparent; font: 700 12px "DM Sans", sans-serif; }
  .menu-toggle-icon, .menu-toggle-icon::before, .menu-toggle-icon::after { display: block; width: 20px; height: 2px; background: currentColor; transition: transform .2s ease; }
  .menu-toggle-icon { position: relative; }
  .menu-toggle-icon::before, .menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-icon::before { top: -6px; }
  .menu-toggle-icon::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }
  .main-menu { position: absolute; z-index: 10; top: 74px; left: 0; width: 100%; display: none; padding: 18px; background: var(--surface); border-bottom: 1px solid #e4e0d7; box-shadow: 0 8px 20px rgba(23, 63, 71, .1); }
  .main-menu.open { display: grid; }
  .main-menu a { padding: 8px 0; }
  main { width: calc(100% - 36px); }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 48px; padding: 64px 0 80px; }
  .hero-image { display: none; }
  .intro { padding-block: 82px; }
  .platform { padding: 82px 0 94px; }
  .screenshot-list { gap: 52px; }
  .screenshot { min-height: 260px; }
  .articles-grid { grid-template-columns: 1fr; }
  .site-footer { display: grid; }
  .site-footer nav { justify-content: flex-start; margin-top: 12px; }
}

@media (max-width: 520px) {
  .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  h1 { font-size: 50px; }
  .lede { font-size: 18px; }
  .intro { padding-inline: 22px; }
  .screenshot { min-height: 210px; aspect-ratio: 4 / 3; }
  .image-placeholder > span { font-size: 20px; }
  .site-footer nav { display: grid; grid-template-columns: 1fr 1fr; }
  .site-footer nav a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .hero-image { animation: none; }
}

.hero-video {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  justify-self: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 22px 55px rgba(23, 63, 71, 0.14);
}

.hero-video video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-inline: auto;
  object-fit: contain;
}

/* Ocultar el video en móviles y tablets pequeñas */
@media (max-width: 820px) {
  .hero-video {
    display: none;
  }
}

.hero-chart {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid #ded9cf;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 22px 55px rgba(23, 63, 71, 0.14);
}

.chart-heading {
  margin-bottom: 28px;
}

.chart-heading > span {
  color: #6e9191;
  font: 500 11px/1.4 "DM Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chart-heading h2 {
  margin: 8px 0 4px;
  color: #173f47;
  font: 700 clamp(20px, 2vw, 27px)/1.2 "DM Sans", sans-serif;
}

.chart-heading p {
  margin: 0;
  color: #7a8889;
  font: 12px/1.5 "DM Mono", monospace;
}

.chart-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 310px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background: #e7ebe7;
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgba(23, 63, 71, 0.05);
}

.donut-center {
  position: relative;
  z-index: 1;
  color: #173f47;
  font: 700 20px/1 "DM Sans", sans-serif;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.donut-chart.finished .donut-center {
  opacity: 1;
}

.chart-legend {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-legend li {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #536a6c;
  font-size: 10px;
  line-height: 1.25;
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-value {
  color: #173f47;
  font-weight: 700;
}

/* Conserva el comportamiento solicitado para móviles */
@media (max-width: 820px) {
  .hero-chart {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .donut-center {
    transition: none;
  }
}

.chart-content {
  position: relative;
}

.donut-chart {
  cursor: pointer;
}

.chart-tooltip {
  position: absolute;
  z-index: 10;
  display: grid;
  gap: 4px;
  width: max-content;
  max-width: 230px;
  padding: 12px 14px;
  color: #173f47;
  background: #fffdf9;
  border: 1px solid #dce2df;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(23, 63, 71, 0.18);
  pointer-events: none;
  transform: translateZ(0);
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip strong {
  font: 700 13px/1.3 "DM Sans", sans-serif;
}

.chart-tooltip span {
  color: #6e7e80;
  font: 500 11px/1.4 "DM Mono", monospace;
}