/* Economía en un baúl — estilo recuperado de la web original (Outfit + Inter, tinta casi negra, acento coral).
   Layout: cabecera blanca con logotipo de texto, portada a sangre con fotografía, secciones centradas a 1120px. */
@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/outfit-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --soft: #f2f3f6;
  --ink: #1d1e20;
  --muted: #5f6270;
  --line: #dadce0;
  --accent: #cc5b52;
  --accent-ink: #ffffff;
  --btn: #000000;
  --btn-ink: #ffffff;
  --display: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141517; --soft: #1d1f22; --ink: #ecedef; --muted: #a3a6b0; --line: #2f3236;
    --accent: #e0766d; --accent-ink: #141517; --btn: #ecedef; --btn-ink: #141517;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141517; --soft: #1d1f22; --ink: #ecedef; --muted: #a3a6b0; --line: #2f3236;
  --accent: #e0766d; --accent-ink: #141517; --btn: #ecedef; --btn-ink: #141517;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }

/* Cabecera */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.site-header .inner { max-width: 1200px; margin: 0 auto; padding-inline: 20px; padding-block: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.site-nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink); padding-block: 2px; border-bottom: 1.5px solid transparent; }
.site-nav a:hover { border-color: var(--line); }
.site-nav a[aria-current="page"] { border-color: var(--ink); }
.site-nav .nav-tools { color: var(--accent); font-weight: 600; }

/* Portada */
.hero { position: relative; min-height: clamp(360px, 62vh, 560px); display: grid; place-items: center; text-align: center; color: #fff; background: #3a3b3e url("https://images.unsplash.com/photo-1516979187457-637abb4f9353?auto=format&fit=crop&w=1920&q=70") center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(20, 21, 23, .5); }
.hero .inner { position: relative; padding-inline: 20px; padding-block: 48px; display: grid; gap: 14px; justify-items: center; }
.hero h1 { font-size: clamp(38px, 8vw, 64px); text-transform: uppercase; letter-spacing: .01em; color: #fff; }
.hero p { margin: 0; font-size: clamp(17px, 2.4vw, 19px); max-width: 38ch; color: #fff; }
.hero .ig { color: #fff; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 6px 14px; }
.hero .ig:hover { background: rgba(255,255,255,.12); }

/* Bloques */
.section { max-width: 1120px; margin: 0 auto; padding-inline: 20px; padding-block: 64px; display: grid; gap: 28px; }
.section.soft-wrap { max-width: none; background: var(--soft); }
.section.soft-wrap > .in { max-width: 1080px; width: 100%; margin: 0 auto; display: grid; gap: 28px; }
.section-title { font-size: clamp(30px, 4.5vw, 40px); text-transform: uppercase; }
.lede { margin: 0; color: var(--muted); font-size: 17px; max-width: 62ch; }

.btn { display: inline-block; background: var(--btn); color: var(--btn-ink); text-decoration: none; padding: 12px 26px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.btn:hover { opacity: .88; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }

/* Libro destacado */
.book { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 36px; align-items: center; }
@media (max-width: 680px) { .book { grid-template-columns: minmax(0, 1fr); } .book img { max-width: 200px; } }
.book img { border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); width: 100%; height: auto; }
.book-text { display: grid; gap: 14px; justify-items: start; }
.book-text h3 { font-size: 24px; }
.book-text p { margin: 0; max-width: 62ch; }

/* Tarjetas de artículos */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { display: grid; gap: 12px; align-content: start; text-decoration: none; color: var(--ink); }
.card .thumb { aspect-ratio: 3 / 2; width: 100%; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--soft); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.card .meta { font-size: 13px; color: var(--muted); }

/* Herramientas */
.tool-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--ink); }
@media (max-width: 760px) { .tool-feature { grid-template-columns: minmax(0, 1fr); } }
.tool-feature .txt { padding: 28px; display: grid; gap: 10px; align-content: start; }
.tool-feature .txt h3 { font-size: 26px; }
.tool-feature .txt p { margin: 0; color: var(--muted); }
.tool-feature .fig { background: var(--accent); color: var(--accent-ink); padding: 28px; display: grid; gap: 6px; align-content: center; }
.tool-feature .fig .k, .tool-feature .fig .s { font-size: 13px; opacity: .9; }
.tool-feature .fig .v { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5vw, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.tool-feature:hover { border-color: var(--accent); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
@media (max-width: 680px) { .link-list { grid-template-columns: minmax(0, 1fr); } }
.link-list li { border-bottom: 1px solid var(--line); padding: 16px 16px 16px 0; display: grid; gap: 4px; min-width: 0; }
.link-list a { font-weight: 600; text-decoration: none; }
.link-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-list span { color: var(--muted); font-size: 14.5px; }
.link-list .src { font-size: 12px; letter-spacing: .02em; }

/* Contacto */
.contact { text-align: center; justify-items: center; }
.contact p { margin: 0; color: var(--muted); max-width: 50ch; }
.contact .mail { font-weight: 600; font-size: 18px; user-select: all; }

/* Páginas y artículos */
.page { max-width: 760px; margin: 0 auto; padding-inline: 20px; padding-block: 48px 24px; display: grid; gap: 22px; }
.page.wide { max-width: 1120px; }
.page-title { font-size: clamp(32px, 5vw, 46px); }
.page-title.upper { text-transform: uppercase; }
.article-head { display: grid; gap: 12px; }
.article-head time { color: var(--muted); font-size: 14px; }
.prose { font-size: 17px; line-height: 1.75; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 26px; margin-top: 1.6em; }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose figure { margin-block: 1.6em; }
.prose figure img { border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; height: auto; }
.prose figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.about-img { border-radius: 12px; width: 100%; height: auto; }
.note { font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.back { font-size: 14px; color: var(--muted); }

/* Pie */
.site-footer { background: var(--soft); margin-top: 48px; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding-inline: 20px; padding-block: 36px 44px; display: grid; gap: 14px; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.site-footer p { margin: 0; max-width: 80ch; }

/* Páginas legales */
.article { max-width: 760px; margin: 0 auto; padding-inline: 20px; padding-block: 48px 24px; display: grid; gap: 22px; }
.page-head { display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(30px, 5vw, 42px); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.prose a, .page p a, .note a { color: var(--accent); text-underline-offset: 3px; }
