/* Cesar Adames — light flexbox redesign (site palette) */
:root {
  --brand: #c85e00;
  --brand-dark: #9a4800;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --paper: #f7f4ef;
  --white: #ffffff;
  --footer: #1f1f1f;
  --max: 1100px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Libre Baskerville", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(200, 94, 0, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(31, 31, 31, 0.06), transparent 50%),
    var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.site-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  flex-wrap: wrap;
}

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

.site-brand:hover {
  text-decoration: none;
  color: var(--ink);
}

.site-brand img {
  height: 56px;
  width: auto;
}

.site-brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.site-brand-text {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.site-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 2px 0 0;
}

@media (min-width: 720px) {
  /* Logo artwork already includes the wordmark — avoid double brand on desktop */
  .site-brand-text-wrap {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

/* Nav */
.site-nav {
  background: #111;
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  width: 100%;
}

.nav-list a {
  display: block;
  color: #f2f2f2;
  padding: 14px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: #fff;
  border-bottom-color: var(--brand);
  text-decoration: none;
}

/* Main */
.site-main {
  flex: 1;
  padding: 36px 0 56px;
}

.page-header {
  margin: 0 0 28px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--brand);
}

.page-header h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0;
  line-height: 1.25;
}

.page-lead {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 42em;
}

/* Homepage hero */
.home-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
  padding: 36px 28px;
  background:
    linear-gradient(135deg, rgba(200, 94, 0, 0.92), rgba(31, 31, 31, 0.88)),
    url("/assets/img/logo.jpg") center / cover;
  color: #fff;
  position: relative;
  overflow: hidden;
  animation: heroIn 0.7s ease both;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.35), transparent 60%);
  pointer-events: none;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

.home-hero .brand-mark {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
}

.home-hero p {
  margin: 0;
  max-width: 36em;
  font-size: 1.05rem;
  opacity: 0.95;
}

.home-hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: #fff;
  color: var(--brand-dark);
}

.btn-primary:hover {
  background: #fff8f0;
  color: var(--brand-dark);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Post grids */
.section-title {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.post-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-grid > li,
.post-card {
  flex: 1 1 280px;
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.post-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.post-card a.thumb {
  display: block;
  overflow: hidden;
  background: #ece8e1;
  aspect-ratio: 16 / 10;
}

.post-card a.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover a.thumb img {
  transform: scale(1.04);
}

.post-card .body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.post-card .cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
}

.post-card h2,
.post-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.3;
}

.post-card h2 a,
.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover {
  color: var(--brand);
}

.post-card .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: auto;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
}

.post-list li {
  border-bottom: 1px solid var(--line);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
}

.post-list a:hover {
  background: #fff8f0;
  color: var(--brand-dark);
}

.post-list .thumb-sm {
  width: 88px;
  height: 66px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ece8e1;
}

.post-list .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-list .info strong {
  font-family: var(--display);
  font-weight: 700;
}

/* Content */
.romlicontainer,
.page-content {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px 30px 36px;
}

.page-content p,
.romlicontainer p {
  margin: 0 0 1em;
}

.page-content h2,
.page-content h3,
.romlicontainer h2,
.romlicontainer h3 {
  font-family: var(--display);
  line-height: 1.3;
}

.page-content figure,
.romlicontainer figure {
  margin: 1.4em 0;
}

.page-content figcaption,
.romlicontainer figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.article-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  list-style: none;
  padding: 0;
}

.article-cats a {
  display: inline-block;
  padding: 4px 10px;
  background: #fff1e4;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-cats a:hover {
  text-decoration: none;
  background: #ffe4c8;
}

/* Blog listing (r-template_blog) */
.blog-container {
  width: 100%;
}

.blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.blog-card {
  flex: 1 1 280px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.blog-title {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.blog-title a {
  color: var(--ink);
}

.blog-title a:hover {
  color: var(--brand);
}

.blog-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #d0d0d0;
  margin-top: auto;
  padding: 40px 0 0;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-bottom: 28px;
}

.footer-col {
  flex: 1 1 220px;
}

.footer-col h3 {
  color: #fff;
  font-family: var(--display);
  font-size: 1.05rem;
  margin: 0 0 12px;
}

.footer-col p,
.footer-col li {
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 6px;
}

.footer-col a {
  color: #e8e8e8;
}

.footer-col a:hover {
  color: #ffb066;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 12px;
  filter: brightness(1.05);
}

.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}

.footer-social a {
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 14px 0 20px;
  font-size: 0.85rem;
  color: #999;
}

.romlifooter {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #333;
}

.romlidata {
  margin: 28px 0;
}

/* Mobile */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    margin: 8px 0;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 10px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 12px 4px;
    border-bottom: 1px solid #2a2a2a;
  }

  .romlicontainer,
  .page-content {
    padding: 20px 16px 28px;
  }

  .home-hero {
    padding: 28px 20px;
  }
}
