/* BareNerve — Raw Psychology. No Filters. */

/* === Reset & Variables === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bone: #F5F0EB;
  --ink: #1A1A1A;
  --nerve: #C73E3E;
  --nerve-dim: #9B2D2D;
  --nerve-glow: rgba(199, 62, 62, 0.12);
  --ash: #6B6560;
  --whisper: #E8E2DB;
  --deep: #0D0D0D;
  --deep-soft: #141414;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1120px;
  --content-width: 720px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* === Navigation === */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  transition: all 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 40px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--nerve);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--bone);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

.nav-cta {
  background: var(--nerve) !important;
  color: var(--bone) !important;
  opacity: 1 !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--nerve-dim) !important;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 40px 100px;
  position: relative;
  background: var(--deep);
  color: var(--bone);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(199,62,62,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(199,62,62,0.04) 0%, transparent 50%);
  pointer-events: none;
}

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

.brand {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--nerve);
  margin-bottom: 48px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 28px;
  letter-spacing: -1.5px;
}

.hero h1 em {
  font-style: italic;
  color: var(--nerve);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: rgba(245, 240, 235, 0.65);
  max-width: 560px;
  margin-bottom: 40px;
}

/* === Subscribe Form === */
.subscribe-form {
  max-width: 460px;
}

.subscribe-form--footer,
.subscribe-form--article {
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 10px;
}

.subscribe-input {
  flex: 1;
  padding: 14px 18px;
  border: 1.5px solid rgba(245, 240, 235, 0.15);
  border-radius: 8px;
  background: rgba(245, 240, 235, 0.06);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.subscribe-input:focus {
  border-color: var(--nerve);
  background: rgba(245, 240, 235, 0.1);
}

.subscribe-input::placeholder {
  color: rgba(245, 240, 235, 0.35);
}

.subscribe-btn {
  padding: 14px 28px;
  background: var(--nerve);
  color: var(--bone);
  border: none;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.subscribe-btn:hover {
  background: var(--nerve-dim);
}

.subscribe-btn:active {
  transform: scale(0.98);
}

.subscribe-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.subscribe-msg {
  font-size: 13px;
  margin-top: 10px;
  min-height: 20px;
}

.msg-success {
  color: #5cb85c;
}

.msg-error {
  color: var(--nerve);
}

.subscribe-fine {
  font-size: 12px;
  color: rgba(245, 240, 235, 0.35);
  margin-top: 12px;
}

/* Light context forms */
.subscribe-section .subscribe-input {
  background: rgba(26, 26, 26, 0.04);
  border-color: rgba(26, 26, 26, 0.15);
  color: var(--ink);
}

.subscribe-section .subscribe-input:focus {
  border-color: var(--nerve);
  background: rgba(26, 26, 26, 0.06);
}

.subscribe-section .subscribe-input::placeholder {
  color: var(--ash);
}

.subscribe-section .subscribe-fine {
  color: var(--ash);
}

/* === Sections === */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.articles-section {
  padding: 100px 0;
  background: var(--bone);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--ink);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--ash);
  margin-bottom: 48px;
}

/* === Article Cards Grid === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(26, 26, 26, 0.06);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(26, 26, 26, 0.08);
}

.article-card-link {
  display: block;
  padding: 32px;
  height: 100%;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-category {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--nerve);
}

.article-read-time {
  font-size: 12px;
  color: var(--ash);
}

.article-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  color: var(--ink);
}

.article-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ash);
  margin-bottom: 20px;
}

.article-card-cta {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--nerve);
  transition: color 0.2s;
}

.article-card:hover .article-card-cta {
  color: var(--nerve-dim);
}

.no-articles {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--ash);
  font-size: 1.1rem;
}

/* === Subscribe Section === */
.subscribe-section {
  padding: 100px 0;
  background: var(--whisper);
  text-align: center;
}

.subscribe-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--ink);
}

.subscribe-sub {
  font-size: 1.05rem;
  color: var(--ash);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.subscribe-section .form-row {
  justify-content: center;
}

/* === Article Page === */
.article-page {
  padding-top: 80px;
}

.article-header {
  background: var(--deep);
  color: var(--bone);
  padding: 100px 40px 80px;
}

.article-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 13px;
}

.article-divider {
  color: var(--ash);
}

.article-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.article-excerpt-large {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(245, 240, 235, 0.6);
  max-width: 600px;
}

/* Article Body */
.article-body {
  padding: 64px 40px 80px;
  background: var(--bone);
}

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink);
}

.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--ink);
}

.article-content p {
  margin-bottom: 24px;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content blockquote {
  border-left: 3px solid var(--nerve);
  padding: 16px 24px;
  margin: 32px 0;
  background: rgba(199, 62, 62, 0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--ink);
}

.article-content blockquote p {
  margin-bottom: 0;
}

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

.article-content em {
  font-style: italic;
}

.article-content ul,
.article-content ol {
  margin: 20px 0;
  padding-left: 28px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--whisper);
  margin: 40px 0;
}

/* === Related Section === */
.related-section {
  padding: 80px 0;
  background: white;
}

/* === Footer === */
.site-footer {
  background: var(--deep);
  color: var(--bone);
  padding: 60px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--nerve);
  text-transform: uppercase;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.4);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.5);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--bone);
}

.footer-copy p {
  font-size: 12px;
  color: rgba(245, 240, 235, 0.3);
}

/* === Error Page === */
.error-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px;
}

.error-section h1 {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 700;
  color: var(--nerve);
  margin-bottom: 16px;
}

.error-section p {
  font-size: 1.1rem;
  color: var(--ash);
  margin-bottom: 32px;
}

.back-link {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--nerve);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--nerve-dim);
}

/* === Responsive === */
@media (max-width: 768px) {
  .site-nav {
    padding: 16px 20px;
  }

  .site-nav.scrolled {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .hero {
    padding: 100px 24px 80px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .form-row {
    flex-direction: column;
  }

  .subscribe-btn {
    width: 100%;
    padding: 14px;
  }

  .section-inner {
    padding: 0 24px;
  }

  .articles-section {
    padding: 64px 0;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-card-link {
    padding: 24px;
  }

  .subscribe-section {
    padding: 64px 0;
  }

  .article-header {
    padding: 80px 24px 60px;
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-body {
    padding: 40px 24px 60px;
  }

  .article-content {
    font-size: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .related-section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.85rem;
  }

  .brand {
    margin-bottom: 32px;
  }

  .article-card-title {
    font-size: 1.15rem;
  }

  .subscribe-heading {
    font-size: 1.5rem;
  }
}
