/* =========================================================
   MessageFit landing page
   ========================================================= */

/* ----- Design tokens ----- */
:root {
  --bg: #faf9fb;
  --surface: #ffffff;
  --text: #030c19;
  --muted: rgba(3, 12, 25, 0.72);
  --muted-soft: rgba(3, 12, 25, 0.55);
  --accent: #0099ff;
  --accent-deep: #0d47a1;
  --dark: #030c19;
  --border: rgba(3, 12, 25, 0.09);
  --shadow-sm: 0 1px 3px rgba(3, 12, 25, 0.06);
  --shadow-md: 0 10px 30px rgba(3, 12, 25, 0.08);
  --shadow-lg: 0 30px 60px rgba(3, 12, 25, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* ----- Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
  text-decoration: none;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 251, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

/* ----- Buttons / store badges ----- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.store-badges.center {
  justify-content: center;
}
.store-badge img,
.store-badge svg {
  height: 52px;
  width: auto;
  display: block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.store-badge {
  display: inline-block;
  border-radius: 10px;
}
.store-badge:hover {
  text-decoration: none;
}
.store-badge:hover img,
.store-badge:hover svg {
  transform: translateY(-2px);
  opacity: 0.92;
}
.store-badge:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ----- Hero ----- */
.hero {
  padding-top: 72px;
  padding-bottom: 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  max-width: 15ch;
  margin-inline: auto;
}

.hero .lead {
  margin: 24px auto 0;
  max-width: 62ch;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
}

.hero .store-badges {
  margin-top: 34px;
}

/* Accent gradient text on the brand word inside the hero */
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----- Phone carousel ----- */
.carousel {
  margin-top: 56px;
  position: relative;
}

.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0 24px;
}
.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__track {
  display: flex;
  gap: 28px;
  padding-inline: max(24px, calc((100% - var(--maxw)) / 2));
  width: max-content;
  margin-inline: auto;
}

.carousel__slide {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: min(260px, 68vw);
}
.carousel__slide img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.carousel__btn {
  position: absolute;
  top: calc(50% - 12px);
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
  transition: transform 0.15s ease, background 0.15s ease;
}
.carousel__btn:hover {
  transform: translateY(-50%) scale(1.06);
}
.carousel__btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.carousel__btn svg {
  width: 22px;
  height: 22px;
}
.carousel__btn--prev {
  left: 12px;
}
.carousel__btn--next {
  right: 12px;
}

/* ----- Sections ----- */
.section {
  padding: 72px 0;
}

.section__eyebrow {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.section__title {
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  max-width: 20ch;
  margin-inline: auto;
}

.section__intro {
  text-align: center;
  color: var(--muted);
  max-width: 60ch;
  margin: 18px auto 0;
}

/* Feature card grid */
.cards {
  display: grid;
  gap: 22px;
  margin-top: 48px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--accent-deep);
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* "For you if" checklist */
.checklist {
  list-style: none;
  margin: 44px auto 0;
  padding: 0;
  max-width: 760px;
  display: grid;
  gap: 16px;
}
.checklist li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 1.02rem;
}
.checklist .check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.checklist .check svg {
  width: 15px;
  height: 15px;
}

/* Alternating section background */
.section--alt {
  background: linear-gradient(180deg, #ffffff 0%, #f4f3f7 100%);
  border-block: 1px solid var(--border);
}

/* ----- Final CTA ----- */
.cta {
  background: radial-gradient(
      120% 120% at 50% 0%,
      #0b3a86 0%,
      var(--dark) 70%
    );
  color: #fff;
  text-align: center;
  padding: 88px 0;
}
.cta h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  max-width: 16ch;
  margin-inline: auto;
}
.cta p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 60ch;
  margin: 20px auto 0;
  font-size: 1.1rem;
}
.cta .store-badges {
  margin-top: 36px;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 40px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
}
.footer-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.75);
}
.footer-links a:hover {
  color: #fff;
}
.footer-copy {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ----- Legal pages (Terms / Privacy) ----- */
.legal {
  padding: 56px 0 80px;
}
.legal .container {
  max-width: 820px;
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
}
.legal .effective {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 1rem;
}
.legal .intro {
  margin-top: 28px;
}
.legal h2 {
  font-size: clamp(1.3rem, 3vw, 1.55rem);
  margin-top: 48px;
  padding-top: 8px;
}
.legal h3 {
  font-size: 1.14rem;
  margin-top: 30px;
  color: var(--accent-deep);
}
.legal p {
  color: var(--muted);
  margin: 16px 0;
}
.legal ul {
  color: var(--muted);
  margin: 16px 0;
  padding-left: 1.35em;
}
.legal li {
  margin: 9px 0;
}
.legal strong {
  color: var(--text);
  font-weight: 600;
}
.legal a {
  color: var(--accent-deep);
  text-decoration: underline;
}
.legal .contact-email {
  font-weight: 600;
  font-size: 1.05rem;
}

/* ----- Motion preferences ----- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* On narrow screens the header keeps just the brand; the hero shows the
   download badges prominently, so the header pair would only crowd things. */
@media (max-width: 768px) {
  .site-header .store-badges {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }
  .section {
    padding: 56px 0;
  }
  .carousel__btn {
    display: none;
  }
  .store-badge img,
  .store-badge svg {
    height: 48px;
  }
}
