/* Site chrome: the header, the footer, and the Get Aweigh strip above the
   footer. One stylesheet for every page. The home page loads it before
   home.css; the other pages load it after app.css. Markup:
   partials/site-header.php and partials/site-footer.php.

   It reads the palette and font tokens that app.css and home.css both define
   with the same names and values (--ink, --paper, --rule, --font ...). It
   defines only the two that are its own: --hh and --gutter.

   The reset rules differ between the two stylesheets (app.css styles bare h2,
   a and ul; home.css zeroes them), so every rule here sets its own margins,
   list style and type rather than relying on either. */

:root { --hh: 56px; --gutter: 16px; }
@media (min-width: 900px) { :root { --hh: 64px; --gutter: max(32px, calc((100vw - var(--maxw, 72rem)) / 2)); } }

/* Phone-only and desktop-only. 900px is the layout breakpoint used throughout. */
@media (max-width: 899px) { .desk-only { display: none !important; } }

/* ---------- Buttons ---------- */
.t-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px;
  font: 600 .9375rem/1 var(--font); text-decoration: none; white-space: nowrap; }
.t-btn-primary { background: var(--ink); color: #fff; }
.t-btn-quiet { border: 1px solid var(--rule); background: var(--paper-raised); color: var(--ink); }

/* ---------- Header ---------- */
.t-header { position: sticky; top: 0; z-index: 50; height: var(--hh); display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter); background: rgb(237 233 221 / 88%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(211 204 184 / 60%); transition: background .4s, border-color .4s; font-family: var(--font); }
.t-brand { position: relative; display: block; height: calc(var(--hh) - 10px); aspect-ratio: 420 / 331; flex: none; }
.t-brand img { position: absolute; inset: 0; display: block; height: 100%; width: auto; max-width: none; transition: opacity .4s; }
.mark-light { opacity: 0; }
.t-header-cta { display: flex; gap: 8px; margin-left: auto; }

/* Menu: a button and a drop-down on phones, inline links on desktop. Without
   JavaScript the button is hidden and the links show inline. */
.t-nav { order: 3; position: static; }
.t-menu-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--rule); border-radius: 50%;
  background: var(--paper-raised); color: var(--ink); cursor: pointer; }
.t-menu { display: none; position: absolute; top: var(--hh); right: var(--gutter); min-width: 11rem; margin: 0; padding: 6px; list-style: none;
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.t-menu li { margin: 0; }
.t-menu.open { display: block; }
.t-menu a { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; font-weight: 600; color: var(--ink); }
.t-menu a:hover { background: var(--paper-sunk); }
.t-menu a[aria-current="page"] { color: var(--brass); }
html:not(.has-js) .t-menu-btn { display: none; }
html:not(.has-js) .t-menu { display: flex; position: static; padding: 0; border: 0; box-shadow: none; background: none; min-width: 0; }
@media (min-width: 900px) {
  .t-nav { order: 0; margin-left: 20px; }
  .t-menu-btn { display: none; }
  .t-menu { display: flex; gap: 4px; position: static; padding: 0; border: 0; box-shadow: none; background: none; min-width: 0; }
  .t-menu a { padding: 8px 12px; }
}

/* ---------- Environment badge (partials/env-badge.php) ---------- */
/* In the header beside the logo. app.css floats it in a corner, which is
   still where it goes on a page without this header; the .t-header prefix is
   what overrides that here. Smaller on phones, where the header is tightest. */
.t-header .env-badge { position: static; flex: none; pointer-events: none; display: flex; align-items: center; gap: .3rem;
  padding: .28rem .45rem; border-radius: 999px; background: var(--env-badge-color, var(--ink)); color: #fff; box-shadow: none;
  font: 700 .55rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.t-header .env-badge__dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .85; }
@media (min-width: 900px) {
  .t-header .env-badge { gap: .4rem; padding: .4rem .6rem; font-size: .65rem; letter-spacing: .14em; }
  .t-header .env-badge__dot { width: 6px; height: 6px; }
}

/* ---------- QR (the home page's Get Aweigh section and the strip) ---------- */
.t-qr { display: none; margin: 0; }
@media (min-width: 900px) {
  .t-qr { display: grid; gap: 10px; justify-items: center; width: 220px; text-align: center; font-size: .85rem; color: var(--muted); }
  /* Both dimensions: the PNG is square, and width alone left it 200x350. */
  .t-qr img { display: block; width: 200px; height: 200px; background: #fff; padding: 10px; border-radius: var(--radius); box-shadow: var(--shadow); }
}

/* ---------- Get Aweigh strip (every page but home) ---------- */
/* No top margin: every page above it ends in a .section, whose 72px bottom
   padding is already the gap. A margin here doubled it into an empty band. */
.t-getstrip { border-top: 1px solid var(--rule); background: var(--paper-raised); font-family: var(--font); color: var(--ink); }
/* No max-width: on desktop --gutter already centers the content in --maxw,
   so the strip lines up with the header's logo and buttons. */
.t-getstrip-in { padding: 40px var(--gutter); display: grid; gap: 24px; }
.t-getstrip-text { display: grid; gap: 12px; justify-items: start; }
.t-getstrip h2 { margin: 0; font: 700 clamp(1.6rem, 5vw, 2.2rem)/1.12 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.t-getstrip p { margin: 0; }
.t-getstrip .store-badges-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.t-getstrip .store-badges-row img { display: block; height: 46px; width: auto; }
@media (min-width: 900px) {
  .t-getstrip-in { grid-template-columns: 1fr auto; align-items: center; padding-top: 48px; padding-bottom: 48px; }
}

/* ---------- Footer ---------- */
.t-footer { display: grid; gap: 10px; justify-items: center; padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule); font: .85rem/1.5 var(--font); color: var(--muted); text-align: center; }
.t-footer p { margin: 0; max-width: 46em; }
.t-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; }
.t-footer a { color: inherit; text-decoration: none; }
.t-footer a:hover { text-decoration: underline; }
.t-footer-legal { display: grid; gap: 4px; justify-items: center; font-size: .8rem; }

@media print { .t-header, .t-getstrip { display: none !important; } }
