/*
Theme Name: Nexulas
Theme URI: https://nexulas.local
Author: Paperclip CTO
Description: Custom launch theme for the Nexulas affiliate media website.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: nexulas
*/

:root {
  --nx-bg: #f4efe6;
  --nx-surface: #fffaf2;
  --nx-surface-strong: #f0e1c8;
  --nx-ink: #1b1713;
  --nx-muted: #5f5549;
  --nx-accent: #cf5f2f;
  --nx-accent-dark: #9a3c15;
  --nx-accent-soft: #f1b98f;
  --nx-line: rgba(27, 23, 19, 0.12);
  --nx-shadow: 0 18px 45px rgba(59, 35, 12, 0.14);
  --nx-radius: 24px;
  --nx-content: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(207, 95, 47, 0.18), transparent 24rem),
    linear-gradient(180deg, #f8f2e8 0%, var(--nx-bg) 100%);
  color: var(--nx-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
}

a {
  color: inherit;
}

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

.site-shell {
  min-height: 100vh;
}

.site-header,
.site-footer,
.section-inner,
.content-shell {
  width: min(calc(100% - 2rem), var(--nx-content));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand-mark {
  text-decoration: none;
}

.brand-kicker {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.brand-name {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav a {
  text-decoration: none;
  color: var(--nx-muted);
}

.hero {
  width: min(calc(100% - 2rem), calc(var(--nx-content) + 4rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: stretch;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: calc(var(--nx-radius) + 10px);
  background: linear-gradient(145deg, rgba(255, 250, 242, 0.95), rgba(240, 225, 200, 0.88));
  box-shadow: var(--nx-shadow);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--nx-accent-dark);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero h1,
.entry-title {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.95;
}

.hero-copy p,
.entry-summary {
  max-width: 38rem;
  color: var(--nx-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.button-link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--nx-accent);
  color: #fffaf6;
  text-decoration: none;
  font-weight: 700;
}

.button-link.is-secondary {
  background: transparent;
  border-color: var(--nx-line);
  color: var(--nx-ink);
}

.hero-card,
.panel,
.post-card,
.category-card {
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--nx-shadow);
}

.hero-card {
  align-self: center;
  padding: 1.5rem;
  transform: rotate(2deg);
}

.hero-card h2,
.section-title {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.3vw, 2.4rem);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-metrics strong {
  display: block;
  font-size: 1.6rem;
}

.section {
  padding: 1.25rem 0 3rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-intro {
  max-width: 36rem;
  color: var(--nx-muted);
}

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

.panel,
.post-card,
.category-card {
  padding: 1.5rem;
}

.panel-label,
.post-card time {
  color: var(--nx-accent-dark);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.category-card span {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--nx-accent-dark);
  font-weight: 700;
}

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

.trust-strip .panel {
  background: rgba(27, 23, 19, 0.95);
  color: #f8f2e8;
}

.cta-band {
  padding: 2rem;
  background: linear-gradient(160deg, rgba(207, 95, 47, 0.95), rgba(154, 60, 21, 0.95));
  color: #fffaf6;
}

.content-shell {
  padding: 2rem 0 4rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, 0.9fr);
  gap: 2rem;
}

.entry-card,
.sidebar-card {
  padding: 1.75rem;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--nx-shadow);
}

.entry-meta {
  margin-bottom: 1rem;
  color: var(--nx-muted);
  font-size: 0.9rem;
}

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

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--nx-muted);
}

.site-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--nx-line);
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

@media (max-width: 920px) {
  .hero-panel,
  .content-grid,
  .feature-grid,
  .category-grid,
  .posts-grid,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .site-footer-top,
  .site-header {
    display: block;
  }

  .primary-nav {
    margin-top: 1rem;
  }
}
