/* Vekoma × Mobaro QR — neutral partnership chrome (neither brand owns the palette) */

:root {
  --ink: #1b1f21;
  --ink-soft: #2c3136;
  --muted: #5c6366;
  --on-surface: #22262a;
  --surface: #ffffff;
  --bg: #eceeef;
  --wash: #f3f4f5;
  --outline: #a8adb1;
  --line: rgba(28, 32, 36, 0.12);
  --accent: #2c3136;
  --accent-soft: #e6e8ea;
  --on-accent: #ffffff;
  --ok: #3d6b4a;
  --ok-bg: #f3f8f4;
  --err: #d21515;
  --hero-ink: #121417;
  --font: "Outfit", "Helvetica Neue", sans-serif;
  --pad: 20px;
  --content: 26rem;
  --radius-full: 999px;
  --radius-md: 12px;
  --shadow: 0 18px 40px rgba(18, 20, 23, 0.16);
  --header-offset: calc(56px + env(safe-area-inset-top, 0px) + 12px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Sticky header clearance for in-page anchors */
#integrations,
#docs-sync,
.pillar[id],
.block[id] {
  scroll-margin-top: var(--header-offset);
}

body {
  margin: 0;
  font: 400 16px/1.45 var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 35% at 100% 0%, rgba(160, 166, 172, 0.22), transparent 55%),
    var(--bg);
}

/* Passthrough on real phones — chrome only from 720px up */
@media (max-width: 719px) {
  .phone-shell,
  .phone-bezel,
  .phone-screen {
    min-height: 100%;
  }
}

.phone-notch {
  display: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 20px;
  line-height: 1;
  user-select: none;
}

/* —— Sticky partnership header —— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(56px + env(safe-area-inset-top, 0px));
  padding:
    env(safe-area-inset-top, 0px)
    var(--pad)
    0;
  color: #fff;
  background: transparent;
  isolation: isolate;
}

/* Separate layer so logos / × don’t re-composite when the bar fades in */
.site-header-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.site-header.is-stuck .site-header-bg {
  opacity: 1;
}

/* Stay readable over the booking backdrop */
/* —— Hero ——
   Upper band = promise (uses the photo). Lower band = booking CTAs.
   Do not center the whole stack or park it all at the bottom. */

.hero {
  position: relative;
  isolation: isolate;
  /* Fixed height (not min-height) so URL-bar resize can’t reflow flex CTAs */
  height: var(--app-height, 100svh);
  min-height: var(--app-height, 100svh);
  margin-top: calc(-56px - env(safe-area-inset-top, 0px));
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keep structure behind the mid gap between copy and CTAs */
  object-position: 62% 28%;
  transform: scale(1.03);
  filter: grayscale(1) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(18, 20, 23, 0.58) 0%,
      rgba(18, 20, 23, 0.5) 22%,
      rgba(18, 20, 23, 0.62) 48%,
      rgba(18, 20, 23, 0.84) 72%,
      rgba(18, 20, 23, 0.94) 90%,
      var(--hero-ink) 100%
    );
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  box-sizing: border-box;
  width: min(100%, var(--content));
  margin-inline: auto;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding:
    calc(64px + env(safe-area-inset-top, 0px))
    var(--pad)
    calc(16px + env(safe-area-inset-bottom, 0px));
}

.hero-copy {
  max-width: 22rem;
  /* Sit in the upper half, under the sticky brands */
  margin-top: clamp(8px, 3.5%, 28px);
}

.hero-actions {
  margin-top: auto;
  padding-top: 28px;
  width: 100%;
}

.brands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 44px;
  width: 100%;
  max-width: var(--content);
}

.brands img {
  filter: brightness(0) invert(1);
}

/* Optical balance: Vekoma is tall+airy; Mobaro is denser horizontal */
.logo-vekoma {
  height: 38px;
  width: auto;
}

.logo-mobaro {
  height: 22px;
  width: auto;
}

.brand-x {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  position: relative;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.brand-x::before,
.brand-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
}

.brand-x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.brand-x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 6.2vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 17ch;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(18, 20, 23, 0.35);
}

.hero .lede {
  margin: 0 0 14px;
  font-size: 0.98rem;
  font-weight: 400;
  color: rgba(240, 245, 247, 0.9);
  max-width: 34ch;
}

/* Status, not a CTA — avoids competing with the two book buttons */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: rgba(230, 234, 236, 0.92);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.live-badge .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.read-more {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 12px;
  max-width: 26ch;
  color: rgba(220, 224, 228, 0.62);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.read-more:hover {
  color: rgba(230, 234, 236, 0.88);
}

.read-more-text {
  display: block;
}

.read-more .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
  opacity: 0.85;
  animation: bob 1.8s ease-in-out infinite;
}

.cta-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(220, 224, 228, 0.85);
}

.hero-cta {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}

.jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(240, 245, 247, 0.82);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  min-height: 40px;
}

.jump .material-symbols-outlined {
  font-size: 18px;
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.reveal {
  animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
.reveal.d4 { animation-delay: 0.34s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Buttons —— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font: 600 14px/1.2 var(--font);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  color: inherit;
  background: transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn .material-symbols-outlined {
  font-size: 18px;
}

.btn .end {
  opacity: 0.55;
  font-size: 16px;
}

/* Equal partnership CTAs — neither is secondary */
.btn.book {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
  justify-content: center;
  gap: 10px;
  padding-inline: 18px;
}

.btn.book:hover {
  background: #fff;
}

.btn-glyph {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.btn-glyph.mobaro {
  /* Keep Mobaro mark in its own teal on the neutral button */
  filter: invert(22%) sepia(24%) saturate(1204%) hue-rotate(143deg) brightness(92%) contrast(95%);
}

.btn-glyph.vekoma {
  width: 28px;
  height: 20px;
  filter: none;
}

.btn.tonal {
  width: 100%;
  background: var(--accent);
  color: var(--on-accent);
}

.btn.text {
  min-height: 40px;
  color: var(--accent);
  padding: 0 8px;
}

/* —— Sections —— */

.block {
  width: min(100%, var(--content));
  margin-inline: auto;
  padding: 36px var(--pad) calc(36px + env(safe-area-inset-bottom, 0px));
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.section-ico {
  color: var(--accent);
  font-size: 22px;
}

.block h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.02em;
}

.section-lede {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  max-width: 34ch;
}

/* —— Pillars —— */

.pillars {
  border-top: 1px solid var(--line);
}

.pillar {
  border-bottom: 1px solid var(--line);
}

.pillar summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
}

.pillar summary::-webkit-details-marker {
  display: none;
}

.pillar .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.pillar .ico .material-symbols-outlined {
  font-size: 22px;
}

.pillar[open] .ico {
  background: var(--accent);
  color: #fff;
}

.meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-top: 2px;
}

.tag {
  justify-self: start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.tag.live {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #c5d9cb;
}

.tag.coming {
  background: var(--wash);
  color: var(--muted);
  border: 1px solid var(--line);
}

.name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.01em;
}

.blurb {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.chev {
  color: var(--muted);
  margin-top: 12px;
  transition: transform 0.22s ease;
}

.pillar[open] .chev {
  transform: rotate(180deg);
  color: var(--accent);
}

.panel {
  padding: 0 0 20px;
  overflow: hidden;
}

.steps {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--on-surface);
}

.steps li::marker {
  color: var(--accent);
  font-weight: 600;
}

.watch {
  margin-top: 4px;
}

.watch > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px 0 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.watch > summary:hover {
  border-color: var(--accent);
}

.watch > summary::-webkit-details-marker {
  display: none;
}

.watch > summary .material-symbols-outlined {
  font-size: 20px;
}

.video-shell {
  width: min(100%, 260px);
  margin: 8px auto 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0a2e33;
  box-shadow: var(--shadow);
  aspect-ratio: 9 / 16;
}

.watch[open] > .video-shell,
.pillar > .panel {
  will-change: height;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

/* —— Bookings drawer (official MS Bookings iframe) ——
   Closed with visibility/transform (not display:none) so the iframe can preload. */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  /* Hidden when idle so a translated panel can’t extend scroll areas */
  visibility: hidden;
}

.drawer.is-open,
.drawer.is-closing {
  visibility: visible;
}

.drawer.is-open {
  pointer-events: auto;
}

/* Don’t let the sticky brands steal taps while booking */
body.drawer-open .site-header {
  pointer-events: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 20, 23, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer.is-closing .drawer-backdrop {
  opacity: 0;
}

.drawer-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 95dvh;
  max-height: 95dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -12px 40px rgba(18, 20, 23, 0.2);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* transform: none (not translateY(0)) — Chrome won’t pass clicks into iframes
   while an ancestor still has a transform. */
.drawer.is-open .drawer-panel {
  transform: none;
}

.drawer.is-closing .drawer-panel {
  transform: translateY(100%);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.28s;
}

.drawer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding:
    max(8px, env(safe-area-inset-top, 0px))
    10px
    8px
    14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface);
}

.drawer-glyph {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.drawer-glyph[hidden] {
  display: none;
}

.drawer-glyph.mobaro {
  width: 20px;
  height: 20px;
  filter: invert(22%) sepia(24%) saturate(1204%) hue-rotate(143deg) brightness(92%) contrast(95%);
}

.drawer-glyph.vekoma {
  width: 26px;
  height: 18px;
}

.drawer-bar h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-external {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.drawer-external[hidden] {
  display: none;
}

.drawer-external .material-symbols-outlined {
  font-size: 18px;
}

.drawer-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--wash);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.drawer-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.drawer-tip {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}

.drawer-tip[hidden] {
  display: none;
}

.drawer-tip strong {
  font-weight: 600;
  color: var(--ink);
}

.drawer-frame-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.drawer-frame-wrap[hidden] {
  display: none;
}

.drawer-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  pointer-events: auto;
}

.drawer-fallback {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
}

.drawer-fallback[hidden],
.drawer-missing[hidden] {
  display: none;
}

.drawer-missing {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 28px 24px;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
}

.drawer-missing p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 28ch;
}

.drawer-missing-hint {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--muted);
}

.drawer-missing code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--wash);
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .phone-screen {
  overflow: hidden;
}

/* Desktop: show the page inside a phone shell so layout matches mobile */
@media (min-width: 720px) {
  body {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 28px 20px;
    overflow: hidden;
    background:
      radial-gradient(ellipse 55% 45% at 50% 20%, rgba(255, 255, 255, 0.08), transparent 55%),
      radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 0, 0, 0.35), transparent 60%),
      #1a1d20;
  }

  .phone-shell {
    --phone-max-h: calc(100dvh - 56px);
    width: min(390px, calc(100vw - 40px), calc(var(--phone-max-h) * 390 / 844));
    height: min(844px, var(--phone-max-h));
    max-height: var(--phone-max-h);
    min-height: 0; /* grid defaults to min-height:auto and lets content blow past the cap */
    aspect-ratio: 390 / 844;
    flex-shrink: 0;
  }

  .phone-bezel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 12px;
    border-radius: 44px;
    overflow: hidden; /* clip closed drawer so it can’t extend scroll */
    background: linear-gradient(160deg, #3a3e42 0%, #121417 40%, #0a0b0c 100%);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 28px 64px rgba(0, 0, 0, 0.45),
      0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .phone-notch {
    display: block;
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 50;
    width: 88px;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 8px;
    background: #0a0b0c;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
    pointer-events: none;
  }

  .phone-screen {
    position: relative;
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 32px;
    background:
      radial-gradient(ellipse 70% 35% at 100% 0%, rgba(160, 166, 172, 0.22), transparent 55%),
      var(--bg);
    -webkit-overflow-scrolling: touch;
  }

  /* Keep mobile composition — viewport media queries would otherwise widen layout */
  .hero-cta {
    grid-template-columns: 1fr;
  }

  .hero-media img {
    object-position: 62% 28%;
  }

  /* Overlay the phone screen (sibling of #phone-screen, not inside its scroll) */
  .drawer {
    position: absolute;
    inset: 12px;
    border-radius: 32px;
    overflow: hidden;
  }

  .drawer-panel {
    width: 100%;
    height: 95%;
    max-height: 95%;
    border-radius: 18px 18px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .jump .material-symbols-outlined {
    animation: none !important;
  }

  .drawer-backdrop,
  .drawer-panel {
    transition: none !important;
  }
}
