:root {
  --h3-bg: #0d0d0d;
  --h3-surface: #121212;
  --h3-surface-soft: #1a1a1a;
  --h3-text: #f4f4f4;
  --h3-muted: #c4c4c4;
  --h3-accent: #ffbb18;
  --h3-accent-soft: #ff9900;
  --h3-danger: #c70000;
  --h3-line: rgba(255, 187, 24, 0.28);
  --h3-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --h3-radius: 14px;
  --h3-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--h3-text);
  font-family: "Roboto", "Segoe UI", sans-serif;
  line-height: 1.72;
  background:
    radial-gradient(circle at 94% -6%, rgba(255, 187, 24, 0.14), transparent 34%),
    radial-gradient(circle at 12% 28%, rgba(255, 153, 0, 0.1), transparent 30%),
    linear-gradient(180deg, #0f0f0f 0%, #0a0a0a 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.primary-nav a,
.footer-menu a,
.hero-kicker,
.featured-kicker,
.terminal-title,
.meta-row {
  font-family: "Kanit", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.site-wrap {
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

.site-wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 187, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 187, 24, 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 95%);
}

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

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

a:hover {
  color: #ffd67a;
}

.container {
  width: min(var(--h3-max), calc(100vw - 2rem));
  margin: 0 auto;
}

.skip-link,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus,
.screen-reader-text:focus {
  width: auto;
  height: auto;
  clip: auto;
  margin: 1rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  color: #111;
  z-index: 200;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 110;
  background: linear-gradient(90deg, var(--h3-accent), var(--h3-accent-soft));
  box-shadow: 0 0 20px rgba(255, 187, 24, 0.35);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--h3-line);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
}

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

.brand-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

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

.brand-name {
  color: var(--h3-accent);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
}

.primary-nav ul,
.footer-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.primary-nav .menu {
  display: block;
}

.primary-nav a,
.footer-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--h3-muted);
  text-decoration: none;
  font-size: 0.96rem;
}

.primary-nav a:hover,
.footer-menu a:hover,
.primary-nav .current-menu-item > a {
  color: #111;
  background: var(--h3-accent);
  border-color: transparent;
}

.header-actions {
  display: flex;
  gap: 0.55rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.54rem 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.btn-outline {
  color: var(--h3-accent);
  border-color: var(--h3-line);
  background: rgba(255, 187, 24, 0.08);
}

.btn-accent {
  color: #111;
  background: linear-gradient(135deg, var(--h3-accent) 0%, var(--h3-accent-soft) 100%);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(255, 187, 24, 0.24);
}

.hero {
  padding: 3.3rem 0 2.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 1rem;
}

.hero-copy,
.hero-panel,
.featured-post,
.post-card,
.newsletter,
.archive-header,
.page-article,
.single-article,
.page-body,
.author-box,
.comments-area,
.empty-state,
.site-sidebar .widget {
  border: 1px solid rgba(255, 187, 24, 0.24);
  border-radius: var(--h3-radius);
  background: linear-gradient(180deg, #151515 0%, #101010 100%);
  box-shadow: var(--h3-shadow);
}

.hero-copy,
.hero-panel {
  padding: 1.15rem;
}

.hero-kicker,
.featured-kicker {
  margin: 0 0 0.65rem;
  color: var(--h3-accent);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.8vw, 3.25rem);
  line-height: 1.08;
  color: #fff;
}

.hero-copy p {
  color: var(--h3-muted);
  margin-top: 1rem;
  max-width: 62ch;
}

.terminal-title {
  margin: 0;
  color: #ffd67a;
  font-size: 0.87rem;
}

.hero-panel ul {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.58rem;
}

.hero-panel li {
  color: #e6e6e6;
}

.hero-panel li span {
  color: var(--h3-accent);
}

.site-main {
  padding-bottom: 3.5rem;
}

/* Reduce el hueco superior en páginas estáticas (Conócenos, Contacto, Equipo). */
.page .site-main {
  margin-block-start: 0 !important;
  padding-top: 0.35rem;
}

.page .main-with-sidebar {
  margin-top: 0 !important;
}

.featured-post {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.featured-thumb img,
.card-thumb img,
.single-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.thumb-fallback {
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #1b1b1b;
  border: 1px dashed var(--h3-line);
  color: #ffd67a;
}

.featured-content h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  line-height: 1.16;
  font-size: clamp(1.38rem, 2.7vw, 1.9rem);
}

.featured-content h2 a {
  color: #fff;
  text-decoration: none;
}

.featured-content h2 a:hover {
  color: var(--h3-accent);
}

.featured-content p {
  color: var(--h3-muted);
  margin-top: 0;
}

.main-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.post-card {
  overflow: hidden;
  display: grid;
  gap: 0.7rem;
}

.card-body {
  padding: 0 1rem 1rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: #bdbdbd;
  font-size: 0.84rem;
}

.card-title {
  margin: 0.45rem 0 0.65rem;
  line-height: 1.2;
  font-size: 1.24rem;
}

.card-title a {
  color: #fff;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--h3-accent);
}

.card-body p {
  margin: 0;
  color: var(--h3-muted);
}

.card-link {
  display: inline-flex;
  margin-top: 0.82rem;
  color: var(--h3-accent);
  font-weight: 700;
  text-decoration: none;
}

.card-link::after {
  content: " ->";
}

.site-sidebar {
  position: sticky;
  top: 98px;
}

.site-sidebar .widget {
  padding: 0.95rem;
  margin-bottom: 0.8rem;
}

.widget-title {
  margin: 0 0 0.6rem;
  color: var(--h3-accent);
  font-size: 1.1rem;
}

.site-sidebar ul {
  margin: 0;
  padding-left: 1rem;
}

.site-sidebar li {
  margin: 0.38rem 0;
}

.site-sidebar a {
  color: #f0f0f0;
  text-decoration: none;
}

.site-sidebar a:hover {
  color: var(--h3-accent);
}

.tag-cloud a {
  display: inline-flex;
  margin: 0.1rem 0.15rem;
  border-radius: 999px;
  border: 1px solid var(--h3-line);
  padding: 0.26rem 0.58rem;
  font-size: 0.82rem;
}

.newsletter {
  margin-top: 1.2rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.newsletter h2 {
  margin: 0;
}

.newsletter p {
  color: var(--h3-muted);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-form label {
  flex: 1;
  min-width: 170px;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  border: 1px solid rgba(255, 187, 24, 0.36);
  border-radius: 10px;
  background: #171717;
  color: #f2f2f2;
  padding: 0.64rem 0.7rem;
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #9a9a9a;
}

.pagination-wrap {
  margin-top: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-numbers {
  border-radius: 8px;
  border: 1px solid var(--h3-line);
  color: #f0f0f0;
  text-decoration: none;
  padding: 0.32rem 0.62rem;
}

.page-numbers.current {
  background: var(--h3-accent);
  color: #111;
  border-color: transparent;
}

.archive-header,
.page-article,
.single-article,
.comments-area,
.author-box,
.page-body,
.empty-state {
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.archive-header h1,
.single-header h1,
.page-article h1,
.empty-state h1,
.empty-state h2 {
  margin-top: 0;
  line-height: 1.08;
}

.archive-header h1,
.page-article h1,
.single-header h1 {
  color: #fff;
}

.single-header h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
}

.single-author {
  color: var(--h3-muted);
}

.single-content {
  color: #efefef;
  font-size: 1.05rem;
}

.single-content > * {
  max-width: 72ch;
}

.single-content p,
.single-content li,
.single-content blockquote {
  color: #f1f1f1;
}

.single-content a {
  color: #ffd166;
}

.single-content h2,
.single-content h3,
.single-content h4 {
  color: #fff;
  margin-top: 1.45em;
  line-height: 1.2;
}

.single-content img {
  border-radius: 12px;
  border: 1px solid rgba(255, 187, 24, 0.24);
  margin: 0.8rem 0;
}

.single-content pre {
  background: #0a0a0a;
  border: 1px solid rgba(255, 187, 24, 0.35);
  border-radius: 12px;
  padding: 0.95rem;
  overflow: auto;
}

.single-content code {
  color: #ffd67a;
}

.single-content blockquote {
  border-left: 3px solid var(--h3-accent);
  padding-left: 0.95rem;
  margin: 1.2rem 0;
}

.entry-tax {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.entry-tax a {
  border: 1px solid var(--h3-line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.84rem;
}

.entry-tax a:hover {
  background: var(--h3-accent);
  color: #111;
}

.comment-list {
  margin: 0;
  padding-left: 1.15rem;
}

.comment-list article {
  border-bottom: 1px solid rgba(255, 187, 24, 0.2);
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
}

.related-posts h2,
.author-box h2,
.comments-area h2 {
  margin-top: 0;
}

.site-footer {
  margin-top: 1.5rem;
  border-top: 2px solid var(--h3-accent);
  background: #0a0a0a;
}

.footer-grid {
  min-height: 120px;
  padding: 1.2rem 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 0.8rem;
}

.footer-brand {
  margin: 0;
  color: #fff;
}

.footer-copy {
  margin-top: 0.35rem;
  color: #bdbdbd;
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .hero-grid,
  .featured-post,
  .newsletter,
  .main-with-sidebar {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: static;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions {
    display: none;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(var(--h3-max), calc(100vw - 1rem));
  }

  .menu-toggle {
    display: inline-flex;
    border-radius: 10px;
    border: 1px solid var(--h3-line);
    background: rgba(255, 187, 24, 0.08);
    color: var(--h3-accent);
    padding: 0.5rem 0.7rem;
    font: inherit;
    font-weight: 700;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0.5rem;
    right: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--h3-line);
    background: rgba(18, 18, 18, 0.98);
    padding: 0.45rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav a {
    width: 100%;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}
