/* ============================================================
   Invoice Swift — Landing Page Stylesheet
   Mobile-first · Responsive · Accessible
   ============================================================ */

/* ------------------------------------------------------------
   1. Custom Properties
   ------------------------------------------------------------ */
:root {
  --primary: #0175c2;
  --primary-dark: #015a96;
  --primary-light: #e6f3fb;
  --accent: #ff6b35;
  --accent-dark: #e55a25;
  --text: #1a1a2e;
  --text-light: #555;
  --text-inv: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------------------
   2. Reset & Base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:
    'Poppins',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Helvetica Neue',
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  font-weight: 700;
}

/* ------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  color: var(--text);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

/* ------------------------------------------------------------
   4. Buttons (shared)
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inv);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-inv);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-inv);
  transform: translateY(-2px);
}

.btn-sm {
  font-size: 0.9rem;
  padding: 10px 22px;
}

/* ------------------------------------------------------------
   5. Navigation / Header
   ------------------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition:
    background var(--transition),
    box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1001;
}

.nav-logo svg,
.nav-logo img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.nav-cta {
  background: var(--accent);
  color: var(--text-inv) !important;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition:
    background var(--transition),
    transform var(--transition);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--accent-dark);
  color: var(--text-inv);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--text);
  border-radius: 4px;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: calc(var(--nav-height) + 24px) 32px 32px;
    background: var(--bg);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--bg-alt);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 16px;
    text-align: center;
    width: 100%;
    display: block;
    padding: 14px 24px;
  }

  /* Open state */
  .nav-open .nav-links {
    transform: translateX(0);
  }

  .nav-open .hamburger span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .nav-open .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .hamburger span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  /* Overlay */
  .nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
  }

  /* Prevent scroll when menu open */
  .nav-open {
    overflow: hidden;
  }
}

/* ------------------------------------------------------------
   6. Hero Section
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  background: linear-gradient(
    145deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  overflow: hidden;
  color: var(--text-inv);
}

/* Decorative shapes */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -8%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: 80px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  animation: heroFadeUp 0.8s ease-out both;
}

.hero h1 span {
  display: inline-block;
  background: linear-gradient(135deg, #fff 60%, rgba(255, 255, 255, 0.65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.7;
  animation: heroFadeUp 0.8s 0.15s ease-out both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  animation: heroFadeUp 0.8s 0.3s ease-out both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 24px;
  animation: heroFadeUp 0.6s ease-out both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wave divider */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 2;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------
   7. Features Section
   ------------------------------------------------------------ */
.features {
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------------
   8. Why Choose Section
   ------------------------------------------------------------ */
.why-choose {
  background: var(--bg-alt);
}

.why-choose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.why-choose-content h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  margin-bottom: 20px;
}

.why-choose-content p {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.why-choose-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.why-choose-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1rem;
  color: var(--text);
}

.why-choose-list li::before {
  content: '✓';
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

@media (min-width: 768px) {
  .why-choose-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------
   9. Pricing Section
   ------------------------------------------------------------ */
.pricing {
  background: var(--bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 820px;
  margin-inline: auto;
}

.pricing-card {
  background: var(--bg);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--primary);
  position: relative;
  box-shadow: var(--shadow);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--text-inv);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 20px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
}

.pricing-card .price-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 28px;
}

.pricing-features {
  flex: 1;
  margin-bottom: 28px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
}

.pricing-features li.disabled {
  color: var(--text-light);
  opacity: 0.55;
}

.pricing-features li.disabled::before {
  content: '—';
  background: var(--bg-alt);
  color: var(--text-light);
}

.pricing-card .btn {
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-card.featured {
    transform: scale(1.03);
  }

  .pricing-card.featured:hover {
    transform: scale(1.03) translateY(-4px);
  }
}

/* ------------------------------------------------------------
   10. Guides / Blog Section
   ------------------------------------------------------------ */
.guides {
  background: var(--bg-alt);
}

.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.guide-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.guide-card-body {
  padding: 28px 24px;
}

.guide-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.guide-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
}

.guide-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap var(--transition);
}

.guide-link:hover {
  gap: 10px;
}

.guide-link::after {
  content: '→';
}

/* Collapsible articles via <details> */
.guide-card details {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 16px;
}

.guide-card details summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guide-card details summary::-webkit-details-marker {
  display: none;
}

.guide-card details summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  transition: transform var(--transition);
}

.guide-card details[open] summary::after {
  transform: rotate(45deg);
}

.guide-card details .details-content {
  padding-bottom: 16px;
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------
   11. Offline Capabilities Section
   ------------------------------------------------------------ */
.offline {
  background: var(--bg);
}

.offline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.offline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: box-shadow var(--transition);
}

.offline-item:hover {
  box-shadow: var(--shadow);
}

.offline-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.offline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text);
}

.offline-item p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .offline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .offline-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  color: var(--text-inv);
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--text-inv);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  padding: 5px 0;
  transition:
    color var(--transition),
    padding-left var(--transition);
}

.footer-col a:hover {
  color: var(--text-inv);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  transition:
    background var(--transition),
    color var(--transition);
}

.footer-socials a:hover {
  background: var(--primary);
  color: var(--text-inv);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ------------------------------------------------------------
   13. Animations — Fade-in (Intersection Observer)
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in-group > .fade-in:nth-child(1) {
  transition-delay: 0s;
}
.fade-in-group > .fade-in:nth-child(2) {
  transition-delay: 0.1s;
}
.fade-in-group > .fade-in:nth-child(3) {
  transition-delay: 0.2s;
}
.fade-in-group > .fade-in:nth-child(4) {
  transition-delay: 0.3s;
}
.fade-in-group > .fade-in:nth-child(5) {
  transition-delay: 0.4s;
}
.fade-in-group > .fade-in:nth-child(6) {
  transition-delay: 0.5s;
}

/* ------------------------------------------------------------
   14. Accessibility
   ------------------------------------------------------------ */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

::selection {
  background: var(--primary);
  color: var(--text-inv);
}

/* 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;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* High contrast */
@media (forced-colors: active) {
  .btn,
  .nav-cta,
  .pricing-badge {
    border: 2px solid currentColor;
  }
}

/* ------------------------------------------------------------
   15. Responsive Breakpoints — Tablet
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }

  .section {
    padding: 100px 0;
  }
}

/* ------------------------------------------------------------
   16. Responsive Breakpoints — Desktop
   ------------------------------------------------------------ */
@media (min-width: 1024px) {
  .container {
    padding-inline: 40px;
  }

  .section {
    padding: 120px 0;
  }

  .hero .container {
    padding-block: 100px;
  }
}

/* ------------------------------------------------------------
   17. Utility Classes
   ------------------------------------------------------------ */
.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary);
}
.text-accent {
  color: var(--accent);
}
.bg-alt {
  background: var(--bg-alt);
}
.mt-auto {
  margin-top: auto;
}
.mb-0 {
  margin-bottom: 0;
}
.gap-sm {
  gap: 12px;
}
.gap-md {
  gap: 24px;
}
.gap-lg {
  gap: 48px;
}

/* ------------------------------------------------------------
   18. Breadcrumb Navigation
   ------------------------------------------------------------ */
.breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px 0;
  margin-top: var(--nav-height);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb ol li + li::before {
  content: '/';
  margin-right: 6px;
  opacity: 0.5;
}

.breadcrumb ol a {
  color: var(--primary);
  font-weight: 500;
  transition: opacity var(--transition);
}

.breadcrumb ol a:hover {
  opacity: 0.75;
}

.breadcrumb ol li[aria-current='page'] {
  color: var(--text);
  font-weight: 500;
}

/* ------------------------------------------------------------
   19. Article Header (hero for article pages)
   ------------------------------------------------------------ */
.article-header {
  background: linear-gradient(
    145deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-inv);
  padding: 64px 0 56px;
  text-align: center;
}

.article-header .guide-tag {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-inv);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 800;
  margin: 16px 0 20px;
  max-width: 800px;
  margin-inline: auto;
  margin-top: 16px;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.article-meta {
  font-size: 0.9rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------------------------------------
   20. Article Prose Body
   ------------------------------------------------------------ */
.article-body {
  background: var(--bg);
}

.article-prose {
  max-width: 740px;
  margin-inline: auto;
}

.article-prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 48px 0 16px;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

.article-prose h3 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
  color: var(--text);
}

.article-prose p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: 20px;
}

.article-prose strong {
  color: var(--text);
  font-weight: 600;
}

.article-prose ul,
.article-prose ol {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-prose ul li,
.article-prose ol li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.02rem;
  color: var(--text-light);
  line-height: 1.7;
}

.article-prose ul li::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  margin-top: 2px;
}

.article-prose ol {
  counter-reset: article-ol;
}

.article-prose ol li {
  counter-increment: article-ol;
}

.article-prose ol li::before {
  content: counter(article-ol);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--text-inv);
  margin-top: 2px;
}

.article-prose blockquote {
  border-left: 4px solid var(--primary);
  margin: 28px 0;
  padding: 16px 24px;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
}

/* Callout box */
.article-callout {
  background: var(--primary-light);
  border: 1px solid rgba(1, 117, 194, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}

.article-callout h4 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.article-callout p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* In-article CTA */
.article-cta-box {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-inv);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  margin: 56px 0 0;
}

.article-cta-box h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.article-cta-box p {
  font-size: 1rem;
  opacity: 0.88;
  margin-bottom: 24px;
  color: var(--text-inv);
}

/* ------------------------------------------------------------
   21. Article Navigation (prev / next / back)
   ------------------------------------------------------------ */
.article-nav {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 40px;
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.article-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
  padding: 10px 20px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.article-nav a:hover {
  background: var(--primary);
  color: var(--text-inv);
  transform: translateY(-2px);
}

.article-nav .nav-back {
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-light);
}

.article-nav .nav-back:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--text-light);
}

/* ------------------------------------------------------------
   22. Guides Listing Page (guides.html)
   ------------------------------------------------------------ */
.guides-hero {
  background: linear-gradient(
    145deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-inv);
  padding: 80px 0 64px;
  text-align: center;
  margin-top: var(--nav-height);
}

.guides-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.guides-hero p {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 560px;
  margin-inline: auto;
}

.guides-listing {
  background: var(--bg-alt);
  padding: 64px 0 80px;
}

.guides-listing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.guide-listing-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.guide-listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.guide-listing-card h2 {
  font-size: 1.35rem;
  color: var(--text);
}

.guide-listing-card p {
  font-size: 0.98rem;
  color: var(--text-light);
  line-height: 1.75;
  flex: 1;
}

.guide-listing-card .guide-link {
  align-self: flex-start;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.guide-listing-card .guide-link:hover {
  gap: 10px;
}

.guide-listing-card .guide-link::after {
  content: '→';
}

@media (min-width: 768px) {
  .guides-listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-header {
    padding: 80px 0 72px;
  }
}
