@import url("base.css");

.home {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 0;
  line-height: 1.45;
}

/* Top nav */

.lets-talk {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(13, 13, 15, 0.18);
}

.lets-talk:hover {
  background: var(--red);
  text-decoration: none;
}

.lets-talk-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Hero */

.hero {
  width: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 164px 24px;
}

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 32px;
}

.hero-logo {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
}

.coming-soon-sticker {
  position: absolute;
  top: -12px;
  right: -36px;
  width: 84px;
  height: 84px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-body {
  max-width: 680px;
  font-size: 1.05rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.store-badges {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.store-badges a {
  display: inline-block;
  transition: transform 0.2s ease;
}

.store-badges a:hover {
  transform: translateY(-4px);
}

.store-badges img {
  height: 44px;
  width: auto;
  display: block;
}

/* Newsletter */

.newsletter {
  width: 100%;
  max-width: 480px;
  margin: 32px auto 0;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--red);
}

.newsletter-submit {
  flex-shrink: 0;
  padding: 14px 24px;
  background: var(--red);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

.newsletter-submit:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
}

.newsletter-submit:disabled,
.newsletter-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-message {
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 1.2em;
}

.newsletter-message.success {
  color: #0a8a3f;
}
.newsletter-message.warning {
  color: #b8860b;
}
.newsletter-message.error {
  color: var(--red-text);
}

.newsletter-caption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  /* A sibling of .newsletter now (see index.html), not a child of its
     480px box - this can match .hero-body's own max-width and let .hero's
     flex centering handle it directly, instead of fighting the narrower
     parent (a margin-left/transform breakout hack was tried first, but
     margin-left: 50% shrinks the space width: fit-content has left to
     work with, so the two fought each other instead of cooperating). */
  max-width: 680px;
}

.hero-social {
  justify-content: center;
  margin: 16px auto 0;
}

.newsletter-submit.shake {
  animation: newsletter-shake 0.4s;
}

@keyframes newsletter-shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}

/* Features */

.features {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding: 64px 0 96px;
  border-top: 1px solid var(--line);
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 64px;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-img {
  flex: 1 1 44%;
  max-width: 400px;
  width: 100%;
  height: auto;
}

.feature-row:nth-child(2) .feature-img {
  max-width: 380px;
  position: relative;
  top: 45px;
}

.feature-row:nth-child(3) .feature-img {
  max-width: 460px;
}

.feature-text {
  flex: 1 1 56%;
  text-align: left;
}

.feature-heading {
  display: block;
}

.feature-desc {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-desc-text {
  flex: 1;
  min-width: 0;
}

.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #684cc4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-heading h2 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature-heading .accent {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--red);
  margin-bottom: 16px;
}

.feature-tagline {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.feature-body {
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* Stats */

.stats {
  padding-bottom: 64px;
}

.stats-card {
  background: var(--red);
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  gap: 24px;
}

.stat {
  flex: 1;
  text-align: left;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-number span {
  color: var(--eye);
  font-size: 1.4rem;
  font-weight: 700;
}

.stat-tagline {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.stat-label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

/* Stories showcase */

.stories-showcase {
  width: 100%;
  background: var(--eye);
  padding: 64px 24px 96px;
}

.stories-showcase-inner {
  /* 1032px, not 1080px: .stories-showcase already spends 24px+24px of
     its own on padding, and .home's identical 1080px cap is a
     border-box width (padding included), so .home's actual content
     area tops out at 1080-48=1032px. Matching that number here (instead
     of re-applying the same 1080 cap on top of padding already spent)
     is what keeps this row's edges lined up with .stats-card above. */
  max-width: 1032px;
  margin: 0 auto;
  text-align: center;
}

.stories-showcase h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.stories-showcase .subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 48px;
}

.stories-grid {
  /* A grid, not flex: 4 equal columns always fill the full row width
     (down to .stories-showcase-inner's own 1032px cap) with no leftover
     gap on wide screens, and grid's own default row-stretch gives every
     card the same height with no extra rule needed. Below 780px the
     media query further down switches this to a single column instead. */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.story-card {
  /* In the 4-column row, grid's own row-stretch already makes every
     card match the tallest one - this min-height is what keeps them
     equal below 780px too, where each card stacks into its own row
     with nothing to stretch against otherwise. */
  min-height: 160px;
  padding: 20px 16px;
  border-radius: 12px;
  text-align: left;
}

.story-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #d9d9d9;
  font-size: 24px;
  line-height: 1;
}

.story-card-text {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.story-card.white {
  background: #ffffff;
  color: var(--ink);
}

.story-card.red {
  background: var(--red);
  color: #ffffff;
}

.home footer {
  margin-bottom: 64px;
}

/* Store modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #eeeeee;
  border-radius: 24px;
  padding: 48px 36px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  display: block;
  background: #eeeeee;
  border-radius: 50%;
  object-fit: cover;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--ink);
}

.modal-body {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink-muted);
  line-height: 1.5;
}

.modal-cta {
  margin-top: 28px;
  width: 100%;
  padding: 14px 24px;
  background: var(--red);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

.modal-cta:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
}

@media (max-width: 780px) {
  .feature-row,
  .feature-row.reverse {
    flex-direction: column;
    gap: 32px;
  }
  .feature-img {
    max-width: 320px;
  }
  .feature-text {
    text-align: left;
  }
  .stats-card {
    flex-wrap: wrap;
  }
  .stat {
    flex: 1 1 40%;
  }
  .stories-grid {
    grid-template-columns: 1fr;
  }
  .story-card {
    /* justify-self: center, not margin: 0 auto - auto margins make a
       grid item shrink-to-fit its own content instead of stretching,
       which was sizing each card to its own text length (so "Free vinyl
       records..." rendered wider than "Road blocked..."). width: 100%
       plus justify-self keeps every card the same width, capped at
       320px and centered in the column. */
    width: 100%;
    max-width: 320px;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .home {
    padding: 0 20px 0;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .hero {
    padding: 56px 20px 82px;
  }
  .hero-logo-wrap {
    margin-top: 60px;
  }
  .hero-logo {
    margin-top: 40px;
  }
  .coming-soon-sticker {
    top: -30px;
    right: 0;
  }
  .features {
    gap: 64px;
    padding: 48px 0 64px;
  }
  .lets-talk {
    top: 14px;
    right: 14px;
    padding: 8px 14px;
    font-size: 0.78rem;
  }
  .newsletter-form {
    flex-direction: column;
  }
}
