/* La casa en números: tema propio sobre Pico CSS 2.1.1 (vendor/pico.min.css). */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/tipografia/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/tipografia/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root[data-theme="light"] {
  --ladrillo: #b5532f;
  --ladrillo-oscuro: #8f3f22;
  --arena: #fbf8f4;
  --crema: #fff4e8;
  --tinta: #2b2420;
  --suave: #6b5f57;
  --linea: #ece3d8;

  --pico-font-family-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pico-font-family: var(--pico-font-family-sans-serif);
  --pico-font-size: 106.25%;
  --pico-line-height: 1.6;
  --pico-background-color: var(--arena);
  --pico-color: var(--tinta);
  --pico-muted-color: var(--suave);
  --pico-muted-border-color: var(--linea);
  --pico-h1-color: var(--tinta);
  --pico-h2-color: var(--tinta);
  --pico-h3-color: var(--tinta);
  --pico-primary: var(--ladrillo-oscuro);
  --pico-primary-background: var(--ladrillo);
  --pico-primary-border: var(--ladrillo);
  --pico-primary-underline: rgba(181, 83, 47, 0.45);
  --pico-primary-hover: #6f2f18;
  --pico-primary-hover-background: var(--ladrillo-oscuro);
  --pico-primary-hover-border: var(--ladrillo-oscuro);
  --pico-primary-focus: rgba(181, 83, 47, 0.28);
  --pico-primary-inverse: #fff;
  --pico-card-background-color: #fff;
  --pico-card-sectioning-background-color: var(--crema);
  --pico-card-box-shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 8px 24px rgba(60, 40, 20, 0.07);
  --pico-border-radius: 0.8rem;
  --pico-form-element-background-color: #fff;
  --pico-form-element-border-color: #e2d6c8;
  --pico-form-element-focus-color: var(--ladrillo);
  --pico-table-border-color: var(--linea);
}

[hidden] { display: none !important; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.15; }
h2 { font-size: 1.45rem; margin-top: 2.4rem; }
h1 .icono { width: 1em; height: 1em; vertical-align: -0.12em; margin-right: 0.35em; color: var(--ladrillo); }

/* Cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}
.cabecera nav { padding-block: 0.15rem; }
.marca { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--tinta); text-decoration: none; }
.marca svg { width: 34px; height: 34px; flex: none; }
.cabecera .menu a { font-size: 0.95rem; color: var(--suave); }
.cabecera .menu a:hover, .cabecera .menu a[aria-current="page"] { color: var(--ladrillo-oscuro); }
.cabecera .menu details.dropdown > summary:not([role]) {
  display: flex; align-items: center; gap: 0.35rem; height: auto; padding: 0.35rem 0.4rem;
  border: 0; background: none; box-shadow: none; white-space: nowrap;
  font-size: 0.95rem; font-weight: 500; color: var(--tinta);
}
.cabecera .menu details.dropdown > summary:not([role])::after { float: none; margin: 0; }
.cabecera .menu details.dropdown ul { min-width: 15rem; }

main.container { padding-top: 1.6rem; padding-bottom: 3rem; }
main.container, .cabecera .container, .pie .container { max-width: 960px; }
.migas { margin-bottom: 0.2rem; font-size: 0.88rem; }
.migas ul { padding: 0; }

/* Portada */
.portada {
  margin: 0.4rem 0 2.4rem; padding: clamp(1.6rem, 5vw, 3rem);
  border-radius: 1.2rem; border: 1px solid var(--linea);
  background: radial-gradient(120% 140% at 100% 0%, #ffe6cf 0%, var(--crema) 45%, #fff 100%);
}
.portada h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); margin-bottom: 0.8rem; }
.antetitulo { color: var(--ladrillo-oscuro); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.6rem; }
.entradilla { font-size: 1.12rem; color: var(--suave); max-width: 40rem; }
.botones { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0 1.2rem; }
.botones [role="button"] { margin: 0; }
.sellos { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; padding: 0; margin: 0; list-style: none; font-size: 0.92rem; color: var(--suave); }
.sellos li { display: flex; align-items: center; gap: 0.4rem; margin: 0; list-style: none; }
.sellos .icono { width: 18px; height: 18px; color: var(--ok, #2f7a4f); }

/* Tarjetas de la portada */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.tarjeta {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.2rem 1.25rem;
  background: #fff; border: 1px solid var(--linea); border-radius: 1rem;
  color: var(--tinta); text-decoration: none; box-shadow: var(--pico-card-box-shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tarjeta:hover { transform: translateY(-2px); border-color: var(--ladrillo); }
.tarjeta .icono { width: 30px; height: 30px; color: var(--ladrillo); margin-bottom: 0.3rem; }
.tarjeta strong { font-size: 1.08rem; }
.tarjeta span { color: var(--suave); font-size: 0.95rem; line-height: 1.45; }

/* Calculadora */
article.calculadora { margin: 1.4rem 0 2.2rem; padding: clamp(1rem, 3vw, 1.6rem); }
.calculadora fieldset { margin-bottom: 0.6rem; }
.calculadora legend { font-weight: 600; margin-bottom: 0.4rem; }
.calculadora label { font-size: 0.92rem; color: var(--suave); }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
.campos input, .campos select { margin-bottom: 0.7rem; }
.nota { font-size: 0.86rem; color: var(--suave); margin-top: 0.2rem; }
.resultado {
  margin-top: 1rem; padding: 1.2rem 1.3rem; border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--crema), #fff); border: 1px solid #f1dcc4;
}
.resultado > div:first-child { font-size: 0.9rem; color: var(--suave); text-transform: uppercase; letter-spacing: 0.06em; }
.resultado .cifra { font-size: clamp(2.2rem, 7vw, 3rem); font-weight: 600; color: var(--ladrillo-oscuro); line-height: 1.1; margin: 0.2rem 0 0.4rem; font-variant-numeric: tabular-nums; }
.resultado ul { margin: 0.4rem 0 0.6rem; padding-left: 1.1rem; }
.resultado li { margin-bottom: 0.15rem; }

/* Tablas y preguntas */
.valores table { font-size: 0.92rem; }
.valores th { font-weight: 600; }
.tabla { overflow-x: auto; }
.faq details { border-bottom: 1px solid var(--linea); padding-bottom: 0.6rem; }
.faq summary { font-weight: 600; }
.revisado { font-size: 0.88rem; color: var(--suave); margin-top: 2rem; }

/* Pie */
.pie { background: var(--tinta); color: #e9e1d8; padding: 2.4rem 0 1.4rem; margin-top: 2rem; }
.pie a { color: #f3c9a8; }
.pie ul { padding: 0; margin: 0; }
.pie li { list-style: none; margin-bottom: 0.3rem; }
.columnas { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.marca-pie, .titulo-pie { font-weight: 600; color: #fff; margin-bottom: 0.5rem; }
.pie p { font-size: 0.92rem; color: #cfc4b8; }
.pie .aviso { font-size: 0.84rem; }
.creditos { font-size: 0.8rem !important; color: #a99c90 !important; margin-top: 1.2rem; }

@media (max-width: 720px) {
  .columnas { grid-template-columns: 1fr; gap: 1.2rem; }
}
