/* Bēkon shared stylesheet
   Self-contained, no external dependencies, mobile-first, dark-mode aware. */

:root {
  --color-text: #2d3436;           /* charcoal-800 */
  --color-text-secondary: #5a6568;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f1e8;         /* cream-100 */
  --color-border: #e5e5e0;
  --color-link: #c2410c;
  --color-link-hover: #9a3412;
  --color-primary: #ff6b35;        /* bekon orange */
  --color-charcoal: #2d3436;       /* charcoal-800 */
  --color-cream: #f5f1e8;          /* cream-100 */
  --max-width: 720px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e8e6e1;
    --color-text-secondary: #aaa6a0;
    --color-bg: #1a1a1a;
    --color-bg-alt: #242424;
    --color-border: #333;
    --color-link: #fb923c;
    --color-link-hover: #fdba74;
    --color-charcoal: #e8e6e1;
    --color-cream: #242424;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
  text-align: center;
}

header.site-header a.brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

main.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

article h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin: 0.5rem 0 0.5rem;
  line-height: 1.25;
}

article h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  line-height: 1.3;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.35rem;
  scroll-margin-top: 1rem;
}

article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  line-height: 1.4;
}

article p,
article ul,
article ol {
  margin: 0 0 1rem;
}

article ul,
article ol {
  padding-left: 1.5rem;
}

article li {
  margin: 0.3rem 0;
}

article a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

article a:hover {
  color: var(--color-link-hover);
}

article strong {
  font-weight: 600;
}

article em {
  color: var(--color-text-secondary);
}

p.last-updated {
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 0 0 1.5rem;
}

article hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.25rem 0;
}

.table-wrapper {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-wrapper th,
.table-wrapper td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  vertical-align: top;
}

.table-wrapper th {
  background-color: var(--color-bg-alt);
  font-weight: 600;
}

footer.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

footer.site-footer nav {
  margin-bottom: 0.75rem;
}

footer.site-footer nav a {
  color: var(--color-text-secondary);
  margin: 0 0.6rem;
  text-decoration: none;
}

footer.site-footer nav a:hover {
  color: var(--color-link);
  text-decoration: underline;
}

footer.site-footer p {
  margin: 0;
}

/* ---------- Landing Page ---------- */

/* Pin the homepage to brand colors regardless of OS dark-mode preference
   so it matches the mobile app's always-cream look. */
body.home {
  --color-text: #2d3436;
  --color-text-secondary: #5a6568;
  --color-bg: #f5f1e8;
  --color-bg-alt: #ffffff;
  --color-border: #e5e0d3;
  --color-link: #c2410c;
  --color-link-hover: #9a3412;
  --color-charcoal: #2d3436;
  --color-cream: #f5f1e8;
  background-color: var(--color-cream);
  color: var(--color-text);
}

body.home header.site-header {
  border-bottom: none;
  padding: 1.25rem 1.25rem 0;
  background-color: transparent;
}

main.home-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
  text-align: center;
}

.hero {
  padding: 2rem 0 1rem;
}

.hero-logo {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto 1.5rem;
  /* Logo file has a white background — multiply blends it into the cream page */
  mix-blend-mode: multiply;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-charcoal);
  margin: 0 auto 1rem;
  max-width: 32ch;
}

.hero-description {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
}

@media (min-width: 640px) {
  .hero {
    padding: 3rem 0 1.5rem;
  }
  .hero-logo {
    max-width: 420px;
  }
  .hero-tagline {
    font-size: 2rem;
  }
  .hero-description {
    font-size: 1.125rem;
  }
}

/* Download section */

.download-section {
  margin: 2rem auto 3rem;
}

.download-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin: 0 0 1.25rem;
  letter-spacing: 0.01em;
}

.download-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .download-cards {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }
}

.download-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Official store badges.
   Both badges are normalized to ~56px tall — Apple's guideline is
   minimum 40px onscreen, and Google's "legible" threshold is similar.
   The Google badge has ~10% padding baked into its artwork, so we bump
   its height slightly so the visible logo matches Apple's at the eye. */
.store-badge {
  display: block;
  height: 56px;
  width: auto;
}

.store-badge--google {
  /* Google artwork includes ~18% whitespace padding; compensate so the
     visible logomark matches the Apple badge's optical height. */
  height: 68px;
  margin: -6px 0;
}

.coming-soon-label {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-align: center;
}

/* Home footer tweaks */

body.home footer.site-footer {
  background-color: transparent;
  border-top: 1px solid var(--color-border);
  margin-top: 1.5rem;
}

/* Print styles */
@media print {
  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }
  header.site-header,
  footer.site-footer {
    border-color: #000;
  }
  article a {
    color: #000;
    text-decoration: underline;
  }
  article h2 {
    page-break-after: avoid;
    border-bottom-color: #000;
  }
  article h3 {
    page-break-after: avoid;
  }
  .table-wrapper {
    page-break-inside: avoid;
  }
}
