/* GLOBAL */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;   /* <- prevents left-right scrolling */
}

body {
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #FFFDF0;
  color: #333333;
}

.page-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px 80px;
}

/* Typography */
h1, h2, h3 {
  color: #222222;
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.5;
  font-size: 15px;
}

.section {
  margin-top: 90px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
}

.section-kicker {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.center {
  text-align: center;
}

/* Buttons */
.btn-primary {
  background: #FFD85A;
  color: #333333;
  border-radius: 9999px;
  padding: 10px 24px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.1s ease, background 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.03);
}

/* active visual state for Talk button */
.btn-primary.is-playing {
  background: #FFB73A;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
  position: relative;
}

.btn-primary.is-playing::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 183, 58, 0.6);
  pointer-events: none;
}

/* HERO */
.hero {
  margin-top: 0;
  margin-bottom: 40px;
}

.hero-inner {
  display: flex;
  gap: 56px;
  align-items: center;
}

/* logo (prominent, top left) */
.brand {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.brand-icon {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}

.brand-text {
  margin-left: 12px;
}

.brand-line {
  display: block;
  font-weight: 800;
  font-size: 26px;
  color: #FFA62B;
  line-height: 1.02;
}

/* hero left */
.hero-left {
  flex: 0 0 60%;
}

.hero-title {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-subtitle {
  margin-top: 10px;
  color: #444444;
  font-size: 16px;
  max-width: 460px;
}

/* CTA row: coffee girl + button */
.hero-cta-row {
  display: inline-flex;
  align-items: center;
  margin-top: 26px;
  gap: 18px;
}

.hero-character-reading {
  height: 110px;
  width: auto;
}

/* metrics */
.hero-metrics {
  display: flex;
  margin-top: 32px;
  gap: 40px;
}

.metric {
  text-align: left;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
}

.metric-label {
  font-size: 13px;
  margin-top: 4px;
}

/* footnote */
.hero-footnote {
  margin-top: 10px;
  font-size: 12px;
  color: #777777;
}

/* rating */
.hero-rating {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.rating-stars span {
  color: #FFD85A;
  font-size: 18px;
  margin-right: 2px;
}

.rating-number {
  font-size: 26px;
  font-weight: 800;
}

.rating-text {
  font-size: 13px;
}

.rating-avatars {
  display: flex;
  gap: 6px;
  margin-left: 6px;
}

.rating-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* hero right / phone */
.hero-right {
  flex: 0 0 40%;
  display: flex;
  justify-content: center;
}

.hero-phone-wrap {
  position: relative;
  width: 210px;
  padding-top: 6px;
  padding-bottom: 24px;
}

/* CSS phone with black border and dynamic island */
.hero-phone-frame {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: none;
}

.hero-phone-body {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background: #000;
  padding: 7px;
}

/* dynamic island – narrower, no shadow */
.hero-dynamic-island {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 14px;
  background: #000;
  border-radius: 18px;
  box-shadow: none;
  z-index: 3;
}

/* screen inside border */
.hero-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
}

.hero-phone-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* floating character – yoga man */
.hero-floater {
  position: absolute;
  height: auto;
}

.hero-floater-bottom {
  left: -135px;
  bottom: -26px;
  z-index: 3;
  width: 240px;
}

/* HOW IT WORKS */
.section-how {
  position: relative;
}

.section-how .section-title {
  margin-bottom: 40px;
}

/* decorative characters around how-section */
.how-deco {
  position: absolute;
  pointer-events: none;
  z-index: 2; /* ensure characters sit above GIF cards */
}

/* desktop defaults */
.how-deco-top {
  width: 230px;
  left: -40px;
  top: 60px; /* moved further up so top aligns with first GIF */
}

.how-deco-middle {
  width: 220px;
  top: 550px;      /* around vertical center of "Personalize your morning" GIF */
  right: -40px;    /* mirror spacing from the right edge similar to sitting lady on the left */
  left: auto;
  transform: none;
}

.how-deco-bottom {
  width: 230px;
  left: -40px;
  bottom: -10px;
}

/* desktop layout – two independent columns so spacing stays even */
.how-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.how-column {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.how-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* unified width for all GIFs */
.how-media {
  background: #FFF5CF;
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: inline-block;
  width: 220px;
}

.how-media-img {
  display: block;
  border-radius: 18px;
  width: 100%;
  height: auto;
}

.how-text {
  font-size: 14px;
  margin-top: 10px;
  max-width: 220px;
}

/* WHY USE IT */
.section-why .section-title {
  margin-top: 4px;
  margin-bottom: 32px;
}

/* swap styles between kicker/title only in this section */
.section-why .section-kicker {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-why .section-title {
  font-size: 20px;
  font-weight: 600;
}

.comparison-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.comparison-card {
  background: #FFF5CF;
  border-radius: 26px;
  padding: 24px 24px 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.comparison-card-left {
  border: 2px solid #FFE6C0;
}

.comparison-card-right {
  border: 2px solid #E3E3E3;
}

.comparison-card-highlight {
  border: 2px solid #FFD85A;
  background: #FFF3C9;
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.comparison-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.comparison-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.comparison-list li::before {
  display: inline-block;
  width: 18px;
  margin-right: 4px;
}

/* ✓ for Wakeup Buddy */
.comparison-list-positive li::before {
  content: "✓";
  color: #21A179;
  font-weight: 700;
}

/* ✗ for Alarm Clocks + Mobile Alarms */
.comparison-list-negative li::before {
  content: "✗";
  color: #E63C3C;
  font-weight: 700;
}

.comparison-illustration {
  margin-top: 18px;
  text-align: center;
}

.comparison-illustration img {
  max-height: 140px;
}

.comparison-mobile-img {
  max-height: 130px;
}

/* SQUAD */
.section-squad {
  display: flex;
  gap: 60px;
  align-items: center;
}

.squad-left {
  flex: 1;
}

.squad-title {
  font-size: 20px;
  margin-bottom: 6px;
}

.squad-subtitle {
  font-size: 13px;
  margin-bottom: 18px;
}

.squad-group-image img {
  max-width: 100%;
  height: auto;
}

.squad-right {
  flex: 1;
  text-align: center;
}

.squad-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.squad-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.squad-image {
  height: 150px;
  width: auto;
}

.squad-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #FFEFC1;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* fixed description height so image doesn't move */
.squad-description {
  margin-top: 16px;
  font-size: 13px;
  text-align: left;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  min-height: 120px;
}

/* TOOLS */
.section-tools {
  margin-top: 80px;
}

.tools-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.tools-left {
  flex: 1.2;
}

.tools-right {
  flex: 1;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-tile {
  border: none;
  border-radius: 16px;
  padding: 8px 6px 10px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
  color: #222222;
  opacity: 0.5;
  transition: opacity 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.tool-emoji {
  font-size: 18px;
  margin-bottom: 4px;
  color: #111111;
}

.tool-label {
  white-space: nowrap;
}

/* color coding */
.tool-calendar   { background: #FBE4D8; }
.tool-news       { background: #FFE1BF; }
.tool-journal    { background: #FFE8B7; }
.tool-hue        { background: #F6E4FF; }

.tool-motivation { background: #FBF1C7; }
.tool-meditation { background: #BCE5C3; }
.tool-reminder   { background: #D6E7FF; }
.tool-weather    { background: #CDECF4; }

.tool-email      { background: #FFE6F2; }
.tool-fitness    { background: #F3D0D0; }
.tool-alexa      { background: #D7E3FF; }
.tool-websearch  { background: #F2E2FF; }

.tool-tile.is-active {
  opacity: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.tool-description {
  margin-top: 16px;
  font-size: 13px;
  min-height: 96px;
}

.tools-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tools-copy {
  font-size: 14px;
  max-width: 260px;
}

/* STORE BUTTONS */
.section-stores {
  margin-top: 80px;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid #E0E0E0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: #333333;
}

.store-logo {
  width: 32px;
  height: auto;
}

.store-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.store-line-1 {
  font-weight: 700;
}

.store-line-2 {
  font-size: 13px;
}

.store-line-1,
.store-line-2 {
  white-space: nowrap;
}

/* FOOTER */
.section-footer {
  margin-top: 80px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.footer-illustration img {
  max-width: 210px;
  border-radius: 28px;
}

.footer-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-contact {
  text-align: left;
}

.footer-email {
  font-size: 14px;
}

.footer-email-icon {
  margin-right: 6px;
}

.footer-email a {
  font-weight: 600;
  color: #333333;
  text-decoration: none;
}

.footer-email a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 26px;
  font-size: 11px;
  color: #777777;
  text-align: center;
}

.footer-copy-main::after {
  content: " | ";
}

/* ===== MODAL (STORE INFO) ===== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 999;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #FFFDF0;
  border-radius: 24px;
  padding: 24px 28px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: #FFEFC1;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  padding-right: 44px;
}

.modal-subtitle {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Social links in store modal */
.social-links {
  margin-top: 12px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 28px; /* increased spacing between Instagram & TikTok */
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 999px;
  text-decoration: none;
}

.social-link:hover {
  background: #FFEFC1;
}

.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

/* ===== RESPONSIVE / TABLET ===== */

@media (max-width: 900px) {
  .page-container {
    padding: 16px 16px 64px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-right {
    align-self: center;
  }

  .hero-phone-wrap {
    width: 200px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-metrics {
    gap: 24px;
  }

  .hero-floater-bottom {
    left: -120px;
    bottom: -24px;
    width: 210px;
  }

  .section-squad {
    flex-direction: column;
    gap: 32px;
  }

  .tools-layout {
    flex-direction: column;
  }

  .tools-right {
    order: -1;
  }

  .comparison-three {
    grid-template-columns: 1fr;
  }

  .comparison-card-highlight {
    order: -1; /* Wakeup Buddy first on mobile */
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-contact {
    text-align: center;
  }

  /* slightly smaller how-section characters on tablet */
  .how-deco-top {
    width: 200px;
    left: -150px;
    top: 160px;
  }

  .how-deco-middle {
    width: 190px;
    right: -160px;
    top: 380px;
    left: auto;
    transform: none;
  }

  .how-deco-bottom {
    width: 200px;
    left: -170px;
    bottom: -10px;
  }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 600px) {
  .hero-title {
    font-size: 32px;
  }

  .brand-icon {
    width: 64px;
    height: 64px;
  }

  .brand-line {
    font-size: 22px;
  }

  .hero-cta-row {
    flex-direction: row;
    align-items: center;
  }

  .hero-character-reading {
    height: 90px;
  }

  .hero-phone-wrap {
    width: 170px;
  }

  .hero-floater-bottom {
    left: -110px;
    bottom: -24px;
    width: 190px;
  }

  /* metrics stay in a row, just tighter */
  .hero-metrics {
    gap: 16px;
  }

  .metric-value {
    font-size: 24px;
  }

  .metric-label {
    font-size: 12px;
  }

  /* HOW IT WORKS – mobile: single column in the correct order 1–6 */
  .how-grid {
    flex-direction: column;
    align-items: center;
  }

  /* let cards become direct flex items for ordering */
  .how-column {
    display: contents;
  }

  .how-card {
    order: 0; /* base */
  }

  /* DOM order of .how-card is: 1,3,5,2,4,6
     We remap to 1,2,3,4,5,6 via flex order */
  .how-card:nth-of-type(1) { order: 1; } /* 1: Create alarms */
  .how-card:nth-of-type(4) { order: 2; } /* 2: Edit alarm */
  .how-card:nth-of-type(2) { order: 3; } /* 3: Personality */
  .how-card:nth-of-type(5) { order: 4; } /* 4: Tools */
  .how-card:nth-of-type(3) { order: 5; } /* 5: Apple alarm */
  .how-card:nth-of-type(6) { order: 6; } /* 6: Buddy interaction */

  .how-media {
    width: 190px;
  }

  .how-text {
    max-width: 190px;
  }

  /* mobile-specific positions & sizes for how-section characters */
  .how-deco-top {
    width: 90px;
    right: -12px;   /* closer to the card, centered between edge and GIF */
    left: auto;
    top: 150px;     /* moved further up so her bottom aligns roughly with first GIF */
  }

  .how-deco-middle {
    width: 115px;
    left: -10px;        /* on the left side of "Personalize your morning" GIF */
    right: auto;
    top: 1080px;        /* lower so it aligns with that GIF instead of the second one */
    transform: none;
  }

  .how-deco-bottom {
    width: 130px;
    right: -24px;
    left: auto;
    bottom: 12px;
  }

  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* store buttons: side-by-side equal width on mobile */
  .store-buttons {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .store-button {
    flex: 1 1 0;
    padding-inline: 10px;
    justify-content: center;
  }

  .section {
    margin-top: 64px;
  }

  /* footer copy line break & no separator */
  .footer-copy-main::after {
    content: "";
  }

  .footer-copy-location {
    display: block;
    margin-top: 2px;
  }
}
