/* ============================================
   KOSHI ACADEMY — Master Stylesheet
   ============================================ */

/* ---- Font faces (local) ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2');
}

/* ---- Design tokens (matched to original Koshi) ---- */
:root {
  --primary: #175CFF;
  --primary-dark: #0A083B;
  --primary-light: #c9d7ff;
  --accent: #81d742;
  --accent-dark: #6fc032;
  --danger: #dd3333;
  --text: #0A083B;
  --text-muted: #57586E;
  --text-light: #8c8da3;
  --bg: #ffffff;
  --bg-soft: #F7F9FA;
  --bg-light: #EAF1F8;
  --border: #e6ebf2;
  --shadow-sm: 0 2px 8px rgba(10, 8, 59, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 8, 59, 0.08);
  --shadow-lg: 0 20px 60px rgba(10, 8, 59, 0.12);
  --shadow-glow: 0 0 40px rgba(23, 92, 255, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-heading: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --container: 1200px;
  --container-wide: 1360px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Dark mode ---- */
[data-theme='dark'] {
  --primary: #4d82ff;
  --primary-dark: #0a0a1e;
  --primary-light: #1a2653;
  --text: #f0f2fa;
  --text-muted: #a9b0c6;
  --text-light: #6b7190;
  --bg: #0a0a1e;
  --bg-soft: #141535;
  --bg-light: #1d1e40;
  --border: #262848;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p { color: var(--text-muted); margin-bottom: 1rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-wide { max-width: var(--container-wide); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.8rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4d82ff 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(23, 92, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(23, 92, 255, 0.4);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #a3e063 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(129, 215, 66, 0.3);
}
.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(129, 215, 66, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.btn-ghost {
  background: var(--bg-light);
  color: var(--text);
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary-dark); }

.btn-lg { padding: 1.1rem 2.4rem; font-size: 1.05rem; }
.btn-sm { padding: 0.65rem 1.2rem; font-size: 0.85rem; }

/* Button shine effect */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}
.btn:hover::before { left: 100%; }

/* ---- Header / Nav ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

[data-theme='dark'] .site-header {
  background: rgba(10, 10, 30, 0.85);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #4d82ff 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(23, 92, 255, 0.35);
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 50%);
}

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

.nav-menu a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }
.nav-menu a:hover,
.nav-menu a.active { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle,
.cart-btn,
.menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-light);
  color: var(--text);
  transition: all var(--transition);
  position: relative;
}

.theme-toggle:hover,
.cart-btn:hover,
.menu-toggle:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.menu-toggle { display: none; }

@media (max-width: 992px) {
  .menu-toggle { display: grid; }
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: calc(100vh - 70px);
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 0;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    overflow-y: auto;
  }
  .nav-menu.open { right: 0; }
  .nav-menu li { border-bottom: 1px solid var(--border); }
  .nav-menu a { display: block; padding: 1rem 0; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 10rem 0 6rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0A083B 0%, #175CFF 100%);
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(129, 215, 66, 0.2), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(77, 130, 255, 0.3), transparent 40%);
  pointer-events: none;
}

.hero-pixels {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 30px 30px, 90px 90px;
  background-position: 0 0, 15px 15px;
  pointer-events: none;
  animation: pixelShift 30s linear infinite;
}

@keyframes pixelShift {
  from { background-position: 0 0, 15px 15px; }
  to { background-position: 60px 60px, 75px 75px; }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #81d742 0%, #c9ff9f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 540px;
}

.hero-stat .num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hero-stat .num::after { content: '+'; color: var(--accent); }

.hero-stat .label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 500px;
  justify-self: end;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-visual .pixel-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 4px;
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5),
              inset 0 0 60px rgba(23, 92, 255, 0.3);
  backdrop-filter: blur(10px);
}

.hero-visual .pixel {
  background: #0d0d2a;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.hero-visual .pixel.on {
  animation: pixelPulse 3s ease-in-out infinite;
}

@keyframes pixelPulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 0.9; }
  50% { box-shadow: 0 0 12px 4px currentColor; opacity: 1; }
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { justify-self: center; max-width: 320px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .hero-stat .num { font-size: 1.6rem; }
}

/* ---- Section ---- */
section { padding: 5rem 0; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-head h2 { margin-bottom: 1rem; }
.section-head p { font-size: 1.05rem; }

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-light), rgba(129, 215, 66, 0.15));
  display: grid;
  place-items: center;
  color: var(--primary);
  margin-bottom: 1.25rem;
  transition: all var(--transition);
}
.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---- Course cards ---- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.course-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.course-media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light), var(--primary) 50%, var(--primary-dark));
}

.course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.course-card:hover .course-media img { transform: scale(1.08); }

.course-level {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--primary-dark);
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.course-level.beginner { color: var(--accent-dark); }
.course-level.intermediate { color: var(--primary); }
.course-level.advanced { color: var(--danger); }

.course-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-category {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.course-body h3 a { color: var(--text); }
.course-body h3 a:hover { color: var(--primary); }

.course-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 1rem 0;
}

.course-price .current {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.course-price .original {
  text-decoration: line-through;
  color: var(--text-light);
  font-size: 0.95rem;
}

.course-price .discount {
  background: var(--accent);
  color: #fff;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-left: auto;
}

.course-actions { display: flex; gap: 0.5rem; }
.course-actions .btn { flex: 1; }

.course-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #f5a623;
  font-size: 0.9rem;
}

/* ---- About split ---- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) { .about-split { grid-template-columns: 1fr; } }

.about-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark));
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 8, 59, 0.6) 100%);
}

.about-badge {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  z-index: 2;
}

.about-badge .num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.about-badge .label {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.about-text ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about-text ul li {
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
}

.about-text ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---- Testimonials ---- */
.testimonials {
  background: var(--bg-soft);
}

.testimonial {
  background: var(--bg);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  margin: 1rem;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 25px;
  font-size: 7rem;
  font-family: Georgia, serif;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
}

.testimonial p {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-user .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-heading);
  overflow: hidden;
}

.testimonial-user img { width: 100%; height: 100%; object-fit: cover; }

.testimonial-user .info h4 {
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.testimonial-user .info span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(129, 215, 66, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: pixelShift 40s linear infinite;
}

.cta-band .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) { .cta-band .container { grid-template-columns: 1fr; text-align: center; } }

.cta-band h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

.cta-band .actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 768px) { .cta-band .actions { justify-content: center; } }

/* ---- Blog cards ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.blog-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}

.blog-card:hover .blog-media img { transform: scale(1.1); }

.blog-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }

.blog-card h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 0.75rem; }
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--primary); }

.blog-card .excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap var(--transition);
}
.read-more:hover { gap: 0.75rem; }

/* ---- Forms ---- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.form-field label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.form-field label .req { color: var(--danger); }

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.95rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: all var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(23, 92, 255, 0.1);
}

.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
  border-color: var(--danger);
}

.form-field .error-msg {
  font-size: 0.8rem;
  color: var(--danger);
  display: none;
  margin-top: 0.1rem;
}
.form-field.invalid .error-msg { display: block; }

.form-field textarea { resize: vertical; min-height: 130px; }

.form-check {
  display: flex;
  align-items: start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-check input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.form .btn { align-self: start; }

/* ---- Contact split ---- */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

@media (max-width: 900px) { .contact-split { grid-template-columns: 1fr; } }

.contact-info {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark));
  color: #fff;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.contact-info::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 25px 25px;
}

.contact-info h3 { color: #fff; margin-bottom: 1rem; position: relative; z-index: 2; }
.contact-info p { color: rgba(255,255,255,0.85); position: relative; z-index: 2; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.contact-list .icon {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  backdrop-filter: blur(10px);
}

.contact-list .text {
  display: flex;
  flex-direction: column;
}
.contact-list .text strong { font-weight: 600; color: #fff; }
.contact-list .text a,
.contact-list .text span {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  margin-top: 0.1rem;
}
.contact-list .text a:hover { color: #fff; }

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.social-row a {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  backdrop-filter: blur(10px);
  transition: all var(--transition);
}
.social-row a:hover { background: var(--accent); transform: translateY(-3px); color: #fff; }

/* ---- Footer ---- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 1.5rem;
}

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

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand h4 { color: #fff; margin-bottom: 1rem; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.95rem; }

.footer-brand .logo { color: #fff; margin-bottom: 1rem; }

.footer-col h5 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-col ul a:hover { color: var(--accent); padding-left: 4px; }

.newsletter {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  background: rgba(255,255,255,0.08);
  padding: 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.15);
}

.newsletter input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.6rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}
.newsletter input::placeholder { color: rgba(255,255,255,0.5); }

.newsletter button {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.newsletter button:hover { background: var(--accent-dark); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

.footer-bottom-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-bottom-links a { color: rgba(255,255,255,0.65); }
.footer-bottom-links a:hover { color: var(--accent); }

/* ---- Breadcrumb / Page header ---- */
.page-header {
  padding: 9rem 0 4rem;
  background: linear-gradient(135deg, #0A083B 0%, #175CFF 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 25px 25px;
}

.page-header h1 { color: #fff; position: relative; z-index: 2; margin-bottom: 0.75rem; }
.page-header p { color: rgba(255,255,255,0.85); position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: rgba(255,255,255,0.4); }
.breadcrumb .current { color: var(--accent); }

/* ---- Article typography ---- */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

@media (max-width: 900px) { .article-wrap { grid-template-columns: 1fr; } }

.article-body h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.9rem; }
.article-body h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.4rem; color: var(--primary-dark); }
.article-body p { margin-bottom: 1.25rem; font-size: 1.05rem; line-height: 1.75; }
.article-body ul, .article-body ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; color: var(--text-muted); line-height: 1.7; }
.article-body li strong { color: var(--text); }

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--primary);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.1rem;
  font-style: italic;
  position: relative;
}

.article-body blockquote::before {
  content: '"';
  font-size: 3rem;
  color: var(--primary);
  position: absolute;
  top: 0;
  left: 1rem;
  line-height: 1;
  font-family: Georgia, serif;
}

.article-body img, .article-body figure {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-body figure img { margin: 0; border-radius: 0; }
.article-body figcaption {
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-body th {
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 1rem;
  text-align: left;
  font-weight: 600;
}

.article-body td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.article-body tr:nth-child(even) td { background: var(--bg-soft); }

.article-body code {
  background: var(--bg-light);
  color: var(--primary-dark);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.article-body pre {
  background: var(--primary-dark);
  color: #e8ecf7;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-body pre code { background: none; color: inherit; padding: 0; }

.article-body .info-box {
  background: linear-gradient(135deg, rgba(23, 92, 255, 0.05), rgba(129, 215, 66, 0.05));
  border: 1px solid var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.article-body .info-box strong { color: var(--primary); display: block; margin-bottom: 0.4rem; }

.article-head {
  margin-bottom: 2rem;
}

.article-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }

.article-head .meta {
  display: flex;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.article-head .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-cover {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  overflow: hidden;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.toc-card,
.related-card,
.author-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.toc-card h4,
.related-card h4,
.author-card h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.toc-card ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toc-card ol a {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.toc-card ol a:hover,
.toc-card ol a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--bg-soft);
  padding-left: 1.2rem;
}

.author-card {
  display: flex;
  gap: 1rem;
  align-items: start;
}
.author-card .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.author-card h5 { font-size: 1rem; margin-bottom: 0.2rem; }
.author-card p { font-size: 0.85rem; margin: 0; }

.related-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.related-card li { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
.related-card li:last-child { border-bottom: none; padding-bottom: 0; }
.related-card a { color: var(--text); font-size: 0.9rem; font-weight: 500; line-height: 1.4; display: block; }
.related-card a:hover { color: var(--primary); }

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.tag-chip {
  background: var(--bg-light);
  color: var(--text);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.tag-chip:hover { background: var(--primary); color: #fff; }

.share-row {
  display: flex;
  gap: 0.6rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
  align-items: center;
}

.share-row .label { font-weight: 600; margin-right: 0.5rem; font-size: 0.9rem; }

.share-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: all var(--transition);
}

.share-row a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* ---- Filters / tabs ---- */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--bg-light);
  border: 2px solid transparent;
  color: var(--text);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tab:hover { background: var(--primary-light); }
.filter-tab.active { background: var(--primary); color: #fff; }

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ---- FAQ accordion ---- */
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item.open {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition);
}

.faq-q:hover { color: var(--primary); }

.faq-q .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-q .icon { transform: rotate(45deg); background: var(--primary); color: #fff; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
  padding: 0 1.5rem;
}

.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

.faq-a p { margin: 0; color: var(--text-muted); line-height: 1.7; }

/* ---- Pricing / Plans ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.plan {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.plan.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-light) 0%, transparent 30%);
  transform: scale(1.03);
}

.plan .ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plan h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.plan .plan-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.plan .price {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.plan .per { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; text-align: left; }
.plan li {
  padding: 0.5rem 0 0.5rem 1.8rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.plan.featured li::before { color: var(--primary); }

/* ---- Thank you page ---- */
.ty-wrap {
  min-height: 85vh;
  display: grid;
  place-items: center;
  padding: 8rem 1.5rem 4rem;
  text-align: center;
}

.ty-card {
  max-width: 620px;
  background: var(--bg);
  padding: 3rem 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.ty-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, #a3e063 100%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  position: relative;
  animation: successPop 0.8s cubic-bezier(0.17, 0.67, 0.45, 1.3);
}

.ty-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  opacity: 0;
  animation: ring 2s ease-out infinite;
}
.ty-icon::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: ring 2s ease-out 0.4s infinite;
}

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes ring {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ty-card h1 { font-size: 2.3rem; margin-bottom: 1rem; }

/* ---- 404 ---- */
.e404 {
  min-height: 85vh;
  display: grid;
  place-items: center;
  padding: 8rem 1.5rem 4rem;
  text-align: center;
}

.e404 .big {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 20vw, 12rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0%, 90%, 100% { text-shadow: none; }
  92% { text-shadow: -3px 0 var(--danger), 3px 0 var(--primary); }
  94% { text-shadow: 3px 0 var(--danger), -3px 0 var(--primary); }
}

/* ---- Back to top ---- */
.back-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all var(--transition);
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-top:hover { background: var(--primary-dark); transform: translateY(-4px); }

/* ---- Cookie bar ---- */
.cookie-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 520px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.5rem;
  z-index: 999;
  border: 1px solid var(--border);
  display: none;
  animation: slideUp 0.5s cubic-bezier(0.17, 0.67, 0.45, 1.3);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-bar.show { display: block; }

.cookie-bar p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.cookie-bar .actions {
  display: flex;
  gap: 0.5rem;
}

/* ---- Toast notification ---- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: var(--primary-dark);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.17, 0.67, 0.45, 1.3);
  font-weight: 500;
  max-width: 90vw;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--accent-dark); }
.toast.error { background: var(--danger); }

/* ---- Loader ---- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: grid;
  place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 60px;
  height: 60px;
}

.loader-grid div {
  background: var(--primary);
  border-radius: 2px;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader-grid div:nth-child(1) { animation-delay: 0s; }
.loader-grid div:nth-child(2) { animation-delay: 0.1s; }
.loader-grid div:nth-child(3) { animation-delay: 0.2s; }
.loader-grid div:nth-child(4) { animation-delay: 0.1s; }
.loader-grid div:nth-child(5) { animation-delay: 0.2s; background: var(--accent); }
.loader-grid div:nth-child(6) { animation-delay: 0.3s; }
.loader-grid div:nth-child(7) { animation-delay: 0.2s; }
.loader-grid div:nth-child(8) { animation-delay: 0.3s; }
.loader-grid div:nth-child(9) { animation-delay: 0.4s; }

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

/* ---- Scroll-reveal (fallback if AOS off) ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---- Policy page typography ---- */
.policy-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.policy-wrap h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.6rem; color: var(--primary-dark); }
.policy-wrap h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; font-size: 1.2rem; }
.policy-wrap p { margin-bottom: 1rem; font-size: 1rem; line-height: 1.7; }
.policy-wrap ul, .policy-wrap ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.policy-wrap li { margin-bottom: 0.5rem; color: var(--text-muted); line-height: 1.6; }
.policy-wrap .last-updated {
  background: var(--bg-soft);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-0 { padding: 0; }
.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;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in { animation: fadeIn 0.8s ease; }
.slide-left { animation: slideInLeft 0.8s ease; }
.slide-right { animation: slideInRight 0.8s ease; }

/* ---- Print ---- */
@media print {
  .site-header, .site-footer, .back-top, .cookie-bar, .cta-band { display: none; }
  body { color: #000; background: #fff; }
}
