/*
Theme Name: Porque Online
Theme URI: http://porque.online
Author: Nomad Editorial
Description: Tema futurista de portal editorial para porque.online.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: porque-online
*/

:root {
  --void: #070b18;
  --void-2: #0c1427;
  --panel: rgba(12, 22, 42, .76);
  --panel-2: rgba(255, 255, 255, .065);
  --ink: #f7fbff;
  --muted: #9aaac2;
  --cyan: #60efff;
  --mint: #8dffbd;
  --violet: #9b7bff;
  --amber: #ffd166;
  --line: rgba(173, 222, 255, .18);
  --line-hot: rgba(96, 239, 255, .52);
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --glow: 0 0 34px rgba(96, 239, 255, .22);
  --display: "Unbounded", "Space Grotesk", sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(96, 239, 255, .18), transparent 30rem),
    radial-gradient(circle at 82% 0, rgba(155, 123, 255, .2), transparent 28rem),
    radial-gradient(circle at 70% 82%, rgba(141, 255, 189, .12), transparent 34rem),
    linear-gradient(135deg, var(--void), #0a1020 45%, #040712);
  font-family: var(--body);
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(96, 239, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 239, 255, .055) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.92), transparent 82%);
}

.site-header { padding: 22px 0 10px; position: relative; z-index: 5; }
.site-nav, .hero, .newsroom, .topic-strip, .content-section, .archive-head, .article-layout, .page-card, .footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto minmax(190px, 270px);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(7, 11, 24, .68);
  backdrop-filter: blur(22px);
  padding: 12px 14px 12px 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.brand, .nav-links a, .question-card a, .button, .footer-links a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  font: 800 24px/1 var(--display);
  box-shadow: 0 0 28px rgba(96, 239, 255, .48);
}

.nav-links { display: flex; gap: 14px; color: var(--muted); font-weight: 700; font-size: 14px; margin: 0; padding: 0; list-style: none; }
.nav-links li { margin: 0; padding: 0; }
.nav-links a { transition: color .2s ease, text-shadow .2s ease; }
.nav-links a:hover { color: var(--cyan); text-shadow: 0 0 16px rgba(96, 239, 255, .5); }
.nav-search input {
  width: 100%;
  border: 1px solid rgba(96, 239, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  padding: 11px 13px;
  font: 600 13px/1 var(--body);
  outline: none;
}
.nav-search input::placeholder { color: rgba(154, 170, 194, .74); }
.nav-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(96, 239, 255, .12); }

.hero, .newsroom, .topic-strip, .content-section, .archive-head, .article-layout, .page-stage { animation: rise-in .7s ease both; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: 22px;
  align-items: stretch;
  padding: 56px 0 26px;
}

.hero-copy, .why-panel, .question-card, .archive-head, .article-main, .article-toc, .page-card {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 72px);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 33px;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(96, 239, 255, .18), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(141, 255, 189, .18), transparent 16rem);
  mask-image: linear-gradient(135deg, #000, transparent 82%);
}

.hero-copy > * { position: relative; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -.06em; line-height: .98; }
.hero h1 { max-width: 12ch; margin: 0; font-size: clamp(48px, 7.2vw, 104px); }
.hero-lead, .archive-head p, .question-card p, .article-deck, .site-footer p { color: var(--muted); line-height: 1.7; }
.hero-lead { max-width: 64ch; font-size: clamp(17px, 2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 17px;
  font-weight: 800;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--line-hot); box-shadow: var(--glow); }
.button.primary {
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  border-color: transparent;
}

.why-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  background:
    linear-gradient(160deg, rgba(96, 239, 255, .14), rgba(155, 123, 255, .1)),
    rgba(6, 12, 25, .88);
  color: var(--ink);
}

.why-panel::before {
  content: "?";
  position: absolute;
  right: -12px;
  top: -32px;
  color: rgba(96, 239, 255, .08);
  font: 800 220px/.8 var(--display);
}

.why-panel span { color: var(--mint); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }
.why-panel strong { display: block; margin: 14px 0 24px; font: 800 clamp(34px, 4vw, 58px)/.95 var(--display); max-width: 8ch; }
.why-panel ol { position: relative; display: grid; gap: 14px; margin: 0; padding-left: 20px; color: rgba(247,251,255,.74); }

.topic-strip { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0 24px; }
.topic-strip a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 800;
  color: var(--muted);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.topic-strip a:hover { color: var(--ink); border-color: var(--line-hot); background: rgba(96, 239, 255, .12); }

.newsroom { padding: 38px 0 16px; }
.edition-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.edition-bar span {
  color: #06111f;
  background: var(--mint);
  border-radius: 999px;
  padding: 5px 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
}
.edition-bar a { color: var(--cyan); margin-left: auto; text-decoration: none; }
.newsroom-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.newsroom-head h1 {
  grid-column: 1;
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
}
.newsroom-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.newsroom-head p:not(.eyebrow) {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
}
.lead-story, .rail-story {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.lead-story {
  border-radius: 34px;
  overflow: hidden;
}
.lead-story a, .rail-story a { display: block; color: inherit; text-decoration: none; }
.lead-media {
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
  background: linear-gradient(135deg, #091326, #14313c);
}
.lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.95) contrast(1.08) brightness(.78);
}
.lead-copy { padding: clamp(24px, 4vw, 42px); }
.lead-copy h2 {
  margin: 10px 0 14px;
  font-size: clamp(34px, 5.4vw, 70px);
  max-width: 12ch;
}
.lead-copy p { color: var(--muted); line-height: 1.72; font-size: 18px; }
.side-rail { display: grid; gap: 14px; }
.rail-story {
  border-radius: 24px;
  padding: 22px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.rail-story:hover { border-color: var(--line-hot); transform: translateY(-3px); box-shadow: var(--glow); }
.rail-story h3 { margin: 8px 0 10px; font-size: 25px; letter-spacing: -.045em; }
.rail-story p { margin: 0; color: var(--muted); line-height: 1.55; }
.placeholder-panel { display: grid; align-items: end; min-height: 420px; }

.content-section { padding: 20px 0 58px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.section-head h2, .archive-head h1 { margin: 0; font-size: clamp(36px, 5vw, 70px); }
.question-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.question-card {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.question-card:hover { transform: translateY(-5px); border-color: var(--line-hot); box-shadow: var(--shadow), var(--glow); }
.question-card a { display: block; color: var(--ink); }
.question-mark { position: absolute; right: 14px; top: 8px; z-index: 2; color: rgba(96, 239, 255, .8); text-shadow: 0 0 24px rgba(96, 239, 255, .4); font: 800 64px/1 var(--display); }
.question-media { aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #091326, #14313c); }
.question-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.08) brightness(.78); transition: transform .45s ease, filter .45s ease; }
.question-card:hover img { transform: scale(1.04); }
.question-body { padding: 22px; }
.question-topic { color: var(--mint); font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.question-card h3 { margin: 10px 0; font-size: 26px; }
.question-meta { display: flex; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }

.archive-head { margin-top: 44px; padding: clamp(30px, 5vw, 58px); text-align: center; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination a, .pagination span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: var(--panel-2); text-decoration: none; }
.pagination .current { background: var(--cyan); color: #06111f; }

.article-stage { padding: 42px 0 70px; }
.article-layout { display: grid; grid-template-columns: 230px minmax(0, 820px); gap: 22px; align-items: start; }
.article-toc { position: sticky; top: 20px; padding: 22px; }
.article-toc strong { display: block; margin-bottom: 12px; }
.article-toc a { display: block; color: var(--muted); margin: 9px 0; text-decoration: none; }
.article-toc a:hover { color: var(--cyan); }
.article-main { padding: clamp(26px, 5vw, 56px); }
.article-header h1 { margin: 0; font-size: clamp(42px, 6vw, 82px); }
.article-deck { font-size: 20px; }
.article-image { margin: 0 0 26px; }
.article-image img { width: 100%; border-radius: 24px; }
.article-body { color: var(--ink); font: 500 18px/1.82 var(--body); }
.article-body h2 { margin: 2.2em 0 .65em; font-size: clamp(30px, 4vw, 46px); }
.article-body h3 { margin: 1.6em 0 .6em; font-size: 28px; }
.article-body p { margin: 0 0 1.25em; }
.article-body a { color: var(--cyan); text-underline-offset: 4px; }
.article-body blockquote { border-left: 5px solid var(--cyan); margin: 1.6em 0; padding: 16px 20px; background: rgba(96, 239, 255, .08); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px; text-align: left; }
.article-body code { color: var(--mint); background: rgba(141, 255, 189, .09); border-radius: 8px; padding: .12em .34em; }

.page-stage { padding: 44px 0 70px; }
.page-card { max-width: 860px; padding: clamp(28px, 5vw, 58px); }
.page-card h1 { margin: 0 0 24px; font-size: clamp(42px, 6vw, 80px); }

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 18, .78);
  color: var(--ink);
  backdrop-filter: blur(18px);
}
.footer-inner { display: flex; justify-content: space-between; gap: 22px; padding: 32px 0; }
.footer-inner p { max-width: 540px; margin: 8px 0 0; color: var(--muted); }
.footer-links { display: flex; gap: 14px; align-items: center; }
.footer-links a:hover { color: var(--cyan); }

.empty-state { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); padding: 30px; text-align: center; }

@media (max-width: 900px) {
  .site-nav, .hero, .newsroom-head, .lead-grid, .article-layout, .footer-inner { grid-template-columns: 1fr; }
  .nav-links { justify-content: flex-start; flex-wrap: wrap; }
  .nav-search { display: none; }
  .question-grid { grid-template-columns: 1fr; }
  .article-toc { position: static; }
  .section-head { display: block; }
  .newsroom-head p:not(.eyebrow) { grid-column: auto; grid-row: auto; }
  .lead-copy h2 { max-width: none; }
}

@media (max-width: 520px) {
  .hero h1, .article-header h1 { font-size: 46px; }
  .hero-copy, .why-panel, .article-main, .page-card { border-radius: 24px; padding: 24px; }
}
