/* ============================================================
   OMNI RESUME — HOMEPAGE RESPONSIVE LAYOUT
   Solid, tested layout from 320px → 1920px.
   Zero horizontal overflow. Touch-friendly. Production-grade.
   ============================================================ */

/* ============================================================
   1. GLOBAL SAFETY NET
   ============================================================ */

html, body {
  overflow-x: clip;
  max-width: 100%;
}

/* Prevent any child from causing horizontal scroll */
.page--home * {
  min-width: 0;
}

/* Long words never break layout */
.page--home p,
.page--home h1,
.page--home h2,
.page--home h3,
.page--home h4,
.page--home li,
.page--home a,
.page--home span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Images never overflow */
.page--home img,
.page--home svg {
  max-width: 100%;
  height: auto;
}

/* Focus visible on all interactive elements */
.page--home a:focus-visible,
.page--home button:focus-visible,
.page--home input:focus-visible,
.page--home summary:focus-visible {
  outline: 2px solid var(--c-primary-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   2. HERO — solid responsive
   ============================================================ */

.hero {
  padding-block: clamp(2.5rem, 6vw, 6rem) clamp(3rem, 8vw, 8rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(3rem, 5vw, 5rem);
  }
}

.hero__title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: clamp(1rem, 1.1vw + 0.8rem, 1.125rem);
  max-width: 60ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__cta .btn {
  flex: 1 1 200px;
  min-width: 0;
}

@media (min-width: 640px) {
  .hero__cta .btn { flex: 0 1 auto; }
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 100%;
}

@media (min-width: 480px) {
  .hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
}

.hero__stats dd {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Hero mock — hide below 1024px, scale down on tablet */
.hero__visual { display: none; }

@media (min-width: 1024px) {
  .hero__visual { display: block; }
}

.hero-mock {
  max-width: 100%;
  overflow: hidden;
}

.hero-mock__body {
  grid-template-columns: minmax(0, 100px) minmax(0, 1fr) minmax(0, 80px);
}

.hero-mock__resume {
  width: 100%;
  max-width: 220px;
}

/* ============================================================
   3. VALUE BAR
   ============================================================ */

.value-bar__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 480px) {
  .value-bar__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .value-bar__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .value-bar__inner { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
}

/* ============================================================
   4. STEPS (How it works)
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}

.step {
  padding: clamp(1.25rem, 3vw, 1.5rem);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: all var(--tr-base);
}

.step__num {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

/* ============================================================
   5. SECTION HEAD — split variant stacks on mobile
   ============================================================ */

.section__head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: end;
  max-width: none;
}

@media (min-width: 768px) {
  .section__head--split {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
  }
}

.section__head-copy {
  min-width: 0;
}

.section__head-action {
  align-self: start;
  justify-self: start;
}

@media (min-width: 768px) {
  .section__head-action {
    align-self: end;
    justify-self: end;
  }
}

.section__title {
  font-size: clamp(1.5rem, 3.5vw + 0.5rem, 2.75rem);
  line-height: 1.15;
}

.section__lead {
  font-size: clamp(0.95rem, 0.8vw + 0.75rem, 1.125rem);
}

/* ============================================================
   6. TEMPLATE STRIP
   ============================================================ */

.template-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (max-width: 480px) {
  .template-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tpl-card {
  min-width: 0;
  overflow: hidden;
}

.tpl-card__thumb {
  aspect-ratio: 8.5 / 11;
}

/* Category cloud — wraps cleanly on mobile */
.cat-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-pill {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .cat-pill {
    font-size: 0.75rem;
    padding: 0.3125rem 0.625rem;
  }
}

/* ============================================================
   7. FEATURE GRID
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.feature {
  padding: clamp(1.25rem, 3vw, 1.5rem);
  min-width: 0;
}

.feature h3 {
  font-size: clamp(1rem, 1vw + 0.75rem, 1.125rem);
}

/* ============================================================
   8. SHOWCASE
   ============================================================ */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .showcase {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.showcase__copy { min-width: 0; }
.showcase__visual { min-width: 0; }

.showcase__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.showcase__cta .btn {
  flex: 1 1 180px;
}

@media (min-width: 480px) {
  .showcase__cta .btn { flex: 0 1 auto; }
}

.showcase-mock {
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow: hidden;
}

.showcase-mock__row {
  grid-template-columns: minmax(0, 90px) minmax(0, 1fr);
  gap: clamp(0.5rem, 2vw, 1rem);
}

@media (max-width: 480px) {
  .showcase-mock__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
  .showcase-mock__label {
    font-size: 0.625rem;
    padding-top: 0;
  }
}

/* ============================================================
   9. AVATAR MARQUEE
   ============================================================ */

.avatar-marquee {
  overflow: hidden;
  margin-inline: calc(-1 * var(--sp-5));
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .avatar-marquee {
    margin-inline: calc(-1 * var(--sp-8));
    padding-inline: var(--sp-8);
  }
}

.avatar-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .avatar-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   10. VIDEO GRID
   ============================================================ */

.video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 640px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.video-card { min-width: 0; }
.video-card__thumb { aspect-ratio: 16 / 9; }

/* ============================================================
   11. EXAMPLE GRID
   ============================================================ */

.example-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

@media (min-width: 640px) {
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .example-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.example-card { min-width: 0; }

/* ============================================================
   12. BLOG GRID
   ============================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.blog-card { min-width: 0; }

/* ============================================================
   13. CAREER GRID
   ============================================================ */

.career-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 640px) {
  .career-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .career-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.career-card { min-width: 0; }

/* ============================================================
   14. PROFESSION GRID (chips)
   ============================================================ */

.prof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .prof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .prof-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .prof-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.prof-chip {
  min-width: 0;
  font-size: clamp(0.75rem, 1.2vw + 0.5rem, 0.875rem);
  padding: 0.625rem 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   15. SVG CATEGORIES
   ============================================================ */

.svg-cats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1rem);
}

@media (min-width: 640px) {
  .svg-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .svg-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.svg-cat { min-width: 0; }

.svg-cat__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

/* ============================================================
   16. ATS EXPLAINER
   ============================================================ */

.ats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .ats {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.ats__copy { min-width: 0; }
.ats__visual { min-width: 0; }

.ats-mock {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 480px) {
  .ats-mock { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

.ats-mock__col { min-width: 0; }

.ats-mock .chip {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.6875rem;
}

/* ============================================================
   17. USE CASE GRID
   ============================================================ */

.usecase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 480px) {
  .usecase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .usecase-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.usecase { min-width: 0; }

/* ============================================================
   18. FAQ
   ============================================================ */

.faq-list {
  max-width: 100%;
}

.faq-item {
  overflow: hidden;
}

.faq-item > summary {
  padding: clamp(1rem, 2.5vw, 1.25rem);
  font-size: clamp(0.9375rem, 0.8vw + 0.75rem, 1.125rem);
  gap: 1rem;
}

.faq-item__body {
  padding: 0 clamp(1rem, 2.5vw, 1.25rem) clamp(1rem, 2.5vw, 1.25rem);
}

/* ============================================================
   19. CTA BOX
   ============================================================ */

.cta-box {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: clamp(var(--r-lg), 3vw, var(--r-2xl));
}

.cta-box__inner {
  max-width: 640px;
}

.cta-box__title {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
}

.cta-box__lead {
  font-size: clamp(0.95rem, 0.8vw + 0.75rem, 1.125rem);
}

.cta-box__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-box__actions .btn {
  flex: 1 1 200px;
}

@media (min-width: 480px) {
  .cta-box__actions .btn { flex: 0 1 auto; }
}

.cta-box__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.875rem;
}

/* ============================================================
   20. FOOTER
   ============================================================ */

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

@media (min-width: 480px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) repeat(6, minmax(0, 1fr));
    gap: clamp(1.5rem, 2vw, 2rem);
  }
}

.footer-brand {
  max-width: 100%;
}

@media (min-width: 480px) and (max-width: 1023px) {
  .footer-brand { grid-column: span 2; }
}

.footer-col {
  min-width: 0;
}

.footer-col a {
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom { text-align: left; }
}

.footer-bottom__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

/* ============================================================
   21. HEADER RESPONSIVE
   ============================================================ */

.header-search-btn { display: none; }

@media (min-width: 640px) {
  .header-search-btn { display: inline-flex; }
}

.header-cta { display: none; }

@media (min-width: 640px) {
  .header-cta { display: inline-flex; }
}

/* Mobile: hide primary nav, show menu button */
.primary-nav { display: none; }

@media (min-width: 1024px) {
  .primary-nav { display: block; }
  .menu-btn { display: none; }
}

@media (max-width: 1023px) {
  .site-header__inner {
    padding-block: 0.5rem;
    gap: 0.5rem;
  }
}

/* ============================================================
   22. MOBILE NAV PANEL
   ============================================================ */

.mobile-nav__panel {
  width: min(360px, 90vw);
  max-width: 100vw;
}

.mobile-nav__body {
  overscroll-behavior: contain;
}

.mobile-nav__body a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding-block: 0.75rem;
}

/* ============================================================
   23. SEARCH OVERLAY
   ============================================================ */

.search-overlay {
  padding: 8vh 0.75rem 0.75rem;
}

@media (min-width: 640px) {
  .search-overlay { padding: 10vh 1rem 1rem; }
}

.search-overlay__panel {
  width: min(640px, 100%);
}

.search-overlay__head {
  padding: 0.75rem 0.875rem;
  gap: 0.5rem;
}

.search-overlay__head input {
  font-size: 1rem;
}

.search-overlay__body {
  max-height: 60vh;
}

/* ============================================================
   24. ANNOUNCE BAR RESPONSIVE
   ============================================================ */

.announce-bar__text {
  font-size: clamp(0.75rem, 1vw + 0.5rem, 0.875rem);
  line-height: 1.4;
}

@media (max-width: 480px) {
  .announce-bar__inner {
    padding-block: 0.5rem;
    gap: 0.5rem;
  }
}

/* ============================================================
   25. BUTTON RESPONSIVE — touch-friendly on mobile
   ============================================================ */

@media (max-width: 767px) {
  .btn--lg { height: 52px; }
  .btn--xl { height: 56px; }
  .hero__cta .btn { min-height: 52px; }
}

/* ============================================================
   26. ASPECT RATIO / IMAGE SAFETY
   ============================================================ */

.tpl-card__thumb img,
.tpl-card__thumb svg,
.video-card__thumb img,
.blog-card__thumb img,
.example-card__icon,
.career-card__icon,
.feature__icon {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   27. GRID STABILITY — prevent content blowout
   ============================================================ */

.feature,
.example-card,
.blog-card,
.video-card,
.career-card,
.step,
.avatar-cat,
.svg-cat,
.prof-chip,
.usecase,
.tpl-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Force all grid items to respect container width */
.feature-grid > *,
.example-grid > *,
.blog-grid > *,
.video-grid > *,
.career-grid > *,
.steps > *,
.avatar-cats > *,
.svg-cats > *,
.usecase-grid > *,
.template-strip > *,
.prof-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* ============================================================
   28. TYPOGRAPHY SCALING
   ============================================================ */

.hero__title,
.section__title,
.cta-box__title,
.feature h3,
.example-card h3,
.blog-card h3,
.career-card h3,
.step__title,
.video-card__title,
.prof-chip,
.tpl-card__name {
  text-wrap: balance;
}

.page--home p,
.page--home li {
  text-wrap: pretty;
}

/* ============================================================
   29. TOUCH TARGETS — mobile minimum 44px
   ============================================================ */

@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn--sm { min-height: 40px; }
  .btn--xs { min-height: 32px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .cat-pill { min-height: 36px; display: inline-flex; align-items: center; }
  .prof-chip { min-height: 44px; }
  .footer-col a { padding-block: 0.5rem; }
  .faq-item > summary { min-height: 56px; }
}

/* ============================================================
   30. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .avatar-marquee__track { animation: none; }
  .hero-mock { transform: none; }
  .hero-mock:hover { transform: none; }
}

/* ============================================================
   31. FORCED COLORS (Windows High Contrast)
   ============================================================ */

@media (forced-colors: active) {
  .btn,
  .step,
  .feature,
  .example-card,
  .blog-card,
  .video-card,
  .career-card,
  .usecase,
  .tpl-card,
  .avatar-cat,
  .svg-cat,
  .prof-chip {
    border: 1px solid ButtonText;
  }
}

/* ============================================================
   32. ULTRA-WIDE OPTIMIZATION
   ============================================================ */

@media (min-width: 1440px) {
  .container { max-width: 1320px; }
  .hero__inner { gap: 5rem; }
  .feature-grid { gap: 1.75rem; }
  .video-grid { gap: 1.75rem; }
}

@media (min-width: 1920px) {
  .container { max-width: 1440px; }
  .hero__title { font-size: clamp(3.5rem, 5vw, 5rem); }
  .section__title { font-size: clamp(2rem, 3vw, 3rem); }
}

/* ============================================================
   33. NARROW DEVICE REFINEMENTS (≤ 359px)
   ============================================================ */

@media (max-width: 359px) {
  .container { padding-inline: 1rem; }

  .hero__title { font-size: 1.75rem; line-height: 1.15; }
  .section__title { font-size: 1.375rem; }
  .cta-box__title { font-size: 1.375rem; }

  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }

  .hero__stats { gap: 0.75rem; }
  .hero__stats dd { font-size: 1.125rem; }

  .prof-grid { grid-template-columns: minmax(0, 1fr); }

  .template-strip { grid-template-columns: minmax(0, 1fr); }

  .cat-cloud { gap: 0.375rem; }
  .cat-pill { font-size: 0.6875rem; padding: 0.25rem 0.5rem; }

  .footer-col a { font-size: 0.8125rem; }
}

/* ============================================================
   34. TABLET SPECIFIC (640 – 1023)
   ============================================================ */

@media (min-width: 640px) and (max-width: 1023px) {
  .hero { padding-block: 3rem 4rem; }
  .section { padding-block: 3.5rem; }

  .hero-mock {
    transform: none;
    max-width: 640px;
    margin-inline: auto;
  }

  .showcase-mock {
    max-width: 640px;
    margin-inline: auto;
  }
}

/* ============================================================
   35. LANDSCAPE PHONE
   ============================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-block: 2rem 3rem; }
  .hero__stats { display: none; }
  .hero__trust { display: none; }
  .section { padding-block: 2.5rem; }
}

/* ============================================================
   36. CONTAINMENT — performance for offscreen sections
   ============================================================ */

@media (min-width: 1024px) {
  .section--features,
  .section--videos,
  .section--examples,
  .section--blog,
  .section--career,
  .section--professions,
  .section--svg,
  .section--usecases,
  .section--faq {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
  }
}

/* ============================================================
   37. FINAL SAFETY — never break layout
   ============================================================ */

.page--home main,
.page--home section,
.page--home .container {
  max-width: 100%;
  box-sizing: border-box;
}

.page--home * {
  box-sizing: border-box;
}