:root {
  --cw-canvas: #0a0b10;
  --cw-canvas-soft: #10121a;
  --cw-surface: #14161f;
  --cw-surface-raised: #1a1d28;
  --cw-surface-soft: #212530;
  --cw-line: rgba(255, 255, 255, 0.09);
  --cw-line-strong: rgba(255, 255, 255, 0.18);
  --cw-paper: #f6f6fa;
  --cw-muted: #9a9aa8;
  --cw-quiet: #6d6d7c;
  --cw-indigo: #818cf8;
  --cw-indigo-deep: #6366f1;
  --cw-accent-blue: #4495ff;
  --cw-green: #4eff74;
  --cw-coral: #ff643d;
  --cw-yellow: #fff04b;
  --cw-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --cw-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  background: var(--cw-canvas) !important;
  color: var(--cw-paper) !important;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(129, 140, 248, 0.09) 0, rgba(10, 11, 16, 0) 460px),
    linear-gradient(180deg, var(--cw-canvas-soft) 0, var(--cw-canvas) 760px) !important;
  color: var(--cw-paper) !important;
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Fine grain texture over everything — imperceptible but premium */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(129, 140, 248, 0.32);
  color: var(--cw-paper);
}

a {
  color: inherit;
}

.container,
.center {
  width: min(1216px, calc(100% - 48px));
  max-width: 1216px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

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

.header,
.site-header {
  position: fixed !important;
  inset: 0 0 auto !important;
  z-index: 1000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(10, 11, 16, 0.72) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  backdrop-filter: blur(24px) !important;
}

.header__inner,
.site-header__inner,
.header__center {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 72px !important;
  gap: 28px !important;
}

.logo,
.brand,
.header__logo,
.footer__logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 11px !important;
  color: var(--cw-paper) !important;
  font-family: "Space Grotesk", Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 21px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  text-decoration: none !important;
}

.logo-icon,
.brand__mark,
.header__pic,
.footer__pic {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  filter: none !important;
  object-fit: contain !important;
}

.header__pic_dark,
.footer__pic_dark {
  content: url("../img/corewod-logo-dark.png");
  display: block !important;
}

.header__pic_light,
.footer__pic_light {
  display: none !important;
}

.header__logo::after,
.footer__logo::after {
  content: "CoreWod";
}

.nav,
.header__nav {
  display: flex !important;
  align-items: center !important;
  gap: 34px !important;
}

.nav a,
.header__link {
  color: var(--cw-muted) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  text-decoration: none !important;
  transition: color 160ms ease !important;
}

.nav a:hover,
.nav a.active,
.header__link:hover,
.header__link.active {
  color: var(--cw-paper) !important;
}

.header__btns {
  display: flex !important;
  gap: 12px !important;
}

.app-store-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 142px !important;
  transition: transform 160ms ease !important;
}

.app-store-badge:hover {
  transform: translateY(-1px) !important;
}

.app-store-badge img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.btn,
.button,
.header__btn,
.contact__btn,
.download__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 50px !important;
  padding: 0 24px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-decoration: none !important;
}

.btn--coral,
.btn_orange,
.button--primary {
  background: linear-gradient(135deg, #93a0ff, var(--cw-indigo-deep) 58%, #5352e0) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 36px rgba(99, 102, 241, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  transition: transform 200ms var(--cw-ease-out), box-shadow 200ms ease !important;
}

.btn--coral:hover,
.btn_orange:hover,
.button--primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 20px 48px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

.btn--green,
.button--green {
  background: linear-gradient(135deg, #7dffa0, var(--cw-green) 55%, #2fe95b) !important;
  color: #04140a !important;
  box-shadow: 0 14px 36px rgba(78, 255, 116, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn_transparent,
.button--ghost {
  border-color: var(--cw-line) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--cw-paper) !important;
}

.menu-toggle span,
.header__burger::before,
.header__burger::after {
  background: var(--cw-paper) !important;
}

.page-header,
.blog-hero,
.features-hero,
.article-header,
.contact,
.download,
.about {
  padding-top: 130px !important;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(129, 140, 248, 0.12), rgba(10, 11, 16, 0) 70%),
    var(--cw-canvas) !important;
  background-size: 54px 54px, 54px 54px, auto, auto !important;
  color: var(--cw-paper) !important;
}

.page-header {
  padding-bottom: 38px !important;
}

.page-header__title,
.blog-hero__title,
.features-hero h1,
.article-title,
.about__title,
.contact__title,
.download__title,
.h1,
.h2,
.d1 {
  color: var(--cw-paper) !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em !important;
}

.page-header__title,
.blog-hero__title,
.features-hero h1,
.article-title {
  font-size: clamp(38px, 6vw, 72px) !important;
  line-height: 1.02 !important;
}

.page-header__text,
.page-header__date,
.blog-hero__text,
.features-hero p,
.article-meta,
.contact__info,
.download__info,
.about__info {
  color: var(--cw-muted) !important;
}

.page-header__back,
.article-back {
  color: var(--cw-muted) !important;
}

.page-header__back:hover,
.article-back:hover {
  color: var(--cw-paper) !important;
}

.page-content,
.posts-section,
.faq-sections,
.section,
.article-content {
  background: var(--cw-canvas) !important;
  color: var(--cw-paper) !important;
}

.page-content {
  padding-bottom: 72px !important;
}

.page-body,
.article-body {
  color: var(--cw-muted) !important;
  font-size: 17px !important;
  line-height: 1.8 !important;
}

.page-body h2,
.page-body h3,
.article-body h2,
.article-body h3,
.section-title,
.faq-category__title {
  color: var(--cw-paper) !important;
  border-color: var(--cw-line) !important;
}

.page-body strong,
.article-body strong,
.faq__answer-inner strong {
  color: var(--cw-paper) !important;
}

.page-body a,
.article-body a,
.faq__answer-inner a {
  color: var(--cw-accent-blue) !important;
}

.post-card,
.featured-post,
.feature-card,
.style-card,
.timeline-item,
.comparison-card,
.community-feature,
.premium-card,
.faq__item,
.faq-cta,
.article-cta,
.contact__form,
.download__item,
.review__item {
  border: 1px solid var(--cw-line) !important;
  background: var(--cw-surface) !important;
  color: var(--cw-paper) !important;
  box-shadow: none !important;
}

.post-card:hover,
.feature-card:hover,
.download__item:hover {
  border-color: var(--cw-line-strong) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34) !important;
}

.post-card__title,
.featured-post__title,
.feature-card__title,
.faq__question,
.faq-cta__title,
.article-cta__title,
.download__subtitle,
.download__category,
.review__author {
  color: var(--cw-paper) !important;
}

.post-card__excerpt,
.post-card__meta,
.featured-post__excerpt,
.featured-post__meta,
.feature-card__text,
.faq__answer-inner,
.faq-cta__text,
.article-cta__text,
.download__text,
.review__text,
.footer__text {
  color: var(--cw-muted) !important;
}

.post-card__category,
.featured-post__category,
.article-category,
.section-badge,
.page-header__badge,
.stage {
  border: 1px solid rgba(129, 140, 248, 0.32) !important;
  border-radius: 999px !important;
  background: rgba(129, 140, 248, 0.1) !important;
  color: #b6bcff !important;
  font-family: var(--cw-mono) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

.category-btn,
.lang-switch {
  border: 1px solid var(--cw-line) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--cw-muted) !important;
}

.category-btn:hover,
.category-btn.active,
.lang-switch button.active {
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: var(--cw-paper) !important;
}

.faq-category__icon,
.feature-card__icon,
.progress-row__icon,
.coach-feature__icon {
  border: 1px solid rgba(129, 140, 248, 0.22) !important;
  background: rgba(129, 140, 248, 0.1) !important;
  color: var(--cw-indigo) !important;
}

.footer {
  border-top: 1px solid var(--cw-line) !important;
  background: var(--cw-canvas) !important;
  color: var(--cw-muted) !important;
}

.footer__link,
.footer__links a,
.footer__copyright {
  color: var(--cw-muted) !important;
}

.footer__link:hover,
.footer__links a:hover {
  color: var(--cw-paper) !important;
}

.simple-page {
  position: relative;
  min-height: 100vh;
  padding: 132px 0 72px;
  background:
    linear-gradient(180deg, rgba(129, 140, 248, 0.1), rgba(10, 11, 16, 0) 440px),
    var(--cw-canvas);
}

.simple-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 720px;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.042) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 92% 82% at 50% 0%, black, transparent 74%);
  mask-image: radial-gradient(ellipse 92% 82% at 50% 0%, black, transparent 74%);
}

.simple-page > .container {
  position: relative;
}

.simple-hero {
  max-width: 840px;
  margin: 0 auto 42px;
  text-align: center;
}

.simple-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.08);
  color: #b6bcff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .simple-hero > *,
  .simple-grid > *,
  .simple-actions {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(8px);
    animation: cw-rise 860ms var(--cw-ease-out) forwards;
  }

  .simple-hero > *:nth-child(1) { animation-delay: 60ms; }
  .simple-hero > *:nth-child(2) { animation-delay: 150ms; }
  .simple-hero > *:nth-child(3) { animation-delay: 250ms; }
  .simple-hero .simple-actions,
  .simple-hero > *:nth-child(4) { animation-delay: 340ms; }

  .simple-grid > *:nth-child(1) { animation-delay: 420ms; }
  .simple-grid > *:nth-child(2) { animation-delay: 510ms; }
  .simple-grid > *:nth-child(3) { animation-delay: 600ms; }
  .simple-grid > *:nth-child(4) { animation-delay: 690ms; }
  .simple-grid > *:nth-child(5) { animation-delay: 780ms; }
  .simple-grid > *:nth-child(6) { animation-delay: 870ms; }
}

@keyframes cw-rise {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.simple-hero h1 {
  margin-top: 20px;
  color: var(--cw-paper);
  font-size: clamp(40px, 6.4vw, 72px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.simple-hero p {
  max-width: 660px;
  margin: 18px auto 0;
  color: var(--cw-muted);
  font-size: 18px;
}

.simple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.simple-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.simple-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--cw-line);
  border-radius: 22px;
  background: var(--cw-surface);
  transition: transform 220ms var(--cw-ease-out), border-color 220ms ease, box-shadow 220ms ease;
}

.simple-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

.simple-card h2,
.simple-card h3 {
  color: var(--cw-paper);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

.simple-card p,
.simple-card li {
  margin-top: 10px;
  color: var(--cw-muted);
}

.simple-card ul {
  margin-top: 14px;
  padding-left: 18px;
}

.simple-card a {
  color: var(--cw-green);
  font-weight: 800;
}

.simple-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.popup,
.mfp-content {
  background: var(--cw-surface) !important;
  color: var(--cw-paper) !important;
}

input,
textarea {
  border-color: var(--cw-line) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--cw-paper) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--cw-quiet) !important;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--cw-indigo) !important;
  outline-offset: 2px !important;
  border-radius: 6px;
}

.btn:active,
.button:active,
.header__btn:active,
.contact__btn:active,
.download__btn:active {
  transform: scale(0.97) !important;
}

@media (max-width: 768px) {
  .container,
  .center {
    width: min(100% - 32px, 1216px);
  }

  .header__inner,
  .site-header__inner,
  .header__center {
    height: 70px !important;
  }

  .nav,
  .header__nav {
    display: none !important;
  }

  .header__btns .btn,
  .header__btns .header__btn {
    min-height: 42px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
  }

  .page-header,
  .blog-hero,
  .features-hero,
  .article-header,
  .contact,
  .download,
  .about {
    padding-top: 104px !important;
  }

  .simple-page {
    padding: 104px 0 56px;
  }

  .simple-grid,
  .simple-grid--two {
    grid-template-columns: 1fr;
  }

  .simple-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header__title,
  .blog-hero__title,
  .features-hero h1,
  .article-title {
    font-size: 38px !important;
  }
}

/* Accent card exceptions — keep gradient hero cards on the features page */
.feature-card--coral {
  background: linear-gradient(135deg, #ff643d 0%, #ff8a6a 100%) !important;
  border-color: transparent !important;
}

.feature-card--coral .feature-card__title {
  color: #ffffff !important;
}

.feature-card--coral .feature-card__text {
  color: rgba(255, 255, 255, 0.88) !important;
}

.feature-card--coral .feature-card__label {
  color: rgba(255, 255, 255, 0.75) !important;
}

.feature-card--coral .feature-card__icon {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

.feature-card--accent {
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(129, 140, 248, 0.18), rgba(255, 255, 255, 0) 60%),
    var(--cw-surface-raised) !important;
  border-color: rgba(129, 140, 248, 0.3) !important;
}
