/*
 * Online store: the site's shell on the /store/ pages (checkout, order status,
 * reserve confirm, account link, printable terms).
 *
 * Warren, 2026-11-21: pressing Buy "looks like a whole new page". Checkout
 * stays on the portal on purpose (its script list, its framing lock, its
 * cookies), so these pages draw the same night sky, logo and menu as the
 * website instead (.claude/rules/single-page.md, "The website and the shop").
 * The markup is storeWebSiteHeader() / storeWebSiteFooter() in store/_web.php.
 *
 * A linked file, never inline: the checkout's content-security rule allows
 * styles only from our own host. No script goes with it: the phone-width menu
 * is a <details> element.
 *
 * Scrolling rules (.claude/rules/scrolling.md): the body stays the one
 * scroller. The sky is fixed behind the page and never scrolls. The header is
 * part of the page (not fixed), so nothing is parked over the content; the
 * closed phone menu is a closed <details>, which is not drawn at all. The only
 * transform is on the shooting stars inside the sky.
 */

/* ---- The night sky --------------------------------------------------------
   Copied rule for rule from assets/store/store.css (the shop pages' sky), so a
   listing and its checkout have the same sky. tests/store/C_SiteShellTest.php
   fails when the two drift. --accent is the one colour those rules read. */
:root { --accent: #2eb6e9; }
.sp-sky { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; overflow: clip; pointer-events: none; }
.sp-sky::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: .15; background: radial-gradient(ellipse at 20% 20%, rgba(46, 182, 233, .4) 0%, transparent 50%), radial-gradient(ellipse at 80% 30%, rgba(46, 182, 233, .2) 0%, transparent 50%), radial-gradient(ellipse at 40% 80%, rgba(46, 182, 233, .3) 0%, transparent 50%); }
.sp-neb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .1; }
.sp-neb1 { top: 10%; right: 10%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(46, 182, 233, .6) 0%, transparent 70%); }
.sp-neb2 { bottom: 20%; left: 5%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(46, 182, 233, .5) 0%, transparent 70%); }
.sp-stars i { position: absolute; background: #fff; border-radius: 50%; }
.sp-s1 i { width: 1px; height: 1px; opacity: .6; }
.sp-s2 i { width: 2px; height: 2px; opacity: .8; }
.sp-s3 i { width: 3px; height: 3px; box-shadow: 0 0 6px 1px rgba(46, 182, 233, .6); }
.sp-s3 i:nth-child(odd) { background: var(--accent); box-shadow: 0 0 8px 2px rgba(46, 182, 233, .4); }
.sp-shoot { position: absolute; width: 100px; height: 2px; border-radius: 50%; opacity: 0; background: linear-gradient(to right, transparent, #fff, var(--accent)); }
.sp-shoot1 { top: 10%; right: 12%; }
.sp-shoot2 { top: 30%; right: 34%; width: 80px; }
.sp-shoot3 { top: 50%; right: 3%; width: 120px; }
.sp-s1 i:nth-child(1) { top: 5%; left: 10%; }
.sp-s1 i:nth-child(2) { top: 12%; left: 25%; }
.sp-s1 i:nth-child(3) { top: 8%; left: 45%; }
.sp-s1 i:nth-child(4) { top: 15%; left: 65%; }
.sp-s1 i:nth-child(5) { top: 3%; left: 80%; }
.sp-s1 i:nth-child(6) { top: 20%; left: 90%; }
.sp-s1 i:nth-child(7) { top: 35%; left: 5%; }
.sp-s1 i:nth-child(8) { top: 40%; left: 20%; }
.sp-s1 i:nth-child(9) { top: 45%; left: 35%; }
.sp-s1 i:nth-child(10) { top: 38%; left: 55%; }
.sp-s1 i:nth-child(11) { top: 50%; left: 75%; }
.sp-s1 i:nth-child(12) { top: 42%; left: 95%; }
.sp-s1 i:nth-child(13) { top: 60%; left: 8%; }
.sp-s1 i:nth-child(14) { top: 65%; left: 30%; }
.sp-s1 i:nth-child(15) { top: 70%; left: 50%; }
.sp-s1 i:nth-child(16) { top: 58%; left: 70%; }
.sp-s1 i:nth-child(17) { top: 75%; left: 85%; }
.sp-s1 i:nth-child(18) { top: 80%; left: 15%; }
.sp-s1 i:nth-child(19) { top: 85%; left: 40%; }
.sp-s1 i:nth-child(20) { top: 90%; left: 60%; }
.sp-s2 i:nth-child(1) { top: 10%; left: 15%; }
.sp-s2 i:nth-child(2) { top: 25%; left: 40%; }
.sp-s2 i:nth-child(3) { top: 18%; left: 70%; }
.sp-s2 i:nth-child(4) { top: 55%; left: 12%; }
.sp-s2 i:nth-child(5) { top: 48%; left: 88%; }
.sp-s2 i:nth-child(6) { top: 72%; left: 25%; }
.sp-s2 i:nth-child(7) { top: 68%; left: 65%; }
.sp-s2 i:nth-child(8) { top: 88%; left: 78%; }
.sp-s3 i:nth-child(1) { top: 8%; left: 30%; }
.sp-s3 i:nth-child(2) { top: 22%; left: 85%; }
.sp-s3 i:nth-child(3) { top: 52%; left: 5%; }
.sp-s3 i:nth-child(4) { top: 78%; left: 55%; }
.sp-s3 i:nth-child(5) { top: 92%; left: 92%; }
/* The sky moves only for visitors who allow motion; otherwise the stars sit still
 * and the shooting stars never show. */
@media (prefers-reduced-motion: no-preference) {
  .sp-s1 i { animation: sp-twinkle 3s infinite; }
  .sp-s2 i { animation: sp-twinkle 4s infinite; }
  .sp-s3 i { animation: sp-twinkle-bright 2s infinite; }
  .sp-stars i:nth-child(5n+2) { animation-delay: .5s; }
  .sp-stars i:nth-child(5n+3) { animation-delay: 1s; }
  .sp-stars i:nth-child(5n+4) { animation-delay: 1.6s; }
  .sp-stars i:nth-child(5n+5) { animation-delay: 2.2s; }
  .sp-shoot { transform: rotate(-45deg); animation: sp-shoot 8s infinite; }
  .sp-shoot2 { animation-delay: 4s; }
  .sp-shoot3 { animation-delay: 7s; }
}
@keyframes sp-twinkle { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes sp-twinkle-bright { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes sp-shoot { 0% { opacity: 0; transform: rotate(-45deg) translateX(0); } 2% { opacity: 1; } 6% { opacity: 0; transform: rotate(-45deg) translateX(-300px); } 100% { opacity: 0; } }

/* ---- The logo menu --------------------------------------------------------
   The website's menu (themacspace-website site/shop.html ".nav"): same colours,
   sizes and order. It sits at the top of the page instead of staying fixed, so
   it never covers the card window or the terms window. */
.sc-nav { position: relative; z-index: 40; background: rgba(26, 26, 46, 0.9); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sc-nav-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 40px; }
.nav-logo { display: flex; align-items: center; gap: 12px; min-width: 0; color: #f0f0f0; text-decoration: none; }
.nav-logo img { flex: 0 0 auto; width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(46, 182, 233, 0.4)); }
.sc-nav-brand { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.sc-nav-name { font-size: 18px; font-weight: 700; }
.sc-nav-blue { color: #2eb6e9; }
.sc-nav-tag { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.sc-nav-pma { margin-top: 2px; font-size: 7.5px; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }

.sc-nav-links { display: flex; align-items: center; gap: 32px; }
.sc-nav-links a, .sc-nav-links span { padding: 6px 0; border-bottom: 2px solid transparent; color: rgba(255, 255, 255, 0.62); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.sc-nav-links a:hover, .sc-nav-links a:focus-visible, .sc-nav-links .sc-nav-on { color: #f0f0f0; border-bottom-color: #2eb6e9; }

.sc-nav-cta { display: flex; align-items: center; gap: 8px; }
.sc-nav-btn { padding: 10px 22px; border: 1px solid transparent; border-radius: 25px; background: linear-gradient(135deg, #2eb6e9 0%, #3498db 100%); color: #ffffff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sc-nav-btn-line { background: transparent; border-color: #2eb6e9; }
a.sc-nav-btn-line:hover, a.sc-nav-btn-line:focus-visible { background: rgba(46, 182, 233, 0.1); }

/* Phone width: the links fold into one "Menu" button. A <details>, so it opens
   and closes with no script; closed, its list is not drawn. */
.sc-nav-menu { display: none; }
.sc-nav-menu summary { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; color: #f0f0f0; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.sc-nav-menu summary::-webkit-details-marker { display: none; }
.sc-nav-menu[open] summary { border-color: #2eb6e9; color: #2eb6e9; }
.sc-nav-drop { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; padding: 4px 16px 14px; background: #14162a; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.sc-nav-drop a, .sc-nav-drop span { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: #f0f0f0; font-size: 16px; text-decoration: none; }
.sc-nav-drop span { color: rgba(255, 255, 255, 0.62); }
.sc-nav-drop .sc-nav-on { color: #2eb6e9; }
.sc-nav-drop > :last-child { border-bottom: 0; }

@media (max-width: 1100px) {
  .sc-nav-in { padding: 14px 24px; }
  .sc-nav-links { gap: 20px; }
}
@media (max-width: 900px) {
  .sc-nav-in { padding: 10px 16px; }
  .sc-nav-links, .sc-nav-cta { display: none; }
  .sc-nav-menu { display: block; }
}

/* ---- The footer ----------------------------------------------------------- */
.sc-foot { margin-top: 8px; padding: 20px 0 36px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.62); font-size: 13px; }
.sc-foot p { margin: 0 0 8px; }
.sc-foot a { color: rgba(255, 255, 255, 0.78); }
.sc-foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* On paper (the printable agreement, an order page): the words only. */
@media print {
  .sp-sky, .sc-nav, .sc-foot { display: none !important; }
}
