/* The header and footer every page shares (site/chrome/, stamped into each
   page by scripts/stamp_site.py), and the post cards the home page and the
   404 page borrow from the Blogs index. Loaded before the page's own
   stylesheet, so a page can move the bar (the home page fixes it) without
   restyling it. Colours are spelled out: the page stylesheets name their
   tokens differently. */

/* ---------- Header: the can, the sections, the one filled button ---------- */

.gnav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 22, 23, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.gnav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1012px;
  height: 52px;
  margin: 0 auto;
  padding: 0 16px;
}
.gnav a, .gnav a:hover { text-decoration: none; }
.gnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-right: auto;
  color: #f5f5f7;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.011em;
}
.gnav-brand img { border-radius: 7px; }
.gnav ul { margin: 0; padding: 0; list-style: none; }
.gnav-links ul { display: flex; gap: 2px; }
.gnav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: rgba(245, 245, 247, 0.8);
  font-size: 12px;
  letter-spacing: -0.01em;
}
.gnav-links a:hover, .gnav-links a[aria-current] { color: #f5f5f7; }
.gnav-links a[aria-current] { font-weight: 600; }
.gnav-cta { display: inline-flex; margin-left: 6px; }
/* 44 px to tap, a 30 px pill to see. */
.gnav-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: #fff;
  font-size: 12px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.gnav-button::before {
  content: "";
  position: absolute;
  inset: 7px 0;
  z-index: -1;
  border-radius: 999px;
  background: #0071e3;
  transition: background-color 200ms;
}
.gnav-button:hover::before { background: #0077ed; }
.gnav a:focus-visible, .gnav summary:focus-visible { outline: 2px solid #2997ff; outline-offset: -2px; border-radius: 10px; }

/* Phones: the sections fold into a menu that needs no script. */
.gnav-menu { position: static; display: none; }
.gnav-menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  color: #f5f5f7;
  cursor: pointer;
  list-style: none;
}
.gnav-menu summary::-webkit-details-marker { display: none; }
.gnav-menu summary svg { width: 22px; height: 22px; }
.gnav-menu ul {
  position: absolute;
  inset: 52px 0 auto;
  padding: 4px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #161617;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
.gnav-menu li + li { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.gnav-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: #f5f5f7;
  font-size: 17px;
  letter-spacing: -0.022em;
}
.gnav-menu a[aria-current] { color: #2997ff; font-weight: 600; }

@media (max-width: 734px) {
  .gnav-links { display: none; }
  .gnav-menu { display: block; }
  .gnav-brand { font-size: 19px; }
}

/* ---------- Footer: the fine print, grouped links, the company ---------- */

.gfoot {
  margin-top: 64px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #161617;
  color: #86868b;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.01em;
}
.gfoot-inner { max-width: 1012px; margin: 0 auto; padding: 0 16px; }
.gfoot p { margin: 0; }
.gfoot-legal { padding-bottom: 16px; border-bottom: 1px solid #424245; }
.gfoot-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; padding: 20px 0 8px; }
.gfoot h2 { margin: 0 0 4px; color: #f5f5f7; font-size: 12px; font-weight: 600; line-height: 1.33; letter-spacing: -0.01em; }
.gfoot ul { margin: 0; padding: 0; list-style: none; }
.gfoot a { color: #d2d2d7; text-decoration: none; }
.gfoot a:hover { color: #f5f5f7; text-decoration: underline; }
.gfoot-groups a { display: inline-flex; align-items: center; min-height: 32px; }
.gfoot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #424245;
}
.gfoot-social { display: flex; gap: 4px; margin-right: -12px !important; }
.gfoot-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.gfoot-social svg { width: 20px; height: 20px; }
.gfoot a:focus-visible { outline: 2px solid #2997ff; outline-offset: 2px; border-radius: 6px; }

@media (max-width: 734px) {
  .gfoot-groups { grid-template-columns: 1fr 1fr; }
  .gfoot-groups a { min-height: 44px; }
  .gfoot-bottom { flex-direction: column; align-items: flex-start; }
  .gfoot-social { margin: 0 0 0 -12px !important; }
}
@media (max-width: 340px) {
  .gfoot-groups { grid-template-columns: 1fr; }
}

/* ---------- Cards the home and 404 pages share: the newest posts (stamped
   from the Blogs index) and the three tools ---------- */

.post-cards, .tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; }
.post-card, .tool-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  color: #f5f5f7;
  text-align: left;
  text-decoration: none;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover, .tool-card:hover { transform: scale(1.012); text-decoration: none; }
.post-card:focus-visible, .tool-card:focus-visible { outline: 2px solid #2997ff; outline-offset: 3px; }
.post-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-text { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 18px 22px 22px; }
.post-card .eyebrow, .tool-card .eyebrow { margin: 0; color: #86868b; font-size: 12px; font-weight: 600; line-height: 1.33; letter-spacing: 0.02em; text-transform: uppercase; }
.post-card-title, .tool-card-title { font-size: 21px; font-weight: 600; line-height: 1.19; letter-spacing: 0.011em; text-wrap: balance; }
.post-card time { margin-top: auto; padding-top: 10px; color: #86868b; font-size: 14px; }
.tool-card { gap: 8px; padding: 24px 22px 22px; background: radial-gradient(120% 90% at 100% 0%, rgba(41, 151, 255, 0.18), transparent 60%), #000; }
.tool-card svg { width: 30px; height: 30px; margin-bottom: 6px; color: #2997ff; }
.tool-card-text { color: #a1a1a6; font-size: 15px; line-height: 1.4; }
.tool-card-go { margin-top: auto; padding-top: 8px; color: #2997ff; font-size: 15px; }

@media (max-width: 734px) {
  .post-cards, .tool-cards { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card, .tool-card { transition: none; }
  .post-card:hover, .tool-card:hover { transform: none; }
}

/* ---------- Launch day (scripts/launch_switch.py): Apple's badge, unaltered,
   at least 40 px tall, with a quarter of its height clear around it ---------- */

.app-store-badge { display: inline-flex; margin: 12px 0; border-radius: 9px; }
.app-store-badge img { width: auto; height: 48px; }
.app-store-badge:focus-visible { outline: 2px solid #2997ff; outline-offset: 4px; }
.notice-badge { display: flex; justify-content: center; margin: 24px 0 0 !important; }

/* ---------- Before launch (launch_switch.py --coming-soon): the waitlist is
   closed, so the calls to action are labels, not buttons ---------- */

.app-soon {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 12px 0;
  padding: 0 18px;
  border: 1px solid rgba(245, 245, 247, 0.28);
  border-radius: 999px;
  color: #f5f5f7;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.gnav-soon { align-items: center; min-height: 44px; padding: 0 6px; color: #a1a1a6; font-size: 12px; white-space: nowrap; }
