/* YACHTWAVE Interactive Demo — shell, gate, wizard, tour engine chrome.
   Brand palette per the YACHTWAVE design system. */

:root {
  --blue: #0478CC;
  --blue2: #4AA6E8;
  --blue3: #D9EBF7;
  --ink: #0B2239;
  --gray: #5A6A80;
  --green: #13CE8B;
  --red: #E8333C;
  --orange: #FA884C;
  --purple: #8D7EFB;
  --bg: #eef3f8;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 18px 50px -12px rgba(11, 34, 57, .28);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }

/* ============ overlay screens (gate / wizard / welcome / plans / closing) ============ */
.overlay-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(4, 120, 204, .16), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(74, 166, 232, .18), transparent 55%),
    var(--bg);
  overflow-y: auto; padding: 32px;
}

.btn-primary {
  background: var(--blue); color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 10px; transition: background .15s;
}
.btn-primary:hover { background: #0368b2; }
.btn-secondary {
  background: var(--ink); color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 10px; text-decoration: none;
}
.btn-ghost {
  color: var(--blue); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 10px; border: 1.5px solid var(--blue2);
}
.btn-lg { font-size: 16px; padding: 15px 32px; }

/* ---- gate ---- */
.gate-card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow);
  max-width: 480px; width: 100%; padding: 44px 46px; text-align: center;
}
.gate-logo { font-size: 26px; font-weight: 900; letter-spacing: .5px; }
.gate-logo span { color: var(--blue); }
.gate-logo sup { font-size: 10px; font-weight: 600; color: var(--gray); }
.gate-badge {
  display: inline-flex; align-items: center; gap: 7px; margin: 18px 0 20px;
  font-size: 12.5px; font-weight: 600; color: var(--gray);
  background: var(--blue3); border-radius: 99px; padding: 6px 14px;
}
.gate-badge .stars { color: var(--orange); letter-spacing: 1px; }
.gate-card h1 { font-size: 25px; font-weight: 800; line-height: 1.25; margin-bottom: 12px; }
.gate-card p { font-size: 14.5px; color: var(--gray); line-height: 1.55; margin-bottom: 26px; }
#gate-form { display: flex; flex-direction: column; gap: 10px; }
#gate-form input {
  font-family: var(--font); font-size: 15px; padding: 13px 16px;
  border: 1.5px solid #cdd9e4; border-radius: 10px; outline: none;
}
#gate-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(4, 120, 204, .14); }
.gate-fine { margin-top: 16px; font-size: 12px; color: #8fa0b3; }

/* ---- wizard ---- */
.wizard-inner { text-align: center; max-width: 900px; }
.wizard-inner h1 { font-size: 32px; font-weight: 800; }
.wizard-sub { color: var(--gray); font-size: 15px; margin: 10px 0 34px; }
.persona-cards { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.persona-card {
  background: var(--card); border-radius: var(--radius); box-shadow: 0 8px 28px -10px rgba(11, 34, 57, .18);
  width: 262px; padding: 30px 24px 26px; text-align: left;
  border: 2px solid transparent; transition: transform .15s, border-color .15s;
}
.persona-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.pc-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--blue3); color: var(--blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.pc-icon svg { width: 26px; height: 26px; }
.pc-title { font-size: 16.5px; font-weight: 800; margin-bottom: 7px; }
.pc-sub { font-size: 13px; color: var(--gray); line-height: 1.5; }

/* ---- welcome / closing spine ---- */
.welcome-inner, .closing-inner, .plans-inner { text-align: center; max-width: 860px; width: 100%; }
.welcome-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
}
.welcome-inner h1 { font-size: 34px; font-weight: 800; margin-bottom: 14px; }
.welcome-inner p { color: var(--gray); font-size: 15.5px; line-height: 1.6; max-width: 620px; margin: 0 auto; }
.welcome-spine {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 30px auto 26px; flex-wrap: wrap;
}
.welcome-spine span {
  font-size: 13px; font-weight: 700; color: var(--blue);
  background: var(--blue3); padding: 7px 14px; border-radius: 99px;
}
.welcome-spine i { width: 16px; height: 2px; background: var(--blue2); border-radius: 2px; }
.welcome-story { margin-bottom: 30px !important; }
.welcome-story strong { color: var(--ink); }

/* ---- closing ---- */
.closing-inner h1 { font-size: 30px; font-weight: 800; line-height: 1.3; margin: 26px 0 14px; }
.closing-inner > p { color: var(--gray); font-size: 15.5px; margin-bottom: 34px; }
.closing-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.closing-ctas a { text-decoration: none; }
.closing-links { font-size: 13.5px; color: var(--gray); display: flex; gap: 10px; justify-content: center; }
.closing-links a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ---- plans ---- */
.plans-inner h1 { font-size: 32px; font-weight: 800; }
.plans-sub { color: var(--gray); font-size: 15px; margin: 10px 0 28px; }
.plan-table {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; text-align: left; max-width: 720px; margin: 0 auto;
}
.pt-row {
  display: grid; grid-template-columns: 1fr 110px 110px; align-items: center;
  padding: 11px 26px; border-bottom: 1px solid #eef2f6; font-size: 14px;
}
.pt-row > div:nth-child(2), .pt-row > div:nth-child(3) { text-align: center; }
.pt-row:last-child { border-bottom: 0; }
.pt-head { background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; padding: 15px 26px; }
.pt-head .ult-col { color: #fff; }
.pt-row .ult-col { background: rgba(4, 120, 204, .06); align-self: stretch; display: flex; align-items: center; justify-content: center; }
.pt-feature { font-weight: 600; }
.pt-badge {
  margin-left: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  color: var(--orange); border: 1px solid var(--orange); border-radius: 99px; padding: 2px 8px;
  vertical-align: 1px;
}
.pt-yes { color: var(--green); font-weight: 800; font-size: 15px; }
.pt-no { color: #c3ced9; }
.plans-note { font-size: 12.5px; color: #8fa0b3; margin: 18px 0 26px; }
.plans-note a { color: var(--blue); }

/* ============ demo shell ============ */
#shell { position: fixed; inset: 0; display: flex; flex-direction: column; }

#demo-header {
  height: 62px; flex: 0 0 62px; background: var(--ink); color: #fff;
  display: flex; align-items: center; padding: 0 22px; gap: 24px; z-index: 120;
}
.hdr-logo { font-size: 17px; font-weight: 900; letter-spacing: .4px; white-space: nowrap; }
.hdr-logo span { color: var(--blue2); }
#stepper { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.stage {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .38); white-space: nowrap;
  transition: color .3s;
}
.stage i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, .22); transition: background .3s, box-shadow .3s;
}
.stage.lit { color: rgba(255, 255, 255, .85); }
.stage.lit i { background: var(--green); }
.stage.current { color: #fff; font-weight: 800; }
.stage.current i { box-shadow: 0 0 0 4px rgba(19, 206, 139, .25); }
.stage-sep { width: 18px; height: 1.5px; background: rgba(255, 255, 255, .18); border-radius: 2px; }
.btn-cta {
  background: var(--green); color: var(--ink); font-weight: 800; font-size: 13.5px;
  padding: 10px 18px; border-radius: 9px; text-decoration: none; white-space: nowrap;
}
.btn-cta:hover { filter: brightness(1.06); }

/* ---- stage layouts ---- */
#stage {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  gap: 40px; padding: 26px; min-height: 0;
}
.surface-wrap { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
#stage.mode-phone #fleet-wrap { display: none; }
#stage.mode-fleet #phone-wrap { display: none; }
#stage.mode-split #fleet-wrap { flex: 1; }
#stage.mode-split .browser-frame { transform: scale(.94); }
#stage.mode-split .iphone-frame { transform: scale(.86); }

/* browser frame */
.browser-frame {
  width: min(1060px, calc(100vw - 420px));
  background: #dfe7ee; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
#stage.mode-fleet .browser-frame { width: min(1120px, calc(100vw - 80px)); }
.browser-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.bdot { width: 10px; height: 10px; border-radius: 50%; }
.bdot.r { background: #ff5f57; } .bdot.y { background: #febc2e; } .bdot.g { background: #28c840; }
.burl {
  margin-left: 12px; background: #fff; border-radius: 7px; height: 22px;
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
  font-size: 11.5px; color: var(--gray); min-width: 260px;
}
#fleet-screen { height: min(640px, calc(100vh - 180px)); background: #f4f7fa; }

/* iphone frame */
.iphone-frame {
  width: 336px; height: min(700px, calc(100vh - 140px));
  background: #0b0d10; border-radius: 46px; padding: 10px;
  box-shadow: var(--shadow), inset 0 0 0 2.5px #3a3f45;
  position: relative;
}
.iphone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 26px; background: #0b0d10; border-radius: 99px; z-index: 5;
}
.iphone-frame .app-screen {
  width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #f4f7fa;
}

/* ---- spotlight + tooltip ---- */
#spotlight {
  position: fixed; z-index: 130; pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(11, 34, 57, .52), 0 0 0 2.5px var(--blue2);
  transition: all .35s cubic-bezier(.4, 0, .2, 1);
}
#tooltip {
  position: fixed; z-index: 140; width: 330px;
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px -12px rgba(11, 34, 57, .45);
  padding: 18px 20px 16px;
  transition: left .35s cubic-bezier(.4, 0, .2, 1), top .35s cubic-bezier(.4, 0, .2, 1);
}
.tt-chapter {
  font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 7px;
}
.tt-title { font-size: 16.5px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.tt-copy { font-size: 13.5px; color: var(--gray); line-height: 1.58; margin-bottom: 15px; }
.tt-foot { display: flex; align-items: center; justify-content: space-between; }
.tt-count { font-size: 12px; font-weight: 600; color: #9fb0c1; }
.tt-btns { display: flex; gap: 8px; }
.tt-btn { font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 8px; }
.tt-btn.ghost { color: var(--gray); }
.tt-btn.ghost:hover { background: #f0f4f8; }
.tt-btn.solid { background: var(--ink); color: #fff; }
.tt-btn.solid:hover { background: #163350; }

/* ---- persistent tour button + chapter menu ---- */
#tour-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
  padding: 11px 18px; border-radius: 99px; box-shadow: 0 10px 30px -8px rgba(11, 34, 57, .5);
}
#chapter-menu {
  position: fixed; right: 22px; bottom: 72px; z-index: 150; width: 250px;
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px -12px rgba(11, 34, 57, .4);
  padding: 10px; overflow: hidden;
}
.cm-head {
  font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: #9fb0c1; padding: 8px 12px 6px;
}
.cm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  padding: 9px 12px; border-radius: 9px; text-align: left;
}
.cm-item:hover { background: #f0f4f8; }
.cm-item.on { background: var(--blue3); color: var(--blue); }
.cm-item b {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  background: var(--blue3); color: var(--blue); font-size: 11.5px;
  display: flex; align-items: center; justify-content: center;
}
.cm-item.on b { background: var(--blue); color: #fff; }

/* narrow screens: the demo is desktop-first */
@media (max-width: 900px) {
  #stepper .stage { display: none; }
  #stepper::after { content: 'Best experienced on a desktop'; font-size: 12px; color: rgba(255,255,255,.5); }
}
