/* ============================================
   AppMaven Studio - Homepage
   Product-led, responsive presentation
   ============================================ */

.home-page {
  --home-surface: rgba(20, 29, 66, 0.72);
  --home-surface-strong: rgba(18, 27, 62, 0.94);
  --home-border: rgba(148, 163, 184, 0.18);
  --home-copy: rgba(255, 255, 255, 0.76);
}

.home-page .navbar {
  background: rgba(10, 14, 39, 0.78);
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.home-page .navbar.scrolled {
  background: rgba(10, 14, 39, 0.94);
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-24);
  isolation: isolate;
}

.home-hero::before {
  content: '';
  position: absolute;
  width: min(900px, 72vw);
  aspect-ratio: 1;
  top: -42%;
  right: -16%;
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(26, 117, 255, 0.2) 0%,
      rgba(34, 211, 238, 0.08) 36%,
      transparent 68%);
  filter: blur(10px);
  z-index: -1;
}

.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 39, 0.96) 0%, rgba(10, 14, 39, 0.76) 45%, rgba(10, 14, 39, 0.34) 100%),
    var(--pattern-grid);
  background-size: auto, 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, black 76%, transparent 100%);
  opacity: 0.7;
  z-index: -2;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  align-items: center;
  gap: clamp(var(--space-10), 7vw, var(--space-24));
  min-height: 610px;
}

.home-hero-copy {
  max-width: 690px;
  position: relative;
  z-index: 2;
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  color: var(--color-cyan-400);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

.home-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-cyan-500);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.12), var(--glow-cyan);
}

.home-hero-title {
  max-width: 680px;
  margin-bottom: var(--space-6);
  font-size: clamp(3.2rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.home-hero-title span {
  background: linear-gradient(100deg, var(--color-blue-300), var(--color-cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-subtitle {
  max-width: 610px;
  margin-bottom: var(--space-8);
  color: var(--home-copy);
  font-size: clamp(var(--text-lg), 1.6vw, var(--text-xl));
  line-height: 1.7;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.home-hero-actions .btn {
  min-height: 52px;
}

.home-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-hero-proof li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

.home-hero-proof svg {
  width: 18px;
  height: 18px;
  color: var(--color-blue-300);
  flex: 0 0 auto;
}

.home-showcase {
  position: relative;
  min-height: 600px;
  z-index: 1;
}

.home-showcase::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 78%;
  height: 18%;
  transform: translateX(-50%);
  background: rgba(0, 102, 255, 0.26);
  filter: blur(55px);
  border-radius: 50%;
}

.showcase-card {
  position: absolute;
  top: 50%;
  display: block;
  overflow: hidden;
  width: 210px;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: var(--color-bg-secondary);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.52);
  transition: border-color var(--duration-normal) var(--ease-smooth),
    box-shadow var(--duration-normal) var(--ease-smooth),
    filter var(--duration-normal) var(--ease-smooth);
}

.showcase-card:hover {
  border-color: rgba(128, 179, 255, 0.65);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.62), var(--glow-blue);
  filter: brightness(1.06);
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-card--main {
  left: 50%;
  width: 255px;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.showcase-card--left {
  left: 0;
  transform: translateY(-48%) rotate(-7deg);
  opacity: 0.88;
  z-index: 1;
}

.showcase-card--right {
  right: 0;
  transform: translateY(-48%) rotate(7deg);
  opacity: 0.88;
  z-index: 2;
}

.home-section {
  padding: var(--space-28) 0;
  position: relative;
}

.home-section--soft {
  background: linear-gradient(180deg, rgba(15, 22, 53, 0.74), rgba(15, 22, 53, 0.94));
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.home-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.home-section-heading-copy {
  max-width: 720px;
}

.home-section-heading h2,
.home-principles-copy h2,
.home-cta-panel h2 {
  margin-bottom: var(--space-4);
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  letter-spacing: -0.045em;
}

.home-section-heading p,
.home-principles-copy > p,
.home-cta-panel p {
  margin: 0;
  color: var(--home-copy);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.home-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-7);
  border: 1px solid var(--home-border);
  border-radius: var(--radius-2xl);
  background: linear-gradient(150deg, rgba(30, 44, 92, 0.76), rgba(15, 22, 53, 0.9));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  transition: transform var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.product-card::before {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  top: -105px;
  right: -95px;
  border-radius: 50%;
  background: var(--card-accent, rgba(26, 117, 255, 0.2));
  filter: blur(20px);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(128, 179, 255, 0.46);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.34);
}

.home-app-grid .product-card .app-card-link-wrapper {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.home-app-grid .product-card .app-card-icon {
  width: 68px;
  height: 68px;
  margin-bottom: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 17px;
}

.home-app-grid .product-card .app-card-title {
  font-size: clamp(var(--text-xl), 2.2vw, var(--text-3xl));
  letter-spacing: -0.035em;
}

.home-app-grid .product-card .app-card-description {
  margin-bottom: var(--space-5);
  color: var(--home-copy);
  line-height: var(--leading-relaxed);
}

.home-app-grid .product-card .app-card-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.product-card-promo {
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 160px;
  flex: 0 0 auto;
  margin-bottom: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

.product-card-promo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform var(--duration-slow) var(--ease-out);
}

.product-card:hover .product-card-promo img {
  transform: scale(1.025);
}

.home-app-grid .product-card .btn-app-store {
  display: none;
}

.home-app-grid .product-card .btn-google-play {
  min-height: 44px;
  padding: 0 var(--space-4);
  border-color: rgba(103, 232, 249, 0.24);
  background: rgba(6, 182, 212, 0.09);
  color: var(--color-cyan-400);
}

.home-app-grid .product-card .btn-google-play:hover {
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(6, 182, 212, 0.16);
  color: #baf6ff;
}

.product-card--featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  min-height: 430px;
  padding: 0;
}

.product-card--featured .product-card-visual {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.home-app-grid .product-card--featured .app-card-link-wrapper {
  grid-column: 2;
  grid-row: 1;
  padding: var(--space-8) var(--space-8) 0;
}

.home-app-grid .product-card--featured .app-card-footer {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin: 0;
  padding: 0 var(--space-8) var(--space-8);
  border-top: none;
}

.home-app-grid .product-card--featured .app-card-description {
  display: block;
  overflow: visible;
}

.product-card--featured::before {
  display: none;
}

.product-card-visual {
  position: relative;
  height: 430px;
  min-height: 0;
  overflow: hidden;
  background: var(--color-bg-secondary);
}

.product-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 39, 0.42), transparent 50%);
  pointer-events: none;
}

.product-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.product-card--featured:hover .product-card-visual img {
  transform: scale(1.025);
}

.product-card-featured-label {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background: rgba(10, 14, 39, 0.78);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  backdrop-filter: blur(var(--blur-sm));
}

.product-card h3 {
  margin: 0;
  font-size: clamp(var(--text-xl), 2.2vw, var(--text-3xl));
  letter-spacing: -0.035em;
}

.home-principles-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(var(--space-12), 8vw, var(--space-28));
  align-items: start;
}

.home-principles-copy {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
}

.home-principles-copy .btn {
  margin-top: var(--space-8);
}

.home-principle-list {
  border-top: 1px solid var(--home-border);
}

.home-principle {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: start;
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--home-border);
}

.home-principle-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(128, 179, 255, 0.22);
  border-radius: 15px;
  background: rgba(26, 117, 255, 0.1);
  color: var(--color-blue-300);
}

.home-principle-icon svg {
  width: 25px;
  height: 25px;
}

.home-principle h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
}

.home-principle p {
  margin: 0;
  color: var(--home-copy);
  line-height: var(--leading-relaxed);
}

.home-principle-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-blue-300);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

.home-cta {
  padding: var(--space-24) 0;
}

.home-cta-panel {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  padding: clamp(var(--space-8), 6vw, var(--space-16));
  border: 1px solid rgba(128, 179, 255, 0.25);
  border-radius: var(--radius-3xl);
  background:
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(26, 37, 80, 0.96), rgba(15, 22, 53, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.home-cta-panel::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  right: -120px;
  bottom: -170px;
  border: 1px solid rgba(128, 179, 255, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(128, 179, 255, 0.04), 0 0 0 68px rgba(128, 179, 255, 0.025);
}

.home-cta-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.home-cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-3);
}

@media (max-width: 1120px) {
  .home-hero-grid {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: var(--space-10);
  }

  .home-showcase {
    min-height: 540px;
  }

  .showcase-card {
    width: 180px;
  }

  .showcase-card--main {
    width: 225px;
  }

  .home-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card--featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .home-hero {
    padding-top: calc(var(--header-height) + var(--space-12));
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .home-hero-copy {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
  }

  .home-hero-title,
  .home-hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero-actions,
  .home-hero-proof {
    justify-content: center;
  }

  .home-showcase {
    width: min(560px, 100%);
    min-height: 500px;
    margin: 0 auto;
  }

  .home-principles-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .home-principles-copy {
    position: static;
    max-width: 720px;
  }

  .home-cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: calc(var(--header-height-mobile) + var(--space-6)) 0 var(--space-12);
  }

  .home-hero-grid {
    gap: var(--space-6);
  }

  .home-showcase {
    min-height: 360px;
  }

  .showcase-card {
    width: 150px;
  }

  .showcase-card--main {
    width: 190px;
  }

  .home-section {
    padding: var(--space-20) 0;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: var(--space-8);
  }

  .home-section-heading .btn {
    display: none;
  }

  .product-card--featured {
    grid-template-columns: minmax(230px, 0.82fr) minmax(0, 1.18fr);
  }

  .product-card-visual {
    height: 390px;
  }

  .home-cta {
    padding: var(--space-16) 0;
  }
}

@media (max-width: 640px) {
  .home-page .container {
    padding-right: var(--space-5);
    padding-left: var(--space-5);
  }

  .home-page .navbar-container {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  .home-hero::before {
    width: 150vw;
    top: 12%;
    right: -68%;
  }

  .home-hero-copy {
    text-align: left;
  }

  .home-eyebrow {
    margin-bottom: var(--space-5);
    font-size: 0.72rem;
  }

  .home-hero-title {
    margin-bottom: var(--space-5);
    font-size: clamp(2.55rem, 12vw, 3.35rem);
    line-height: 1.04;
  }

  .home-hero-subtitle {
    margin-bottom: var(--space-6);
    font-size: var(--text-base);
  }

  .home-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: var(--space-6);
  }

  .home-hero-actions .btn {
    width: 100%;
  }

  .home-hero-proof {
    justify-content: flex-start;
    gap: var(--space-3) var(--space-4);
  }

  .home-showcase {
    min-height: 260px;
  }

  .showcase-card {
    width: 104px;
    border-radius: 20px;
  }

  .showcase-card--main {
    width: 130px;
  }

  .showcase-card--left {
    left: 2%;
  }

  .showcase-card--right {
    right: 2%;
  }

  .home-section-heading h2,
  .home-principles-copy h2,
  .home-cta-panel h2 {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  .home-section-heading p,
  .home-principles-copy > p,
  .home-cta-panel p {
    font-size: var(--text-base);
  }

  .home-app-grid {
    grid-template-columns: 1fr;
  }

  .product-card,
  .product-card--featured {
    grid-column: auto;
    min-height: 0;
  }

  .product-card {
    padding: var(--space-6);
  }

  .product-card--featured {
    display: flex;
    padding: 0;
  }

  .product-card-visual {
    height: 300px;
  }

  .product-card-promo {
    height: 220px;
  }

  .home-principle {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }

  .home-principle-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .home-principle-link {
    grid-column: 2;
    justify-self: start;
  }

  .home-cta-panel {
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-2xl);
  }

  .home-cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .home-cta-actions .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .home-hero-actions {
    grid-template-columns: 1fr;
  }

  .showcase-card {
    width: 94px;
  }

  .showcase-card--main {
    width: 122px;
  }

  .home-showcase {
    min-height: 245px;
  }

  .navbar-logo {
    gap: var(--space-2);
    font-size: var(--text-lg);
  }
}
