/* ==========================================================================
   Bean - marketing site
   Design tokens mirror src/theme/colors.ts in the main Bean app repo, so
   this site reads as the same product. If those tokens change, update the
   custom properties below to match.
   ========================================================================== */

:root {
  --cream: #F4EADA;      /* colors.background - Latte Cream */
  --surface: #FBF5EA;    /* colors.surface */
  --espresso: #3B2415;   /* colors.espresso */
  --caramel: #8A5A38;    /* colors.caramel */
  --bean-brown: #6F4224; /* colors.visited */
  --taupe: #705F4D;      /* colors.taupe */
  --border: #E3D3B8;     /* colors.border */

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max-width: 1120px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-card: 0 10px 30px rgba(59, 36, 21, 0.10), 0 2px 8px rgba(59, 36, 21, 0.06);
  --nav-height: 76px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 12px);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 640px) {
  section { padding: 64px 0; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--caramel);
  margin: 0 0 14px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--espresso);
  margin: 0;
}

h2 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.01em;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head p {
  margin: 16px 0 0;
  color: var(--taupe);
  font-size: 17px;
}

.emphasis { font-weight: 700; font-style: italic; color: var(--espresso); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(244, 234, 218, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(59, 36, 21, 0.06);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 30px; height: 30px; }
.nav-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--espresso);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--espresso);
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-cta {
  background: var(--espresso);
  color: var(--surface) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600 !important;
  opacity: 1 !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--espresso);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-menu.is-open {
    display: flex;
  }
}

.nav-menu-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: var(--cream);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.nav-menu-mobile.is-open { display: flex; }
.nav-menu-mobile a {
  text-decoration: none;
  color: var(--espresso);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}
.nav-menu-mobile .nav-cta { font-family: var(--font-body); font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + 72px);
  padding-bottom: 80px;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.hero-blob-1 {
  width: 520px; height: 520px;
  top: -180px; right: -160px;
  background: linear-gradient(135deg, var(--caramel), var(--bean-brown));
}
.hero-blob-2 {
  width: 360px; height: 360px;
  bottom: -160px; left: -140px;
  background: linear-gradient(135deg, var(--border), var(--caramel));
  opacity: 0.3;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { order: -1; margin: 0 auto 8px; }
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin: 22px 0 34px;
  font-size: 19px;
  color: var(--taupe);
  max-width: 480px;
}
@media (max-width: 900px) { .hero-sub { margin-left: auto; margin-right: auto; } }

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
@media (max-width: 900px) { .store-row { justify-content: center; } }

.btn-store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--espresso);
  color: var(--surface);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-card);
}
.btn-store:hover { transform: translateY(-2px); }
.btn-store svg { width: 22px; height: 22px; flex: 0 0 auto; }
.btn-store .btn-store-text { display: flex; flex-direction: column; line-height: 1.15; }
.btn-store .btn-store-text small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; }
.btn-store .btn-store-text strong { font-size: 16px; font-family: var(--font-body); font-weight: 700; }
.btn-store .soon-badge {
  position: absolute;
  top: -9px; right: -9px;
  background: var(--caramel);
  color: var(--surface);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 2px solid var(--cream);
  white-space: nowrap;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--taupe);
}
@media (max-width: 900px) { .hero-note { text-align: center; } }

.hero-visual { display: flex; align-items: center; justify-content: center; position: relative; }
.hero-mark {
  width: 220px; height: 220px;
  border-radius: 22%;
  object-fit: cover;
  filter: drop-shadow(0 24px 40px rgba(59, 36, 21, 0.25));
}
@media (max-width: 640px) { .hero-mark { width: 160px; height: 160px; } }

/* ---------- about ---------- */
.about { background: var(--surface); }
.about .container { max-width: 720px; }
.about-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  color: var(--espresso);
  text-align: center;
}
.about-mark { width: 44px; height: 44px; margin: 0 auto 20px; }

/* ---------- screenshots ---------- */
.screens-scroll {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 12px 24px 28px;
  margin: 0 -24px;
  scroll-snap-type: x proximity;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.screens-scroll.is-dragging { cursor: grabbing; }
.screens-scroll::-webkit-scrollbar { height: 8px; }
.screens-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.screens-scroll::-webkit-scrollbar-track { background: transparent; }

.screen-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 220px;
  text-align: center;
}
.phone-frame {
  width: 220px;
  aspect-ratio: 300 / 650;
  background: linear-gradient(160deg, var(--espresso), #24140b);
  border-radius: 34px;
  padding: 9px;
  position: relative;
  box-shadow: var(--shadow-card);
}
.phone-notch {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 14px;
  background: #24140b;
  border-radius: 10px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: var(--surface);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.screen-caption { margin-top: 18px; }
.screen-caption strong { display: block; font-family: var(--font-display); font-size: 17px; }
.screen-caption span { display: block; margin-top: 4px; font-size: 13px; color: var(--taupe); }

/* ---------- ranking ---------- */
.ranking-intro {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
  color: var(--taupe);
  font-size: 17px;
}
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .ranking-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

.rank-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.rank-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--caramel), var(--espresso));
}
.bean-pill {
  display: inline-flex;
  gap: 5px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--caramel), var(--espresso));
  margin-bottom: 18px;
}
.bean-pill svg { width: 20px; height: 20px; }
.rank-card h3 { font-size: 20px; margin-bottom: 10px; }
.rank-card p { margin: 0; color: var(--taupe); font-size: 15px; line-height: 1.6; }

/* ---------- download (repeat cta) ---------- */
.download {
  text-align: center;
}
.download .container { max-width: 620px; }
.download h2 { margin-bottom: 16px; }
.download p { color: var(--taupe); font-size: 17px; margin: 0 0 32px; }
.download .store-row { justify-content: center; }
.download .hero-note { text-align: center; }

/* ---------- footer ---------- */
footer {
  background: var(--espresso);
  color: var(--cream);
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(244, 234, 218, 0.15);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 26px; height: 26px; }
.footer-brand span { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.footer-tagline { font-size: 14px; color: rgba(244, 234, 218, 0.65); max-width: 320px; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; color: rgba(244, 234, 218, 0.85); font-size: 14px; }
.footer-links a:hover { color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(244, 234, 218, 0.55);
}
.footer-bottom a { color: rgba(244, 234, 218, 0.75); text-decoration: none; }

@media (max-width: 640px) {
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
}
