/*
Theme Name: Felisberto
Theme URI: https://felisberto.local
Author: Felisberto Rodrigues
Author URI: mailto:felisberto362@gmail.com
Description: Tema personal, ligero y elegante para el sitio de Felisberto Rodrigues. Diseñado para WordPress clásico y bloques.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: felisberto
Tags: personal, blog, one-column, custom-menu, featured-images, translation-ready
*/

:root {
  --ink: #14110e;
  --ink-soft: #3a332c;
  --muted: #6f655b;
  --paper: #faf7f2;
  --paper-2: #f2ece2;
  --line: #e2d9cb;
  --accent: #b85c38;
  --accent-dark: #8f4426;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(20, 17, 14, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.brand-tag { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.main-nav a:hover { background: var(--paper-2); color: var(--ink); }

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  background: var(--ink);
  color: var(--paper);
}

.menu-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(64px, 10vw, 130px) 0 clamp(48px, 8vw, 96px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, rgba(184, 92, 56, 0.16), rgba(184, 92, 56, 0) 68%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
}

.hero h1 { margin-bottom: 18px; }

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; color: var(--paper); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }

.hero-card {
  justify-self: end;
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  border-radius: 160px 160px var(--radius) var(--radius);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(160deg, #efe4d3, #d9c7ae);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.hero-card span {
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 6.5rem);
  color: #8a6d4f;
  letter-spacing: -0.04em;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 46px);
}

.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.prose > *:last-child { margin-bottom: 0; }
.prose p { color: var(--ink-soft); }

.facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.facts li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.facts strong {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  min-width: 84px;
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d3c6b3; }

.card-thumb {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(184, 92, 56, 0.12), rgba(20, 17, 14, 0.06)),
    var(--paper-2);
  display: grid;
  place-items: center;
  color: #a98a6a;
  font-family: var(--serif);
  font-size: 2rem;
}

.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card-meta {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h3 { margin: 0; font-size: 1.22rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .more { margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 600; color: var(--accent-dark); }

/* ---------- CTA band ---------- */

.cta-band {
  margin: 0;
  padding: clamp(40px, 7vw, 76px);
  border-radius: calc(var(--radius) + 8px);
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 28px;
  align-items: center;
}

.cta-band h2 { color: var(--paper); margin-bottom: 10px; }
.cta-band p { color: rgba(250, 247, 242, 0.72); margin: 0; max-width: 48ch; }
.cta-band .btn { justify-self: end; }
.cta-band .btn-primary { background: var(--accent); color: #fff; }
.cta-band .btn-primary:hover { background: #c96a44; }

/* ---------- Content / pages ---------- */

.page-head {
  padding: clamp(48px, 8vw, 90px) 0 clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(32px, 5vw, 54px);
}

.page-head .eyebrow { margin-bottom: 12px; }
.page-head h1 { margin-bottom: 8px; }
.page-head .sub { color: var(--muted); margin: 0; }

.content-area { padding-bottom: clamp(56px, 9vw, 100px); }
.content-area .prose { max-width: 72ch; }

.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.prose blockquote {
  margin: 1.8em 0;
  padding: 18px 26px;
  border-left: 3px solid var(--accent);
  background: #fff;
  border-radius: 0 12px 12px 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- Blog ---------- */

.post-list { display: grid; gap: 20px; }

.post-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.post-row:hover { border-color: #d3c6b3; box-shadow: var(--shadow); }

.post-date {
  font-family: var(--serif);
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.post-row h2 { font-size: 1.45rem; margin-bottom: 6px; }
.post-row h2 a { text-decoration: none; color: var(--ink); }
.post-row h2 a:hover { color: var(--accent-dark); }
.post-row p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.article { max-width: 72ch; margin-inline: auto; }
.article .article-meta { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.article .article-body { font-size: 18px; }
.article .article-body > *:first-child { margin-top: 0; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

/* ---------- Contact form ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 6vw, 64px);
  align-items: start;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
}

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.14); }

.field textarea { min-height: 150px; resize: vertical; }

.form-note { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

.form-alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 15px;
}

.form-alert.ok { background: #edf6ec; border: 1px solid #cfe5cc; color: #2f5c2b; }
.form-alert.err { background: #fdeeea; border: 1px solid #f2cfc6; color: #8f2f1e; }

.contact-aside h2 { font-size: 1.6rem; }
.contact-aside p { color: var(--ink-soft); }
.contact-aside .email { font-family: var(--serif); font-size: 1.15rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 46px 0 34px;
  margin-top: clamp(56px, 8vw, 100px);
}

.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { font-family: var(--serif); font-size: 18px; }
.footer-note { color: var(--muted); font-size: 14px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.footer-nav a:hover { color: var(--accent-dark); text-decoration: underline; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
}

.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 999;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; clip: auto; clip-path: none; width: auto; height: auto;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .btn { justify-self: start; }
  .post-row { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .header-inner { min-height: 66px; flex-wrap: wrap; padding-block: 10px; }
  .brand-tag { display: none; }
  .main-nav ul { gap: 2px; }
  .main-nav a { padding: 7px 10px; font-size: 14px; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
