@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg-dark: #121215;
  --bg-card: #191920;
  --bg-card-hover: #21212a;
  --bg-input: #16161d;
  
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-red-glow: rgba(239, 68, 68, 0.15);
  
  --border-color: #2b2b36;
  --border-accent: #ef4444;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #121215;
  
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --shadow-brutal: 4px 4px 0px #ef4444;
  --shadow-brutal-dark: 4px 4px 0px #2b2b36;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: #d1d5db;
  font-size: 1.05rem;
}

a {
  color: var(--accent-red);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #f87171;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 860px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  min-width: 48px;
  text-align: center;
  border: 2px solid var(--accent-red);
}

.btn-primary {
  background-color: var(--accent-red);
  color: #ffffff;
  box-shadow: var(--shadow-brutal-dark);
}

.btn-primary:hover {
  background-color: var(--accent-red-hover);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-brutal);
  color: #ffffff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-red);
  color: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-brutal);
}

/* Header & Nav */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--accent-red);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
}

.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(18, 18, 21, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-color);
  z-index: 900;
  padding: 1.1rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  min-height: 48px;
}

.logo span {
  color: var(--accent-red);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-red);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #ffffff;
}

.logo-icon svg {
  stroke: #ffffff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-red);
}

.burger-btn {
  display: none;
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.burger-btn:hover {
  border-color: var(--accent-red);
}

/* Hero Section */
.hero {
  padding: 4rem 0 3rem;
  position: relative;
  border-bottom: 2px solid var(--border-color);
  background: radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.08) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--accent-red);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.hero-title {
  margin-bottom: 1.25rem;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-image-wrapper {
  position: relative;
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-brutal);
  display: block;
}

.hero-badge {
  position: absolute;
  bottom: -15px;
  left: -15px;
  background: var(--bg-card);
  border: 2px solid var(--accent-red);
  padding: 1rem 1.25rem;
  box-shadow: 4px 4px 0px #121215;
}

.hero-badge-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-red);
}

.hero-badge-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Article Layout */
.main-content {
  padding: 4rem 0;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3.5rem;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.8;
}

.article-body blockquote {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-red);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.15rem;
  font-style: italic;
  color: #ffffff;
}

.article-body ul, .article-body ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.6rem;
  color: #d1d5db;
}

.feature-box {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin: 2.25rem 0;
  box-shadow: var(--shadow-brutal-dark);
}

.feature-box-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.feature-box-title svg {
  stroke: var(--accent-red);
}

/* Calculator Widget */
.calculator-card {
  background: var(--bg-card);
  border: 2px solid var(--accent-red);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-brutal);
}

.calc-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.calc-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.calc-result-box {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border-color);
}

.result-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.result-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
}

.result-value.danger {
  color: var(--accent-red);
}

.result-value.success {
  color: #10b981;
}

/* Sidebar */
.sidebar-wrapper {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.widget-title {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-red);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toc-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.25rem 0;
}

.toc-link:hover {
  color: var(--accent-red);
  transform: translateX(4px);
}

.toc-num {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-red);
  font-size: 0.85rem;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-red);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  color: #ffffff;
  font-size: 1.2rem;
}

.author-info h4 {
  font-size: 1rem;
  margin: 0;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Digest Banner / CTA */
.cta-banner {
  background: linear-gradient(135deg, #1c1917 0%, #121215 100%);
  border: 2px solid var(--accent-red);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  margin: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-brutal);
}

.cta-banner-content {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-form {
  display: flex;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}

.cta-form .form-input {
  flex: 1;
}

/* Toast Notice */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 2px solid var(--accent-red);
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-brutal);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
}

/* Legal Pages Styling */
.legal-header {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
}

.legal-content {
  padding: 3.5rem 0;
  max-width: 900px;
  margin: 0 auto;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.5rem;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-info-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  width: 42px;
  height: 42px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon svg {
  stroke: var(--accent-red);
}

.info-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

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

/* Footer */
.site-footer {
  background-color: #0b0b0d;
  border-top: 2px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.disclaimer-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: #858b97;
  margin-top: 2rem;
  line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .hero-grid, .article-layout, .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar-wrapper {
    position: static;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0;
  }

  .nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  /* Ensure nav container doesn't take flex space on mobile header */
  .site-header nav {
    display: contents;
  }

  .logo {
    font-size: 1.3rem;
  }

  .burger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-menu {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-dark);
    border-bottom: 3px solid var(--accent-red);
    flex-direction: column;
    padding: 1.25rem 1rem;
    gap: 0.5rem;
    transform: translateY(-160%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
    z-index: 999;
  }

  .nav-menu.is-active {
    transform: translateY(0);
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: var(--bg-card);
    border-color: var(--border-color);
    border-left: 4px solid var(--accent-red);
    color: #ffffff;
  }

  .nav-menu .nav-link.active::after {
    display: none;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-badge {
    position: relative;
    bottom: 0;
    left: 0;
    margin-top: 1rem;
    width: 100%;
    box-shadow: 3px 3px 0px var(--accent-red);
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .cta-form {
    flex-direction: column;
    width: 100%;
  }

  .cta-form .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: calc(100% - 2rem);
    justify-content: center;
  }
}

/* Neo-Brutalism Mobile 375px+ Specific Optimization */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    word-break: break-word;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  .hero-tag {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    flex-wrap: wrap;
  }

  .feature-box {
    padding: 1.15rem 0.9rem;
    margin: 1.5rem 0;
    box-shadow: 3px 3px 0px #2b2b36;
  }

  .calculator-card {
    padding: 1.25rem 0.9rem;
    margin: 2rem 0;
    box-shadow: 3px 3px 0px var(--accent-red);
  }

  .calc-result-box {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .result-value {
    font-size: 1.1rem;
    word-break: break-word;
  }

  .cta-banner {
    padding: 1.75rem 1rem;
    margin: 2.5rem 0;
    box-shadow: 3px 3px 0px var(--accent-red);
  }

  .article-body blockquote {
    padding: 1rem;
    font-size: 1rem;
    margin: 1.5rem 0;
  }

  .sidebar-widget {
    padding: 1.15rem 0.9rem;
  }

  .author-avatar {
    width: 46px;
    height: 46px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .info-item {
    gap: 0.75rem;
  }

  .info-icon {
    width: 38px;
    height: 38px;
  }

  .contact-info-card {
    padding: 1.25rem 0.9rem;
  }
}

