/* CSS Variables - Color System */
:root {
  /* Orange + white brand palette – light theme */
  --primary: oklch(0.7045 0.1926 39.23); /* Brand orange */
  --primary-foreground: oklch(1 0 0); /* White text on primary */
  --radius: 1rem;
  --radius-xl: 2rem;
  --background: oklch(1 0 0); /* White */
  --foreground: oklch(0.22 0.02 285); /* Dark text on white */
  --card: oklch(1 0 0); /* White cards – work on white and orange sections */
  --card-foreground: oklch(0.22 0.02 285); /* Dark text on cards */
  --secondary: oklch(0.7045 0.1926 39.23); /* Same as primary */
  --muted: oklch(0.96 0.008 285); /* Very light gray */
  --muted-foreground: oklch(0.48 0.02 285); /* Gray secondary text */
  --accent: oklch(0.7045 0.1926 39.23); /* Same as primary */
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.88 0.01 285); /* Light gray border */
  --ring: oklch(0.7045 0.1926 39.23); /* Focus ring = primary */
}

/* Base Styles */
* {
  box-sizing: border-box;
  border-color: var(--border);
  outline-color: oklch(from var(--ring) l c h / 0.5);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  margin: 0;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
[type="button"]:not(:disabled),
[type="submit"]:not(:disabled),
[type="reset"]:not(:disabled),
a[href],
select:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled) {
  cursor: pointer;
}

.min-h-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.min-h-screen > .footer {
  margin-top: auto;
}

/* Container */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1280px;
  }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: oklch(from var(--background) l c h / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--border) l c h / 0.5);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  animation: fadeInDown 0.6s ease-out;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-container {
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.logo-container:hover {
  transform: scale(1.05);
}

.logo {
  height: 48px;
  width: auto;
}

.header-spacer {
  flex: 1;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
  background-color: var(--background); /* White */
  contain: paint;
  isolation: isolate;
}

.hero-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: paint;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

.bg-blob-1 {
  top: 80px;
  left: 40px;
  width: 128px;
  height: 128px;
  background-color: oklch(from var(--primary) l c h / 0.2);
}

.bg-blob-2 {
  bottom: 80px;
  right: 40px;
  width: 160px;
  height: 160px;
  background-color: oklch(from var(--accent) l c h / 0.2);
  animation-delay: 1s;
}

.bg-blob-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 192px;
  height: 192px;
  background-color: oklch(from var(--secondary) l c h / 0.2);
  animation-delay: 2s;
}

/* Small orange pulsation points – one beat per position, fade in/out */
.hero-pulse {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  border-radius: 50%;
  background: oklch(from var(--primary) l c h / 0.85);
  box-shadow: 0 0 20px oklch(from var(--primary) l c h / 0.6);
  filter: blur(2px);
  opacity: 0;
}

.hero-pulse.is-running {
  animation: hero-pulse-one-beat 2.6s ease-in-out 1 forwards;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

/* One smooth breath: appear and pulse are the same motion, then fade away */
@keyframes hero-pulse-one-beat {
  0% {
    opacity: 0;
    transform: scale(0.92);
    box-shadow: 0 0 8px oklch(from var(--primary) l c h / 0);
  }
  45% {
    opacity: 1;
    transform: scale(1.12);
    box-shadow: 0 0 26px oklch(from var(--primary) l c h / 0.7);
  }
  100% {
    opacity: 0;
    transform: scale(0.96);
    box-shadow: 0 0 6px oklch(from var(--primary) l c h / 0);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-text-wrapper {
  max-width: 80rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: var(--foreground);
}

.text-primary {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 3rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle-highlight {
  font-weight: bold;
  color: var(--primary);
}

@media (min-width: 640px) {
  .hero-subtitle-br {
    display: none;
  }
  .hero-title {
    font-size: 4.5rem;
  }
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 6rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  outline: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem 1rem;
  min-height: 2.25rem;
  touch-action: manipulation;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn:focus-visible {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.5);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover:not(:disabled) {
  background-color: oklch(from var(--primary) l c h / 0.9);
}

.btn-outline {
  border: 1px solid var(--border);
  background-color: transparent;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--accent);
}

.btn-lg {
  height: 2.5rem;
  padding: 0 2rem;
  font-size: 1.125rem;
}

.btn-submit {
  width: 100%;
  height: 3rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--primary), oklch(from var(--primary) l c h / 0.9));
  box-shadow: 0 10px 15px -3px oklch(from var(--primary) l c h / 0.25);
}

.btn-submit:hover:not(:disabled) {
  background: linear-gradient(to right, oklch(from var(--primary) l c h / 0.9), var(--primary));
  box-shadow: 0 20px 25px -5px oklch(from var(--primary) l c h / 0.3);
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-icon {
  transition: transform 0.2s;
}

.btn-submit:hover .btn-icon {
  transform: translateX(4px);
}

/* Fade In Animations (enabled only on index and blog pages) */
body.home-page .fade-in-up,
body.blog-page .fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

body.home-page .fade-in-up.visible,
body.blog-page .fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

body.home-page .fade-in-left,
body.blog-page .fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

body.home-page .fade-in-left.visible,
body.blog-page .fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

body.home-page .fade-in-right,
body.blog-page .fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

body.home-page .fade-in-right.visible,
body.blog-page .fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Sections */
.services-section,
.contact-section {
  padding: 6rem 0;
  position: relative;
}

.services-section {
  background-color: oklch(from var(--primary) l c h / 0.14); /* Orange section */
}

.benefits-section {
  padding: 6rem 0;
  position: relative;
  background-color: var(--background); /* White */
  overflow: hidden;
}

.benefits-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3.75rem;
  }
}

/* Cards – white surface for contrast on both white and orange sections */
.card {
  background-color: var(--card);
  color: var(--card-foreground);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
  height: 100%;
}

.card:hover {
  border-color: oklch(from var(--primary) l c h / 0.4);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 8px 16px -4px oklch(from var(--primary) l c h / 0.08);
}

.card-header {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.5rem;
  align-items: start;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

.card-content {
  padding: 0;
}

.card-description {
  font-size: 1rem;
  color: var(--muted-foreground);
  margin: 0;
}

.service-card .card-description {
  margin-bottom: 1.5rem;
}

.card-icon {
  margin-bottom: 1rem;
  color: var(--primary);
}

.card-icon-meta {
  margin-bottom: calc(1.5rem - 12px);
}

.meta-logo {
  display: block;
}

/* Service Cards */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 75rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  transition: transform 0.2s;
}

body.home-page .service-card.visible:hover {
  transform: scale(1.05);
}

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 75rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.benefit-card {
  transition: transform 0.2s;
}

body.home-page .benefit-card.visible:hover {
  transform: scale(1.05);
}

/* Plan Section */
.plan-section {
  padding: 6rem 0;
  position: relative;
  background-color: oklch(from var(--primary) l c h / 0.14); /* Orange section */
}

/* Final Message Section */
.final-message-section {
  padding: 6rem 0;
  position: relative;
  background-color: var(--background); /* White */
  overflow: hidden;
}

.final-message-wrapper {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.final-message-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.final-message-text {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.final-message-wrapper .btn-plan {
  width: auto;
  justify-content: center;
  height: 3rem;
  padding-left: 2rem;
  padding-right: 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--primary), oklch(from var(--primary) l c h / 0.9));
  box-shadow: 0 10px 15px -3px oklch(from var(--primary) l c h / 0.25);
}

.final-message-wrapper .btn-plan:hover {
  background: linear-gradient(to right, oklch(from var(--primary) l c h / 0.9), var(--primary));
  box-shadow: 0 20px 25px -5px oklch(from var(--primary) l c h / 0.3);
}

@media (min-width: 768px) {
  .final-message-title {
    font-size: 3.75rem;
    white-space: nowrap;
  }
  .final-message-text {
    font-size: 1.5rem;
  }
}

.plan-grid {
  display: grid;
  gap: 2rem;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.plan-card-wrapper {
  max-width: 36rem;
  margin: 0 auto;
}

.plan-card {
  padding: 2rem;
}

@media (min-width: 768px) {
  .plan-card {
    padding: 2.5rem;
  }
}

.plan-card-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid oklch(from var(--border) l c h / 0.6);
  margin-bottom: 1.5rem;
}

.plan-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--foreground);
}

.plan-card-price {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.plan-price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.plan-price-period {
  font-weight: 500;
  color: var(--muted-foreground);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.plan-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--card-foreground);
  line-height: 1.5;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--primary);
}

.plan-disclosure {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0 0 1.25rem;
  font-style: italic;
}

.plan-card-content .btn-plan {
  width: 100%;
  justify-content: center;
  height: 3rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(to right, var(--primary), oklch(from var(--primary) l c h / 0.9));
  box-shadow: 0 10px 15px -3px oklch(from var(--primary) l c h / 0.25);
}

.plan-card-content .btn-plan:hover {
  background: linear-gradient(to right, oklch(from var(--primary) l c h / 0.9), var(--primary));
  box-shadow: 0 20px 25px -5px oklch(from var(--primary) l c h / 0.3);
}

.plan-card-free .plan-card-content .btn-plan {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.plan-card-free .plan-card-content .btn-plan:hover {
  background-color: oklch(from var(--primary) l c h / 0.12);
  border-color: var(--primary);
  box-shadow: none;
}

.benefit-icon {
  margin-bottom: 1rem;
  color: var(--primary);
}

.benefit-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.benefit-description {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-form-wrapper {
  max-width: 48rem;
  margin: 0 auto;
}

.contact-card {
  position: relative;
  background: linear-gradient(to bottom right, var(--card), oklch(from var(--card) l c h / 0.95), oklch(from var(--card) l c h / 0.9));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid oklch(from var(--border) l c h / 0.6);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px oklch(from var(--primary) l c h / 0.05);
  overflow: hidden;
}

.contact-card-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, oklch(from var(--primary) l c h / 0.05), transparent, oklch(from var(--accent) l c h / 0.05));
  pointer-events: none;
}

.contact-card-sparkle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: oklch(from var(--primary) l c h / 0.2);
  animation: pulse 2s ease-in-out infinite;
}

.contact-card-content {
  position: relative;
  z-index: 10;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .contact-card-content {
    padding: 2rem;
  }
}

.contact-form-header {
  margin-bottom: 2rem;
}

.contact-form-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-form-subtitle {
  color: var(--muted-foreground);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  user-select: none;
}

.form-label svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--foreground);
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-foreground);
}

.form-input {
  height: 3rem;
}

.form-select {
  height: 3rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.form-textarea {
  min-height: 8rem;
  resize: none;
}

.form-footer-text {
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted-foreground);
  padding-top: 0.5rem;
  margin: 0;
}

/* Footer */
.footer {
  background-color: oklch(from var(--primary) l c h / 0.14); /* Orange section */
  border-top: 1px solid oklch(from var(--primary) l c h / 0.25);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding: 0.2rem 0;
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
  }

  .footer-column:last-child {
    justify-self: end;
    text-align: right;
  }
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-logo-container {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-logo {
  height: 28px;
  width: auto;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-text {
  color: var(--muted-foreground);
  margin: 0;
}

/* Ensure spacing between stacked footer text matches link spacing */
.footer-text + .footer-text {
  margin-top: 0.5rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted-foreground);
}

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

.footer-contact-item svg {
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid oklch(from var(--primary) l c h / 0.25);
  padding-top: 1rem;
  text-align: center;
  color: var(--muted-foreground);
}

/* Loading State */
.btn-submit.loading {
  pointer-events: none;
}

.btn-submit.loading .btn-content::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid oklch(from var(--primary-foreground) l c h / 0.3);
  border-top-color: var(--primary-foreground);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast notifications – handled by toast.js (app-matching red popup design) */
/* ==========================================================================
 * Header Navigation
 * ========================================================================== */

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover {
  color: var(--foreground);
  background-color: oklch(from var(--muted) l c h / 0.3);
}

.nav-link-active {
  color: var(--primary);
}

.nav-link-cta {
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  margin-left: 0.5rem;
}

.nav-link-cta:hover {
  color: var(--primary-foreground);
  background-color: oklch(from var(--primary) l c h / 0.9);
}

.nav-btn-blog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  touch-action: manipulation;
  font-weight: 600;
  color: var(--primary-foreground);
  background-color: var(--primary);
  text-decoration: none;
  border-radius: 9999px;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.nav-btn-blog:hover {
  background-color: oklch(from var(--primary) l c h / 0.9);
  box-shadow: 0 4px 12px oklch(from var(--primary) l c h / 0.35);
}

.nav-btn-blog-active {
  opacity: 0.9;
  cursor: default;
}

.nav-btn-blog-active:hover {
  background-color: var(--primary);
  box-shadow: none;
}

.footer-link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary);
}

/* ==========================================================================
 * Blog Hero
 * ========================================================================== */

.blog-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 140px;
  padding-bottom: 3rem;
}

.blog-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.blog-hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.blog-hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .blog-hero-title {
    font-size: 4rem;
  }
  .blog-hero-subtitle {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
 * Blog Listing
 * ========================================================================== */

.blog-section {
  padding: 2rem 0 6rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 75rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Blog Card */
.blog-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s;
  touch-action: manipulation;
}

body.blog-page .blog-card:hover {
  transform: translateY(-4px);
}

.blog-card .card {
  height: 100%;
  transition: border-color 0.3s, box-shadow 0.3s;
  /* Avoid backdrop-filter to prevent empty-card bug when scrolling while hovered */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: oklch(from var(--card) l c h / 0.92);
}

body.blog-page .blog-card:hover .card {
  border-color: oklch(from var(--primary) l c h / 0.5);
  box-shadow: 0 20px 25px -5px oklch(from var(--primary) l c h / 0.08);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.blog-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background-color: oklch(from var(--primary) l c h / 0.1);
  border-radius: 9999px;
  border: 1px solid oklch(from var(--primary) l c h / 0.2);
}

.blog-date {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.blog-card-excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.blog-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background-color: oklch(from var(--muted) l c h / 0.4);
  border-radius: var(--radius);
  border: 1px solid oklch(from var(--border) l c h / 0.3);
}

.blog-card-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
}

body.blog-page .blog-card:hover .blog-card-cta svg {
  transform: translateX(4px);
}

.blog-card-cta svg {
  transition: transform 0.2s;
}

/* Empty State */
.blog-empty {
  text-align: center;
  padding: 4rem 1rem;
  max-width: 32rem;
  margin: 0 auto;
}

.blog-empty-icon {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  opacity: 0.4;
}

.blog-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.blog-empty-text {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Upcoming Notice */
.blog-upcoming {
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid oklch(from var(--border) l c h / 0.3);
}

.blog-upcoming-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  margin: 0;
}

.blog-upcoming-text svg {
  color: var(--primary);
  flex-shrink: 0;
}

.blog-error {
  text-align: center;
  color: var(--destructive);
  padding: 3rem 1rem;
  font-size: 1rem;
}

/* ==========================================================================
 * Article Page
 * ========================================================================== */

/* Only section gets padding; body.article-page must not get it (causes excess space on article.html) */
section.article-page {
  padding-top: 120px;
  padding-bottom: 4rem;
}

.article-container {
  max-width: 48rem;
  margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-sep {
  display: flex;
  align-items: center;
  color: oklch(from var(--muted-foreground) l c h / 0.5);
}

.breadcrumb-current {
  color: var(--foreground);
  font-weight: 500;
}

/* Article Header */
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid oklch(from var(--border) l c h / 0.3);
}

.article-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.article-subtitle {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
  .article-title {
    font-size: 2.75rem;
  }
  .article-subtitle {
    font-size: 1.25rem;
  }
}

/* Article Body */
.article-body {
  padding-bottom: 2rem;
}

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

.article-section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
  line-height: 1.3;
}

.article-section-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: oklch(from var(--foreground) l c h / 0.85);
  margin: 0;
}

/* Citations */
.citation-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.75em;
  font-weight: 600;
  transition: color 0.2s;
}

.citation-link:hover {
  color: oklch(from var(--primary) l c h / 0.8);
  text-decoration: underline;
}

/* Conclusion */
.article-conclusion {
  margin-bottom: 2.5rem;
}

.article-cta-box {
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, oklch(from var(--primary) l c h / 0.08), oklch(from var(--accent) l c h / 0.05));
  border: 1px solid oklch(from var(--primary) l c h / 0.15);
  border-radius: var(--radius-xl);
  text-align: center;
}

.article-cta-text {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* Sources */
.article-sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid oklch(from var(--border) l c h / 0.3);
}

.sources-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.source-item {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  scroll-margin-top: 100px;
}

.source-item .source-number {
  font-weight: 600;
  color: var(--primary);
  margin-right: 0.5rem;
  display: inline-block;
}

.source-title {
  color: var(--foreground);
  font-weight: 500;
}

.source-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.source-link:hover {
  text-decoration: underline;
  color: oklch(from var(--primary) l c h / 0.8);
}

/* Back button */
.article-back {
  padding-top: 2rem;
  border-top: 1px solid oklch(from var(--border) l c h / 0.3);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-foreground) !important;
  background-color: var(--primary) !important;
  text-decoration: none;
  border-radius: 9999px;
  transition: background-color 0.2s, box-shadow 0.2s;
  border: none;
}

.btn-back:hover {
  color: var(--primary-foreground) !important;
  background-color: oklch(from var(--primary) l c h / 0.9) !important;
  box-shadow: 0 4px 12px oklch(from var(--primary) l c h / 0.35);
}

/* Article Loading State */
.article-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 0;
  color: var(--muted-foreground);
  gap: 1rem;
}

.article-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid oklch(from var(--muted) l c h / 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Hide footer until article content is loaded to prevent layout bounce */
body.article-page .footer {
  opacity: 0;
  transition: opacity 0.25s ease-in;
}
body.article-page.article-loaded .footer {
  opacity: 1;
}
