/* Sistema visual de doyouwin.es (kit global de Elementor, post-7.css, y portada, post-138.css):
   amarillo #FBBE0A, texto #3C3524, oscuro #1E1E1E, fondos #F5F7FA; Rubik; botones con
   degradado #FDD04B→#FCBE09 y radio 4 px; tarjetas de radio 12 px; paneles de radio 20 px. */
@font-face {
  font-family: "Rubik";
  src: url("/brand/rubik-latin-variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --yellow: #fbbe0a;
  --yellow-hi: #fdd04b;
  --yellow-lo: #fcbe09;
  --yellow-10: #fcbe091a;
  --yellow-20: #fcbe0933;
  --yellow-30: #fcbe094d;
  --dark: #1e1e1e;
  --on-yellow: #1e1e1e;

  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --surface: #ffffff;
  --ink: #333333;
  --text: #3c3524;
  --muted: #6b6458;
  --line: #e7e8ec;
  --hero: linear-gradient(180deg, #ffffff 30%, #eeebf9 100%);
  --warm: linear-gradient(180deg, #fcf5eb 0%, #fee9b0 100%);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(60 53 36 / 0.06);
  --shadow-hover: 0 0 12px rgb(173 133 0 / 0.3);
  --band: #1e1e1e;
  --band-edge: transparent;
  --band-line: rgb(255 255 255 / 0.3);
  color-scheme: light;
}

/* Oscuro: por preferencia del sistema salvo que se haya elegido claro, o forzado con el botón.
   Los dos bloques llevan los mismos valores. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161616;
    --bg-soft: #1b1b1b;
    --surface: #232323;
    --ink: #f5f7fa;
    --text: #e4e1da;
    --muted: #a9a397;
    --line: rgb(255 255 255 / 0.1);
    --hero: linear-gradient(180deg, #161616 30%, #1d1b26 100%);
    --warm: linear-gradient(180deg, rgb(252 190 9 / 0.1) 0%, rgb(252 190 9 / 0.2) 100%);
    --shadow: none;
    --band: #221f18;
    --band-edge: rgb(252 190 9 / 0.22);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161616;
  --bg-soft: #1b1b1b;
  --surface: #232323;
  --ink: #f5f7fa;
  --text: #e4e1da;
  --muted: #a9a397;
  --line: rgb(255 255 255 / 0.1);
  --hero: linear-gradient(180deg, #161616 30%, #1d1b26 100%);
  --warm: linear-gradient(180deg, rgb(252 190 9 / 0.1) 0%, rgb(252 190 9 / 0.2) 100%);
  --shadow: none;
  --band: #221f18;
  --band-edge: rgb(252 190 9 / 0.22);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  font: 400 16px/1.55 "Rubik", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; }
h1 { font-size: clamp(2.25rem, 1.2rem + 4.4vw, 4.5rem); line-height: 1.06; font-weight: 700; letter-spacing: -1px; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); line-height: 1.2; font-weight: 700; letter-spacing: -1px; }
h3, .h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
h4 { font-size: 1rem; font-weight: 600; margin: 0.5rem 0 0.25rem; }
.light { display: block; font-weight: 400; }
em { font-style: normal; color: var(--yellow); }
code, pre, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; }
code { background: var(--yellow-10); border: 1px solid var(--yellow-30); border-radius: 4px; padding: 0.05em 0.35em; color: var(--ink); overflow-wrap: anywhere; }
pre { background: var(--dark); color: #f5f7fa; border-radius: 12px; padding: 1rem 1.1rem; margin: 0.75rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
pre code { background: none; border: 0; padding: 0; color: inherit; overflow-wrap: normal; }
kbd { display: inline-block; min-width: 1.6em; text-align: center; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--surface); color: var(--muted); font-size: 0.8rem; line-height: 1.5; }

.wrap { width: 100%; max-width: 75rem; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Cabecera, como la de doyouwin.es: logo, enlaces de texto y botón amarillo. */
.top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.logo { display: flex; color: var(--ink); flex: none; }
.logo svg { height: 52px; width: auto; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--text); font-size: 0.95rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: color 0.3s, border-color 0.3s; }
.nav a:hover { color: var(--ink); border-color: var(--yellow-30); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; border-color: var(--yellow); }
.top-actions { display: flex; align-items: center; gap: 0.75rem; }
.theme { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; cursor: pointer; padding: 0; }
.theme svg { width: 1.15rem; height: 1.15rem; }

.banner { margin: 0; padding: 0.55rem 0; background: var(--warm); font-size: 0.85rem; color: var(--text); }
.banner .wrap { display: block; }

/* Botones de doyouwin.es. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(180deg, var(--yellow-hi) 0%, var(--yellow-lo) 100%);
  color: var(--on-yellow); border: 2px solid transparent; border-radius: 4px;
  padding: 14px 24px; font: inherit; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 0 4px rgb(0 0 0 / 0.15); transition: box-shadow 0.3s, transform 0.3s;
}
.btn:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 0.95rem; }
.btn-outline { background: transparent; border-color: var(--yellow); color: var(--ink); box-shadow: none; }
.btn img { width: 18px; height: 18px; filter: brightness(0) saturate(100%); opacity: 0.85; }
.btn.is-active { box-shadow: inset 0 0 0 2px rgb(30 30 30 / 0.35); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.more { color: var(--ink); font-weight: 500; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; color: var(--yellow); transition: margin 0.3s; }
.more:hover::after { margin-left: 0.2rem; }

/* Chips de sección: oscuro con texto amarillo, o amarillo con texto oscuro. */
.chip {
  display: inline-block; margin-bottom: 1rem; padding: 6px 16px; border-radius: 4px;
  background: linear-gradient(90deg, #1e1e1e 0%, #4a4a4a 100%); color: var(--yellow);
  font-weight: 700; font-size: 0.95rem; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.chip-yellow { background: linear-gradient(90deg, var(--yellow) 0%, #fde49a 100%); color: #3c3524; }

/* Hero con el degradado de doyouwin.es y la mancha amarilla difuminada. */
.hero { position: relative; background: var(--hero); padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.nowrap { white-space: nowrap; }
.hero::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -160px; top: 32%;
  background: linear-gradient(180deg, #fee9b0, var(--yellow)); border-radius: 30%;
  transform: rotate(45deg); filter: blur(70px); opacity: 0.35; pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-center { text-align: center; }
.hero-center h1 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.75rem); max-width: 20ch; margin: 0 auto; }
.hero-center .lead { max-width: 40rem; margin-left: auto; margin-right: auto; }
.hero-center .apps { text-align: left; }
.hero-sm h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); max-width: 20ch; }
.lead { font-size: 1.125rem; color: var(--text); margin: 1.25rem 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-split { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
.hero-art { width: 150px; margin: -20px 0 -60px; }

/* Menú de aplicaciones. */
.apps { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(32px, 5vw, 56px); }
.card {
  display: flex; flex-direction: column; gap: 0.6rem; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; box-shadow: var(--shadow); transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.apps .card:hover { border-color: var(--yellow-30); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.4rem; }
.card h3 { font-size: 1.375rem; }
.card-text { margin: 0; color: var(--muted); flex: 1; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 0.75rem; }
.card .btn-sm { padding: 10px 16px; }
.card-featured { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: clamp(24px, 5vw, 64px); padding: clamp(24px, 3vw, 36px); background: var(--warm); border-color: var(--yellow-30); }
.card-featured { position: relative; }
.card-featured kbd { position: absolute; top: 24px; right: 24px; }
.feat-main { flex: 1.3; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.card-featured h3 { font-size: 1.75rem; }
.card-featured .card-text { color: var(--text); }
.card-featured .checks { flex: 1; margin: 0; padding: 20px 24px; background: var(--surface); border-radius: 12px; }
.tile { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--yellow-20); flex: none; }
.tile img { width: 34px; height: 34px; }
.card-featured .tile { background: var(--surface); }
.tile-lg { width: 80px; height: 80px; border-radius: 20px; }
.tile-lg img { width: 48px; height: 48px; }

/* Listas con el check amarillo de doyouwin.es. */
.checks { list-style: none; padding: 0; margin: 1rem 0; }
.checks li { position: relative; padding-left: 1.75rem; margin: 0.45rem 0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 1.05rem; height: 1.05rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FBBE0A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Pasos numerados. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0 0 1rem; min-height: 1.9rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1em; width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center; border-radius: 999px; background: var(--yellow-20);
  color: var(--ink); font-weight: 700; font-size: 0.9rem;
}

/* Banda oscura, como la del Método Doyouwin. */
.band { position: relative; background: var(--band); border-block: 1px solid var(--band-edge); color: #e9e7e2; padding: clamp(56px, 8vw, 110px) 0; overflow: hidden; }
.band::before, .band::after {
  content: ""; position: absolute; border: 1px solid var(--band-line); border-radius: 56px; pointer-events: none;
}
.band::before { width: 520px; height: 520px; right: -200px; top: 40px; }
.band::after { width: 420px; height: 420px; right: -260px; top: 220px; }
.band h1, .band h2 { color: #ffffff; }
.band h1 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.75rem); }
.band p { max-width: 36rem; font-size: 1.0625rem; }
.band .checks li { color: #e9e7e2; }
.band-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 2rem; }
.band-art { width: 100%; max-width: 380px; justify-self: center; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.45)); }
.band .btn { margin-top: 0.75rem; }
.band code { background: rgb(255 255 255 / 0.06); border-color: var(--band-line); color: #ffffff; }
.copy { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.copy code { font-size: 1rem; padding: 0.7rem 0.9rem; border-radius: 4px; }

/* Secciones claras con panel blanco de radio 20 px. */
.section { padding: clamp(56px, 8vw, 110px) 0; }
.soft { background: var(--bg-soft); }
.stack { display: grid; gap: 24px; }
.board { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: 2rem; background: var(--surface); border-radius: 20px; padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); }
.stack .board { margin-top: 0; }
.board-one { grid-template-columns: 1fr; }
.board-col { min-width: 0; }
.board-col > .h3:not(:first-child) { margin-top: 1.75rem; }
.board-col > p { margin: 0.75rem 0 0; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.clients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.clients .card { gap: 0.25rem; }
.clients p { margin: 0.5rem 0 0; color: var(--muted); }

/* Noticias. */
.news { list-style: none; margin: 1rem 0 0; padding: 0; }
.news-item { padding: 1rem 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; padding-top: 0.25rem; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.3rem; }
.tag { font-weight: 700; color: var(--yellow); background: var(--dark); border-radius: 4px; padding: 1px 8px; }
.tag-casa { background: linear-gradient(180deg, var(--yellow-hi), var(--yellow-lo)); color: var(--on-yellow); }
.ver { font-family: ui-monospace, monospace; }
.news-title { color: var(--ink); font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.news-title:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.news-body { color: var(--text); font-size: 0.95rem; }
.news-body p, .news-body ul { margin: 0.4rem 0; }
.empty { color: var(--muted); margin: 1rem 0 0; }

.crumbs { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.crumbs a { color: var(--text); }
.sheet-head { display: flex; align-items: center; gap: 1.25rem; }
.sheet-head .lead { margin-top: 0.4rem; }

/* Pie oscuro. */
.foot { background: var(--band); color: #bdb8ae; padding: 64px 0 0; font-size: 0.95rem; }
.foot .logo { color: #ffffff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 40px; }
.foot h2 { color: #ffffff; font-size: 1rem; letter-spacing: 0; margin-bottom: 0.75rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0.4rem 0; }
.foot a { color: #e9e7e2; text-decoration: none; }
.foot a:hover { color: var(--yellow); }
.foot-claim { color: var(--yellow); font-weight: 700; font-size: 1.25rem; margin: 1rem 0 0.25rem; }
.foot-brand p:last-child { max-width: 26rem; margin-top: 0; }
.foot-base { border-top: 1px solid rgb(255 255 255 / 0.12); padding-top: 20px; padding-bottom: 28px; font-size: 0.85rem; }

@media (max-width: 960px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-featured { flex-direction: column; align-items: stretch; }
  .clients { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr; }
  .band-art { max-width: 260px; justify-self: start; }
}
@media (max-width: 720px) {
  .top-row { flex-wrap: wrap; gap: 0.5rem 1rem; padding-top: 12px; padding-bottom: 12px; min-height: 0; }
  .logo svg { height: 36px; }
  .top-actions { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0; gap: 1.25rem; }
  .apps, .board, .foot-grid { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .band::before, .band::after { display: none; }
  .band-art { max-width: 200px; }
  .sheet-head { align-items: flex-start; }
  /* En el móvil no hay teclado: fuera los atajos, y el menú, compacto. */
  .nowrap, .card kbd, .card-featured .checks { display: none; }
  .card { padding: 20px; }
  .tile-lg { width: 64px; height: 64px; border-radius: 16px; }
  .tile-lg img { width: 38px; height: 38px; }
}
