/* Boba Talk website — shared styles.
   Tokens lifted directly from the shipping Mac app (BobaColor.swift) and the
   established Pencil design system. Two-font wordmark — Newsreader Italic for
   "Boba", Inter Black for "Talk" — matches the brand mark used in the iOS
   mockups and Mac app. No invented values; everything traces to a source.
   Single-file CSS, no framework, no build step. Mobile-first. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@1,6..72,600&family=Inter:wght@400;500;600;800&display=swap');

:root {
  /* Shipping Mac app tokens (BobaColor.swift) */
  --bg:           #ffffff;
  --card:         #f5f2ed;   /* warm cream for elevated surfaces */
  --border:       #ececec;
  --text:         #1a1a1a;
  --text-soft:    #3d3d3d;
  --text-mute:    #6b6b6b;
  --terracotta:   #d4916e;
  --terracotta-d: #b5754f;
  --terracotta-tint: #f1d9cd;
  --max-w:        720px;
  --radius:       12px;
  --gap:          18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--terracotta-d);
  text-decoration: none;
  border-bottom: 1px solid var(--terracotta-tint);
  transition: border-color 120ms ease;
}
a:hover { border-color: var(--terracotta-d); }

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 22px 64px;
}

/* ---- Brand mark + wordmark ---- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-bottom: none;
  color: inherit;
}
.brand:hover { border-bottom: none; }

.brand .cup {
  flex-shrink: 0;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-feature-settings: "kern" 1;
}
.wordmark .boba {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--terracotta);
  line-height: 1;
  letter-spacing: -0.005em;
}
.wordmark .talk {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.015em;
}

/* Header-size wordmark — used in <header> on every page */
header.site .wordmark .boba { font-size: 20px; }
header.site .wordmark .talk { font-size: 18px; }

/* Hero-size wordmark — only on the landing page hero */
.hero .wordmark .boba { font-size: 56px; }
.hero .wordmark .talk { font-size: 50px; }

/* ---- Layout chrome ---- */

header.site {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
header.site nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}
header.site nav a {
  font-size: 13px;
  color: var(--text-soft);
  border-bottom: none;
  font-weight: 500;
}
header.site nav a:hover { color: var(--terracotta-d); }

h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 22px 0 12px;
  color: var(--text);
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 36px 0 8px;
  color: var(--text);
}
h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 22px 0 6px;
  color: var(--text);
}

p, ul, ol { margin: 0 0 var(--gap); }
ul, ol    { padding-left: 22px; }
li        { margin-bottom: 4px; }

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-soft);
  margin-bottom: 28px;
}

.muted { color: var(--text-mute); }
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* Hero block on the landing page */
.hero {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-top: 28px;
}
.hero .wordmark { margin-bottom: 20px; }
.hero h1 { margin-top: 4px; }
.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--text);
  color: #fff;
}
.btn-primary:hover { background: #000; border-color: transparent; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--terracotta); color: var(--terracotta-d); }

/* Soft inset card for legal pages */
.policy {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 36px;
}
.policy h1 { margin-top: 4px; }
.policy blockquote {
  border-left: 3px solid var(--terracotta);
  padding: 12px 16px;
  margin: 18px 0;
  background: rgba(212, 145, 110, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}

.meta {
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

footer.site {
  max-width: var(--max-w);
  margin: 32px auto 28px;
  padding: 18px 22px 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--text-mute);
}
footer.site a { color: var(--text-soft); border-bottom: none; }
footer.site a:hover { color: var(--terracotta-d); }
footer.site .copyright { margin-left: auto; }

@media (max-width: 540px) {
  main { padding: 22px 16px 48px; }
  h1 { font-size: 28px; }
  .hero { padding: 28px 22px; }
  .hero .wordmark .boba { font-size: 44px; }
  .hero .wordmark .talk { font-size: 40px; }
  .policy { padding: 24px 22px; }
  footer.site .copyright { margin-left: 0; width: 100%; }
}

/* ============================================================
   Homepage (index.html only) — opt-in styles via body.home and
   .home-* classes so the legal pages keep their existing look.
   ============================================================ */

html:has(body.home) {
  background: #ECDFCC;
}
body.home {
  min-height: 100vh;
  background: radial-gradient(ellipse 130% 170% at 50% 20%, #FAF6EE, #E5D0B5) fixed;
}

/* Boba pearls — matches the app icon's pearl style: dark near-black with a
   warm-brown center, one diffuse highlight and one bright spec on the
   top-left (like wet reflective pearls). Fixed to the viewport so they stay
   put while content scrolls past. */
.pearls {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.pearl {
  position: absolute;
  left: var(--x);
  bottom: -20vh;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 32%,
    #6a5340 0%,
    #2a1a0f 55%,
    #150a05 100%
  );
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  animation: pearl-rise var(--duration, 50s) linear var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

/* Slow rise from below viewport to above, with gentle horizontal sway like
   pearls being pushed around by liquid currents. Fades in at ~8% and out at
   the top so the loop restart is seamless. */
@keyframes pearl-rise {
  0%   { transform: translate(0,   0);      opacity: 0; }
  8%   { transform: translate(0,   -8vh);   opacity: 0.65; }
  25%  { transform: translate(8px, -30vh); }
  50%  { transform: translate(-6px, -55vh); }
  75%  { transform: translate(7px, -80vh); }
  92%  { transform: translate(0,   -105vh); opacity: 0.65; }
  100% { transform: translate(0,   -115vh); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pearl { animation: none; opacity: 0.55; bottom: auto; top: var(--fallback-y, 40%); }
}
.pearl::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 20%;
  width: 34%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 240, 220, 0.18);
  filter: blur(4px);
  transform: rotate(-30deg);
}
main.home, footer.home-footer { position: relative; z-index: 1; }

main.home {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 22px 24px;
}

/* ---- Hero ---- */

.home-hero {
  background: transparent;
  border-radius: 0;
  padding: 32px 0 0;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.home-hero .wordmark {
  justify-content: center;
  margin-bottom: 16px;
}
.home-hero .wordmark .boba { font-size: 60px; }
.home-hero .wordmark .talk { font-size: 54px; }
.home-hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin: 8px auto 16px;
}
.home-hero .lede {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: center;
}
.home-hero .cta-row {
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 18px;
}
.btn-cta {
  background: var(--terracotta);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid var(--terracotta);
  transition: background 120ms ease, transform 60ms ease;
}
.btn-cta:hover { background: var(--terracotta-d); border-color: var(--terracotta-d); }
.btn-cta:active { transform: translateY(1px); }

/* Pre-launch CTA — visually a button but non-interactive. Swap back to a
   real <a class="btn btn-cta"> with the App Store URL once live. */
.btn-soon {
  cursor: default;
  pointer-events: none;
}

.hero-pricing {
  font-size: 13px;
  color: var(--text-soft);
  margin: 12px 0 4px;
  text-align: center;
}
.hero-sub-link {
  font-size: 12px;
  margin: 0 0 12px;
  text-align: center;
}
.hero-sub-link a {
  color: var(--terracotta-d);
  font-weight: 600;
  border-bottom: none;
}
.hero-sub-link a:hover { border-bottom: 1px solid var(--terracotta-d); }

/* ---- Value strip ---- */

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 640px;
  margin: 40px auto 48px;
  padding: 0 8px;
}
.value-item {
  text-align: center;
}
.value-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  background: #F5E6D8;
  color: var(--terracotta);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.value-item h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.value-item p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
  margin: 0;
}

/* ---- Founder's note (speech bubble) ---- */

.founder-note {
  display: flex;
  justify-content: center;
  margin: 16px 0 48px;
}
.bubble {
  position: relative;
  background: #F9F0E1;
  border-radius: 20px;
  padding: 26px 22px 22px;
  width: 100%;
  max-width: 640px;
  text-align: center;
}
.bubble-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 10px;
}
.bubble-body {
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: #3A3A3A;
  margin: 0 0 12px;
}
.bubble-sig {
  font-size: 13px;
  font-weight: 600;
  color: var(--terracotta);
  margin: 0;
}
.bubble-tail {
  position: absolute;
  left: 64px;
  bottom: -14px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 14px solid #F9F0E1;
}

/* ---- FAQ ---- */

.faq {
  margin: 16px 0 0;
  text-align: center;
}
.faq-heading {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
}
.faq-list {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #EAE4DA;
  overflow: hidden;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
.faq-list details {
  border-top: 1px solid #F0EAE0;
}
.faq-list details:first-child { border-top: none; }
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: rotate(45deg);
  transition: transform 160ms ease;
  flex-shrink: 0;
}
.faq-list details[open] summary::after {
  transform: rotate(-135deg);
}
.faq-list summary:hover { background: #FAF7F1; }
.faq-answer {
  padding: 0 22px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
}

/* ---- Footer (homepage variant) ---- */

footer.home-footer {
  max-width: 720px;
  margin: 16px auto 24px;
  padding: 18px 22px 0;
  border-top: 1px solid rgba(26,26,26,0.10);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: var(--text-mute);
}
footer.home-footer a {
  color: var(--text-soft);
  border-bottom: none;
  font-weight: 500;
}
footer.home-footer a:hover { color: var(--terracotta-d); }
footer.home-footer .email-line a {
  color: var(--text);
  font-weight: 600;
}
footer.home-footer .footer-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}
footer.home-footer .copyright {
  font-size: 12px;
  color: #8A8A8A;
}

@media (max-width: 640px) {
  .home-hero .wordmark .boba { font-size: 46px; }
  .home-hero .wordmark .talk { font-size: 42px; }
  .home-hero h1 { font-size: 28px; }
  .value-strip {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 32px 0 36px;
  }
  .bubble { padding: 22px 24px 20px; }
  .faq-list summary { padding: 16px 18px; font-size: 14px; }
  .faq-answer { padding: 0 18px 16px; font-size: 13px; }
  footer.home-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  footer.home-footer .footer-links { margin-left: 0; }
}
