/* ============================================================
   Little Blue Bug — design overrides on top of Pico.blue
   ============================================================ */

:root {
  /* Type */
  --pico-font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pico-font-family-headings: "Fraunces", "Inter", -apple-system, BlinkMacSystemFont,
    "SF Pro Display", Georgia, serif;
  --pico-font-weight: 400;
  --pico-font-weight-bold: 600;
  --pico-line-height: 1.65;

  /* Brand palette — light mode defaults */
  --lbb-blue: #0b6bcb;
  --lbb-blue-deep: #073f78;
  --lbb-blue-soft: #e6f2ff;
  --lbb-bg: #fbfaf6;
  --lbb-bg-tint: rgba(11, 107, 203, 0.10);
  --lbb-ink: #0f1c2e;
  --lbb-ink-soft: #46556a;
  --lbb-rule: #e6e8ee;
  --lbb-card-bg: #ffffff;
  --lbb-card-border: rgba(15, 28, 46, 0.04);
  --lbb-card-shadow: 0 1px 2px rgba(15, 28, 46, 0.04),
                     0 12px 32px -8px rgba(15, 28, 46, 0.10);
  --lbb-card-shadow-hover: 0 2px 4px rgba(15, 28, 46, 0.05),
                           0 24px 56px -10px rgba(15, 28, 46, 0.18);
  --lbb-radius: 1rem;
  --lbb-radius-sm: 0.6rem;

  /* Override Pico tokens */
  --pico-background-color: var(--lbb-bg);
  --pico-color: var(--lbb-ink);
  --pico-muted-color: var(--lbb-ink-soft);
  --pico-muted-border-color: var(--lbb-rule);
  --pico-h1-color: var(--lbb-ink);
  --pico-h2-color: var(--lbb-ink);
  --pico-h3-color: var(--lbb-ink);
  --pico-primary: var(--lbb-blue);
  --pico-primary-hover: var(--lbb-blue-deep);
  --pico-primary-focus: rgba(11, 107, 203, 0.25);

  --pico-spacing: 1rem;
  --pico-typography-spacing-vertical: 1.1rem;
}

/* ----- Dark mode (auto) ------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lbb-blue: #4ea4ff;
    --lbb-blue-deep: #8fc5ff;
    --lbb-blue-soft: #15263d;
    --lbb-bg: #0a1220;
    --lbb-bg-tint: rgba(78, 164, 255, 0.16);
    --lbb-ink: #e8eef7;
    --lbb-ink-soft: #92a3bd;
    --lbb-rule: #1d2940;
    --lbb-card-bg: #131c2e;
    --lbb-card-border: rgba(255, 255, 255, 0.06);
    --lbb-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4),
                       0 12px 32px -8px rgba(0, 0, 0, 0.55);
    --lbb-card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5),
                             0 24px 56px -10px rgba(0, 0, 0, 0.65);

    --pico-background-color: var(--lbb-bg);
    --pico-color: var(--lbb-ink);
    --pico-muted-color: var(--lbb-ink-soft);
    --pico-muted-border-color: var(--lbb-rule);
    --pico-h1-color: var(--lbb-ink);
    --pico-h2-color: var(--lbb-ink);
    --pico-h3-color: var(--lbb-ink);
    --pico-primary: var(--lbb-blue);
    --pico-primary-hover: var(--lbb-blue-deep);
  }
}

/* Subtle warm/blue background with a faint top wash */
body {
  background:
    radial-gradient(1200px 600px at 50% -200px, var(--lbb-bg-tint), transparent 70%),
    var(--lbb-bg);
  min-height: 100vh;
}

/* ----- Containers ------------------------------------------- */

main.container,
header.container,
footer.container {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ----- Header / Nav ----------------------------------------- */

.site-header {
  padding-block: 1.25rem;
}

.site-header nav {
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--lbb-ink);
  font-family: var(--pico-font-family-headings);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* LBB icon: no box, no shadow — blends with the page */
.site-header .brand img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Right-side nav: vertical pipe dividers between items */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  font-size: 0.95rem;
}

.site-nav li {
  display: flex;
  align-items: center;
}

.site-nav li:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  background: var(--lbb-rule);
  margin-inline: 0.85rem;
  flex-shrink: 0;
}

.site-nav a {
  color: var(--lbb-ink-soft);
  text-decoration: none;
  padding: 0.4rem 0;
  position: relative;
  transition: color 120ms ease;
}

.site-nav a:hover {
  color: var(--lbb-blue);
}

/* Active page: blue text + blue underline that sits below the link */
.site-nav a[aria-current="page"] {
  color: var(--lbb-blue);
  font-weight: 600;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--lbb-blue);
  border-radius: 2px;
}

/* ----- Buttons ---------------------------------------------- */

.btn,
a[role="button"] {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  line-height: 1;
  border: 1.5px solid transparent;
  transition: transform 120ms ease, box-shadow 120ms ease,
              background 120ms ease, color 120ms ease,
              border-color 120ms ease;
}

.btn-primary,
a[role="button"].primary {
  background: var(--lbb-blue);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(11, 107, 203, 0.45);
}

.btn-primary:hover,
a[role="button"].primary:hover {
  background: var(--lbb-blue-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(11, 107, 203, 0.55);
}

.btn-ghost,
a[role="button"].outline {
  background: transparent;
  color: var(--lbb-ink);
  border-color: var(--lbb-rule);
}

.btn-ghost:hover,
a[role="button"].outline:hover {
  border-color: var(--lbb-blue);
  color: var(--lbb-blue);
  background: var(--lbb-blue-soft);
}

/* ----- Home: Hero ------------------------------------------- */

.home-hero {
  text-align: center;
  padding-block: 3.5rem 2.5rem;
}

/* LBB hero icon: blends with background, no shadow / no rounded box */
.home-hero .hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-inline: auto;
  margin-block-end: 1.25rem;
}

.home-hero h1 {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, var(--lbb-ink) 30%, var(--lbb-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero .tagline {
  font-family: var(--pico-font-family-headings);
  font-style: italic;
  font-weight: 500;
  color: var(--lbb-ink-soft);
  font-size: clamp(1.1rem, 1.5vw + 0.6rem, 1.5rem);
  margin: 0 0 1.5rem;
}

.home-hero .lede {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--lbb-ink-soft);
}

/* ----- Home: Product card grid ------------------------------ */

.product-grid {
  display: grid;
  gap: 1.5rem;
  margin-block: 2.5rem 4rem;
}

@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--lbb-card-bg);
  border-radius: var(--lbb-radius);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--lbb-card-shadow);
  border: 1px solid var(--lbb-card-border);
  transition: transform 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--lbb-blue), #6dd0ff);
  opacity: 0.85;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--lbb-card-shadow-hover);
}

.product-card .product-icon {
  width: 72px;
  height: 72px;
  border-radius: 20%;
  margin-block-end: 1.25rem;
  align-self: flex-start;
  box-shadow: 0 6px 14px -6px rgba(15, 28, 46, 0.35);
}

.product-card h2 {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--lbb-ink);
}

.product-card h2 a {
  color: inherit;
  text-decoration: none;
}

.product-card .product-tagline {
  color: var(--lbb-blue);
  font-weight: 500;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.product-card .product-desc {
  color: var(--lbb-ink-soft);
  margin: 0 0 1.5rem;
  flex-grow: 1;
}

.product-card .product-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--lbb-blue);
  text-decoration: none;
}

.product-card .product-cta::after {
  content: "→";
  transition: transform 150ms ease;
}

.product-card:hover .product-cta::after {
  transform: translateX(3px);
}

/* ----- Page hero (LunchSync / UltraSpacer landing) ---------- */

.page-hero {
  text-align: center;
  padding-block: 3rem 1.5rem;
  margin-block-end: 1.5rem;
}

/* App icons (LunchSync, UltraSpacer): keep the squircle + shadow */
.page-hero .hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 22%;
  margin-inline: auto;
  margin-block-end: 1.25rem;
  box-shadow: 0 14px 32px -12px rgba(11, 107, 203, 0.5);
}

.page-hero h1 {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  font-size: clamp(2.25rem, 4vw + 1rem, 3.25rem);
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  line-height: 1.1;
  color: var(--lbb-ink);
}

.page-hero .tagline {
  font-family: var(--pico-font-family-headings);
  font-style: italic;
  color: var(--lbb-ink-soft);
  font-size: 1.25rem;
  margin: 0 0 1.5rem;
}

.page-hero .store-buttons {
  margin-block-start: 1.25rem;
}

/* Plain page header (FAQ, Release Notes, Contact, Privacy) */
.page-title {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  font-size: clamp(2rem, 3vw + 1rem, 2.75rem);
  letter-spacing: -0.02em;
  margin-block: 2.5rem 1.5rem;
  line-height: 1.1;
  color: var(--lbb-ink);
}

/* ----- Sub-page nav (FAQ / release notes inside a product) -- */

.sub-pages {
  margin-block: 1.5rem 2.5rem;
}

.sub-pages ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.sub-pages a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--lbb-blue-soft);
  color: var(--lbb-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 120ms ease, color 120ms ease;
}

.sub-pages a:hover {
  background: var(--lbb-blue);
  color: #fff;
}

.sub-pages a[aria-current="page"] {
  background: var(--lbb-blue);
  color: #fff;
}

/* ----- Article body ----------------------------------------- */

.page {
  margin-block-end: 4rem;
}

/* Lead paragraph on product pages (first <p> with no h1 above it) */
.page > p:first-child {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  font-size: 1.15rem;
  color: var(--lbb-ink-soft);
}

.page h2 {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
  margin-block-start: 3rem;
  margin-block-end: 1rem;
  color: var(--lbb-ink);
}

.page h3 {
  font-family: var(--pico-font-family-headings);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin-block-start: 2.25rem;
  color: var(--lbb-ink);
}

.page h4 {
  font-weight: 600;
  margin-block-start: 1.75rem;
  color: var(--lbb-ink);
}

.page p,
.page li {
  color: var(--lbb-ink);
}

.page li {
  margin-block-end: 0.4rem;
}

.page p > img,
.page figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--lbb-radius-sm);
  display: block;
  margin: 1.5rem auto;
  box-shadow: 0 1px 2px rgba(15, 28, 46, 0.05),
              0 16px 36px -12px rgba(15, 28, 46, 0.18);
  max-height: 520px;
  width: auto;
}

.page hr {
  border: none;
  border-top: 1px solid var(--lbb-rule);
  margin-block: 2.5rem;
}

.page a {
  color: var(--lbb-blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

/* ----- Demo video block ------------------------------------- */

.demo-video {
  margin: 2.5rem auto 3rem;
  max-width: 720px;
}

.demo-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--lbb-radius-sm);
  box-shadow: 0 1px 2px rgba(15, 28, 46, 0.05),
              0 22px 48px -16px rgba(15, 28, 46, 0.28);
  background: #000;
}

.demo-video figcaption {
  text-align: center;
  margin-block-start: 0.75rem;
  color: var(--lbb-ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}

/* ----- Feature rows (product page sections) ----------------- */

.feature {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
  margin-block: 4rem;
}

@media (min-width: 720px) {
  .feature {
    grid-template-columns: 1fr 1fr;
  }
  /* Alternate sides: every even feature flips the image to the right */
  .feature:nth-of-type(even) .feature-media {
    order: 2;
  }
}

.feature-media {
  display: flex;
  justify-content: center;
}

.feature-media img {
  max-width: 100%;
  height: auto;
  max-height: 420px;
  border-radius: var(--lbb-radius-sm);
  box-shadow: 0 1px 2px rgba(15, 28, 46, 0.05),
              0 18px 40px -14px rgba(15, 28, 46, 0.22);
  display: block;
  margin: 0;
}

.feature-body > :first-child {
  margin-block-start: 0;
}

.feature-body h2,
.feature-body h3 {
  margin-block-start: 0;
  margin-block-end: 0.75rem;
}

.feature-body p {
  margin-block-end: 0.85rem;
}

/* Inline images inside a feature body get sized down */
.feature-body p > img {
  max-width: 100%;
  margin: 1rem 0;
  box-shadow: 0 1px 2px rgba(15, 28, 46, 0.05),
              0 8px 18px -8px rgba(15, 28, 46, 0.18);
}

/* ----- Store button group ----------------------------------- */

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-block: 1.5rem 2rem;
}

.store-buttons a[role="button"] {
  margin: 0;
}

/* ----- Latest blog teasers (home) --------------------------- */

.latest-posts {
  margin-block: 1rem 4rem;
  padding-block-start: 2.5rem;
  border-top: 1px solid var(--lbb-rule);
}

.latest-posts h2 {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin-block-end: 2rem;
  color: var(--lbb-ink);
}

.post-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.25rem 1.4rem;
  background: var(--lbb-card-bg);
  border: 1px solid var(--lbb-card-border);
  border-radius: var(--lbb-radius-sm);
  text-decoration: none;
  color: var(--lbb-ink);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.post-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 107, 203, 0.4);
  box-shadow: var(--lbb-card-shadow);
  color: var(--lbb-ink);
}

.post-link-card small {
  color: var(--lbb-ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-link-card h3 {
  font-family: var(--pico-font-family-headings);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.3;
  color: var(--lbb-ink);
}

.more-link {
  text-align: center;
  margin-block-start: 2rem;
}

.more-link a {
  color: var(--lbb-blue);
  font-weight: 500;
  text-decoration: none;
}

/* ----- Blog list page --------------------------------------- */

.post-list {
  display: grid;
  gap: 1.5rem;
  margin-block-start: 2rem;
}

.post-list article {
  background: var(--lbb-card-bg);
  border: 1px solid var(--lbb-card-border);
  border-radius: var(--lbb-radius);
  padding: 1.75rem 2rem;
  margin: 0;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.post-list article:hover {
  transform: translateY(-2px);
  box-shadow: var(--lbb-card-shadow);
}

.post-list h2 {
  font-family: var(--pico-font-family-headings);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin-block-start: 0.4rem;
  margin-block-end: 0.5rem;
}

.post-list h2 a {
  color: var(--lbb-ink);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--lbb-blue);
}

.post-list small {
  color: var(--lbb-ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-list p {
  color: var(--lbb-ink-soft);
  margin: 0.6rem 0 0;
}

.post-list .read-more {
  display: inline-block;
  margin-block-start: 0.8rem;
  color: var(--lbb-blue);
  font-weight: 500;
  text-decoration: none;
}

/* Single blog post meta */
.post-meta {
  color: var(--lbb-ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  margin-block: 0.5rem 2.5rem;
}

/* ----- Footer ----------------------------------------------- */

.site-footer {
  text-align: center;
  padding-block: 2rem 3rem;
  margin-block-start: 2rem;
  border-top: 1px solid var(--lbb-rule);
  color: var(--lbb-ink-soft);
}

.site-footer small {
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--lbb-ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--lbb-blue);
}
