/* Homepage — compact mobile typography + scrollable rails */

.home-page {
  --mobile-base: 0.875rem;
  --mobile-sm: 0.8125rem;
  --mobile-xs: 0.75rem;
  --mobile-h1: clamp(1.15rem, 4.2vw, 1.65rem);
  --mobile-h2: clamp(1.05rem, 3.8vw, 1.45rem);
  --mobile-h3: 0.9375rem;
  --mobile-section-pad: clamp(2rem, 5.5vw, 3.75rem);
  --home-rail-gap: 0.85rem;
  --home-rail-pad: 16px;
  --hero-radius: clamp(20px, 4vw, 28px);
}

/* ===== Hero ===== */

.home-page .hero {
  position: relative;
  padding-block: clamp(5.5rem, 12vw, 7rem) clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #fafafa 62%,
    rgba(255, 221, 97, 0.08) 100%
  );
  overflow: hidden;
}

.home-page .hero .container {
  display: grid;
  gap: clamp(1.75rem, 4.5vw, 3rem);
  align-items: center;
}

.home-page .hero-content {
  max-width: 36rem;
}

.home-page .hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--raisin-black-1);
  background: rgba(255, 221, 97, 0.45);
  border-radius: 999px;
}

.home-page .hero-title {
  font-size: clamp(1.75rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
  color: var(--black);
}

.home-page .hero-title .has-before::before {
  height: 0.35em;
  bottom: 0.12em;
}

.home-page .hero-text {
  max-width: 32rem;
  margin-block: 0 1.5rem;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--slate-gray);
}

.home-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.35rem;
  margin-bottom: 1.5rem;
}

.home-page .hero-actions .btn {
  flex-shrink: 0;
}

.home-page .hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--raisin-black-1);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  transition: color var(--transition-1), transform var(--transition-1);
}

.home-page .hero-link:is(:hover, :focus-visible) {
  color: var(--majorelle-blue);
  transform: translateX(2px);
}

.home-page .hero-link ion-icon {
  display: block;
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--majorelle-blue);
}

.home-page .hero-link .span {
  display: block;
  line-height: 1.2;
}

.home-page .hero-social {
  gap: 0.65rem;
}

.home-page .hero .social-link {
  padding: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: none;
}

.home-page .hero-banner {
  position: relative;
  margin: 0;
  border-radius: var(--hero-radius);
  overflow: hidden;
  background: #efefef;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.home-page .hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 794 / 637;
}

@media (min-width: 768px) {
  .home-page .hero .container {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .home-page .hero-banner {
    margin-inline-end: 0;
  }

  .home-page .hero-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .home-page .hero-actions .btn {
    width: auto;
  }

  .home-page .hero-actions .hero-link {
    align-self: center;
  }
}

@media (min-width: 992px) {
  .home-page .hero .container {
    gap: 3rem;
  }

  .home-page .hero-banner img {
    aspect-ratio: auto;
    max-height: min(520px, 72vh);
    object-fit: contain;
    object-position: center;
  }
}

/* Services — compact pill rows (icon left, label right) */

.home-page .service .section-title {
  margin-block: 0.85rem 1.15rem;
}

.home-page .service-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-page .service-list-compact > li {
  min-width: 0;
}

.home-page .service-list-compact .service-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  height: auto;
  min-height: 0;
  padding: 0.3rem 0.7rem 0.3rem 0.3rem;
  padding-block-end: 0.3rem;
  border-radius: 999px;
  border-block-end: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.home-page .service-list-compact .service-card:is(:hover, :focus-within) {
  border-color: hsl(var(--color));
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.home-page .service-list-compact .service-card .card-icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0.2rem;
  margin: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-page
  .service-list-compact
  .service-card:is(:hover, :focus-within)
  .card-icon {
  transform: none;
}

.home-page .service-list-compact .service-card .card-icon img {
  width: 0.95rem;
  height: 0.95rem;
}

.home-page .service-list-compact .service-card .h3 {
  margin: 0;
  min-width: 0;
  flex: 1;
  line-height: 1;
}

.home-page .service-list-compact .service-card .card-title {
  font-size: 0.8125rem;
  font-weight: var(--fw-500);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.home-page .service-list-compact .link-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-align: left;
}

.home-page .service-list-compact .link-card .span {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: var(--fw-500);
  white-space: nowrap;
}

.home-page .service-list-compact .link-card ion-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .home-page .service-list-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
}

@media (min-width: 992px) {
  .home-page .service-list-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .home-page .service-list-compact .service-card .card-title,
  .home-page .service-list-compact .link-card .span {
    font-size: 0.875rem;
  }
}

.home-scroll-hint,
.scroll-hint {
  display: none;
  margin: 0.35rem 0 0.85rem;
  font-size: var(--mobile-xs, 0.75rem);
  color: var(--slate-gray);
  text-align: center;
}

@media (max-width: 767px) {
  .home-page {
    --home-rail-gap: 10px;
    --home-rail-pad: 12px;
  }

  .home-page .section {
    padding-block: var(--mobile-section-pad, 1.75rem);
  }

  .home-page .section-title {
    margin-block: 0.5rem 0.85rem;
    font-size: var(--mobile-h2, clamp(1.2rem, 4.8vw, 1.45rem));
    letter-spacing: -0.025em;
    font-weight: 700;
  }

  .home-page .section-subtitle {
    font-size: var(--mobile-sm, 0.8125rem);
    font-weight: 500;
    color: #767676;
  }

  .home-page .card-text,
  .home-page .hero-text,
  .home-page .psec-subtitle,
  .home-page .footer-text {
    font-size: var(--mobile-base, 0.9375rem);
    line-height: 1.55;
    color: #767676;
  }

  .home-page .h3,
  .home-page .card-title {
    font-size: var(--mobile-h3, 0.9375rem);
    font-weight: 600;
  }

  .home-page .btn {
    font-size: 0.9375rem;
    font-weight: 600;
    min-height: 48px;
    padding: 0.65rem 1.15rem;
  }

  /* Hero — mobile feed-style */

  .home-page .hero {
    padding-block: calc(64px + env(safe-area-inset-top)) 2rem;
    background: #ffffff;
  }

  .home-page .hero .container {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .home-page .hero-banner {
    order: -1;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  }

  .home-page .hero-banner img {
    aspect-ratio: 5 / 4;
    object-fit: cover;
  }

  .home-page .hero-badge {
    margin-bottom: 0.75rem;
    font-size: 0.625rem;
  }

  .home-page .hero-title {
    font-size: clamp(1.5rem, 6.5vw, 1.85rem);
    margin-bottom: 0.6rem;
  }

  .home-page .hero-text {
    margin-block: 0 1.15rem;
    font-size: 0.9375rem;
  }

  .home-page .hero-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.15rem;
    margin-bottom: 1.15rem;
  }

  .home-page .hero-actions .btn {
    width: auto;
    flex: 0 0 auto;
  }

  .home-page .hero-actions .hero-link {
    width: auto;
    min-height: 48px;
    align-self: center;
    justify-content: flex-start;
  }

  .home-page .hero-social {
    flex-wrap: wrap;
  }

  /* Services — 2-column compact grid */

  .home-page .service-list-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--home-rail-gap);
  }

  .home-page .service-list-compact .service-card,
  .home-page .service-list-compact .link-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.85rem;
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.06);
    height: 100%;
  }

  .home-page .service-list-compact .service-card .card-title,
  .home-page .service-list-compact .link-card .span {
    white-space: normal;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
  }

  .home-page .service-list-compact .link-card ion-icon {
    font-size: 1rem;
    transform: none;
    margin: 0;
    color: var(--majorelle-blue);
  }

  .home-page .service-list-compact .service-card .card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
  }

  /* Feature — vertical stack */

  .home-page .feature .container {
    display: block;
  }

  .home-page .feature-banner {
    max-width: 100%;
    margin: 0 0 1.15rem;
    border-radius: 24px;
    overflow: hidden;
  }

  .home-page .feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--home-rail-gap);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .home-page .feature-list > li {
    flex: unset;
  }

  .home-page .feature-card {
    padding: 1.15rem;
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.06);
  }

  /* Work — themed list (mobile only, no preview images) */

  .home-page .templates-spotlight .home-scroll-hint {
    display: none;
  }

  .home-page .templates-spotlight-grid,
  .home-page .templates-spotlight-grid.home-rail {
    display: flex !important;
    flex-direction: column;
    gap: 0.65rem;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .home-page .templates-spotlight-grid > li {
    flex: unset;
    scroll-snap-align: unset;
  }

  .home-page .templates-spotlight-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    overflow: visible;
    background: linear-gradient(
      90deg,
      hsla(var(--spotlight-theme), 0.16) 0%,
      hsla(var(--spotlight-theme), 0.06) 100%
    );
    border: 1px solid hsla(var(--spotlight-theme), 0.22);
    box-shadow: none;
    transform: none;
  }

  .home-page .templates-spotlight-card:is(:hover, :focus-visible) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px hsla(var(--spotlight-theme), 0.18);
    border-color: hsla(var(--spotlight-theme), 0.35);
  }

  .home-page .templates-spotlight-card img {
    display: none;
  }

  .home-page .spotlight-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
  }

  .home-page .templates-spotlight-name {
    display: block;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    color: hsl(var(--spotlight-theme));
  }

  .home-page .spotlight-card-tag {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: hsla(var(--spotlight-theme), 0.75);
  }

  .home-page .spotlight-card-arrow {
    display: block;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: hsl(var(--spotlight-theme));
    opacity: 0.85;
  }

  .home-page .templates-spotlight-lead {
    font-size: 0.875rem;
    margin-bottom: 1.15rem;
  }

  .home-page .templates-spotlight-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.15rem;
  }

  .home-page .templates-spotlight-actions .btn {
    width: 100%;
    max-width: none;
    justify-content: center;
  }

  /* Newsletter */

  .home-page .newsletter .container {
    display: block;
  }

  .home-page .newsletter-banner {
    max-width: min(220px, 60%);
    margin: 0 auto 1rem;
  }

  .home-page .newsletter-content .section-title {
    font-size: var(--mobile-h2, clamp(1.2rem, 4.8vw, 1.45rem));
  }

  .home-page .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .home-page .email-field {
    min-height: 48px;
    font-size: var(--mobile-base, 0.9375rem);
    border-radius: 999px;
    background: #efefef;
    border: none;
  }

  .home-page .newsletter-form .btn-secondary {
    width: 100%;
    justify-content: center;
    border-radius: 999px;
  }

  /* Blog — 2-column feed, featured spans full width */

  .home-page .blog-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--home-rail-gap);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .home-page .blog-list > li {
    flex: unset;
    scroll-snap-align: unset;
  }

  .home-page .blog-list > li:first-child {
    grid-column: 1 / -1;
  }

  .home-page .blog-card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.06);
  }

  .home-page .blog-card.large {
    padding-inline-end: 0;
    border-inline-end: 0;
  }

  .home-page .blog-card .card-banner img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .home-page .blog-card:not(.large) .card-banner img {
    aspect-ratio: 1 / 1;
  }

  .home-page .blog-card .card-content {
    padding: 0.85rem;
  }

  .home-page .blog-card .card-title {
    font-size: 0.8125rem;
    line-height: 1.35;
  }

  .home-page .blog-card .card-text {
    display: none;
  }

  .home-page .blog-card .tag,
  .home-page .blog-card .publish-date {
    font-size: 0.6875rem;
  }

  /* Pricing preview */

  .home-page .psec-pricing--preview {
    padding: var(--mobile-section-pad, 1.75rem) 0;
  }

  .home-page .psec-pricing--preview .psec-title {
    font-size: var(--mobile-h2, clamp(1.2rem, 4.8vw, 1.45rem));
  }

  .home-page .psec-pricing--preview .psec-subtitle {
    font-size: var(--mobile-sm, 0.8125rem);
  }

  .home-page .service {
    background: #ffffff;
  }

  .home-page .feature {
    background: #fafafa;
  }

  .home-page .blog {
    background: #fafafa;
  }

  .home-page .footer-top {
    padding-block: 1.5rem;
  }

  .home-page .footer-list-title,
  .home-page .footer-link {
    font-size: var(--mobile-sm, 0.8125rem);
  }

  .home-page .copyright,
  .home-page .footer-bottom-link {
    font-size: var(--mobile-xs, 0.75rem);
  }
}

@media (max-width: 575px) {
  .home-page .section-title {
    margin-block: 0.65rem 0.85rem;
  }

  .home-page .service {
    padding-block: clamp(1.25rem, 4vw, 2rem);
  }
}

@media (min-width: 768px) {
  .home-scroll-hint {
    display: none;
  }
}

/* Templates spotlight (all breakpoints) */

.home-page .spotlight-card-body {
  display: contents;
}

.home-page .spotlight-card-tag,
.home-page .spotlight-card-arrow {
  display: none;
}

.templates-spotlight-lead {
  max-width: 520px;
  margin: 0.75rem auto 1.5rem;
  color: var(--slate-gray);
}

.templates-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.templates-spotlight-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-4);
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--transition-1),
    box-shadow var(--transition-1);
}

.templates-spotlight-card:is(:hover, :focus-visible) {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.templates-spotlight-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.templates-spotlight-name {
  display: block;
  padding: 0.75rem 0.9rem;
  font-weight: var(--fw-700);
  font-size: 1.05rem;
}

.templates-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1.65rem;
}
@media (max-width: 900px) {
  .templates-spotlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .templates-spotlight-grid:not(.home-rail) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
