/* ==========================================================================
   Wordsmithy Marketing Website – Main Stylesheet
   A premium, accessible, mobile-first stylesheet for the Wordsmithy product site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties
   -------------------------------------------------------------------------- */

:root {
  /* Brand palette — forge / blacksmith theme */
  --color-primary: #A0522D;
  --color-primary-hover: #8B4513;
  --color-secondary: #7B3F0E;
  --color-accent: #C05621;
  --color-accent-hover: #A04418;

  /* Neutrals */
  --color-bg: #FFFBF5;
  --color-surface: #ffffff;
  --color-surface-alt: #FDF5EC;
  --color-border: #E6D5C3;
  --color-text: #33261A;
  --color-text-muted: #78674F;
  --color-text-inverse: #ffffff;

  /* Semantic */
  --color-success: #34d399;
  --color-error: #ef4444;
  --color-warning: #f59e0b;

  /* Typography */
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Scale (based on 1rem = 16px) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --nav-height: 72px;

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(51, 38, 26, 0.06);
  --shadow-md: 0 4px 12px rgba(51, 38, 26, 0.08);
  --shadow-lg: 0 8px 30px rgba(51, 38, 26, 0.1);
  --shadow-xl: 0 16px 48px rgba(51, 38, 26, 0.14);
  --shadow-glow: 0 0 40px rgba(160, 82, 45, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* --------------------------------------------------------------------------
   2. Dark Mode
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1F1810;
    --color-surface: #2A2218;
    --color-surface-alt: #332A1F;
    --color-border: #4A3D2E;
    --color-text: #F0E6D8;
    --color-text-muted: #B5A48E;
    --color-text-inverse: #1F1810;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(160, 82, 45, 0.3);
  }
}

/* --------------------------------------------------------------------------
   3. High Contrast Mode
   -------------------------------------------------------------------------- */

@media (prefers-contrast: high) {
  :root {
    --color-primary: #7B3F0E;
    --color-accent: #A04418;
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-alt: #f0f0f0;
    --color-border: #333333;
    --color-text: #000000;
    --color-text-muted: #333333;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --color-bg: #000000;
      --color-surface: #111111;
      --color-surface-alt: #1a1a1a;
      --color-border: #cccccc;
      --color-text: #ffffff;
      --color-text-muted: #cccccc;
    }
  }
}

/* --------------------------------------------------------------------------
   4. Reduced Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   5. Reset & Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--space-lg));
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(160, 82, 45, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(192, 86, 33, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(123, 63, 14, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   6. Utility Classes
   -------------------------------------------------------------------------- */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-md);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip-to-content link */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: var(--z-toast);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  color: var(--color-text-inverse);
}

/* Container widths */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--sm {
  max-width: var(--container-sm);
}

.container--md {
  max-width: var(--container-md);
}

.container--lg {
  max-width: var(--container-lg);
}

.container--2xl {
  max-width: var(--container-2xl);
}

/* Section spacing */
.section {
  padding-block: var(--space-4xl);
}

.section--lg {
  padding-block: var(--space-5xl);
}

.section--sm {
  padding-block: var(--space-2xl);
}

/* Section headers */
.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .section__title {
    font-size: var(--text-4xl);
  }
}

/* Text utilities */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.text-sm     { font-size: var(--text-sm); }
.text-lg     { font-size: var(--text-lg); }

/* Focus indicators (global) */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75em 1.75em;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-md);
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 14px rgba(160, 82, 45, 0.3);
}

.btn--primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(160, 82, 45, 0.4);
  color: var(--color-text-inverse);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 14px rgba(192, 86, 33, 0.3);
}

.btn--accent:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 6px 20px rgba(192, 86, 33, 0.4);
  color: var(--color-text-inverse);
}

.btn--lg {
  padding: 1em 2.25em;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 0.5em 1.25em;
  font-size: var(--text-sm);
}

.btn--block {
  width: 100%;
}

.btn--disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* --------------------------------------------------------------------------
   8. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--nav-height);
  background-color: rgba(248, 247, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background-color: rgba(26, 23, 51, 0.85);
  }
}

.nav.is-scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--color-primary);
}

.nav__logo img,
.nav__logo svg {
  width: 36px;
  height: 36px;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding-block: var(--space-xs);
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--color-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

.nav__cta {
  display: none;
}

/* Hamburger toggle */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: var(--radius-full);
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.nav__mobile {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
  z-index: var(--z-dropdown);
}

.nav__mobile.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.nav__mobile .nav__link {
  font-size: var(--text-base);
  padding: var(--space-sm) 0;
  display: block;
}

.nav__mobile .btn {
  margin-top: var(--space-sm);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__cta {
    display: inline-flex;
  }

  .nav__toggle {
    display: none;
  }

  .nav__mobile {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   9. Hero Section
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-4xl);
  overflow: hidden;
  background:
    linear-gradient(160deg, var(--color-bg) 0%, var(--color-surface-alt) 40%, var(--color-bg) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(160, 82, 45, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(192, 86, 33, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__content {
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hero__title-accent {
  color: var(--color-primary);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hero__illustration {
  display: flex;
  justify-content: center;
}

.hero__illustration img,
.hero__illustration svg {
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
  .hero {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-5xl);
  }

  .hero__title {
    font-size: var(--text-5xl);
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }

  .hero__content {
    text-align: left;
  }

  .hero__subtitle {
    margin-inline: 0;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__meta {
    justify-content: flex-start;
  }

  .hero__title {
    font-size: var(--text-6xl);
  }
}

/* --------------------------------------------------------------------------
   10. Features Section
   -------------------------------------------------------------------------- */

/* Feature / tier badges */
.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.badge-free {
  background-color: rgba(52, 211, 153, 0.15);
  color: #059669;
}

.badge-premium {
  background: linear-gradient(135deg, rgba(160, 82, 45, 0.15), rgba(123, 63, 14, 0.15));
  color: var(--color-primary);
}

.badge-addon {
  background: linear-gradient(135deg, rgba(192, 86, 33, 0.15), rgba(160, 68, 24, 0.15));
  color: var(--color-accent);
}

.features {
  background-color: var(--color-bg);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  position: relative;
  padding: var(--space-xl);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base),
    border-color var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, rgba(160, 82, 45, 0.1), rgba(160, 82, 45, 0.05));
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-size: var(--text-2xl);
}

.feature-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.feature-card__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   11. Screenshots / Gallery Section
   -------------------------------------------------------------------------- */

.screenshots {
  background-color: var(--color-surface-alt);
}

.screenshots__gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 640px) {
  .screenshots__gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .screenshots__gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.screenshot-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
  cursor: pointer;
}

.screenshot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.screenshot-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: var(--color-surface-alt);
}

.screenshot-card__caption {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* Lightbox overlay (activated via JS) */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: var(--text-xl);
  transition: background-color var(--transition-fast);
}

.lightbox__close:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.lightbox__caption {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  text-align: center;
}

/* Screenshot carousel controls */
.carousel {
  position: relative;
}

.carousel__track {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-md);
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: 0 0 min(85vw, 600px);
  scroll-snap-align: center;
}

.carousel__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.carousel__dot {
  width: 10px;
  height: 10px;
  background-color: var(--color-border);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.carousel__dot.is-active,
.carousel__dot:hover {
  background-color: var(--color-primary);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  font-size: var(--text-lg);
  z-index: 2;
  transition:
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.carousel__btn:hover {
  box-shadow: var(--shadow-lg);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.carousel__btn--prev {
  left: calc(-1 * var(--space-sm));
}

.carousel__btn--next {
  right: calc(-1 * var(--space-sm));
}

@media (min-width: 768px) {
  .carousel__btn--prev {
    left: calc(-1 * var(--space-xl));
  }

  .carousel__btn--next {
    right: calc(-1 * var(--space-xl));
  }
}

/* --------------------------------------------------------------------------
   12. Pricing / Download Section
   -------------------------------------------------------------------------- */

.pricing {
  background-color: var(--color-bg);
}

.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 1100px;
  margin-inline: auto;
  align-items: start;
}

@media (min-width: 640px) {
  .pricing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .pricing__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  position: relative;
  padding: var(--space-2xl);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-align: center;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Premium / highlighted card */
.pricing-card--premium {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.02);
}

.pricing-card--premium:hover {
  transform: scale(1.04);
  box-shadow:
    var(--shadow-xl),
    0 0 60px rgba(160, 82, 45, 0.2);
}

/* Add-on card */
.pricing-card--addon {
  border-color: var(--color-accent);
  box-shadow: 0 0 40px rgba(192, 86, 33, 0.15);
}

.pricing-card--addon:hover {
  box-shadow:
    var(--shadow-xl),
    0 0 60px rgba(192, 86, 33, 0.2);
}

.pricing-card--addon .pricing-card__badge {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pricing-card__name {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.pricing-card__price {
  font-size: var(--text-4xl);
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.pricing-card__price-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.pricing-card__features {
  text-align: left;
  margin-bottom: var(--space-xl);
}

.pricing-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.pricing-card__feature + .pricing-card__feature {
  border-top: 1px solid var(--color-border);
}

/* Checkmark / X-mark icons */
.pricing-card__check,
.pricing-card__x {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

.pricing-card__check {
  background-color: rgba(52, 211, 153, 0.15);
  color: var(--color-success);
}

.pricing-card__check::before {
  content: '✓';
}

.pricing-card__x {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.pricing-card__x::before {
  content: '✗';
}

/* --------------------------------------------------------------------------
   13. Testimonials Section
   -------------------------------------------------------------------------- */

.testimonials {
  background-color: var(--color-surface-alt);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 640px) {
  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .testimonials__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  padding: var(--space-xl);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.testimonial-card__quote {
  position: relative;
  font-size: var(--text-base);
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text);
  flex: 1;
  padding-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.testimonial-card__quote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 0;
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-primary);
  flex-shrink: 0;
}

.testimonial-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.testimonial-card__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   14. Purchase / Checkout Page
   -------------------------------------------------------------------------- */

.purchase {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-block: var(--space-3xl);
}

.purchase__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: 900px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .purchase__layout {
    grid-template-columns: 5fr 4fr;
  }
}

/* Checkout form */
.checkout-form {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.checkout-form__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.form-group__input {
  width: 100%;
  padding: 0.75em 1em;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-group__input::placeholder {
  color: var(--color-text-muted);
}

.form-group__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.15);
}

.form-group__input--error {
  border-color: var(--color-error);
}

.form-group__input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group__error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-xs);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Order summary sidebar */
.order-summary {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  align-self: start;
}

.order-summary__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.order-summary__item {
  display: flex;
  justify-content: space-between;
  padding-block: var(--space-sm);
  font-size: var(--text-sm);
}

.order-summary__total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 2px solid var(--color-border);
  font-weight: 700;
  font-size: var(--text-lg);
}

/* Trust indicators & security badges */
.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.trust-badge__icon {
  width: 20px;
  height: 20px;
  color: var(--color-success);
  flex-shrink: 0;
}

.security-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.security-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

.security-badge__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(52, 211, 153, 0.1);
  border-radius: var(--radius-full);
  color: var(--color-success);
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   15. Email Verification Page
   -------------------------------------------------------------------------- */

.verification {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.verification-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.verification-card__icon {
  width: 64px;
  height: 64px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: var(--text-3xl);
}

.verification-card__icon--pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.verification-card__icon--success {
  background-color: rgba(52, 211, 153, 0.1);
  color: var(--color-success);
}

.verification-card__icon--error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.verification-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.verification-card__message {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.verification-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */

.footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-3xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 640px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer__brand {
  max-width: 280px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  margin-bottom: var(--space-md);
}

.footer__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-primary);
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-2xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 640px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__copyright {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer__social {
  display: flex;
  gap: var(--space-md);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface-alt);
  color: var(--color-text-muted);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.footer__social-link:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* --------------------------------------------------------------------------
   17. Download Page
   -------------------------------------------------------------------------- */

.download-header {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl) var(--space-2xl);
  margin-top: var(--nav-height);
}

.download-header h1 {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  margin-bottom: var(--space-md);
}

.download-subheadline {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: var(--container-md);
  margin-inline: auto;
}

/* Platform Downloads */
.download-platforms {
  padding: var(--space-2xl) var(--space-xl) var(--space-3xl);
  max-width: var(--container-xl);
  margin-inline: auto;
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.platform-card {
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.platform-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.platform-icon {
  font-size: var(--text-4xl);
  display: block;
  margin-bottom: var(--space-md);
}

.platform-card h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xs);
}

.platform-info {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.platform-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.platform-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xl);
}

.platform-note a {
  color: var(--color-primary);
  text-decoration: underline;
}

.platform-note a:hover {
  color: var(--color-primary-hover);
}

/* Feature Comparison */
.comparison-section {
  padding: var(--space-3xl) var(--space-xl);
  max-width: var(--container-xl);
  margin-inline: auto;
}

.comparison-section .section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.comparison-section .section-header h2 {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  margin-bottom: var(--space-sm);
}

.comparison-section .section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.comparison-table thead {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
}

.comparison-table thead th {
  padding: var(--space-lg) var(--space-xl);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.comparison-table thead th:nth-child(2),
.comparison-table thead th:nth-child(3) {
  text-align: center;
}

.comparison-table tbody td,
.comparison-table tbody th {
  padding: var(--space-md) var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.comparison-table tbody tr:last-child td,
.comparison-table tbody tr:last-child th {
  border-bottom: none;
}

.comparison-table tbody td:nth-child(2),
.comparison-table tbody td:nth-child(3) {
  text-align: center;
  font-size: var(--text-lg);
}

.comparison-table tbody tr:hover {
  background-color: var(--color-surface-alt);
}

.comparison-category {
  background-color: var(--color-surface-alt);
}

.comparison-category th {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  padding: var(--space-md) var(--space-xl) !important;
}

.comparison-table .feature-included {
  color: var(--color-success);
  font-weight: 700;
}

.comparison-table .feature-excluded {
  color: var(--color-error);
  font-weight: 700;
}

/* Download CTA */
.download-cta {
  padding: var(--space-3xl) var(--space-xl) var(--space-4xl);
  max-width: 800px;
  margin-inline: auto;
}

.download-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 640px) {
  .download-cta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.download-cta .pricing-card {
  position: relative;
  padding: var(--space-2xl);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-align: center;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.download-cta .pricing-card:hover {
  box-shadow: var(--shadow-lg);
}

.download-cta .pricing-card-highlighted {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.02);
}

.download-cta .pricing-card-highlighted:hover {
  transform: scale(1.04);
  box-shadow:
    var(--shadow-xl),
    0 0 60px rgba(160, 82, 45, 0.2);
}

.download-cta .pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.download-cta .pricing-tier {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.download-cta .pricing-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.download-license-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   18. Animations
   -------------------------------------------------------------------------- */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease both;
}

.animate-fade-in {
  animation: fade-in 0.4s ease both;
}

.animate-delay-1 { animation-delay: 100ms; }
.animate-delay-2 { animation-delay: 200ms; }
.animate-delay-3 { animation-delay: 300ms; }
.animate-delay-4 { animation-delay: 400ms; }

/* --------------------------------------------------------------------------
   19. Print Styles
   -------------------------------------------------------------------------- */

@media print {
  .nav,
  .footer,
  .skip-to-content,
  .hero__actions,
  .btn,
  .carousel__btn,
  .lightbox {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  body::before {
    display: none;
  }

  .section {
    padding-block: 1rem;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }
}

/* --------------------------------------------------------------------------
   Feature Detail Layout (for features.html page)
   -------------------------------------------------------------------------- */

.feature-detail-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.feature-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  padding: var(--space-2xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-base);
}

.feature-detail:hover {
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .feature-detail {
    grid-template-columns: 1fr 1fr;
  }

  .feature-detail--reverse {
    direction: rtl;
  }

  .feature-detail--reverse > * {
    direction: ltr;
  }
}

.feature-detail__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-detail__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.feature-detail__description {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin: 0;
}

.feature-detail__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.feature-detail__list li {
  padding-left: var(--space-lg);
  position: relative;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.feature-detail__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.feature-detail__image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-detail__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
