/* ==========================================================================
   4B Studio — shared stylesheet
   Single source of truth for all three pages.
   Edit the tokens in :root to rebrand the whole site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --accent:        #0071e3;
  --accent-hover:  #0077ed;
  --accent-soft:   rgba(0, 113, 227, 0.10);

  /* Surfaces & text (light mode) */
  --bg:            #ffffff;
  --bg-alt:        #f5f5f7;
  --bg-elevated:   #ffffff;
  --text:          #1d1d1f;
  --text-muted:    #6e6e73;
  --border:        rgba(0, 0, 0, 0.10);
  --shadow:        0 1px 3px rgba(0,0,0,0.05), 0 12px 32px rgba(0,0,0,0.06);
  --shadow-hover:  0 2px 6px rgba(0,0,0,0.06), 0 20px 48px rgba(0,0,0,0.10);
  --nav-bg:        rgba(255, 255, 255, 0.72);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;

  /* Layout */
  --maxw:        1080px;
  --maxw-prose:  720px;
  --radius:      18px;
  --radius-sm:   12px;
  --nav-h:       56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent:        #2997ff;
    --accent-hover:  #57aeff;
    --accent-soft:   rgba(41, 151, 255, 0.14);

    --bg:            #000000;
    --bg-alt:        #0e0e10;
    --bg-elevated:   #1c1c1e;
    --text:          #f5f5f7;
    --text-muted:    #a1a1a6;
    --border:        rgba(255, 255, 255, 0.12);
    --shadow:        0 1px 3px rgba(0,0,0,0.5), 0 12px 32px rgba(0,0,0,0.4);
    --shadow-hover:  0 2px 6px rgba(0,0,0,0.6), 0 20px 48px rgba(0,0,0,0.55);
    --nav-bg:        rgba(20, 20, 22, 0.72);
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1.1em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.nav__brand:hover { color: var(--text); text-decoration: none; opacity: 0.75; }
.nav__mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--accent), #5e5ce6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex: none;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.nav__links a:hover { color: var(--text); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .nav__links { gap: 18px; }
  .nav__links a { font-size: 0.8125rem; }
}

/* --------------------------------------------------------------------------
   4. Sections & hero
   -------------------------------------------------------------------------- */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }

.hero {
  padding: 104px 0 88px;
  text-align: center;
  background:
    radial-gradient(1100px 480px at 50% -18%, var(--accent-soft), transparent 70%);
}
.hero p.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
  color: var(--text-muted);
  max-width: 620px;
  margin-inline: auto;
}
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.section-head { text-align: center; margin-bottom: 48px; }
.section-head p { color: var(--text-muted); max-width: 560px; margin-inline: auto; }

/* --------------------------------------------------------------------------
   5. Buttons & App Store badge
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

/* App Store badge — built in CSS so there is no image dependency.
   Swap for Apple's official badge artwork before going live if you prefer. */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 15px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: opacity .18s ease;
}
.appstore:hover { opacity: 0.82; color: var(--bg); text-decoration: none; }
.appstore svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.appstore span { display: block; line-height: 1.15; }
.appstore .appstore__sm { font-size: 0.625rem; letter-spacing: 0.02em; opacity: 0.8; }
.appstore .appstore__lg { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.appstore--sm { padding: 7px 15px 7px 12px; border-radius: 10px; }
.appstore--sm svg { width: 18px; height: 18px; }
.appstore--sm .appstore__lg { font-size: 0.875rem; }

/* --------------------------------------------------------------------------
   6. App cards
   -------------------------------------------------------------------------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.app-card__icon {
  width: 72px; height: 72px;
  border-radius: 17px;           /* iOS "squircle" approximation */
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  font-size: 30px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
/* Placeholder icon gradients — replace each with a real 1024px icon <img>. */
.icon--1 { background: linear-gradient(160deg, #4f8cff, #5e5ce6); }
.icon--2 { background: linear-gradient(160deg, #ff9f4a, #ff375f); }
.icon--3 { background: linear-gradient(160deg, #32d74b, #0a84ff); }

.app-card h3 { margin-bottom: 6px; }
.app-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.app-card p { color: var(--text-muted); font-size: 0.9375rem; }
.app-card .appstore { margin-top: auto; }

/* --------------------------------------------------------------------------
   7. Feature / contact tiles
   -------------------------------------------------------------------------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.tile {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.tile h3 { margin-bottom: 8px; font-size: 1.0625rem; }
.tile p  { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 0.6em; }
.tile p:last-child { margin-bottom: 0; }
.tile__icon {
  width: 26px; height: 26px;
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   8. FAQ (native disclosure, no JS)
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 40px 20px 0;
  font-weight: 600;
  font-size: 1.0625rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  color: var(--text-muted);
  padding-right: 40px;
  margin-top: -4px;
}

/* --------------------------------------------------------------------------
   9. Legal / long-form pages
   -------------------------------------------------------------------------- */
.page-head {
  padding: 72px 0 32px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.page-head .meta { color: var(--text-muted); font-size: 0.9375rem; margin: 0; }

.legal { padding: 48px 0 88px; }
.legal h2 {
  font-size: 1.375rem;
  margin-top: 44px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 1.0625rem; margin-top: 28px; }
.legal p, .legal li { color: var(--text-muted); }
.legal li { margin-bottom: 8px; }
.legal ul { padding-left: 22px; }

.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin-bottom: 44px;
}
.toc h2 { font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.08em;
          color: var(--text-muted); margin: 0 0 12px !important; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 0.9375rem; }

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.9375rem;
}
.callout p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 44px 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; }

/* --------------------------------------------------------------------------
   11. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
