/* ============================================================
   Rootling landing page (getrootling.com). Loaded after site.css.
   Implements "Rootling Landing Page" (desktop/tablet) and
   "Rootling Landing Page - Mobile" from rootling-designs.zip.

   Styles are written for tablet/desktop first. Each section's
   phone overrides sit right below it, inside
   @media (max-width: 639px). Other breakpoints:
     1000px — hero goes two-column
     1100px — promise strip goes 4-across
   ============================================================ */

/* ---------- Store buttons (Google Play / App Store) ---------- */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 14px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  text-align: left;
}

.store-btn .icon {
  font-size: 28px;
}

.store-btn--dark {
  background: var(--color-ink);
  color: var(--color-warmwhite);
}

.store-btn--light {
  background: var(--color-warmwhite);
  color: var(--color-ink);
}

.store-btn--dark:hover {
  color: var(--color-warmwhite);
}

.store-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.store-btn__eyebrow {
  font-size: 12px;
  opacity: 0.85;
}

.store-btn__name {
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 19px;
}

/* Set by landing.js when a store link is still empty */
.store-btn.is-coming-soon {
  cursor: default;
  opacity: 0.7;
}

@media (max-width: 639px) {
  .store-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .store-btn {
    justify-content: center;
    min-height: 60px;
    padding-block: 10px;
  }
  .store-btn .icon {
    font-size: 26px;
  }
  .store-btn__eyebrow {
    font-size: 11px;
  }
  .store-btn__name {
    font-size: 18px;
  }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-areas:
    "text"
    "actions"
    "art";
  gap: 28px;
  padding-top: clamp(16px, 3vw, 40px);
  padding-bottom: clamp(64px, 9vw, 96px);
}

.hero__text {
  grid-area: text;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__actions {
  grid-area: actions;
}

.hero__art {
  grid-area: art;
  position: relative;
  margin-top: 8px;
  padding: 0 0 clamp(36px, 5vw, 60px) clamp(28px, 5vw, 60px);
}

.hero h1 {
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero__lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  max-width: 34ch;
}

.hero__sun {
  position: absolute;
  right: -60px;
  top: -40px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: var(--color-sun-100);
}

.hero__illustration {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
}

.hero__phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36%;
  max-width: 210px;
  padding: 7px;
  border-radius: 34px;
  background: var(--color-warmwhite);
  box-shadow: var(--shadow-lg);
  transform: rotate(-5deg);
}

.hero__phone img {
  border-radius: 28px;
}

.hero__badge {
  position: absolute;
  right: -8px;
  bottom: 18px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 6px solid var(--color-warmwhite);
  box-shadow: var(--shadow-md);
  transform: rotate(8deg);
}

@media (min-width: 1000px) {
  /* Text + buttons on the left, vertically centred against the artwork */
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".       art"
      "text    art"
      "actions art"
      ".       art";
    column-gap: clamp(36px, 5vw, 56px);
    align-items: center;
  }
  .hero__art {
    margin-top: 0;
  }
}

@media (max-width: 639px) {
  /* Phone order: text, artwork, then full-width store buttons */
  .hero {
    grid-template-areas:
      "text"
      "art"
      "actions";
    gap: 20px;
    padding: 26px 20px 40px;
  }
  .hero__text {
    gap: 20px;
  }
  .chips {
    gap: 8px;
  }
  .chip {
    padding: 6px 12px;
    font-size: 13px;
  }
  .hero h1 {
    font-size: 44px;
    letter-spacing: 0;
  }
  .hero__lede {
    font-size: 18px;
    line-height: 1.5;
    max-width: none;
  }
  .hero__art {
    margin: 12px 0 26px;
    padding: 0;
  }
  .hero__sun,
  .hero__badge {
    display: none;
  }
  .hero__illustration {
    border-radius: 28px;
    transform: none;
  }
  .hero__phone {
    left: auto;
    right: 14px;
    bottom: -34px;
    width: 110px;
    padding: 5px;
    border-radius: 22px;
    transform: rotate(5deg);
  }
  .hero__phone img {
    border-radius: 18px;
  }
}

/* ---------- Promise strip ---------- */
.promises {
  background: var(--color-warmwhite);
  border-block: 1px solid var(--color-sand-100);
}

.promises__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-block: 0;
  padding-block: 30px;
  list-style: none;
}

.promise {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 18px;
}

.promise__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 24px;
}

@media (min-width: 1100px) {
  .promises__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  /* Phone: a 2×2 grid of small cards on the page background */
  .promises {
    background: none;
    border: 0;
  }
  .promises__list {
    gap: 12px;
    padding: 0 20px 56px;
  }
  .promise {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border-radius: 20px;
    background: var(--color-warmwhite);
    box-shadow: var(--shadow-sm);
    font-size: 16px;
    line-height: 1.25;
  }
  .promise__icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 21px;
  }
}

/* ---------- What's inside ---------- */
.inside {
  padding-top: var(--section-y);
  padding-bottom: 40px;
}

.inside__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 56px;
}

.inside__header .section-title {
  max-width: 14ch;
}

.inside__header p {
  font-size: 19px;
  line-height: 1.6;
  max-width: 44ch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-warmwhite);
  box-shadow: var(--shadow-md);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 30px 34px;
}

.card__eyebrow {
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card h3 {
  font-size: 28px;
  line-height: 1.15;
}

.card p {
  font-size: 17px;
  line-height: 1.6;
}

.text-sky {
  color: var(--ink-sky);
}
.text-mint {
  color: var(--ink-mint);
}
.text-coral {
  color: var(--ink-coral);
}

.carousel-dots {
  display: none;
}

@media (max-width: 639px) {
  /* Phone: cards become a swipeable row with position dots */
  .inside {
    padding: 0 0 56px;
  }
  .inside__header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0;
    padding: 0 20px 20px;
  }
  .inside__header .section-title {
    max-width: none;
  }
  .inside__header p {
    font-size: 16px;
    line-height: 1.55;
  }
  .cards {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    padding: 4px 20px 18px;
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar {
    display: none;
  }
  .card {
    flex: 0 0 82%;
    scroll-snap-align: start;
    border-radius: 26px;
  }
  .card__body {
    gap: 8px;
    padding: 18px 20px 22px;
  }
  .card__eyebrow {
    font-size: 12px;
  }
  .card h3 {
    font-size: 23px;
  }
  .card p {
    font-size: 15px;
    line-height: 1.55;
  }
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
  }
  .carousel-dots span {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-sand-300);
    transition:
      width 180ms ease,
      background 180ms ease;
  }
  .carousel-dots span.is-active {
    width: 22px;
    background: var(--color-sky-500);
  }
}

/* ---------- Learning areas ---------- */
.areas {
  padding-top: 40px;
  padding-bottom: var(--section-y);
}

.areas__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--color-sun-100);
}

.areas__intro {
  flex: 1 1 min(100%, 320px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.areas__intro h2 {
  font-size: 32px;
  line-height: 1.1;
}

.areas__intro p {
  font-size: 17px;
  line-height: 1.55;
  max-width: 42ch;
}

.areas__list {
  flex: 1 1 min(100%, 460px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.area-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  background: var(--color-warmwhite);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 17px;
}

.area-pill .icon {
  font-size: 22px;
}

@media (max-width: 639px) {
  .areas {
    padding: 0 20px 56px;
  }
  .areas__panel {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 24px 20px;
    border-radius: 26px;
  }
  .areas__intro {
    flex: none;
    gap: 14px;
  }
  .areas__intro h2 {
    font-size: 26px;
  }
  .areas__intro p {
    font-size: 15px;
  }
  .areas__list {
    flex: none;
    gap: 8px;
  }
  .area-pill {
    gap: 8px;
    padding: 9px 14px;
    box-shadow: none;
    font-size: 14px;
  }
  .area-pill .icon {
    font-size: 18px;
  }
}

/* ---------- How it works ---------- */
.how {
  background: var(--color-mint-100);
}

.how__inner {
  padding-block: var(--section-y);
}

.how .section-title {
  margin-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.step__shot {
  width: min(220px, 80%);
  padding: 7px;
  border-radius: 34px;
  background: var(--color-warmwhite);
  box-shadow: var(--shadow-lg);
}

.step__shot img {
  border-radius: 28px;
}

.step:nth-child(1) .step__shot {
  transform: rotate(-3deg);
}
.step:nth-child(2) .step__shot {
  transform: rotate(2deg);
}
.step:nth-child(3) .step__shot {
  transform: rotate(-2deg);
}

.step__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-warmwhite);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}

.step h3 {
  font-size: 26px;
  line-height: 1.15;
}

.step p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 30ch;
}

@media (max-width: 639px) {
  /* Phone: compact list — number | text | small screenshot */
  .how__inner {
    padding: 48px 20px 52px;
  }
  .how .section-title {
    margin-bottom: 28px;
    text-align: left;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 96px;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "num title shot"
      "num body  shot";
    gap: 6px 14px;
    align-items: start;
    text-align: left;
  }
  .step__num {
    grid-area: num;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  .step h3 {
    grid-area: title;
    font-size: 21px;
  }
  .step p {
    grid-area: body;
    font-size: 15px;
    line-height: 1.5;
    max-width: none;
  }
  .step__shot {
    grid-area: shot;
    width: 100%;
    padding: 4px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
  }
  .step__shot img {
    border-radius: 12px;
  }
  .step:nth-child(odd) .step__shot {
    transform: rotate(3deg);
  }
  .step:nth-child(even) .step__shot {
    transform: rotate(-3deg);
  }
}

/* ---------- For families ---------- */
.families {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(40px, 6vw, 64px);
  padding-block: var(--section-y);
}

.families__art,
.families__text {
  flex: 1 1 min(100%, 420px);
  min-width: 0;
}

.families__art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}

.families__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.families__text > p {
  font-size: 19px;
  line-height: 1.6;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 17px;
  line-height: 1.55;
}

.checklist .icon {
  font-size: 26px;
  color: var(--ink-mint);
}

.text-link {
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 18px;
}

@media (max-width: 639px) {
  .families {
    gap: 20px;
    padding: 52px 20px;
  }
  .families__art img {
    border-radius: 26px;
    transform: none;
  }
  .families__text {
    gap: 20px;
  }
  .families__text > p {
    font-size: 16px;
  }
  .checklist {
    gap: 12px;
  }
  .checklist li {
    gap: 12px;
    font-size: 15px;
    line-height: 1.5;
  }
  .checklist .icon {
    font-size: 22px;
  }
  .text-link {
    font-size: 16px;
  }
}

/* ---------- Download call-to-action ---------- */
.cta {
  padding-bottom: 100px;
}

.cta__panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: clamp(56px, 8vw, 80px) clamp(24px, 4vw, 40px);
  border-radius: 40px;
  background: var(--color-sky-100);
  text-align: center;
}

/* Everything sits above the two decorative bubbles */
.cta__panel > * {
  position: relative;
}

.cta__panel > .cta__bubble {
  position: absolute;
  border-radius: 50%;
  background: var(--color-sky-50);
}

.cta__bubble--left {
  left: -120px;
  bottom: -160px;
  width: 380px;
  height: 380px;
}

.cta__bubble--right {
  right: -90px;
  top: -120px;
  width: 300px;
  height: 300px;
}

.cta__icon {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 6px solid var(--color-warmwhite);
  box-shadow: var(--shadow-md);
}

.cta h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05;
  max-width: 18ch;
}

.cta p {
  font-size: 19px;
  line-height: 1.55;
  max-width: 44ch;
}

.cta .store-buttons {
  justify-content: center;
}

@media (max-width: 639px) {
  .cta {
    padding: 0 20px 40px;
  }
  .cta__panel {
    gap: 16px;
    padding: 36px 22px;
    border-radius: 30px;
  }
  .cta__bubble,
  .cta .store-buttons {
    display: none; /* the sticky download bar covers this on phones */
  }
  .cta__icon {
    width: 84px;
    height: 84px;
    border-width: 5px;
  }
  .cta h2 {
    font-size: 30px;
    line-height: 1.08;
  }
  .cta p {
    font-size: 15px;
    line-height: 1.5;
  }
}

/* ---------- Sticky download bar (phones only) ---------- */
.mobile-bar {
  display: none;
}

@media (max-width: 639px) {
  .mobile-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 6;
    display: flex;
    gap: 10px;
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
    background: linear-gradient(rgba(255, 246, 233, 0), rgba(255, 246, 233, 0.96) 28%);
  }
  .mobile-bar .store-btn {
    flex: 1;
    gap: 8px;
    min-height: 54px;
    padding: 0 12px;
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 16px;
  }
  .mobile-bar .store-btn .icon {
    font-size: 22px;
  }

  /* Leave room below the footer for the sticky bar */
  .site-footer__inner {
    padding-bottom: 120px;
  }
}
