/*
Theme Name: El Universo de Falcon
Theme URI: https://eluniversodefalcon.com
Author: Falcon Martin
Description: Tema editorial oficial de El Universo de Falcon. Organiza la novela El legado de Pedrarias, recuerdos narrativos, cuadernos históricos, comunidad y contacto.
Version: 1.1.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: universo-falcon
*/

:root {
  --ink: #191713;
  --paper: #f5f0e5;
  --paper-deep: #e9dfcc;
  --wine: #6f1d2b;
  --gold: #b48a43;
  --night: #17242d;
  --muted: #6d675f;
  --line: rgba(25, 23, 19, .18);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.72;
}
a { color: var(--wine); text-underline-offset: .18em; }
a:hover { color: #3f0e17; }
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #fff;
  background: rgba(23, 36, 45, .97);
  border-bottom: 3px solid var(--gold);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-weight: 700; }
.brand-copy strong { display: block; font-size: 1.08rem; letter-spacing: .03em; }
.brand-copy small { display: block; color: #d8c9a9; font-family: system-ui, sans-serif; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.custom-logo, .brand-logo { max-height: 54px; width: auto; }
.menu-toggle { display: none; padding: .6rem .8rem; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 3px; }
.primary-menu, .primary-menu ul { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; align-items: center; gap: 1.15rem; font-family: system-ui, sans-serif; font-size: .87rem; }
.primary-menu a { color: #fff; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: #f1d497; }
.primary-menu .menu-item-has-children { position: relative; }
.primary-menu .sub-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 220px; padding: .65rem; background: var(--night); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.primary-menu .menu-item-has-children:hover .sub-menu,
.primary-menu .menu-item-has-children:focus-within .sub-menu { display: grid; gap: .5rem; }

.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(125deg, #101c24 0%, #233743 62%, #6f1d2b 140%); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 34%, rgba(180,138,67,.22), transparent 28%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr .8fr; align-items: center; gap: 3rem; min-height: 520px; padding-block: 5rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--gold); font-family: system-ui, sans-serif; font-size: .76rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.16; }
.hero h1 { max-width: 800px; margin: 0; font-size: clamp(2.6rem, 6vw, 5.4rem); font-weight: 500; }
.hero-lead { max-width: 700px; margin: 1.25rem 0 1.8rem; color: #e9e3d8; font-size: 1.18rem; }
.button { display: inline-block; padding: .78rem 1.08rem; color: #fff; background: var(--wine); border: 1px solid var(--wine); border-radius: 2px; font-family: system-ui, sans-serif; font-size: .88rem; font-weight: 700; text-decoration: none; }
.button:hover { color: #fff; background: #53131f; }
.button.alt { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.hero-card { padding: 1.65rem; background: rgba(245,240,229,.08); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.hero-card p { margin: 0; font-size: 1.15rem; }
.hero-card cite { display: block; margin-top: 1rem; color: #d7c6a2; font-family: system-ui, sans-serif; font-size: .8rem; font-style: normal; }

.book-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(120deg, #0d1a22 0%, #233743 55%, #6f1d2b 145%); }
.book-hero::before { content: ""; position: absolute; inset: 0; opacity: .28; background: radial-gradient(circle at 78% 25%, #b48a43, transparent 28%), linear-gradient(90deg, transparent, rgba(0,0,0,.3)); pointer-events: none; }
.book-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(280px,.72fr); align-items: center; gap: clamp(2rem,6vw,5.5rem); min-height: 690px; padding-block: 4.5rem; }
.book-hero-copy { max-width: 720px; }
.book-hero h1 { max-width: 760px; margin: 0; color: #fff8e9; font-size: clamp(3.35rem,8vw,6.8rem); font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.book-tagline { margin: .9rem 0 0; color: #e8c77f; font-size: clamp(1.15rem,2vw,1.55rem); font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.button.whatsapp { color: #fff; background: #176b4b; border-color: #2ca56f; }
.button.whatsapp:hover { background: #10563c; }
.official-line { margin: 1rem 0 0; color: #d8d0c4; font-family: system-ui,sans-serif; font-size: .82rem; }
.official-line a { color: #f1d497; }
.featured-cover { width: min(100%,410px); margin: 0 auto; padding: .85rem; background: rgba(245,240,229,.08); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 30px 70px rgba(0,0,0,.38); transform: rotate(1deg); }
.featured-cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.featured-cover figcaption { padding: .75rem .35rem 0; color: #d9cfbe; font-family: system-ui,sans-serif; font-size: .72rem; letter-spacing: .06em; text-align: center; text-transform: uppercase; }

.section { padding-block: 4.25rem; }
.section.alt { background: var(--paper-deep); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 .75rem; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; }
.section-heading a { margin-bottom: .9rem; font-family: system-ui, sans-serif; font-size: .82rem; font-weight: 700; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { display: flex; flex-direction: column; min-height: 100%; background: rgba(255,255,255,.5); border: 1px solid var(--line); }
.card-image { aspect-ratio: 16/9; overflow: hidden; background: #d9cfbc; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { flex: 1; padding: 1.25rem; }
.card h3 { margin: .3rem 0 .65rem; font-size: 1.35rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card p { margin: 0; color: #49443e; font-size: .96rem; }
.meta { color: var(--muted); font-family: system-ui, sans-serif; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
.story-dates { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 1rem 0 1.5rem; padding: .75rem 0; color: var(--muted); border-block: 1px solid var(--line); font-family: system-ui, sans-serif; font-size: .78rem; }

.pathways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pathway { padding: 2rem; background: var(--paper); }
.pathway span { color: var(--gold); font-family: system-ui, sans-serif; font-weight: 800; }
.pathway h3 { margin: .5rem 0; }
.pathway p { margin: 0 0 1rem; color: var(--muted); }

.community-band { color: #fff; background: var(--wine); }
.community-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; padding-block: 3.7rem; }
.community-grid h2 { margin: 0 0 .75rem; font-size: 2.2rem; }
.signup-form { display: grid; grid-template-columns: 1fr auto; gap: .65rem; }
.signup-form input[type="email"] { min-width: 0; padding: .82rem; border: 1px solid rgba(255,255,255,.45); border-radius: 2px; font: inherit; }
.signup-form .consent { grid-column: 1 / -1; display: flex; align-items: start; gap: .5rem; font-family: system-ui, sans-serif; font-size: .75rem; }
.notice { padding: .85rem 1rem; margin: 1rem 0; background: #fff5d8; border-left: 4px solid var(--gold); font-family: system-ui, sans-serif; font-size: .86rem; }
.notice.success { background: #e9f4ea; border-color: #4d8a55; }

.content-shell { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 3.5rem; padding-block: 4rem; }
.entry-header h1 { margin: .35rem 0 1rem; font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; }
.entry-content { font-size: 1.08rem; }
.entry-content > * { max-width: 720px; }
.entry-content h2 { margin-top: 2.3rem; }
.entry-content blockquote { margin: 2rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--gold); background: rgba(255,255,255,.45); font-size: 1.2rem; }
.entry-taxonomy { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.entry-taxonomy a { padding: .25rem .55rem; border: 1px solid var(--line); font-family: system-ui, sans-serif; font-size: .75rem; text-decoration: none; }
.sidebar-box { padding: 1.25rem; margin-bottom: 1rem; background: rgba(255,255,255,.45); border-top: 3px solid var(--gold); }
.sidebar-box h2 { margin-top: 0; font-size: 1.2rem; }
.related-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block: 2.5rem; }
.related-nav a { padding: 1rem; background: rgba(255,255,255,.5); border: 1px solid var(--line); text-decoration: none; }

.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.debate-notice { padding: 1rem 1.15rem; background: #efe5d1; border-left: 4px solid var(--gold); font-family: system-ui,sans-serif; font-size: .86rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { margin: 1rem 0; padding: 1rem; background: rgba(255,255,255,.5); border: 1px solid var(--line); }
.comment-meta { font-family: system-ui, sans-serif; font-size: .78rem; }
.comment-form label { display: block; font-family: system-ui, sans-serif; font-size: .82rem; font-weight: 700; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: .75rem; border: 1px solid var(--line); background: #fff; font: inherit; }
.comment-form input[type="submit"] { padding: .8rem 1rem; color: #fff; background: var(--wine); border: 0; cursor: pointer; }
.contact-panel { margin-top: 2rem; padding: 1.4rem; background: rgba(255,255,255,.58); border-left: 4px solid var(--gold); }
.contact-panel h2 { margin-top: 0; }

.site-footer { color: #ded8ce; background: #111b21; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 2rem; padding-block: 3rem; }
.site-footer h2 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { color: #d9c498; }
.footer-bottom { padding-block: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-family: system-ui, sans-serif; font-size: .74rem; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; inset: 82px 0 auto 0; padding: 1rem; background: var(--night); }
  .site-nav.open { display: block; }
  .primary-menu { align-items: stretch; flex-direction: column; }
  .primary-menu .sub-menu { display: grid; position: static; padding-left: 1rem; box-shadow: none; }
  .hero-inner, .book-hero-grid, .community-grid, .content-shell { grid-template-columns: 1fr; }
  .hero-inner { min-height: auto; padding-block: 4rem; }
  .book-hero-grid { min-height: auto; }
  .book-hero-copy { margin-inline: auto; text-align: center; }
  .hero-actions { justify-content: center; }
  .card-grid, .pathways { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .brand-copy small { display: none; }
  .book-hero-grid { padding-block: 3.6rem; }
  .book-hero h1 { font-size: clamp(3rem,16vw,4.7rem); }
  .card-grid, .pathways, .footer-grid { grid-template-columns: 1fr; }
  .signup-form { grid-template-columns: 1fr; }
  .signup-form .consent { grid-column: 1; }
  .related-nav { grid-template-columns: 1fr; }
}
