/* ── The site's shared chrome: header, drawer, Help menu and footer ──────────
   Loaded on EVERY page of pockets.byhoopy.com, right after the synced app sheet
   (_app-styles.css, which supplies the colors and the font). The markup comes
   from site/_partials/header.html and footer.html, written into each page by
   scripts/build-site.js. Edit the partials, then run the script.
   Page layout lives in each section's own sheet: styles.css (the marketing
   pages), help/help.css (Help Center, What's New, Updates). */

:root {
  --gold:        #f6c860;
  --gold-soft:   rgba(246, 200, 96, 0.14);
  --accent-glow: rgba(124, 111, 247, 0.28);
  --max-w:       1120px;
  --font-serif:  'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, 'PT Serif', Georgia, serif;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft:   cubic-bezier(0.22, 1, 0.36, 1);
  --site-nav-h:  64px;
}

body {
  background-color: var(--bg);
  background-image: linear-gradient(180deg, rgba(124, 111, 247, 0.12) 0%, rgba(124, 111, 247, 0.04) 35%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: clip;
}
html { overflow-x: hidden; }
/* The app sheet underlines links on hover; the site never does. */
a, a:hover { text-decoration: none; }

/* ── Header ── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  min-height: var(--site-nav-h);
  padding: 12px 24px;
  background: rgba(15, 15, 19, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}
.site-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text); transition: opacity 0.18s var(--ease-soft); }
.site-brand:hover { opacity: 0.85; }
.site-nav .logo-text { font-size: 22px; }
@media (max-width: 380px) { .site-nav .logo-text { font-size: 19px; } }

.site-links { display: flex; align-items: center; justify-content: center; gap: 26px; flex: 1; }
.site-links > a, .site-menu-btn {
  color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 2px; white-space: nowrap;
  transition: color 0.18s var(--ease-soft);
}
.site-links > a:hover, .site-menu-btn:hover { color: var(--text); }
.site-links > a[aria-current="page"], .site-menu.is-current .site-menu-btn { color: var(--text); font-weight: 600; }

/* The Help menu: opens on hover with a fine pointer, and on click/tap/keyboard everywhere. */
.site-menu { position: relative; }
.site-menu-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.site-menu-btn svg { transition: transform 0.2s var(--ease-soft); }
.site-menu.open .site-menu-btn svg { transform: rotate(180deg); }
.site-menu-list {
  display: none; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 200px; padding: 8px; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
/* A hover bridge so the pointer can cross the gap without the menu closing. */
.site-menu-list::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.site-menu.open .site-menu-list { display: flex; }
@media (hover: hover) and (pointer: fine) { .site-menu:hover .site-menu-list { display: flex; } }
.site-menu-list a { padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: 14px; white-space: nowrap; }
.site-menu-list a:hover { background: rgba(255, 255, 255, 0.05); }
.site-menu-list a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.site-cta { display: flex; gap: 10px; flex-shrink: 0; }
.site-btn {
  display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 6px;
  font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
  transition: transform 0.25s var(--ease-bounce), background 0.2s ease, border-color 0.2s ease;
}
.site-btn:hover { transform: translateY(-1px); }
.site-btn.ghost { color: var(--text); border-color: var(--border); }
.site-btn.ghost:hover { border-color: var(--text); }
.site-btn.primary { background: var(--gold); color: #1c1730; }
.site-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Signed in to the app? (site.js sets html.pbh-signed-in from the app's
   ?signedin=1.) Sign In / Get Started give way to Open Pockets. */
.site-open-app { display: none !important; }
.pbh-signed-in .site-open-app { display: inline-flex !important; }
.pbh-signed-in .site-drawer .site-open-app { display: block !important; }
.pbh-signed-in .site-auth { display: none !important; }

.site-burger { display: none; margin-left: auto; background: transparent; border: 0; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; padding: 0; }
.site-burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px; transition: transform 0.22s var(--ease-bounce), opacity 0.2s; }
.site-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-drawer {
  display: none; position: fixed; top: var(--site-nav-h); left: 0; right: 0; bottom: 0; z-index: 49;
  flex-direction: column; padding: 10px 24px 28px; overflow-y: auto;
  background: var(--bg); border-top: 1px solid var(--border);
}
.site-drawer.open { display: flex; }
.site-drawer a { padding: 13px 4px; font-size: 17px; color: var(--text); border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.site-drawer a.sub { font-size: 15px; color: var(--muted); padding: 10px 4px 10px 14px; }
.site-drawer a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.site-drawer-label { margin-top: 14px; padding: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); opacity: 0.8; }
.site-drawer .drawer-signin { color: var(--muted); margin-top: 14px; }
.site-drawer .drawer-signup { color: var(--gold); font-weight: 600; border-bottom: 0; }
html.site-drawer-open { overflow: hidden; }

/* Six links, the Help menu and two buttons: tighten in two steps, then fold
   everything into the burger at 1060px. A width sweep (320 to 1600px, every
   10px) finds no clipping or overlap; re-run one before adding to the bar. */
@media (max-width: 1260px) {
  .site-links { gap: 18px; }
  .site-nav { gap: 16px; padding: 12px 18px; }
  .site-btn { padding: 9px 14px; }
}
@media (max-width: 1160px) {
  .site-links { gap: 13px; }
  .site-links > a, .site-menu-btn { font-size: 13px; }
  .site-nav .logo-text { font-size: 20px; }
}
@media (max-width: 1060px) {
  .site-links, .site-cta { display: none; }
  .site-burger { display: flex; }
  .site-nav { justify-content: space-between; }
  .site-nav .logo-text { font-size: 22px; }
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 56px 24px 40px; background: rgba(0, 0, 0, 0.18); margin-top: 48px; }
.site-footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.site-footer-brand .logo-text { font-size: 18px; }
.site-footer-tag { color: var(--muted); font-size: 14px; font-style: italic; font-family: var(--font-serif); margin: 10px 0 0; line-height: 1.5; }
.site-footer-col { display: flex; flex-direction: column; gap: 9px; }
.site-footer-h { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text); margin-bottom: 4px; }
.site-footer-col a { color: var(--muted); font-size: 14px; transition: color 0.18s var(--ease-soft); }
.site-footer-col a:hover { color: var(--text); }
.site-footer-fineprint { max-width: var(--max-w); margin: 40px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.site-footer-fineprint > span { opacity: 0.75; }
/* The maker's signature (owner, 2026-11-11): the same white "by" + Safety
   orange "Hoopy" that signs Snark Industries and the Holocene Calendar, and
   links to his site. Hoopy's orange, not Pockets' purple, on purpose. */
.hoopy-sig { font-family: var(--brand-font); font-weight: 800; letter-spacing: -0.5px; font-size: 14px; color: #e8e8f0; text-decoration: none; transition: opacity .15s ease; }
.hoopy-sig span { color: #ff6b1a; }
@media (hover: hover) { .hoopy-sig:hover { opacity: 0.8; } }
.hoopy-sig:focus-visible { outline: 2px solid #ff6b1a; outline-offset: 3px; border-radius: 3px; }
@media (max-width: 760px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
  .site-footer-brand { grid-column: 1 / -1; }
}

/* Inside the app's Help Center frame (?embed=1, help.js) the site's chrome goes. */
.help-embedded .site-nav, .help-embedded .site-drawer, .help-embedded .site-footer { display: none !important; }

/* Anchored sections clear the sticky header. */
[id] { scroll-margin-top: calc(var(--site-nav-h) + 20px); }
