/* css/producto.css — Páginas de ROME Engine y GodotLuau.
   Todo lo demás (cabecera, botones, tarjetas, colores) sale de style.css */

.brand-back { color: var(--muted); font-weight: 600; margin-right: 2px; }

.product-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text);
  font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
}
.product-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--studio); box-shadow: 0 0 0 3px color-mix(in srgb, var(--studio) 25%, transparent); }
.product-badge--ok .product-badge__dot { background: var(--ingame); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ingame) 25%, transparent); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li + li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); margin-right: 10px; }
.hero-meta b { color: var(--text); font-weight: 600; }
.os-note { font-size: 14px; color: var(--studio); }

.btn__size { font-weight: 600; opacity: .75; }
.btn svg { flex-shrink: 0; }

/* Tarjeta grande del hero que se inclina con el puntero */
.product-visual { flex-shrink: 0; width: 470px; perspective: 1200px; }
/* La inclinación la hace la tarjeta de dentro, no el contenedor (ver [data-tilt] en style.css) */
.product-visual[data-tilt] { transform: none; }
.product-visual__card {
  position: relative; overflow: hidden; border-radius: 28px; aspect-ratio: 4 / 3.4;
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--glass-edge), 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 8px var(--accent-glow);
  transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, -10deg));
  transition: transform .5s var(--ease);
}
.product-visual.is-tilting .product-visual__card { transition: transform .12s linear; }
.product-visual__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-visual__card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 18, 0.05) 30%, rgba(11, 10, 18, 0.75) 100%); }
.product-visual__logo { position: absolute; z-index: 1; left: 50%; top: 50%; width: 72%; transform: translate(-50%, -50%); filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.55)); }
/* Variante con solo el icono del juego (CatCular) */
.product-visual__card--icon {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--accent) 45%, transparent) 0%, transparent 100%), var(--glass-sheen), var(--glass-fill-strong);
}
.product-visual__card--icon::after { display: none; }
.product-visual__icon { width: 56%; border-radius: 22%; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); transform: translateZ(30px); }
.product-visual__card--icon .product-visual__tag { background: rgba(11, 10, 18, 0.55); }

.product-visual__tag {
  position: absolute; z-index: 1; left: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; background: rgba(11, 10, 18, 0.62); color: #f3f1fa;
  font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* Ventana de código (hero de GodotLuau y pasos de instalación) */
.code-window {
  overflow: hidden; border-radius: 20px; border: 1px solid var(--glass-border-strong);
  background: linear-gradient(145deg, #221f33 0%, #13111c 100%);
  box-shadow: var(--glass-edge), 0 24px 60px rgba(0, 0, 0, 0.4);
  color: #e8e6f2; text-align: left;
}
.code-window__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.code-window__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-window__bar i:nth-child(2) { background: #febc2e; }
.code-window__bar i:nth-child(3) { background: #28c840; }
.code-window__name { margin-left: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #b9b4d0; }
.code-window__name img { width: 16px; height: 16px; border-radius: 4px; }
.code-window pre {
  margin: 0; padding: 18px 20px 22px; overflow-x: auto;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace; font-size: 14px; line-height: 1.65;
}
/* Colores de Luau como en Roblox Studio */
.tk-k { color: #f86d7c; }
.tk-f { color: #84d6f7; }
.tk-s { color: #adf195; }
.tk-n { color: #ffc600; }
.tk-c { color: #8c8a99; font-style: italic; }
.tk-p { color: #fdfbac; }

.product-visual--code .product-visual__card { aspect-ratio: auto; background: none; border: 0; box-shadow: none; overflow: visible; }
.product-visual--code .product-visual__card::after { display: none; }
.product-visual--code .code-window { box-shadow: var(--glass-edge), 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 8px var(--accent-glow); }
.product-visual__float {
  position: absolute; right: -18px; top: -26px; z-index: 2; width: 92px; height: 92px; border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); transform: translateZ(40px) rotate(6deg);
}

/* Tarjetas de cristal propias de estas páginas */
.feature-card, .download-card, .release, .step, .state-row, .mode-card, .note-card {
  border-radius: var(--radius-lg); border: 1px solid var(--glass-border);
  background: var(--glass-sheen), var(--glass-fill), var(--glass-frost);
  box-shadow: var(--glass-edge), var(--glass-drop);
}

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.feature-card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 13px; margin-bottom: 6px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.feature-card h3 { font-size: 18px; line-height: 1.3; }
.feature-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

.mode-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.mode-card__num { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--accent-text); }
.mode-card h3 { font-size: 17px; }
.mode-card p { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* Imagen grande con su texto al lado */
.showcase { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.showcase__media { overflow: hidden; border-radius: 24px; border: 1px solid var(--glass-border-strong); box-shadow: var(--glass-edge), var(--glass-drop); }
.showcase__media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.showcase__text { display: flex; flex-direction: column; gap: 18px; }

.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--ingame) 20%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ddc84' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.check-list--no li::before {
  background: color-mix(in srgb, #ff6b6b 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b6b' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.check-list b { color: var(--text); }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.note-card { display: flex; flex-direction: column; gap: 16px; padding: 26px 28px; }
.note-card h3 { font-size: 19px; }
.note-card--warn { border-color: color-mix(in srgb, var(--studio) 45%, var(--glass-border)); }

/* Tabla de qué funciona */
.state-list { display: flex; flex-direction: column; gap: 10px; }
.state-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-radius: var(--radius); }
.state-row__name { font-size: 15px; font-weight: 600; }
.state-row__note { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.state {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap;
  --tone: var(--ingame);
  background: color-mix(in srgb, var(--tone) 16%, transparent); color: color-mix(in srgb, var(--tone) 75%, var(--text));
}
.state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.state--part { --tone: var(--studio); }
.state--no { --tone: #ff6b6b; }
.state--soon { --tone: var(--online); }

/* Descargas */
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.download-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.download-card--main { border-color: color-mix(in srgb, var(--accent-text) 55%, var(--glass-border)); box-shadow: var(--glass-edge), var(--glass-drop), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.download-card.is-off { opacity: .78; }
.download-card__head { display: flex; align-items: center; gap: 14px; }
.download-card__os {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--glass-border); color: var(--text);
}
.download-card__title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.download-card__title b { font-size: 18px; }
.download-card__title span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.download-card p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.download-card .btn { align-self: flex-start; }

.hash { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--glass-border); }
.hash__label { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.hash code { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.hash button {
  flex-shrink: 0; min-height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--glass-border);
  background: var(--glass-sheen), var(--glass-fill-strong); font-size: 13px; font-weight: 600;
}
.hash button:hover { border-color: var(--accent-text); }

/* Pasos numerados */
.steps { display: flex; flex-direction: column; gap: 12px; counter-reset: paso; }
.step { display: flex; gap: 18px; padding: 20px 22px; counter-increment: paso; }
.step::before {
  content: counter(paso); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
}
.step__text { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 5px; }
.step__text b { font-size: 16px; }
.step__text span { font-size: 15px; line-height: 1.55; color: var(--muted); }
.step .code-window { margin-top: 10px; }
.step .code-window pre { font-size: 13px; padding: 14px 16px 16px; }

/* Pestañas de sistema encima de los pasos (CatCular) */
.os-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.os-tab {
  min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 600;
  transition: color .2s, border-color .2s, background-color .2s;
}
.os-tab:hover { color: var(--text); border-color: var(--line-strong); }
.os-tab[aria-selected="true"] {
  color: var(--accent-text); border-color: color-mix(in srgb, var(--accent-text) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.subhead { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 48px 0 18px; }
.subhead:first-child { margin-top: 0; }

/* Historial de versiones */
.timeline { position: relative; display: flex; flex-direction: column; gap: 20px; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--accent) 0%, var(--line-strong) 40%, transparent 100%); }
.timeline[data-expanded="false"] > .is-extra { display: none; }
.release { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; }
.release::before {
  content: ''; position: absolute; left: -32px; top: 30px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--line-strong);
}
.release.is-latest::before { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-glow); }
.release__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.release__version { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1; }
.release__date { font-size: 14px; color: var(--muted); }
.release__summary { font-size: 17px; font-weight: 600; line-height: 1.45; }
.release__group { display: flex; flex-direction: column; gap: 8px; }
.release__group h3 { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-text); }
.release ul { display: flex; flex-direction: column; gap: 7px; }
.release li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.release li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); opacity: .7; }
.release__links { display: flex; flex-wrap: wrap; gap: 16px; }
.release--live .release__notes { white-space: pre-line; }

.disclaimer { font-size: 14px; line-height: 1.6; color: var(--subtle); max-width: 820px; }

.cta-band {
  display: flex; align-items: center; gap: 24px; padding: 32px 36px; border-radius: 24px;
  border: 1px solid var(--glass-border-strong);
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 75%), var(--glass-sheen), var(--glass-fill), var(--glass-frost);
  box-shadow: var(--glass-edge), var(--glass-drop);
}
.cta-band img { width: 72px; height: 72px; border-radius: 18px; flex-shrink: 0; }
.cta-band__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cta-band__text b { font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.cta-band__text span { color: var(--muted); }
.cta-band .hero-cta { padding-top: 0; }

/* Las pestañas de la cabecera cuando la página tiene muchas secciones */
.product-page .nav-list { gap: 22px; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .feature-card, .download-card, .release, .step, .state-row, .mode-card, .note-card, .cta-band { background: var(--glass-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .feature-card, .download-card, .release, .step, .state-row, .mode-card, .note-card, .cta-band { background: var(--glass-solid); }
}

:root[data-theme="light"] .product-visual__card::after { background: linear-gradient(180deg, transparent 40%, rgba(11, 10, 18, 0.55) 100%); }
:root[data-theme="light"] .hash { background: rgba(255, 255, 255, 0.6); }

@media (max-width: 1100px) {
  .product-visual { width: 380px; }
  .feature-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .product-visual { width: 100%; max-width: 440px; }
  .product-visual__card { transform: none; }
  .product-visual__float { width: 72px; height: 72px; right: -6px; top: -20px; }
  .hero-meta { justify-content: center; gap: 4px 16px; }
  .hero-meta li + li::before { display: none; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .showcase { grid-template-columns: 1fr; gap: 28px; }
  .split, .download-grid { grid-template-columns: 1fr; gap: 14px; }
  .cta-band { flex-direction: column; text-align: center; padding: 28px 22px; }
  .cta-band .hero-cta { justify-content: center; }
  .subhead { font-size: 22px; margin-top: 36px; }
}

@media (max-width: 600px) {
  .feature-grid, .feature-grid--4 { grid-template-columns: 1fr; }
  .feature-card { padding: 20px; }
  .timeline { padding-left: 24px; }
  .timeline::before { left: 5px; }
  .release { padding: 20px; }
  .release::before { left: -26px; top: 26px; width: 14px; height: 14px; }
  .release__version { font-size: 22px; }
  .state-row { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
  .step { gap: 14px; padding: 16px; }
  .code-window pre { font-size: 12.5px; }
  .hash { flex-wrap: wrap; }
  .download-card .btn { align-self: stretch; }
}
