/* RESERVE — mobile shell, applied to .device markup inside every page.
   The page hides .device on desktop (≥768px) and hides .page on mobile
   (≤767px) via the .reserve-mobile / .reserve-desktop wrappers in styles.css.
*/

:root {
  --m-pad: 22px;
  --m-pad-lg: 28px;
  --m-stack-gap: 26px;
}

.device {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.device.dark-bg-page .bg-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.device.dark-bg-page .bg-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 50%;
  filter: blur(14px) saturate(0.95);
  transform: scale(1.08);
}
.device.dark-bg-page .bg-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(var(--bg-rgb),.78), rgba(var(--bg-rgb),.78)),
    linear-gradient(to bottom,
      rgba(var(--bg-rgb),.30) 0%,
      rgba(var(--bg-rgb),.00) 25%,
      rgba(var(--bg-rgb),.00) 75%,
      rgba(var(--bg-rgb),.45) 100%);
}
.device.dark-bg-page > *:not(.bg-art):not(.m-drawer) { position: relative; z-index: 2; }

/* Shell padding */
.m-shell { padding-left: var(--m-pad); padding-right: var(--m-pad); }
.m-shell--lg { padding-left: var(--m-pad-lg); padding-right: var(--m-pad-lg); }

/* Top bar */
.m-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 16px;
  background: linear-gradient(to bottom, var(--bg) 72%, rgba(var(--bg-rgb), 0));
}
.device.dark-bg-page .m-nav {
  background: linear-gradient(to bottom, rgba(var(--bg-rgb),.96) 72%, rgba(var(--bg-rgb),0));
  backdrop-filter: blur(6px);
}
.m-brand {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.38em;
  color: var(--ink);
}
.m-menu-btn {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: transparent;
  border: 0;
  /* 48px square tap target — comfortably above the 44px minimum
     while the visible lines stay 22px wide. */
  padding: 14px;
  margin: -14px -14px -14px 0;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  justify-self: end;
  position: relative;
  z-index: 4;
}
.m-menu-btn span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 240ms ease, opacity 200ms ease;
}
.m-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.m-menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* Drawer */
.m-drawer {
  position: fixed;
  inset: 0;
  background: rgba(2,4,10,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  display: flex;
  flex-direction: column;
}
.m-drawer.is-open { opacity: 1; pointer-events: auto; }
@media (min-width: 540px) { .m-drawer { position: absolute; } }

.m-drawer-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 18px var(--m-pad) 16px;
}
.m-drawer-close {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px;
  margin: -14px -14px -14px 0;
  justify-self: end;
  cursor: pointer;
}
.m-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 24px var(--m-pad-lg) 32px;
  gap: 4px;
  margin-top: 8px;
}
.m-drawer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--ink);
  -webkit-tap-highlight-color: rgba(255,255,255,.04);
  touch-action: manipulation;
}
.m-drawer-links a[aria-current="page"] .num,
.m-drawer-links a[aria-current="page"] span:first-child { color: var(--ink); }
.m-drawer-links a.is-sub {
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 16px 0 16px 20px;
}
.m-drawer-links a.is-sub .lead-tick {
  width: 14px;
  height: 1px;
  background: var(--ink-mute);
  margin-right: 14px;
  flex: none;
}
.m-drawer-links a.is-sub > span:first-child { display: inline-flex; align-items: center; }
.m-drawer-links a .num {
  display: none;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.m-drawer-foot {
  margin-top: auto;
  padding: 24px var(--m-pad-lg) 36px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.m-drawer-foot .label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.m-drawer-foot a { color: var(--ink-soft); font-size: 13px; }

/* Hairline + section helpers */
.m-hr { height: 1px; background: var(--line); width: 100%; }
.m-hr--strong { background: var(--line-strong); }

.m-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.m-tick {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink-soft);
  opacity: .7;
}

.m-display {
  font-size: clamp(40px, 11.5vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 300;
  color: var(--ink);
  margin: 0;
}
.m-display .line { display: block; }

.m-lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 32ch;
  margin: 0;
}

/* CTA bar */
.m-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 4px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: border-color 200ms ease, padding-left 200ms ease;
}
.m-cta:active { padding-left: 8px; }
.m-cta .arrow { width: 28px; }

/* Footer */
.m-foot {
  margin-top: auto;
  padding: 22px var(--m-pad) 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.m-foot > span,
.m-foot > a {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11.5px;
}

/* Scroll-triggered entrance — text drifts up softly from the dark.
   Children stay hidden until the parent .m-rise gets .is-visible
   (added by the IntersectionObserver in each page's inline script). */
@keyframes mrise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.m-rise > * {
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
}
.m-rise.is-visible > * {
  animation: mrise 800ms cubic-bezier(.2,.6,.2,1) both;
}
.m-rise > *:nth-child(1) { animation-delay: 70ms; }
.m-rise > *:nth-child(2) { animation-delay: 160ms; }
.m-rise > *:nth-child(3) { animation-delay: 250ms; }
.m-rise > *:nth-child(4) { animation-delay: 340ms; }
.m-rise > *:nth-child(5) { animation-delay: 430ms; }
.m-rise > *:nth-child(6) { animation-delay: 520ms; }
.m-rise > *:nth-child(7) { animation-delay: 610ms; }

@media (prefers-reduced-motion: reduce) {
  .m-rise > * {
    opacity: 1; transform: none; filter: none; animation: none;
  }
}
