/* Estilos de bernardogomezbey.com · Sin dependencias externas. */
:root {
  --bg: #f7f6f2;
  --paper: #fffefa;
  --ink: #252b28;
  --muted: #626963;
  --border: #dedfd7;
  --accent: #b5502c;
  --serif: Georgia,"Times New Roman",serif;
  --sans: system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
.container {
  width: min(1140px,calc(100% - 72px));
  margin: auto;
}
.header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 700;
  font-size: 15px;
}
.identity img {
  width: 48px;
  height: 35px;
  object-fit: contain;
}
.navlinks {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
}
.navlinks a:last-child {
  padding: 9px 14px;
  border: 1px solid #c5c9c1;
  border-radius: 4px;
}
.hero {
  padding: 84px 0 82px;
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(210px,.5fr);
  align-items: center;
  gap: 70px;
}
.eyebrow,.section-eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1,h2,h3,p {
  margin-top: 0;
}
h1 {
  font: normal clamp(54px,6.3vw,88px)/1.03 var(--serif);
  letter-spacing: -.06em;
  margin: 17px 0 25px;
}
h1 em {
  color: var(--accent);
  font-weight: normal;
}
.lead {
  color: #525a54;
  font-size: 17px;
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 28px;
}
.hero-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
}
.hero-links a:first-child {
  background: var(--ink);
  color: white;
  padding: 12px 17px;
  border-radius: 3px;
}
.hero-links a:nth-child(2) {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.hero-mark {
  display: grid;
  place-items: center;
  min-height: 250px;
  opacity: .85;
}
.hero-mark img {
  width: min(100%,340px);
  height: auto;
}
.section {
  padding: 72px 0 82px;
  border-top: 1px solid var(--border);
}
.section:nth-of-type(odd) {
  background: #fcfbf7;
}
.heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.section-eyebrow {
  margin-bottom: 11px;
}
h2 {
  font: normal clamp(38px,4vw,54px)/1.12 var(--serif);
  letter-spacing: -.045em;
  margin: 0 0 13px;
}
.intro {
  font-size: 14px;
  line-height: 1.8;
  max-width: 690px;
  color: var(--muted);
  margin: 0;
}
.more {
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  border-bottom: 1px solid #acaea5;
  padding-bottom: 4px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 19px;
}
.card {
  border: 1px solid var(--border);
  background: var(--paper);
  padding: 25px;
  min-height: 215px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.kicker {
  font-size: 10px;
  letter-spacing: .13em;
  color: var(--accent);
  font-weight: 750;
  text-transform: uppercase;
  margin-bottom: 15px;
}
.card h3 {
  font: normal 26px/1.2 var(--serif);
  letter-spacing: -.025em;
  margin: 0 0 8px;
}
.byline {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 14px;
  letter-spacing: .01em;
}
.card .byline {
  font-size: 11px;
  line-height: 1.55;
  margin: 0 0 14px;
}
.research-line .byline {
  font-size: 11px;
  margin: 7px 0 5px;
}
.card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 23px;
}
.card a,.card .arrowlink {
  margin-top: auto;
  font-size: 12px;
  font-weight: 750;
}
.books {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.book {
  display: flex;
  gap: 23px;
}
.book img {
  height: 220px;
  width: auto;
  max-width: 40%;
  object-fit: contain;
  object-position: top;
  box-shadow: 5px 7px 0 #e2e0d9;
  border: 1px solid #e3e3dd;
}
.book .copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.book h3 {
  font-size: 23px;
}
.note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.research-line {
  border: 1px solid var(--border);
  padding: 23px 26px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.research-line strong {
  font: normal 23px var(--serif);
}
.research-line p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}
.research-line a {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.about {
  background: #26352e;
  color: #f8f5ee;
  padding: 78px 0;
}
.about-inner {
  display: grid;
  grid-template-columns: 1.5fr .5fr;
  gap: 65px;
}
.about .section-eyebrow {
  color: #ecad87;
}
.about h2 {
  max-width: 700px;
}
.about p {
  color: #d0d9d0;
  max-width: 690px;
  line-height: 1.85;
}
.contacts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}
.contacts a {
  border-bottom: 1px solid #647167;
  padding: 8px 0;
  font-weight: 600;
}
.footer {
  background: #26352e;
  color: #afbdaf;
  border-top: 1px solid #5e6e61;
  padding: 24px 0;
  font-size: 12px;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
img {
  max-width: 100%;
}
@media(max-width:920px) {
  .container {
    width: min(100% - 48px,1140px);
  }
  .navlinks {
    gap: 12px;
  }
  .cards {
    gap: 12px;
  }
  .card {
    padding: 19px;
  }
  .books {
    grid-template-columns: 1fr 1fr;
  }
  .book {
    flex-direction: column;
  }
  .book img {
    height: 175px;
    max-width: 100%;
  }
}
@media(max-width:680px) {
  .container {
    width: calc(100% - 38px);
  }
  .nav {
    min-height: 70px;
  }
  .identity {
    font-size: 13px;
  }
  .identity img {
    width: 39px;
  }
  .navlinks a:not(:last-child) {
    display: none;
  }
  .navlinks a:last-child {
    font-size: 11px;
  }
  .hero {
    padding: 57px 0 60px;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hero-mark {
    display: none;
  }
  h1 {
    font-size: clamp(47px,10.4vw,68px);
  }
  .lead {
    font-size: 15px;
  }
  .hero-links {
    gap: 16px;
  }
  .section {
    padding: 56px 0 60px;
  }
  .heading {
    display: block;
  }
  .heading .more {
    display: inline-block;
    margin-top: 20px;
  }
  .cards,.books {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 0;
    padding: 24px;
  }
  .book {
    flex-direction: row;
    gap: 17px;
  }
  .book img {
    width: 98px;
    max-width: 98px;
    height: auto;
    align-self: flex-start;
  }
  .book h3 {
    font-size: 20px;
  }
  .research-line {
    align-items: flex-start;
    flex-direction: column;
  }
  .about {
    padding: 60px 0;
  }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .footer .container {
    flex-direction: column;
  }
  h2 {
    font-size: 39px;
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Navegación accesible y experiencia móvil. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: white;
}
.skip-link:focus { top: 12px; }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.navlinks { flex-wrap: wrap; justify-content: flex-end; }
.card, .research-line { border-radius: 3px; }
.research-line a:hover { text-decoration: underline; }
@media (max-width: 680px) {
  .nav { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 0; }
  .navlinks { flex-wrap: nowrap; justify-content: flex-start; gap: 18px; overflow-x: auto; padding: 10px 0; scrollbar-width: thin; }
  .navlinks a:not(:last-child) { display: inline; }
  .navlinks a { white-space: nowrap; font-size: 12px; }
  .navlinks a:last-child { padding: 0; border: 0; font-size: 12px; }
}

/* Interacciones: trazos discretos y tarjetas elevadas con ratón. */
.card a, .heading .more, .hero-links a:nth-child(2),
.navlinks a:not(:last-child) {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0 1px;
}
.navlinks a:not(:last-child) { background-position: left bottom 2px; }

/* El foco funciona también en dispositivos sin hover. */
.card a:is(:hover, :focus-visible),
.heading .more:is(:hover, :focus-visible),
.hero-links a:nth-child(2):is(:hover, :focus-visible),
.navlinks a:not(:last-child):is(:hover, :focus-visible) {
  background-size: 100% 1px;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .card { transition: transform 180ms ease, box-shadow 180ms ease; }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgb(37 43 40 / 7%);
  }
  .card a, .heading .more, .hero-links a:nth-child(2),
  .navlinks a:not(:last-child) { transition: background-size 200ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card a, .heading .more, .hero-links a:nth-child(2),
  .navlinks a:not(:last-child) { transition: none; }
  .card:hover { transform: none; }
}

/* Páginas interiores: listados sencillos, sin tarjetas. */
.inner-page { padding: 52px 0 90px; min-height: 65vh; }
.back-link { display: inline-block; font-size: 12px; font-weight: 700; margin-bottom: 38px; }
.back-link:hover, .entry a:hover { text-decoration: underline; }
.inner-heading { max-width: 750px; margin-bottom: 44px; }
.inner-heading h1 { font-size: clamp(40px, 5vw, 64px); margin: 12px 0 18px; }
.entry { display: flex; align-items: flex-start; gap: 26px; padding: 25px 0; border-top: 1px solid var(--border); }
.entry:last-child { border-bottom: 1px solid var(--border); }
.entry-body { max-width: 790px; }
.entry .kicker { display: block; margin-bottom: 9px; }
.entry h3 { font: normal clamp(23px, 2.6vw, 30px)/1.22 var(--serif); letter-spacing: -.025em; margin: 0 0 8px; }
.entry p { color: var(--muted); font-size: 13px; line-height: 1.75; margin: 0 0 12px; }
.entry .byline { font-size: 11px; margin-bottom: 8px; }
.entry a { display: inline-block; font-size: 12px; font-weight: 750; margin-top: 3px; }
.entry-book > img { width: 84px; height: auto; flex: none; border: 1px solid var(--border); box-shadow: 4px 5px 0 #e2e0d9; }
.external-more { margin: 28px 0 0; }
.heading-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.more-internal { color: var(--accent); }
@media (max-width: 680px) {
  .inner-page { padding: 35px 0 65px; }
  .back-link { margin-bottom: 28px; }
  .inner-heading { margin-bottom: 32px; }
  .entry { gap: 16px; padding: 22px 0; }
  .entry-book > img { width: 70px; }
}

/* Ondas decorativas de la portada */
.home-with-waves .header { border-bottom: 0; }
.wave-accent { height: 62px; overflow: hidden; pointer-events: none; }
.wave-accent svg { display: block; width: 100%; height: 100%; }
.home-with-waves .hero { padding-top: 28px; }
@media (max-width: 700px) {
  .wave-accent { height: 48px; }
  .home-with-waves .hero { padding-top: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .wave-accent { display: none; }
}
