/* ==========================================================================
   CyberCompass - Home + Introduction section styles
   Owner: Mohamed Gamal
   Prefix: home-
   --------------------------------------------------------------------------
   Rules:
   - Uses only design tokens from css/global.css (no raw colors, fonts, or spacing).
   - Every selector is scoped with the home- prefix.
   - Only breakpoints: 1024px and 768px.
   Structure:
     1. Hero photo frame
     2. Introduction (copy + habits card)
     3. What you will find here (topic cards + project links)
     4. Responsive rules
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO PHOTO FRAME
   The frame comes from .hero-media in global.css. The photo keeps the frame
   height instead of its own ratio, so the grid does not jump while it loads
   and object-fit crops the edges rather than stretching the picture.
   -------------------------------------------------------------------------- */
.home-hero-img {
  min-height: var(--media-height);
}

/* --------------------------------------------------------------------------
   2. INTRODUCTION (copy + habits card)
   -------------------------------------------------------------------------- */
.home-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-8);
  align-items: start;
}

.home-intro-copy {
  display: grid;
  gap: var(--space-4);
}

.home-intro-text {
  max-width: var(--measure);
  margin-bottom: 0;
  color: var(--muted);
  line-height: var(--leading-normal);
}

.home-intro-note {
  padding-left: var(--space-4);
  border-left: var(--border-width-strong) solid var(--accent-line);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.home-intro-list {
  margin-top: var(--space-3);
}

/* --------------------------------------------------------------------------
   3. WHAT YOU WILL FIND HERE (topic cards + project links)
   -------------------------------------------------------------------------- */
.home-find-grid {
  margin-bottom: var(--space-6);
}

/* Cards are equal height, so the link sits on the same line in every card. */
.home-find-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-find-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.home-find-link::after {
  content: '\2192';
  font-size: var(--text-base);
  line-height: var(--leading-none);
}

.home-find-link:hover,
.home-find-link:focus-visible {
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
}

.home-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: center;
}

.home-more-text {
  max-width: var(--measure);
  margin-bottom: 0;
  font-size: var(--text-sm);
}

.home-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-more-link {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.home-more-link:hover,
.home-more-link:focus-visible {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   4. RESPONSIVE RULES - 1024px and 768px only
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .home-intro-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .home-more {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 768px) {
  .home-find-link {
    padding-top: var(--space-3);
  }

  .home-more-links {
    flex-direction: column;
    gap: var(--space-2);
  }
}
