/* Ballpark landing — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Newsreader:ital,wght@1,400;1,500&display=swap');

:root {
  --cream: #FBF6EC;
  --ink: #211E1A;
  --ink-2: #3F3B34;
  --muted: #6A655C;
  --muted-2: #8A857C;
  --dark: #16130F;
  --accent: #E5325B;
  --accent-orange: #FF9A4C;
  --card: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1240px; margin: 0 auto; }
.wrap-narrow { max-width: 760px; margin: 0 auto; }

/* ---- Brand mark (real app icon) ---- */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 4px 12px rgba(229,124,79,0.30); }
.brand span { font-weight: 800; font-size: 21px; letter-spacing: -0.5px; color: var(--ink); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(251,246,236,0.80);
  border-bottom: 1px solid rgba(33,30,26,0.07);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a.text { font-weight: 600; font-size: 15px; color: #56514A; }
.nav-links a.text:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 13px;
  cursor: pointer; border: none;
}
.btn-accent {
  color: #fff;
  background: linear-gradient(100deg,#FF9A4C 0%,#F4663C 48%,#E5325B 100%);
  box-shadow: 0 6px 16px rgba(229,80,70,0.30);
}
.btn-dark { color: #fff; background: var(--dark); box-shadow: 0 12px 28px rgba(22,19,15,0.26); }
.btn-light { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(40,33,24,0.05); }
.btn:hover { filter: brightness(1.03); }

/* App Store button */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--dark); color: #fff;
  padding: 14px 24px 14px 20px; border-radius: 16px;
  box-shadow: 0 12px 28px rgba(22,19,15,0.26);
  text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.appstore:hover { transform: scale(1.03); box-shadow: 0 16px 36px rgba(22,19,15,0.32); }
.appstore .stack { display: flex; flex-direction: column; line-height: 1; }
.appstore .stack .small { font-size: 11px; font-weight: 500; opacity: 0.82; margin-bottom: 3px; }
.appstore .stack .big { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }

/* ---- Section heads ---- */
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { letter-spacing: -0.6px; }

/* ---- Phone frame ---- */
.phone { background: #0B0B0C; border-radius: 40px; padding: 9px; box-shadow: 0 40px 80px rgba(40,33,24,0.30), 0 0 0 1px rgba(0,0,0,0.06); }
.phone img { width: 100%; height: auto; border-radius: 32px; object-fit: contain; }

/* ---- Hero phones ---- */
.hero { overflow: hidden; }
.hero-phones {
  width: min(100%, 520px);
  height: clamp(460px, 43vw, 560px) !important;
  margin: 0 auto;
}
.hero-phones > div:first-child {
  width: min(500px, 92%) !important;
  height: min(500px, 92%) !important;
}
.hero-phones .phone:nth-child(2) {
  top: 118px !important;
  left: 8% !important;
  width: clamp(172px, 15vw, 198px) !important;
}
.hero-phones .phone:nth-child(3) {
  top: 18px !important;
  right: auto !important;
  left: 46% !important;
  width: clamp(224px, 19.5vw, 252px) !important;
}
.hero-phones > div:nth-child(4) {
  right: auto !important;
  left: 42% !important;
}
.hero-phones > div:nth-child(5) {
  right: auto !important;
  left: 62% !important;
}

/* ---- Footer ---- */
.footer { background: var(--dark); color: #A39A8B; padding: 64px 40px 48px; }
.footer .brand span { color: #F3EEE4; }
.footer a:hover { color: #fff; }

/* ---- Float animation for hero phones ---- */
@keyframes bpFloat { 0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); } 50% { transform: translateY(-14px) rotate(var(--rot,0deg)); } }

/* ---- Legal / doc pages ---- */
.doc h2 { font-weight: 700; font-size: 26px; letter-spacing: -0.6px; margin: 46px 0 14px; }
.doc h3 { font-weight: 700; font-size: 19px; letter-spacing: -0.3px; margin: 26px 0 8px; }
.doc p, .doc li { font-weight: 400; font-size: 17.5px; line-height: 1.72; color: var(--ink-2); }
.doc p { margin: 0 0 14px; text-wrap: pretty; }
.doc ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-2); }
.doc li { margin-bottom: 8px; }
.doc a.inline { color: var(--accent); text-decoration: underline; }
.doc b { color: var(--ink); }

/* ---- FAQ accordion ---- */
.faq-item { background: #fff; border-radius: 22px; box-shadow: 0 1px 2px rgba(40,33,24,0.04), 0 8px 22px rgba(40,33,24,0.05); overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; cursor: pointer; width: 100%; background: none; border: none; text-align: left; font-family: inherit; }
.faq-q span.q { font-weight: 700; font-size: 19px; letter-spacing: -0.3px; color: var(--ink); }
.faq-q span.sign { font-weight: 600; font-size: 28px; color: var(--accent); line-height: 1; flex-shrink: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 28px 26px; font-weight: 400; font-size: 17px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 640px; text-wrap: pretty; }

/* ---- Responsive ----
   Most page sections carry inline desktop padding/font-size, so mobile
   overrides here use !important inside media queries to win against them. */

/* Belt-and-braces: never allow horizontal scroll on small screens. */
@media (max-width: 900px) {
  html, body { max-width: 100%; overflow-x: hidden; }

  .nav-inner { padding: 13px 18px !important; }
  .nav-links { gap: 14px; }
  .nav-links a.btn { padding: 10px 16px !important; font-size: 14px !important; }
  .footer { padding: 48px 20px 40px !important; }

  /* Pull every full-bleed section's side padding in to a phone-safe margin.
     Sections use `padding:<v> 40px` and doc/contact pages use 32px. */
  section,
  .doc,
  main,
  .footer .wrap { padding-left: 20px !important; padding-right: 20px !important; }

  /* Inner cards that had their own large horizontal padding. */
  .wrap[style*="border-radius:36px"],
  .wrap[style*="padding:72px"],
  .wrap[style*="padding:60px"] { padding: 40px 24px !important; }

  /* Headings scale down so they never run off the edge. */
  h1 { font-size: 46px !important; letter-spacing: -1.6px !important; }
  h2 { font-size: 34px !important; letter-spacing: -1px !important; }

  /* Nothing text-y may be wider than the screen. */
  h1, h2, h3, p, a, span, div, li { max-width: 100% !important; overflow-wrap: break-word; }

  /* Stacks: anything in a 2/3-column grid becomes a single column. */
  .hero-grid, .how-grid, .packs-grid, .lang-grid, .contact-grid { grid-template-columns: 1fr !important; }

  /* The floating hero phones are decorative — hide on mobile, and clip the
     section so no absolutely-positioned leftover can widen the page. */
  .hero-phones { display: none !important; }
  .hero { overflow: hidden; }

  /* Constrain the "how it works" phone screenshots so they don't dominate. */
  .how-grid img { width: 168px !important; }
  .how-grid > div { padding-bottom: 0 !important; }

  /* Hero CTA row wraps cleanly. */
  .appstore { width: 100%; justify-content: center; }
}

@media (max-width: 600px) {
  .nav-links a.text { display: none; }
  h1 { font-size: 38px !important; }
  h2 { font-size: 30px !important; }
  .doc h1 { font-size: 40px !important; }
  .faq-q { padding: 20px 20px !important; }
  .faq-a p { padding: 0 20px 22px !important; }
  .faq-q span.q { font-size: 17px !important; }
}
