:root {
  --orange: #F47348;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --font: "JetBrains Mono", -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", sans-serif;
}

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

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font);
  display: flex;
  justify-content: center;
}

.frame {
  position: relative;
  width: 100%;
  max-width: 430px;
  container-type: inline-size;
}

/* ===================== MENU ===================== */
/* Sits in the orange hero top-right, vertically aligned with the logo.
   (The white strip above is iOS safe-area padding — kept clear.) */
.menu {
  position: absolute;
  top: 22cqw;
  right: 7.4%;
  z-index: 20;
}
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.menu.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu.open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-list {
  position: absolute;
  top: 28px;
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  min-width: 184px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.menu.open .menu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.menu-list a {
  display: block;
  padding: 11px 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.menu-list a:hover { background: rgba(0, 0, 0, 0.05); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  width: 100%;
}
/* Desktop-only hero pieces (shown via the >=768px media query). */
.brand-desktop,
.hero-desktop { display: none; }
/* Crop the 402x926 art to the hero region (through the phone/illustration). */
.hero-art {
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 446;
  overflow: hidden;
  container-type: inline-size;
}
.hero-bg {
  display: block;
  width: 100%;
  height: auto;
}

/* logo + headline overlaid at their Figma coordinates (% of the 545-tall crop) */
.logo {
  position: absolute;
  left: 7.4%;
  top: 18.2%;
  display: flex;
  align-items: center;
  gap: 2.2cqw;
  text-decoration: none;
  color: var(--ink);
}
.logo-icon {
  width: 8.7cqw;
  aspect-ratio: 1;
  border-radius: 22%;
  display: block;
}
.logo span {
  font-size: 5cqw;
  font-weight: 700;
  line-height: 1;
}

.headline {
  position: absolute;
  right: 4.5%;
  top: 26%;
  margin: 0;
  text-align: right;
  font-weight: 700;
  font-size: 5cqw;
  line-height: 1.5;
}

/* transparent hotspot over the App Store badge baked into the hero image */
.badge-link {
  position: absolute;
  left: 65.4%;
  top: 43.7%;
  width: 29.6%;
  transform: translateX(-6px);
}
.badge-link img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===================== FLOW ===================== */
.flow {
  padding: 4cqw 7.4% 0;
}
.flow-title {
  margin: 0 0 5cqw;
  font-weight: 700;
  font-size: 5cqw;
}
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4cqw;
}
.flow-step {
  padding-left: 4cqw;
}
.flow-step h3 {
  margin: 0;
  font-weight: 700;
  font-size: 3.9cqw;
  line-height: 1.4;
}
.flow-step p {
  margin: 1.5cqw 0 0;
  color: var(--muted);
  font-size: 3.2cqw;
  line-height: 1.6;
}

/* ===================== FOOTER ===================== */
.footer {
  margin-top: 10cqw;
  padding: 6cqw 7.4% 8cqw;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}
.footer-logo {
  font-weight: 700;
  font-size: 4.5cqw;
  display: block;
}
.footer-copyright {
  margin: 2.5cqw 0 3cqw;
  font-size: 2.8cqw;
  color: var(--muted);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 5cqw;
}
.footer-links a {
  font-size: 3cqw;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }

/* ===================== DESKTOP ===================== */
/* Mobile design is untouched; below only applies at >= 768px. */
@media (min-width: 768px) {
  .frame {
    max-width: none;
  }

  /* Swap the mobile artwork for a horizontal hero band. */
  .hero {
    background: var(--orange);
    overflow: hidden;
  }
  .hero-art { display: none; }

  /* Brand lockup, top-left of the band. */
  .brand-desktop {
    display: flex;
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 20;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
  }
  .brand-desktop img {
    width: 40px;
    height: 40px;
    border-radius: 22%;
    display: block;
  }
  .brand-desktop span { font-size: 24px; font-weight: 700; }

  /* Hamburger in the band's top-right. */
  .menu { top: 36px; right: 40px; }

  /* Horizontal hero: phone (left) · message + badge (center) · reader (right). */
  .hero-desktop {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    justify-items: center;
    column-gap: clamp(24px, 5vw, 80px);
    max-width: 1100px;
    margin: 0 auto;
    height: clamp(340px, 32vw, 440px);
    padding: 0 40px;
  }

  /* Phone bleeds off the bottom edge of the band. */
  .hd-phone {
    position: relative;
    width: clamp(180px, 17vw, 240px);
    align-self: end;
    margin-bottom: clamp(-90px, -7vw, -60px);
    justify-self: start;
  }
  .hd-phone-shot { display: block; width: 100%; }
  .hd-sticker { position: absolute; display: block; }
  .hd-guitar {
    left: 22.6%;
    top: 38.8%;
    width: 22.6%;
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 50.3 / 73.2;
  }
  .hd-cloud { left: 36.6%; top: 53%; width: 23.9%; }

  /* Center message + badge, vertically centered in the band. */
  .hd-center {
    align-self: center;
    text-align: center;
  }
  .hd-headline {
    margin: 0 0 24px;
    font-weight: 700;
    font-size: clamp(22px, 2.4vw, 32px);
    line-height: 1.5;
    color: var(--ink);
  }
  .hd-badge { display: inline-block; }
  .hd-badge img { display: block; width: clamp(150px, 14vw, 190px); height: auto; }

  /* Reader sits on the bottom edge of the band. */
  .hd-boy {
    align-self: end;
    justify-self: end;
    width: clamp(150px, 15vw, 210px);
    height: auto;
    display: block;
    transform: translateY(10px);
  }

  /* Content sits in a centered column on white. */
  .flow {
    max-width: 720px;
    margin: 0 auto;
    padding: 72px 32px 0;
  }
  .flow-title { font-size: 28px; margin-bottom: 32px; }
  .flow-steps { gap: 32px; }
  .flow-step { padding-left: 20px; }
  .flow-step h3 { font-size: 20px; }
  .flow-step p { margin-top: 8px; font-size: 15px; }

  .footer {
    max-width: 720px;
    margin: 56px auto 0;
    padding: 32px 32px 56px;
  }
  .footer-logo { font-size: 22px; }
  .footer-copyright { margin: 12px 0 16px; font-size: 13px; }
  .footer-links { gap: 28px; }
  .footer-links a { font-size: 14px; }
}
