/* Mobile app shell: bottom tab bar and the page headings used by the tab pages. */

.om-page-head {
  background: var(--warm-white);
  padding: 72px 0 44px;
}
.om-page-head .om-display {
  font-size: clamp(38px, 6vw, 68px);
  margin: 0;
}
.om-page-head .om-kicker { margin-bottom: 14px; }
.om-page-head .om-lede { margin-top: 22px; max-width: 46ch; }

.om-linklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 32px 28px;
  margin-top: 44px;
}
.om-linklist__group h3 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.om-linklist__group h3 a { text-decoration: none; color: var(--text-main); }
.om-linklist__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.om-linklist__group li + li { margin-top: 8px; }
.om-linklist__group li a {
  position: relative;
  display: block;
  padding-left: 18px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text-soft);
}
.om-linklist__group li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-red);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: scale(0.6);
}
.om-linklist__group li a:hover,
.om-linklist__group li a:focus-visible { color: var(--crimson); }
.om-linklist__group li a:hover::before,
.om-linklist__group li a:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

/* Bottom tab bar — desktop keeps the normal header nav, so it is hidden here. */
.om-tabbar { display: none; }

@media (max-width: 900px) {
  .om-tabbar {
    display: grid;
    grid-template-columns: repeat(var(--om-tab-count, 5), minmax(0, 1fr));
    position: fixed;
    z-index: 9500;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: min(520px, calc(100% - 20px));
    gap: 2px;
    padding: 6px;
    border-radius: 21px;
    border: 1px solid rgba(48, 40, 34, 0.1);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 -6px 26px rgba(48, 40, 34, 0.1), 0 10px 30px rgba(48, 40, 34, 0.12);
  }
  @supports (backdrop-filter: blur(18px)) {
    .om-tabbar {
      background: rgba(255, 255, 255, 0.68);
      backdrop-filter: blur(18px) saturate(140%);
      -webkit-backdrop-filter: blur(18px) saturate(140%);
    }
  }
  .om-tabbar__capsule {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc((100% - 12px) / var(--om-tab-count, 5));
    transform: translateX(calc(var(--om-tab-index, 0) * 100%));
    border-radius: 15px;
    background: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 212, 0, 0.35), 0 2px 10px rgba(48, 40, 34, 0.1);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }
  .om-tabbar__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 7px 2px;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-soft);
    transition: color 200ms ease;
  }
  .om-tabbar__item.is-active { color: var(--crimson); }
  .om-tabbar__icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
  }
  .om-tabbar__icon svg { width: 22px; height: 22px; }
  .om-tabbar__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
  }
  /* Room so the bar never covers the end of the page */
  body.om-page {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .om-page-head { padding: 44px 0 28px; }
}

/* Brief fade while the router swaps the page content */
.om-swapping #main {
  opacity: 0.35;
  transition: opacity 140ms ease;
}
