/* Buy Me a Matcha — landing page. The app's own palette and type, so the page
   looks like the product it's selling. Deadpan: straight-faced and polished. */
:root {
  --cream: #FAF6E9;
  --matcha: #7FB03F;
  --deep: #2E4A22;
  --leaf: #C9DDA6;
  --pale: #EAF3D8;
  --pill-fg: #3F6B2B;
  --sakura: #F9C4D6;
  --ink: #8E3358;
  --muted: #6B7C5C;
  --hair: #E2DCC6;
  --on-matcha: #E4F0D0;
  --radius: 22px;
}
* { box-sizing: border-box; }
html { background: var(--cream); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--deep);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pill-fg); }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- bar ------------------------------------------------------------------ */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 14px; padding-inline: max(20px, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--deep); text-decoration: none; letter-spacing: -0.3px; }
.mark { width: 34px; height: 34px; border-radius: 7.8px; background: var(--matcha); display: grid; place-items: center; flex: none; }
.mark img { height: 23px; width: auto; }
.bar-cta { font-weight: 600; font-size: 15px; color: var(--matcha); text-decoration: none; border: 1.5px solid var(--matcha); padding: 7px 16px; border-radius: 20px; }
.bar-cta:hover { background: var(--matcha); color: #fff; }

main > section { padding-inline: max(20px, calc((100vw - 1120px) / 2)); }

/* --- hero ----------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  padding-block: 48px 72px;
}
.pill { display: inline-block; background: var(--pale); color: var(--pill-fg); font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 20px; }
h1 {
  margin: 20px 0 0; font-size: clamp(40px, 5.2vw, 70px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800;
  text-wrap: balance;
}
.thesis { margin: 18px 0 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; color: var(--matcha); letter-spacing: -0.4px; }
.lede { margin: 14px 0 0; color: var(--muted); max-width: 46ch; text-wrap: pretty; }

.signup { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.signup input[type=email], .signup select {
  flex: 1 1 240px; min-width: 0; font: inherit; color: var(--deep);
  background: #fff; border: 1.5px solid var(--hair); border-radius: 30px; padding: 15px 20px;
}
/* Own the arrow, so the select looks the same in Safari on iPhone and Chrome on Android. */
.signup select {
  -webkit-appearance: none; appearance: none; padding-right: 48px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%236B7C5C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 22px center;
}
.signup input:focus, .signup select:focus { outline: none; border-color: var(--matcha); box-shadow: 0 0 0 3px color-mix(in srgb, var(--matcha) 22%, transparent); }
.signup button {
  flex: 0 0 auto; font: inherit; font-weight: 600; color: #fff; background: var(--matcha);
  border: 0; border-radius: 30px; padding: 15px 24px; cursor: pointer;
}
.signup button:hover { background: #71a034; }
.signup button:focus-visible, .bar-cta:focus-visible { outline: 3px solid var(--deep); outline-offset: 2px; }
.signup button:disabled { cursor: default; }
.signup.done button { background: var(--deep); }
.note { flex-basis: 100%; margin: 2px 0 0 6px; font-size: 14px; color: var(--muted); }
.note.err { color: var(--ink); }

.hero-art { position: relative; min-height: 560px; }
.phone {
  background: #1c1c1e; border-radius: 38px; padding: 9px;
  box-shadow: 0 30px 60px -20px rgba(46, 74, 34, 0.35);
  aspect-ratio: 600 / 1194;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.phone-front { position: absolute; width: 58%; right: 4%; top: 0; transform: rotate(4deg); z-index: 2; }
.phone-back { position: absolute; width: 50%; left: 4%; top: 64px; transform: rotate(-6deg); opacity: 0.95; }

.petal { position: absolute; background: var(--sakura); border-radius: 50% 0 50% 50%; z-index: 3; animation: fall 14s linear infinite; }
.p1 { width: 16px; height: 16px; left: 44%; top: -10px; }
.p2 { width: 11px; height: 11px; left: 8%; top: 20%; animation-duration: 18s; animation-delay: -6s; opacity: .75; }
.p3 { width: 14px; height: 14px; right: 0; top: 40%; animation-duration: 22s; animation-delay: -11s; opacity: .6; }
@keyframes fall {
  from { transform: translateY(-40px) rotate(0deg); }
  to { transform: translateY(620px) rotate(260deg); }
}
@media (prefers-reduced-motion: reduce) { .petal { animation: none; } html { scroll-behavior: auto; } }

/* --- how ------------------------------------------------------------------ */
h2 { font-size: clamp(30px, 3.8vw, 44px); letter-spacing: -0.03em; line-height: 1.1; margin: 0; text-wrap: balance; font-weight: 800; }
.how { padding-block: 72px; border-top: 1px solid var(--hair); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.steps li { counter-increment: step; display: grid; gap: 14px; align-content: start; }
.steps .phone { width: min(230px, 100%); }
.steps h3 { margin: 10px 0 0; font-size: 22px; letter-spacing: -0.3px; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; background: var(--pale); color: var(--pill-fg); font-size: 14px; vertical-align: 3px; }
.steps p { margin: 0; color: var(--muted); max-width: 34ch; text-wrap: pretty; }

/* --- band ----------------------------------------------------------------- */
.band { background: var(--matcha); color: var(--on-matcha); padding-block: 64px; text-align: center; }
.band p { margin: 0 auto; max-width: 30ch; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.band strong { display: block; color: var(--cream); font-weight: 800; text-wrap: balance; }

/* --- new ------------------------------------------------------------------ */
.new { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; padding-block: 80px; }
.new-art .phone { width: min(260px, 100%); margin-inline: auto; transform: rotate(-3deg); }
.facts { margin: 32px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.facts dt { font-weight: 700; font-size: 19px; }
.facts dt::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--matcha); margin-right: 10px; vertical-align: 2px; }
.facts dd { margin: 6px 0 0; color: var(--muted); text-wrap: pretty; }

/* --- safe ----------------------------------------------------------------- */
.safe { padding-block: 64px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.safe ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.safe li { background: #fff; border: 1px solid var(--hair); border-radius: 16px; padding: 14px 18px; }

/* --- waitlist ------------------------------------------------------------- */
.waitlist { padding-block: 80px 96px; text-align: center; border-top: 1px solid var(--hair); }
.waitlist > p { color: var(--muted); max-width: 52ch; margin: 14px auto 0; }
.signup-full { margin: 32px auto 0; flex-direction: column; align-items: stretch; text-align: left; max-width: 440px; gap: 8px; }
.signup-full label { font-size: 14px; color: var(--muted); margin: 8px 0 0 8px; }
.signup-full input[type=email], .signup-full select { flex: none; }
.signup-full button { margin-top: 10px; }

/* --- launched: store badge + Android waitlist (hosting/launched) ------------ */
.get { margin-top: 30px; display: grid; gap: 12px; justify-items: start; }
.get .note { margin: 0 0 0 4px; }
.get .note a { color: var(--pill-fg); font-weight: 600; }
.store-badge { display: inline-block; border-radius: 10px; line-height: 0; }
.store-badge img { height: 54px; width: auto; }
.store-badge:focus-visible { outline: 3px solid var(--matcha); outline-offset: 3px; }
.store-badge-lg { margin-top: 28px; }
.store-badge-lg img { height: 64px; }
.android { margin: 64px auto 0; padding-top: 48px; border-top: 1px solid var(--hair); max-width: 520px; }
.android h3 { margin: 0; font-size: 26px; letter-spacing: -0.4px; }
.android > p { color: var(--muted); margin: 10px 0 0; }
.android .signup-full { margin-top: 22px; }

/* --- footer --------------------------------------------------------------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; justify-content: space-between;
  padding-block: 28px 40px; padding-inline: max(20px, calc((100vw - 1120px) / 2));
  border-top: 1px solid var(--hair); font-size: 15px; color: var(--muted);
}
.brand.small { font-size: 15px; }
.brand.small .mark { width: 26px; height: 26px; border-radius: 6px; }
.brand.small .mark img { height: 17px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--deep); text-decoration: underline; }

/* --- narrow ----------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-block: 28px 56px; gap: 24px; }
  /* The frames are 54% wide at 600/1194, so they're ~1.08× the column tall; size the box to
     that instead of a fixed height, or a tall empty gap opens under the phones. */
  .hero-art { min-height: 0; width: min(100%, 460px); margin-inline: auto; aspect-ratio: 1 / 1.16; }
  .phone-front { width: 54%; right: 6%; }
  .phone-back { width: 46%; left: 6%; }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .steps .phone { width: min(240px, 64%); justify-self: center; }
  .new, .safe { grid-template-columns: 1fr; gap: 32px; }
  .new-art { order: 2; }
  .facts { grid-template-columns: 1fr; }
  .bar-cta { padding: 6px 12px; font-size: 14px; }
}

/* --- phone ------------------------------------------------------------------ */
@media (max-width: 520px) {
  .signup:not(.signup-full) button { flex-basis: 100%; }
  .hero { padding-bottom: 36px; }
  .how { padding-block: 56px; }
  .new { padding-block: 56px; }
  .safe { padding-block: 56px; }
  .waitlist { padding-block: 64px 72px; }
  .android { margin-top: 48px; padding-top: 40px; }
  .brand { font-size: 17px; }
}
