/* =========================================================================
   BloomBux — landing page (index.html). Mobile-first.
   Shared tokens, buttons, fields, dialogs and FAQ live in css/theme.css.
   ========================================================================= */

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { overflow-x: hidden; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--card-edge); }
.section-title { font-size: clamp(1.9rem, 5.2vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; max-width: 52ch; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-t);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-edge);
}
.header-nav { display: flex; align-items: center; gap: 1.25rem; min-height: 64px; }
.header-links { display: none; gap: 1.6rem; list-style: none; margin: 0 0 0 1.2rem; padding: 0; }
.header-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .96rem; text-decoration: none;
  transition: color .15s ease;
}
.header-links a:hover { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
@media (min-width: 720px) { .header-links { display: flex; } }
@media (max-width: 380px) {
  .header-nav { gap: .5rem; }
  .header-nav .logo-img { height: 32px; }
  .header-actions { gap: .4rem; }
  .header-actions .theme-toggle { width: 40px; height: 40px; }
  .header-actions .btn-sm { padding-inline: .95rem; }
}

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(1.8rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 4rem);
}
/* two static petals behind the content */
.hero::before, .hero::after {
  content: ''; position: absolute; z-index: 0; border-radius: 50% 0 50% 0; pointer-events: none;
}
.hero::before {
  width: min(640px, 110vw); aspect-ratio: 1; right: -14%; top: -22%;
  background: var(--pink-soft); transform: rotate(14deg);
}
.hero::after {
  width: 260px; height: 260px; left: -90px; bottom: -110px;
  background: var(--gold-soft); transform: rotate(-20deg);
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3rem; } }

.hero h1 {
  font-size: clamp(2.7rem, 10.5vw, 5.2rem);
  font-weight: 800; line-height: .98; letter-spacing: -0.04em;
  margin-bottom: 1.1rem;
}
.hero-lead { color: var(--ink-soft); font-size: clamp(1.05rem, 2.6vw, 1.2rem); max-width: 46ch; }

.hero-form {
  display: flex; flex-wrap: wrap; gap: .7rem;
  max-width: 540px; margin: 1.6rem 0 1rem;
}
.hero-form .field { flex: 1 1 230px; min-width: 0; min-height: 56px; border-radius: 999px; padding-inline: 1.3rem; }
.hero-form .btn { flex: 1 1 100%; }
@media (min-width: 560px) { .hero-form .btn { flex: 0 0 auto; } }

.hero-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--ink-soft); font-size: .92rem; font-weight: 600; }
.hero-trust li::before { content: '✓'; color: var(--green); font-weight: 800; margin-right: .4rem; }

/* one orchestrated entrance */
.hero-text > * { animation: fadeUp .6s cubic-bezier(.2, .8, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .07s; }
.hero-text > :nth-child(3) { animation-delay: .14s; }
.hero-text > :nth-child(4) { animation-delay: .21s; }

/* ---------------- phone mockup ---------------- */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  position: relative; flex: 0 0 auto; width: 276px; height: 560px;
  background: #0d0814; border-radius: 44px; padding: 9px;
  box-shadow: 0 0 0 1.5px var(--card-edge), 0 30px 70px var(--shadow-color);
  animation: fadeUp .8s cubic-bezier(.2, .8, .2, 1) .25s both;
}
.phone-notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 5;
  width: 88px; height: 20px; background: #0d0814; border-radius: 0 0 14px 14px;
}
.phone-screen {
  width: 100%; height: 100%; overflow: hidden; border-radius: 36px;
  background: var(--bg); display: flex; flex-direction: column; gap: 9px; padding: 10px 12px 14px;
}
.phone-statusbar { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; font-size: .62rem; font-weight: 700; color: var(--ink-soft); }
.phone-status-icons { display: inline-flex; align-items: center; gap: 4px; }
.phone-status-icons svg { display: block; }
.phone-profile {
  display: flex; align-items: center; gap: .55rem; margin-top: 10px;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: 26px; padding: .45rem .6rem;
}
.phone-avatar-slot {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 1.1rem;
  background: var(--btn); color: #fff;
}
.phone-avatar-slot img { width: 100%; height: 100%; object-fit: cover; }
.phone-username { font-weight: 800; font-size: .8rem; line-height: 1.2; }
.phone-sub { font-size: .62rem; color: var(--ink-soft); line-height: 1.2; }
.phone-robux {
  margin-left: auto; white-space: nowrap; font-size: .68rem; font-weight: 800;
  color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-border);
  padding: .22rem .6rem; border-radius: 999px;
}
.phone-banner { display: flex; flex-direction: column; gap: 1px; background: var(--btn); color: #fff; border-radius: 14px; padding: .55rem .8rem; }
.phone-banner-title { font-weight: 800; font-size: .84rem; }
.phone-banner-sub { font-size: .62rem; opacity: .92; }
.phone-stories { display: flex; gap: .5rem; overflow: hidden; }
.phone-story { flex: 0 0 56px; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phone-story span { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .52rem; color: var(--ink-soft); }
.phone-story-img { position: relative; overflow: hidden; width: 52px; height: 52px; border-radius: 14px; background: var(--card); border: 2px solid var(--pink); }
.phone-story-img img, .phone-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.phone-cards { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-height: 0; overflow: hidden; }
.phone-card {
  display: flex; align-items: center; gap: .55rem; min-height: 0;
  background: var(--card); border: 1px solid var(--card-edge); border-radius: 12px; padding: .5rem;
  animation: fadeUp .5s ease both;
}
.phone-card:nth-child(2) { animation-delay: .1s; }
.phone-card:nth-child(3) { animation-delay: .2s; }
.phone-card-img { position: relative; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: var(--bg-soft); }
.phone-card-img img { padding: 3px; }
.phone-card-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.phone-card-lines span { font-size: .68rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-card-lines b { font-size: .66rem; font-weight: 800; color: var(--gold-ink); }
.phone-card-lines small { font-size: .55rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-btn {
  margin-top: auto; width: 100%; padding: .8rem; border: 0; border-radius: 999px;
  background: var(--btn); color: #fff; font-weight: 800; font-size: .8rem; cursor: pointer;
  box-shadow: 0 3px 0 var(--pink-deep);
}
.skeleton {
  background: linear-gradient(100deg, var(--bg-soft) 40%, var(--card) 50%, var(--bg-soft) 60%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; color: transparent;
}

/* Phones: show only the top of the device, fading into the next section */
@media (max-width: 939px) {
  .phone-wrap { max-height: 360px; overflow: hidden; margin-top: .6rem;
    -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
}

/* ---------------- rates strip ---------------- */
.rates { background: var(--bg-soft); border-block: 1px solid var(--card-edge); }
.rates-grid { display: grid; gap: .9rem; margin-block: 0; padding-block: 1.4rem; }
.rate { display: grid; grid-template-columns: 8.8rem 1fr; align-items: baseline; gap: .8rem; }
.rate dd {
  grid-column: 1; grid-row: 1; margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1;
  white-space: nowrap;
}
.rate dd.gold { color: var(--gold-ink); }
.rate dt { grid-column: 2; grid-row: 1; color: var(--ink-soft); font-size: .9rem; line-height: 1.35; }
@media (min-width: 720px) {
  .rates-grid { grid-template-columns: repeat(3, 1fr); gap: 0; padding-block: 1.8rem; }
  .rate { grid-template-columns: 1fr; gap: .25rem; align-content: start; }
  .rate dd { grid-column: 1; grid-row: 1; font-size: 2.3rem; }
  .rate dt { grid-column: 1; grid-row: 2; }
  .rate + .rate { border-left: 1px solid var(--card-edge); padding-left: 2rem; }
}

/* ---------------- steps ---------------- */
.steps { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 1.8rem; }
.step { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 1.1rem; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #3b2600; box-shadow: 0 4px 0 #c9951a;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
}
.step h3 { margin-bottom: .3rem; font-size: 1.2rem; }
.step p { margin: 0; color: var(--ink-soft); max-width: 40ch; }
.step:not(:last-child)::after {
  content: ''; position: absolute; left: 25px; top: 62px; bottom: -1.2rem;
  border-left: 2px dashed var(--card-edge);
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.4rem; margin-top: 2.8rem; }
  .step { grid-template-columns: 1fr; gap: 1rem; }
  .step:not(:last-child)::after {
    left: 66px; right: -1.4rem; top: 25px; bottom: auto; height: 0;
    border-left: 0; border-top: 2px dashed var(--card-edge);
  }
}

/* ---------------- split layout (withdraw + FAQ) ---------------- */
.split { display: grid; gap: 1.8rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
  .split-head { position: sticky; top: 100px; }
}

.methods { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.method {
  display: grid; grid-template-columns: 54px 1fr; gap: 1rem; align-items: center;
  padding: 1rem 1.1rem; background: var(--card);
  border: 1.5px solid var(--card-edge); border-radius: 22px;
}
.method.featured { border-color: var(--pink); background: var(--pink-faint); }
.method-ico { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--bg-soft); font-size: 1.7rem; color: var(--pink-text); }
.method-ico .ico-svg { width: 28px; height: 28px; color: var(--ink); }
.method-ico .robux-icon { width: 34px; height: 34px; }
.method.featured .method-ico { background: var(--pink-soft); color: var(--pink); }
.method.featured .method-ico .ico-svg { color: var(--pink-text); }
.method h3 { margin: 0 0 .15rem; }
.method p { margin: 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.5; }

/* ---------------- CTA ---------------- */
.cta { padding-bottom: clamp(3rem, 8vw, 5rem); }
.cta-banner {
  position: relative; overflow: hidden;
  display: grid; justify-items: start; gap: 1.5rem;
  padding: clamp(2rem, 6vw, 4rem); border-radius: 30px;
  background: var(--btn); color: #fff;
}
.cta-banner::after {
  content: ''; position: absolute; right: -60px; bottom: -90px; width: 300px; height: 300px;
  background: rgba(255, 255, 255, .13); border-radius: 50% 0 50% 0; transform: rotate(14deg); pointer-events: none;
}
.cta-banner h2 { position: relative; z-index: 1; margin: 0; max-width: 15ch; font-size: clamp(2rem, 6vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.cta-banner .btn { position: relative; z-index: 1; }
.btn-light { background: #fff; color: #a31a68; box-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.btn-light:hover { background: #fff0f8; }
.btn-light:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }

/* ---------------- footer ---------------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--card-edge); padding: 3rem 0 2rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { margin-top: .8rem; max-width: 40ch; }
.site-footer h3 { font-size: 1rem; }
.site-footer ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .1rem; }
.site-footer ul a {
  display: inline-block; padding: .3rem 0; color: var(--ink-soft); font-size: .95rem; text-decoration: none;
  transition: color .15s ease;
}
.site-footer ul a:hover { color: var(--pink-text); }
.socials { display: flex; gap: .6rem; margin-top: .6rem; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--card-edge); fill: var(--ink-soft);
  transition: fill .15s ease, border-color .15s ease;
}
.socials a:hover { fill: var(--pink-text); border-color: var(--pink-border); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 2rem; color: var(--ink-soft); }
.footer-bottom p { font-size: .84rem; }
.footer-bottom a { color: var(--pink-text); font-weight: 700; }

/* ---------------- mobile sticky CTA ---------------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: .7rem 1rem calc(.7rem + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--card-edge);
  transform: translateY(110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sticky-cta.show { transform: none; }
@media (min-width: 720px) { .sticky-cta { display: none; } }
@media (max-width: 719px) { .site-footer { padding-bottom: calc(5.5rem + var(--safe-b)); } }

/* ---------------- sign-in modal ---------------- */
.modal-head { text-align: center; margin-bottom: .6rem; padding-top: .4rem; }
.modal-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 .3rem; }
.modal-sub { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.modal-sub u { font-weight: 700; color: var(--ink); text-decoration-color: var(--pink); text-underline-offset: 3px; }
#signin-modal form { display: flex; flex-direction: column; }
#signin-modal .label { text-align: center; margin-top: .6rem; color: var(--ink-soft); }
#signin-modal .field { text-align: center; }
#signin-modal .btn { margin-top: 1.2rem; }

.avatar-preview-box {
  display: flex; align-items: center; gap: .8rem; margin-top: .9rem; padding: .7rem .8rem;
  background: var(--card); border: 1.5px dashed var(--pink-border); border-radius: 16px;
}
.avatar-preview-box[hidden] { display: none; }
.avatar-preview-box img, .dialog-confirm img { border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.avatar-preview-box img { width: 56px; height: 56px; }
.avatar-preview-text { flex: 1; min-width: 0; }
.avatar-preview-name { font-weight: 800; overflow-wrap: anywhere; }
.avatar-preview-sub { font-size: .72rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.avatar-preview-link { font-size: .8rem; font-weight: 700; color: var(--green); text-decoration: none; white-space: nowrap; }
.signin-error { margin: .8rem 0 0; color: var(--danger); font-weight: 700; font-size: .9rem; text-align: center; }
.dialog-confirm { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }
@media (max-width: 560px) { .dialog-actions .btn { flex: 1 1 140px; } }

/* ---------------- SEO & educational section ---------------- */
.seo-feature-card {
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--card);
  border: 1.5px solid var(--card-edge);
  border-radius: 28px;
}
.seo-grid {
  display: grid;
  gap: 1.8rem;
  margin-top: 2.2rem;
}
@media (min-width: 720px) {
  .seo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem;
  }
}
.seo-item {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.seo-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  color: var(--pink-text);
  margin-bottom: .4rem;
}
.seo-item h3 {
  font-size: 1.18rem;
  margin: 0;
  color: var(--ink);
}
.seo-item p {
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.55;
  margin: 0;
}
