/* TokenTap5e site chrome: welcome strip, top bar with d20 menu, footer and
   back-to-top. Shared by landing, setup, sample-campaign and about so the public
   pages stay identical. Page-specific styles stay in each page. */

/* Pages style bare links with underlines; the chrome opts out. :where()
   keeps these at element weight so the chrome's own class rules still win. */
.welcome-strip a, .topbar a, .site-footer a, .to-top { border-bottom: none; }
:where(.welcome-strip, .topbar, .site-footer) p { margin: 0; }

/* ── Top bar ──────────────────────────────────────────────────────
   Wordmark left, dice links right, in a centred 1320px frame. The DM
   and Player portals live in the gold strip above. At 900px and under
   the links (and portals) fold into a d20 Menu on the right, the
   wordmark stays left, and the menu slides open instead of popping. */
.topbar {
  position: sticky; top: 0; z-index: 60;
  /* A quiet warm-to-black fall, so the bar reads as lit from the gold strip
     above without competing with it; the gold hairline fades at the ends. */
  background: linear-gradient(180deg, rgba(34,28,16,0.94) 0%, rgba(14,13,11,0.93) 55%, rgba(10,10,10,0.92) 100%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(201,168,76,0) 0%, rgba(201,168,76,0.45) 20%, rgba(201,168,76,0.45) 80%, rgba(201,168,76,0) 100%) 1;
}
.tb-inner {
  line-height: 1.4;
  max-width: 1320px; margin: 0 auto; padding: 12px 28px;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px;
}
/* Wide: wordmark left, dice links right. The links stay first in the
   markup because they double as the menu on narrow screens. */
.topbar-brand { order: 0; justify-self: start; }
.tb-left { display: flex; align-items: center; justify-self: end; min-width: 0; order: 1; }
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(27px, 2.4vw, 32px); line-height: 1;
  color: #e8e0d0; text-decoration: none; white-space: nowrap;
}
.topbar-brand .tb-5e { color: var(--gold); }
/* Two-tone wordmark (Oct 2026): the lasered logo with the d20 as the "o",
   cream name and gold d20 and 5e. Replaces the separate d20 icon. */
.topbar-brand .tb-logo { display: block; height: clamp(26px, 2.3vw, 31px); width: auto; flex-shrink: 0; }
.topbar-nav { display: flex; align-items: center; gap: 22px; }
.topbar-nav > a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'EB Garamond', Georgia, serif; font-size: 18px; letter-spacing: 0.2px;
  color: rgba(232,224,208,0.86); text-decoration: none; transition: color 0.15s;
}
.topbar-nav > a:hover, .topbar-nav > a:focus-visible { color: var(--gold); }
.nav-die { width: 18px; height: 18px; flex-shrink: 0; color: var(--gold); opacity: 0.8; transition: opacity 0.15s; }
/* Hovering a link keeps its die rolling; tapping one in the menu gives a single quick roll. */
@keyframes die-shake {
  0%   { transform: rotate(0) translateY(0); }
  20%  { transform: rotate(-18deg) translateY(-1.5px); }
  40%  { transform: rotate(14deg) translateY(0); }
  60%  { transform: rotate(-10deg) translateY(-1px); }
  80%  { transform: rotate(6deg) translateY(0); }
  100% { transform: rotate(0) translateY(0); }
}
@keyframes die-roll { 0% { transform: rotate(0) scale(1); } 60% { transform: rotate(300deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes die-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.topbar-nav > a:hover .nav-die, .topbar-nav > a:focus-visible .nav-die { opacity: 1; animation: die-spin 0.9s linear infinite; }
.topbar-nav > a.is-rolling .nav-die { opacity: 1; animation: die-roll 0.32s ease-out 1; }
.nav-portals { display: flex; gap: 10px; }
.nav-portals--menu { display: none; }
.nav-portal {
  font-family: 'Cinzel', serif; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; padding: 9px 16px; border-radius: 3px;
  background: rgba(201,168,76,0.07); border: 1px solid rgba(201,168,76,0.55); color: #e8e0d0;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.nav-portal:hover, .nav-portal:focus-visible { background: rgba(201,168,76,0.16); border-color: var(--gold); color: #fff; transform: translateY(-1px); }
.nav-portal--dm {
  background: linear-gradient(180deg, #dcbc62 0%, #b8943a 100%);
  border: 1px solid #e2c46e; color: #0a0a0a;
  box-shadow: 0 0 16px rgba(201,168,76,0.28), inset 0 1px 0 rgba(255,255,255,0.25);
}
.nav-portal--dm:hover, .nav-portal--dm:focus-visible {
  background: linear-gradient(180deg, #ecd07a 0%, #c9a84c 100%); color: #0a0a0a;
  box-shadow: 0 0 24px rgba(201,168,76,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
}
.nav-toggle { display: none; }
#what, #arrives, #pricing, #faq { scroll-margin-top: 80px; }
@media (max-width: 900px) {
  .tb-inner { padding: 10px 18px; gap: 12px; }
  .tb-left { order: 1; justify-self: end; }
  .topbar-brand { justify-self: start; }
  .tb-inner { grid-template-columns: 1fr auto; }
  .nav-toggle {
    display: flex; align-items: center; gap: 8px;
    background: transparent; color: #e8e0d0; cursor: pointer;
    font-family: 'Cinzel', serif; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    padding: 8px 12px; border: 1px solid rgba(201,168,76,0.45); border-radius: 4px;
  }
  .nav-toggle svg { width: 18px; height: 18px; transition: transform 0.35s ease; }
  .nav-toggle[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
  .nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .topbar-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0b0b0b; border-bottom: 1px solid rgba(201,168,76,0.22);
    box-shadow: 0 18px 30px rgba(0,0,0,0.55);
    padding: 6px 20px 20px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s linear 0.24s;
  }
  .topbar-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s; }
  .topbar-nav > a { font-size: 20px; padding: 14px 2px; gap: 12px; border-bottom: 1px solid rgba(232,224,208,0.07); }
  .topbar-nav > a .nav-die { width: 20px; height: 20px; }
  .nav-portals--menu { display: flex; margin: 16px 0 0; }
  .nav-portals--menu .nav-portal { flex: 1; text-align: center; padding: 13px 10px; font-size: 13px; }
}
@media (max-width: 400px) {
  .tb-inner { padding: 10px 12px; gap: 8px; }
  .topbar-brand { font-size: 24px; gap: 7px; }
  .topbar-brand .tb-logo { height: 24px; }
  .nav-toggle { padding: 7px 9px; letter-spacing: 1.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-toggle svg, .topbar-nav, .topbar-nav.is-open { transition: none; }
  .topbar-nav > a:hover .nav-die, .topbar-nav > a:focus-visible .nav-die, .topbar-nav > a.is-rolling .nav-die { animation: none; }
  .nav-portal:hover, .nav-portal:focus-visible { transform: none; }
}

/* ── Welcome strip ── */
/* position + z-index keep page backdrops (setup's drifting plate) from painting over the strip */
.welcome-strip { position: relative; z-index: 61; background: linear-gradient(90deg, #8f7230 0%, #c9a84c 50%, #8f7230 100%); color: #0a0a0a; }
.ws-inner { max-width: 1320px; margin: 0 auto; padding: 7px 28px; line-height: 1.4; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: 'EB Garamond', Georgia, serif; font-size: 15px; font-weight: 500; }
/* line-height pinned so the larger italic doesn't make the strip taller */
.ws-hello { font-style: italic; font-size: 17px; font-weight: 400; letter-spacing: 0.2px; line-height: 1.2; }
.ws-hello { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-links { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ws-dot { opacity: 0.55; }
.ws-links a { color: #0a0a0a; text-decoration: none; font-family: 'Cinzel', serif; font-size: 13px; font-weight: 700; letter-spacing: 0.8px; border-bottom: 1px solid rgba(10,10,10,0.35); }
.ws-links a:hover, .ws-links a:focus-visible { border-bottom-color: #0a0a0a; }
.ws-account { display: inline-flex; align-items: center; gap: 6px; border-bottom: none !important; }
.ws-account svg { width: 17px; height: 17px; flex-shrink: 0; }
.ws-account span { border-bottom: 1px solid rgba(10,10,10,0.35); }
.ws-account:hover span, .ws-account:focus-visible span { border-bottom-color: #0a0a0a; }
@media (max-width: 700px) {
  .ws-inner { padding: 6px 14px; font-size: 14px; justify-content: center; }
  .ws-links a { font-size: 12px; letter-spacing: 0.5px; }
  .ws-hello { display: none; }
  .ws-links { gap: 8px; }

}

/* ── Footer ── */
.site-footer { border-top: 1px solid rgba(201,168,76,0.16); padding: 56px 28px 28px; margin-top: 40px; text-align: left; line-height: 1.45; font-size: 16px; }
.sf-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.sf-mark { font-size: 34px; line-height: 1.1; margin-bottom: 10px; }
.sf-tag { color: #d6cdbd; font-size: 16px; line-height: 1.55; max-width: 380px; margin-bottom: 12px; }
.sf-made { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.sf-col { display: flex; flex-direction: column; gap: 10px; }
.sf-head { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.sf-col a { color: #b5ab9a; text-decoration: none; font-size: 16px; transition: color 0.15s; }
.sf-col a:hover, .sf-col a:focus-visible { color: var(--gold); }
.sf-base { max-width: 1100px; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid rgba(232,224,208,0.08); text-align: center; }
.sf-base p { font-size: 12px; color: #8a8175; line-height: 1.6; margin-top: 6px; }
.sf-legal { display: flex; justify-content: center; gap: 22px; margin-bottom: 8px; }
.sf-legal a { font-size: 13px; color: #9a9080; text-decoration: none; }
.sf-legal a:hover, .sf-legal a:focus-visible { color: var(--gold); }
@media (max-width: 860px) { .sf-grid { grid-template-columns: repeat(3, 1fr); gap: 32px 24px; } .sf-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .sf-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; } .sf-col:last-child { grid-column: 1 / -1; } .site-footer { padding-bottom: 84px; } }

/* ── Back to top ── */
.to-top { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,0.88); border: 1px solid rgba(201,168,76,0.6); color: var(--gold);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s, background 0.15s; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.25s, transform 0.25s, visibility 0s, background 0.15s; }
.to-top:hover, .to-top:focus-visible { background: rgba(201,168,76,0.18); }
.to-top svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.show { transition: none; } }

