/*
Theme Name: Paranoid Time
Theme URI: https://paranoidtime.com
Author: Mars Embassy
Author URI: https://marsembassy.us
Description: Cinematic night-sky WordPress theme for Paranoid Time — documented UAP sightings, declassified threads, and open questions without the noise.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paranoid-time
Tags: custom-logo, custom-menu, featured-images, one-column, two-columns, translation-ready, blog
*/

/* -------------------------------------------------------------------------
   Design tokens — cinematic night sky, mint-teal accents
   ------------------------------------------------------------------------- */
:root {
  --pt-bg: #0b0f14;
  --pt-bg-elevated: #121820;
  --pt-bg-card: #151c26;
  --pt-bg-band: #0e141c;
  --pt-navy: #0a1628;
  --pt-charcoal: #1a222e;
  --pt-border: rgba(126, 224, 200, 0.12);
  --pt-border-strong: rgba(126, 224, 200, 0.28);
  --pt-text: #e8eef4;
  --pt-text-muted: #9aa8b8;
  --pt-text-dim: #6b7a8c;
  --pt-accent: #7EE0C8;
  --pt-accent-dim: rgba(126, 224, 200, 0.15);
  --pt-accent-hover: #a8f0dc;
  --pt-focus: #7EE0C8;
  --pt-danger: #e07e8a;
  --pt-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pt-font-display: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pt-radius: 10px;
  --pt-radius-lg: 16px;
  --pt-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --pt-max: 1120px;
  --pt-header-h: 72px;
}

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

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

body {
  margin: 0;
  font-family: var(--pt-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--pt-text);
  background: var(--pt-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(20, 40, 70, 0.55), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(126, 224, 200, 0.04), transparent 50%);
  min-height: 100vh;
}

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

a {
  color: var(--pt-accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
  color: var(--pt-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--pt-focus);
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pt-font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--pt-text);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1.1em;
}

ul, ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.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;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: var(--pt-bg-elevated);
  clip: auto !important;
  clip-path: none;
  color: var(--pt-text);
  display: block;
  font-size: 0.95rem;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 0.75rem 1rem;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
  border-radius: 6px;
  border: 1px solid var(--pt-border-strong);
}

/* -------------------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------------------- */
.pt-wrap {
  width: min(100% - 2.5rem, var(--pt-max));
  margin-inline: auto;
}

.pt-section {
  padding: 4.5rem 0;
}

.pt-section--tight {
  padding: 3rem 0;
}

.pt-section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pt-accent);
  margin-bottom: 0.75rem;
}

.pt-section__title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  margin-bottom: 0.5rem;
}

.pt-section__lede {
  color: var(--pt-text-muted);
  max-width: 38rem;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* -------------------------------------------------------------------------
   Site header / nav
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pt-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--pt-header-h);
  width: min(100% - 2.5rem, var(--pt-max));
  margin-inline: auto;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.site-branding a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--pt-text);
  text-decoration: none;
}

.site-branding a:hover {
  color: var(--pt-accent);
}

.custom-logo,
.custom-logo-link img,
.site-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pt-border-strong);
}

.site-title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 0;
}

.site-title span {
  color: var(--pt-accent);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--pt-border-strong);
  color: var(--pt-text);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--pt-accent);
  color: var(--pt-accent);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  align-items: center;
}

.primary-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  color: var(--pt-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--pt-accent);
  background: var(--pt-accent-dim);
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.45rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.pt-btn:focus-visible {
  outline: 2px solid var(--pt-focus);
  outline-offset: 3px;
}

.pt-btn--primary {
  background: var(--pt-accent);
  color: #0b0f14;
}

.pt-btn--primary:hover,
.pt-btn--primary:focus {
  background: var(--pt-accent-hover);
  color: #0b0f14;
}

.pt-btn--ghost {
  background: transparent;
  color: var(--pt-text);
  border-color: var(--pt-border-strong);
}

.pt-btn--ghost:hover,
.pt-btn--ghost:focus {
  border-color: var(--pt-accent);
  color: var(--pt-accent);
  background: var(--pt-accent-dim);
}

.pt-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.pt-hero {
  position: relative;
  min-height: clamp(420px, 72vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--pt-border);
}

.pt-hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--pt-navy);
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.pt-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 15, 20, 0.35) 0%, rgba(11, 15, 20, 0.55) 45%, rgba(11, 15, 20, 0.96) 100%),
    linear-gradient(90deg, rgba(11, 15, 20, 0.75) 0%, rgba(11, 15, 20, 0.35) 55%, rgba(11, 15, 20, 0.55) 100%);
}

.pt-hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--pt-max));
  margin-inline: auto;
  padding: 5rem 0 4rem;
}

.pt-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pt-accent);
  margin-bottom: 1rem;
}

.pt-hero__eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--pt-accent);
}

.pt-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.pt-hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--pt-text-muted);
  max-width: 34rem;
  margin-bottom: 2rem;
  line-height: 1.55;
}

/* -------------------------------------------------------------------------
   Map band (visual only — no fake stats)
   ------------------------------------------------------------------------- */
.pt-map-band {
  background: var(--pt-bg-band);
  border-block: 1px solid var(--pt-border);
  position: relative;
  overflow: hidden;
}

.pt-map-band__visual {
  position: relative;
  min-height: 280px;
  border-radius: var(--pt-radius-lg);
  background:
    radial-gradient(circle at 22% 48%, rgba(126, 224, 200, 0.35) 0 3px, transparent 4px),
    radial-gradient(circle at 48% 32%, rgba(126, 224, 200, 0.45) 0 4px, transparent 5px),
    radial-gradient(circle at 68% 58%, rgba(126, 224, 200, 0.3) 0 3px, transparent 4px),
    radial-gradient(circle at 35% 70%, rgba(126, 224, 200, 0.25) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 40%, rgba(126, 224, 200, 0.4) 0 3px, transparent 4px),
    radial-gradient(circle at 55% 75%, rgba(126, 224, 200, 0.2) 0 2px, transparent 3px),
    linear-gradient(160deg, #0d1520 0%, #121c2a 40%, #0a121c 100%);
  border: 1px solid var(--pt-border);
  overflow: hidden;
}

.pt-map-band__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 224, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 224, 200, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.7;
  pointer-events: none;
}

.pt-map-band__visual::after {
  content: "";
  position: absolute;
  inset: 12% 8%;
  border: 1px dashed rgba(126, 224, 200, 0.15);
  border-radius: 50% 40% 55% 45%;
  pointer-events: none;
}

.pt-map-band__caption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1;
  background: rgba(11, 15, 20, 0.82);
  border: 1px solid var(--pt-border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pt-map-band__caption strong {
  display: block;
  color: var(--pt-accent);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.pt-map-band__caption p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pt-text-muted);
}

/* -------------------------------------------------------------------------
   Featured cases
   ------------------------------------------------------------------------- */
.pt-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pt-case-card {
  background: var(--pt-bg-card);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--pt-shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pt-case-card:hover {
  border-color: var(--pt-border-strong);
  transform: translateY(-2px);
}

.pt-case-card__year {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pt-accent);
  margin-bottom: 0.6rem;
}

.pt-case-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
}

.pt-case-card p {
  color: var(--pt-text-muted);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1rem;
}

.pt-case-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pt-accent);
}

.pt-case-card__link:hover {
  color: var(--pt-accent-hover);
}

/* -------------------------------------------------------------------------
   Briefing teaser
   ------------------------------------------------------------------------- */
.pt-briefing {
  background: var(--pt-bg-elevated);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
}

.pt-briefing__meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pt-accent);
  margin-bottom: 0.5rem;
}

.pt-briefing h3 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.pt-briefing p {
  color: var(--pt-text-muted);
  margin-bottom: 0;
  max-width: 42rem;
}

.pt-briefing__note {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--pt-text-dim);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Timeline
   ------------------------------------------------------------------------- */
.pt-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.pt-timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: linear-gradient(180deg, var(--pt-accent), rgba(126, 224, 200, 0.1));
}

.pt-timeline__item {
  position: relative;
  padding: 0 0 1.75rem 2.25rem;
}

.pt-timeline__item:last-child {
  padding-bottom: 0;
}

.pt-timeline__item::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--pt-bg);
  border: 2px solid var(--pt-accent);
  box-shadow: 0 0 0 4px rgba(126, 224, 200, 0.12);
}

.pt-timeline__year {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pt-accent);
  margin-bottom: 0.2rem;
}

.pt-timeline__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.pt-timeline__text {
  margin: 0;
  color: var(--pt-text-muted);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   Inner pages / content
   ------------------------------------------------------------------------- */
.pt-page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--pt-border);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(126, 224, 200, 0.06), transparent 55%),
    var(--pt-bg);
}

.pt-page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.pt-page-hero__lede {
  color: var(--pt-text-muted);
  max-width: 40rem;
  margin: 0;
  font-size: 1.08rem;
}

.site-main {
  padding: 2.5rem 0 4rem;
}

.entry-content,
.page-content,
.post-content {
  max-width: 42rem;
}

.entry-content > *:first-child,
.page-content > *:first-child,
.post-content > *:first-child {
  margin-top: 0;
}

.entry-content a,
.page-content a,
.post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content h2,
.page-content h2,
.post-content h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.entry-meta {
  color: var(--pt-text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.pt-stub-note {
  background: var(--pt-bg-card);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 1.25rem 1.4rem;
  color: var(--pt-text-muted);
  margin-bottom: 2rem;
}

.pt-stub-note strong {
  color: var(--pt-accent);
}

/* Post list (index / archive style) */
.pt-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.pt-post-list__item {
  background: var(--pt-bg-card);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 1.35rem 1.4rem;
}

.pt-post-list__item h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.pt-post-list__item h2 a {
  color: var(--pt-text);
  text-decoration: none;
}

.pt-post-list__item h2 a:hover {
  color: var(--pt-accent);
}

.pt-post-list__excerpt {
  color: var(--pt-text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* 404 */
.pt-404 {
  text-align: center;
  padding: 4rem 0 5rem;
}

.pt-404 h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.75rem;
}

.pt-404 p {
  color: var(--pt-text-muted);
  max-width: 28rem;
  margin: 0 auto 1.75rem;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--pt-border);
  background: #080b10;
  padding: 2.75rem 0 2rem;
  margin-top: auto;
}

.site-footer__inner {
  width: min(100% - 2.5rem, var(--pt-max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__brand {
  max-width: 22rem;
}

.site-footer__brand .site-title {
  margin-bottom: 0.5rem;
}

.site-footer__tagline {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--pt-accent);
  margin: 0 0 0.5rem;
}

.site-footer__copy {
  color: var(--pt-text-dim);
  font-size: 0.85rem;
  margin: 0;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__nav a {
  color: var(--pt-text-muted);
  font-size: 0.9rem;
}

.site-footer__nav a:hover {
  color: var(--pt-accent);
}

/* -------------------------------------------------------------------------
   Alignments / WP defaults
   ------------------------------------------------------------------------- */
.alignwide,
.alignfull {
  max-width: none;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  color: var(--pt-text-dim);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .pt-cases-grid {
    grid-template-columns: 1fr;
  }

  .pt-briefing {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 15, 20, 0.98);
    border-bottom: 1px solid var(--pt-border);
    padding: 0.75rem 1.25rem 1.25rem;
  }

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

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

  .primary-nav a {
    padding: 0.7rem 0.85rem;
  }

  .pt-hero__content {
    padding: 3.5rem 0 3rem;
  }

  .pt-section {
    padding: 3.25rem 0;
  }
}

@media (max-width: 480px) {
  .pt-wrap,
  .site-header__inner,
  .site-footer__inner,
  .pt-hero__content {
    width: min(100% - 1.5rem, var(--pt-max));
  }

  .pt-btn-row {
    flex-direction: column;
  }

  .pt-btn {
    width: 100%;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
