/*
Theme Name: Estranho
Theme URI: https://estranho.org
Author: Rodney Moore
Description: Tema escuro para curiosidades, mistérios e OVNIs — com ceticismo saudável.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: estranho
*/

/* ==========================================================================
   Design tokens (match approved mockup)
   ========================================================================== */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #121214;
  --border-card: rgba(107, 76, 255, 0.18);
  --purple: #6b4cff;
  --purple-bright: #7c5cff;
  --purple-dim: rgba(107, 76, 255, 0.35);
  --purple-glow: rgba(107, 76, 255, 0.45);
  --text: #ffffff;
  --text-muted: #a8a8b3;
  --text-soft: #8e8e9a;
  --radius-card: 10px;
  --radius-pill: 999px;
  --radius-btn: 8px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--purple-bright);
}

ul, ol {
  margin: 0;
  padding: 0;
}

button,
input {
  font: inherit;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.site-main {
  flex: 1;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.site-logo {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--purple);
  text-transform: uppercase;
}

.site-logo:hover {
  color: var(--purple-bright);
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.primary-nav {
  flex: 1;
  min-width: 0;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
}

.primary-nav a {
  display: inline-block;
  padding: 6px 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav a.is-active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.search-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.search-btn:hover {
  background: var(--purple-bright);
  transform: scale(1.04);
}

.search-btn svg {
  width: 18px;
  height: 18px;
}

/* Mobile nav toggle (simple) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-divider {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: #0d0d0d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 24px 20px;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .search-btn {
    margin-left: 8px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 80% at 78% 55%, rgba(107, 76, 255, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 45% 50% at 85% 40%, rgba(90, 50, 200, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #0a0a0a 45%, #0b0b10 100%);
}

/* Atmospheric hills + purple arc (CSS art, not photoreal) */
.hero-bg::before {
  content: "";
  position: absolute;
  right: -8%;
  top: 8%;
  width: min(620px, 68vw);
  height: min(620px, 68vw);
  border-radius: 50%;
  border: 2.5px solid rgba(107, 76, 255, 0.7);
  box-shadow:
    0 0 60px rgba(107, 76, 255, 0.35),
    0 0 120px rgba(107, 76, 255, 0.15),
    inset 0 0 80px rgba(107, 76, 255, 0.1);
  opacity: 0.9;
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 42%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.4) 40%, #0a0a0a 100%),
    radial-gradient(ellipse 90% 100% at 70% 100%, #151520 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 40% 110%, #101018 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 120%, #0e0e16 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 640px;
  z-index: 1;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 4.5vw, 3.15rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-title .accent {
  color: var(--purple);
}

.hero-sub {
  margin: 0 0 32px;
  max-width: 480px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  background: var(--purple);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 24px rgba(107, 76, 255, 0.25);
}

.btn-cta:hover {
  background: var(--purple-bright);
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(107, 76, 255, 0.4);
}

/* ==========================================================================
   Destaques section
   ========================================================================== */
.section-destaques {
  padding: 8px 0 96px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--purple);
}

.section-heading .star {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 720px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 64px;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 240px;
  padding: 22px 24px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(107, 76, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.card-bg--mist {
  background:
    linear-gradient(160deg, transparent 20%, rgba(10, 10, 14, 0.85) 70%),
    radial-gradient(ellipse at 70% 30%, rgba(80, 90, 120, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #1a1a28 0%, #0c0c12 100%);
}

.card-bg--ovni {
  background:
    linear-gradient(160deg, transparent 15%, rgba(10, 10, 14, 0.9) 75%),
    radial-gradient(circle at 75% 25%, rgba(180, 160, 220, 0.35) 0%, transparent 18%),
    radial-gradient(ellipse at 60% 40%, rgba(107, 76, 255, 0.25) 0%, transparent 55%),
    linear-gradient(200deg, #1a1228 0%, #0a0a10 100%);
}

.card-bg--ciencia {
  background:
    linear-gradient(160deg, transparent 20%, rgba(10, 10, 14, 0.88) 70%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 18px,
      rgba(107, 76, 255, 0.06) 18px,
      rgba(107, 76, 255, 0.06) 19px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 18px,
      rgba(107, 76, 255, 0.05) 18px,
      rgba(107, 76, 255, 0.05) 19px
    ),
    radial-gradient(ellipse at 65% 35%, rgba(107, 76, 255, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #141420 0%, #0a0a0e 100%);
}

.card-bg--ilhas {
  background:
    linear-gradient(160deg, transparent 25%, rgba(10, 10, 14, 0.9) 70%),
    radial-gradient(ellipse 40% 20% at 70% 55%, rgba(40, 50, 70, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(50, 40, 90, 0.35) 0%, transparent 60%),
    linear-gradient(180deg, #0e1018 0%, #08080c 100%);
}

.card-body {
  position: relative;
  z-index: 1;
}

.card-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px 12px 5px 10px;
  background: var(--purple);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}

.card-pill svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.card-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ==========================================================================
   Single / article
   ========================================================================== */
.article-page {
  padding: 48px 0 80px;
}

.article-header {
  max-width: 720px;
  margin: 0 auto 36px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.article-cat {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--purple);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}

.article-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.article-date {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  color: #e4e4ea;
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-content h2 {
  margin: 2em 0 0.75em;
  font-size: 1.35rem;
  color: var(--text);
}

.article-content h3 {
  margin: 1.6em 0 0.6em;
  font-size: 1.15rem;
  color: var(--text);
}

.article-content p {
  margin: 0 0 1.15em;
}

.article-content a {
  color: var(--purple-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.4em;
}

.article-content li {
  margin-bottom: 0.4em;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.95rem;
}

.article-content th,
.article-content td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  text-align: left;
}

.article-content th {
  background: rgba(107, 76, 255, 0.15);
  color: var(--text);
}

.article-content strong {
  color: var(--text);
  font-weight: 700;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--purple);
  color: var(--text-muted);
  background: rgba(107, 76, 255, 0.06);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.back-home:hover {
  color: var(--purple);
}

/* ==========================================================================
   Archive / index fallback
   ========================================================================== */
.archive-page {
  padding: 48px 0 80px;
}

.archive-title {
  margin: 0 0 28px;
  font-size: 1.75rem;
  font-weight: 800;
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-list-item {
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
}

.post-list-item h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.post-list-item h2 a:hover {
  color: var(--purple);
}

.post-list-item .excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px 0;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--purple);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.footer-tagline {
  color: var(--text-soft);
}

/* ==========================================================================
   Search overlay (minimal)
   ========================================================================== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  align-items: flex-start;
  justify-content: center;
  padding: 120px 24px 24px;
}

.search-overlay.is-open {
  display: flex;
}

.search-overlay form {
  width: 100%;
  max-width: 520px;
  display: flex;
  gap: 10px;
}

.search-overlay input[type="search"] {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(107, 76, 255, 0.4);
  background: #111;
  color: var(--text);
  outline: none;
}

.search-overlay input[type="search"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(107, 76, 255, 0.2);
}

.search-overlay button[type="submit"] {
  padding: 14px 20px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  cursor: pointer;
}

.search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

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