/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Zeon Flow
   All reusable UI blocks. Zero inline styles needed in HTML.
═══════════════════════════════════════════════════════════════ */


/* ─── Navigation ──────────────────────────────────────────────── */
/*
 * backdrop-filter lives on nav::before — NOT on nav itself.
 * If backdrop-filter is on nav, it becomes a CSS containing block,
 * so position:fixed children inside it would position relative to
 * the nav element instead of the viewport. That breaks the overlay.
 */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  z-index: 500;
  transition: padding var(--transition), box-shadow var(--transition);
}

nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: -1;
  pointer-events: none;
}

nav.scrolled {
  padding: 0.85rem 0;
  box-shadow: var(--shadow);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* sit above nav::before blur layer */
  z-index: 1;
}

/* Logo */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 36px;
  width: auto;
  filter: var(--logo-filter);
  transition: filter 0.3s ease;
}

.logo-text {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Single base color for ALL non-button nav items */
.nav-links a:not(.btn-primary) {
  color: var(--text-muted);
  transition: color var(--transition);
}

/*
 * Pill hover via ::before pseudo-element.
 * The pseudo sits behind the text and expands the click-feel
 * WITHOUT adding padding that would shift flex spacing.
 * Gap on the flex container stays perfectly even.
 */
.nav-links a:not(.btn-primary):not(.nav-icon-link) {
  position: relative;
  z-index: 1;
}

.nav-links a:not(.btn-primary):not(.nav-icon-link)::before {
  content: '';
  position: absolute;
  inset: -0.3rem -0.65rem;
  border-radius: var(--radius-full);
  background: transparent;
  transition: background var(--transition);
  z-index: -1;
}

.nav-links a:not(.btn-primary):not(.nav-icon-link):hover {
  color: var(--text-main);
}

.nav-links a:not(.btn-primary):not(.nav-icon-link):hover::before {
  background: var(--surface-hover);
}

/* Instagram icon link */
.nav-icon-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

.nav-icon-link:hover {
  color: var(--text-main);
}

/* Instagram text label — hidden on desktop, shown in mobile overlay */
.nav-ig-label {
  display: none;
  font-weight: 500;
}

/* Subscribe button in nav */
.nav-links .btn-primary {
  padding: 0.5rem 1.375rem;
  font-size: 0.875rem;
}

/* Mobile Menu Toggle button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.menu-toggle:hover { background: var(--surface-hover); }

/* ── Mobile Styles ────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Hamburger sits at z-index 9999 — highest, always tapable */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0.82rem;
    right: 1.25rem;
    z-index: 9999;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    font-size: 1.35rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 900;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: all;
  }

  /*
   * Specificity fix: desktop rule for text links is (0,3,0).
   * We match that here so the mobile color correctly overrides it.
   * All nav items in the overlay use the same --text-main color.
   */
  .nav-links a:not(.btn-primary):not(.nav-icon-link) {
    color: var(--text-main);
  }

  /* Icon link (Instagram) also gets same color in overlay */
  .nav-links .nav-icon-link {
    color: var(--text-main);
  }

  /* No pill pseudo-element in the fullscreen overlay */
  .nav-links a:not(.btn-primary):not(.nav-icon-link)::before {
    display: none;
  }

  .nav-links .btn-primary {
    font-size: 1.05rem;
    padding: 0.85rem 2.75rem;
    margin-top: 0.5rem;
  }

  /* Show Instagram text label in the mobile overlay */
  .nav-ig-label {
    display: inline;
  }

  /* Instagram row in overlay */
  .nav-icon-link {
    gap: 0.6rem;
  }
}


/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.875rem 1.875rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  opacity: 0.88;
}

.btn-primary:active { transform: translateY(0); }

/* Secondary / ghost button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.875rem 1.875rem;
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* Small button variant */
.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.825rem;
}


/* ─── Hero Section ────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6rem;
  padding-bottom: 2rem;
  min-height: 100svh;
}

.hero-content {
  text-align: center;
  max-width: 760px;
  animation: fadeUp 0.9s ease-out both;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

/* Compact hero for inner pages */
.hero-compact {
  min-height: 36vh;
  padding-top: 7rem;
  padding-bottom: 1.5rem;
}

.hero-compact .hero-content {
  max-width: 680px;
}

.hero-compact h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}


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

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
}

.section-title {
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 2.5rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}


/* ─── YouTube Videos Grid ─────────────────────────────────────── */
.videos-section { padding-bottom: 4rem; }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .videos-grid { grid-template-columns: 1fr; }
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

/* Thumbnail */
.thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--surface-hover);
  overflow: hidden;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .thumbnail img {
  transform: scale(1.04);
}

/* Play overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.video-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.35);
}

.play-icon {
  width: 48px;
  height: 48px;
  background: #FF0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.play-icon svg {
  fill: white;
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

.video-card:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

/* Video info */
.video-info {
  padding: 1.25rem 1.375rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-main);
}

.video-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

/* Loading spinner */
.loader {
  border: 2.5px solid var(--border);
  border-top-color: var(--text-main);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.9s linear infinite;
  margin: 3rem auto;
}

/* Error / Empty state */
.grid-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  animation: fadeIn 0.5s ease;
}

.grid-empty a { color: var(--text-main); text-decoration: underline; }


/* ─── Resource / Guide Cards ──────────────────────────────────── */
.guides-section { background: var(--surface-2); }

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .guides-grid { grid-template-columns: 1fr; }
}

.guide-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.guide-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.guide-card:hover .guide-icon {
  background: var(--accent);
  color: var(--accent-fg);
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-main);
}

.guide-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.guide-arrow {
  margin-top: auto;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.guide-card:hover .guide-arrow {
  transform: translateX(4px);
  color: var(--text-main);
}


/* ─── Downloads / Resource Items ──────────────────────────────── */
.downloads-section {
  padding-bottom: 6rem;
  min-height: 40vh;
}

.downloads-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.download-item {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

@media (min-width: 640px) {
  .download-item {
    flex-direction: row;
    align-items: flex-start;
    padding: 1.75rem 2rem;
    gap: 1.75rem;
  }
}

.download-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

/* Video Thumbnail Box */
.download-item-thumb {
  flex-shrink: 0;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  display: block;
}

@media (min-width: 640px) {
  .download-item-thumb {
    width: 220px; /* Small desktop video box */
  }
}

.download-item-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.download-item:hover .download-item-thumb img,
.download-item-thumb:hover img {
  transform: scale(1.04);
}

.download-item:hover .play-overlay,
.download-item-thumb:hover .play-overlay {
  background: rgba(0, 0, 0, 0.35);
}

.download-item:hover .play-icon,
.download-item-thumb:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

/* Content Area */
.download-item-content {
  flex-grow: 1;
}

.download-item-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.download-item-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Center/back button container */
.back-row {
  display: flex;
  justify-content: center;
  padding-top: 2.5rem;
}


/* ─── Footer ──────────────────────────────────────────────────── */
.footer-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.newsletter-box {
  max-width: 480px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.newsletter-box h2 { margin-bottom: 0.75rem; }

.newsletter-box p {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 0;
}

/* Email form */
.input-group {
  display: flex;
  margin-top: 1.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.input-group:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
  border-color: var(--text-main);
}

.input-group input {
  flex-grow: 1;
  padding: 0.875rem 1.375rem;
  border: none;
  background: var(--bg-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}

.input-group input::placeholder { color: var(--text-muted); }

.input-group button {
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
}

.input-group button:hover { opacity: 0.85; }

@media (max-width: 500px) {
  .input-group {
    flex-direction: column;
    border-radius: var(--radius);
  }
  .input-group input,
  .input-group button {
    width: 100%;
    border-radius: 0;
  }
  .input-group button {
    padding: 1rem;
    border-top: 1px solid var(--border);
  }
}

/* Footer bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  color: var(--text-muted);
  font-size: 0.825rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
}

.footer-social a:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Slim footer for sub-pages */
.footer-slim {
  padding: 2rem 0;
}

.footer-slim .footer-bottom {
  justify-content: center;
  border-top: none;
  padding-top: 0;
}


/* ─── Page-transition Skeleton ────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-hover) 25%,
    var(--border) 50%,
    var(--surface-hover) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
