/* sections/cta-footer.css · owner: cta-footer-agent
   Styles #cta (DESIGN_SPEC §14), #devices (§15) and #footer (§16).
   Motion: motion.md §8 (footer tiles, pulse, link hover) and §11 (black pill hover). */

/* =========================================================
   cta — §14
   ========================================================= */
#cta {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-bottom: var(--space-20);
  background: var(--color-bg);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
  padding: 0 var(--gutter);
  text-align: center;
}

.cta__title {
  max-width: var(--text-w-centered-h3);
  color: var(--color-text);
}

.cta__lead {
  max-width: var(--text-w-cta-lead);
  color: var(--color-text-55);
  text-wrap: balance;
}

.cta__actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: var(--space-20);
}

.cta__pill {
  height: 44px;
  padding: 12px 18px 12px 20px;
  border-radius: var(--radius-40);
  background: var(--color-btn-dark);
  color: var(--color-text-inverse);
  transition: background-color var(--t-spring);
}

.cta__pill:hover {
  background: var(--color-btn-dark-hover);
}

.cta__pill-icon {
  flex: none;
  width: 12px;
  height: 18px;
}

/* =========================================================
   devices — §15
   ========================================================= */
#devices {
  position: relative;
  width: 100%;
  height: 748px;
  overflow: hidden;
  background: var(--color-bg);
}

.devices__art {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(130%, var(--devices-inner-max));
  aspect-ratio: 2.0067;
  transform: translateX(-50%);
}

.devices__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  background: var(--grad-placeholder);
}

/* =========================================================
   footer — §16
   ========================================================= */
#footer {
  width: 100%;
  padding: var(--space-72) var(--gutter) var(--space-24);
  background: var(--color-bg-subtle);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.footer__top {
  display: flex;
  flex-direction: row;
  gap: var(--space-10);
}

.footer__brand {
  flex: none;
  width: 200px;
}

.footer__logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-12);
}

.footer__logo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-12);
}

.footer__grid {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 188px;
  gap: var(--space-32);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.footer__heading {
  color: var(--color-text);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* Link rows are 18px tall at a 34px pitch (§16), text keeps the 22.5 line-height token. */
.footer__item {
  display: flex;
  align-items: center;
  height: 18px;
}

.footer__link {
  color: var(--color-text-55);
  white-space: nowrap;
  transition: color var(--t-spring);
}

.footer__link:hover {
  color: rgba(0, 0, 0, 0.9); /* --color-text-90 (not in tokens.css) */
}

.footer__social {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-10);
  height: 36px;
  padding-top: var(--space-20);
}

.footer__social-link {
  display: block;
  width: 16px;
  height: 16px;
  color: var(--color-text);
  transition: opacity var(--t-spring);
}

.footer__social-link svg {
  display: block;
}

.footer__social-link:hover {
  opacity: 0.5;
}

/* Bottom row: note, tile, city, tile, city, tile — right-aligned. */
.footer__bottom {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-10);
  height: 100px;
  padding-top: var(--space-52);
}

.footer__note {
  color: var(--color-text-55);
  white-space: nowrap;
}

.footer__note--phone {
  display: none;
}

.footer__tile {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--color-border-control);
  border-radius: var(--radius-12);
  background: var(--grad-placeholder);
  box-shadow: var(--shadow-soft-03);
  transform: rotate(var(--footer-tile-rot, 0deg));
  transition: transform var(--t-spring);
}

.footer__tile--1 { --footer-tile-rot: 6deg; }
.footer__tile--2 { --footer-tile-rot: -6deg; }
.footer__tile--3 { --footer-tile-rot: 4deg; }

.footer__tile:hover {
  transform: rotate(0deg);
}

.footer__dot {
  position: relative;
  z-index: var(--z-raised);
  width: 13px;
  height: 13px;
  border: 1px solid var(--color-bg);
  border-radius: var(--radius-pill);
  background: var(--color-accent-dot);
  box-shadow: var(--shadow-dot);
}

.footer__pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 31px;
  height: 31px;
  margin: -15.5px 0 0 -15.5px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-dot);
  animation: footer-pulse var(--dur-pulse) linear infinite;
}

@keyframes footer-pulse {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(2); }
}

/* =========================================================
   Breakpoints (tokens.css §2.1 literals)
   ========================================================= */
@media (max-width: 1199.98px) {
  #devices { height: 500px; }
}

@media (max-width: 789.98px) {
  #devices { height: 300px; }

  .cta__lead { max-width: 100%; }

  .cta__actions { flex-direction: column; }

  .cta__pill { height: 42px; }

  .footer__top {
    flex-direction: column;
    gap: var(--space-48);
  }

  .footer__brand { width: 100%; }

  .footer__grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  /* Phone bottom row: tiles row (gap 1) then one centered note line (gap 10). */
  .footer__bottom {
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 1px;
    row-gap: var(--space-10);
    height: auto;
  }

  .footer__note--desk { display: none; }

  .footer__note--phone {
    display: block;
    flex: 0 0 100%;
    text-align: center;
  }
}

/* Reduced motion (motion.md §12): stop the pulse loop and hide the ring. */
@media (prefers-reduced-motion: reduce) {
  .footer__pulse {
    animation: none;
    opacity: 0;
  }
}

/* =========================================================
   Store badge pair (content pass): replaces the single get-app pill.
   Generic dark pills with a line icon and two-line label; no store artwork.
   ========================================================= */
.cta__store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta__store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 14px;
  border-radius: var(--radius-pill);
  background: var(--color-btn-dark);
  color: var(--color-text-inverse);
  text-decoration: none;
  transition: background-color var(--t-spring);
}

.cta__store-badge:hover { background: var(--color-btn-dark-hover); }
.cta__store-badge:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.cta__store-badge-icon { flex: none; width: 20px; height: 20px; }

.cta__store-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  white-space: nowrap;
}

.cta__store-badge-small { font-size: 10px; line-height: 12px; font-weight: var(--fw-medium); opacity: 0.75; }
.cta__store-badge-big { font-size: 15px; line-height: 18px; font-weight: var(--fw-semibold); letter-spacing: -0.01em; }

@media (max-width: 789.98px) {
  .cta__store-badge { height: 42px; padding: 0 16px 0 12px; }
}
