/* ─── Atlantis Diving Lanzarote — Onboarding Prototype ─────────── */

:root {
  --blue: #1A6BB5;
  --blue-deep: #0F4D86;
  --blue-ink: #082C4F;
  --cyan: #00AEEF;
  --yellow: #FFD700;
  --ink: #0A0A0A;
  --ink-2: #2A2A2A;
  --muted: #6B7380;
  --line: #E6EAF0;
  --bg-soft: #F4F7FB;
  --bg-cream: #FFF9E6;
  --ok: #17A657;
  --err: #E53935;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  background: #E9EEF3;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.display { font-family: 'Archivo Black', 'Archivo', sans-serif; letter-spacing: -0.01em; }

/* ─── Stage ─── */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 80px;
  gap: 32px;
}

/* ─── Phone shell ─── */
.phone {
  width: 375px;
  height: 812px;
  background: #fff;
  border-radius: 44px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(8, 44, 79, 0.35),
    0 0 0 10px #0e1420,
    0 0 0 11px #2a3240;
  flex-shrink: 0;
}

.phone-status {
  position: absolute; top: 0; left: 0; right: 0;
  height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px 0;
  z-index: 30;
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}
.phone-status.on-dark { color: #fff; }
.phone-status .time { padding-left: 8px; }
.phone-status .icons { display: flex; gap: 6px; align-items: center; padding-right: 4px; }
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 30px; border-radius: 18px; background: #000;
  z-index: 40;
}
.phone-home {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; border-radius: 3px;
  background: rgba(0,0,0,0.25);
  z-index: 60;
}
.phone-home.light { background: rgba(255,255,255,0.7); }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* ─── Top chrome (back + progress) ─── */
.chrome {
  padding: 56px 20px 14px;
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  position: sticky; top: 0; z-index: 10;
}
.chrome.on-blue { background: var(--blue); }
.back-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  flex-shrink: 0;
  transition: transform 0.12s;
}
.back-btn:active { transform: scale(0.94); }
.chrome.on-blue .back-btn { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.25); color: #fff; }

.progress-wrap {
  flex: 1;
  display: flex; flex-direction: column; gap: 5px;
}
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.progress-meta .pct { color: var(--blue); }
.progress-bar {
  height: 6px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(.2,.8,.2,1);
}

/* ─── Headings ─── */
.h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 30px; line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px; line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
.eyebrow {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--cyan);
}
.sub {
  font-size: 14px; line-height: 1.45;
  color: var(--muted);
  margin: 6px 0 0;
}

/* ─── Form controls ─── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  letter-spacing: 0.01em;
}
.field-label .req { color: var(--blue); margin-left: 2px; }
.field-hint { font-size: 11px; color: var(--muted); }

.input, .select {
  height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26, 107, 181, 0.12);
}
.input.with-icon { padding-left: 42px; }
.input::placeholder { color: #9CA5B2; }
.input.filled { background: #F8FAFD; }

.input-wrap { position: relative; }
.input-wrap .lead-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}

.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7380' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ─── Stepper ─── */
.stepper {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  width: 100%;
  height: 56px;
  background: #fff;
}
.stepper-btn {
  width: 44px; height: 44px; border: none; border-radius: 10px;
  background: var(--bg-soft);
  color: var(--blue);
  font-size: 22px; font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
}
.stepper-btn:active { transform: scale(0.94); }
.stepper-val {
  flex: 1; text-align: center;
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px;
  color: var(--ink);
}
.stepper-val small {
  font-family: 'Archivo', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--muted); margin-left: 4px;
}

/* ─── Buttons ─── */
.btn {
  height: 52px;
  border-radius: 14px;
  border: none;
  font-family: 'Archivo', sans-serif;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
  width: 100%;
  padding: 0 18px;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 6px 14px -4px rgba(26, 107, 181, 0.55);
}
.btn-primary:hover:not(:disabled) { background: var(--blue-deep); }

.btn-dark {
  background: var(--ink); color: #fff;
}
.btn-ghost {
  background: #fff; color: var(--blue);
  border: 1.5px solid var(--line);
}
.btn-yellow {
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 6px 14px -4px rgba(255, 215, 0, 0.7);
}

/* ─── Toggles (Yes/No) ─── */
.yn-row { display: flex; gap: 8px; }
.yn-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: 'Archivo', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s;
}
.yn-btn[data-state="yes-on"] {
  background: #FEE7E6; border-color: var(--err); color: var(--err);
}
.yn-btn[data-state="no-on"] {
  background: #DFF6E8; border-color: var(--ok); color: var(--ok);
}

/* ─── Checkbox ─── */
.check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.check.checked {
  background: var(--blue); border-color: var(--blue);
}
.check.checked svg { display: block; }
.check svg { display: none; }

/* ─── Keyboard hint ─── */
.keyboard {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 260px;
  background: #D1D4DB;
  border-top: 1px solid #B8BCC5;
  z-index: 20;
  padding: 8px 3px 30px;
  display: flex; flex-direction: column; gap: 10px;
  animation: kbUp 0.3s cubic-bezier(.2,.8,.2,1);
}
@keyframes kbUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.kb-row { display: flex; gap: 5px; justify-content: center; padding: 0 3px; }
.kb-key {
  flex: 1;
  min-width: 0;
  height: 42px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 400;
  color: #0A0A0A;
}
.kb-key.wide { flex: 1.4; background: #AAB0BB; color: #fff; font-size: 13px; }
.kb-key.space { flex: 4.5; background: #fff; }
.kb-key.return { flex: 1.6; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; }

/* ─── Badges / chips ─── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--blue);
}
.chip.cyan { background: rgba(0,174,239,0.12); color: #057BA6; }
.chip.yellow { background: rgba(255,215,0,0.22); color: #8A6B00; }

/* ─── Scene selector (desktop panel) ─── */
.nav-panel {
  width: 240px;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px -20px rgba(8, 44, 79, 0.2);
  position: sticky;
  top: 40px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.nav-panel h3 {
  font-family: 'Archivo Black', sans-serif;
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-panel .nav-sub { font-size: 11px; color: var(--muted); margin: 0 0 16px; }
.nav-panel ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-panel li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  transition: background 0.12s;
}
.nav-panel li:hover { background: var(--bg-soft); }
.nav-panel li.active { background: var(--blue); color: #fff; font-weight: 600; }
.nav-panel li .num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-soft); color: var(--blue);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.nav-panel li.active .num { background: rgba(255,255,255,0.22); color: #fff; }

.panel-footer {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); line-height: 1.5;
}

/* ─── Tweaks panel ─── */
.tweaks {
  position: fixed; right: 24px; bottom: 24px;
  width: 280px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.25);
  z-index: 100;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 {
  margin: 0 0 12px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 14px;
}
.tweaks .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.tweaks select, .tweaks input[type="text"] { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 12px; }

/* ─── Animations ─── */
@keyframes popIn { 0% { transform: scale(0); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes floatMascot { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes bubble { 0% { transform: translateY(0) scale(0.4); opacity: 0; } 20% { opacity: 0.7; } 100% { transform: translateY(-80px) scale(1); opacity: 0; } }
@keyframes screenSlide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

.screen { /* screenSlide animation removed — was causing blank-canvas bug */ }

/* ─── Signature pad ─── */
.sig-pad {
  width: 100%; height: 180px;
  background: #fff;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  position: relative;
  touch-action: none;
  cursor: crosshair;
  overflow: hidden;
}
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sig-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: #C9D1DD; font-size: 13px; pointer-events: none;
}

/* ─── Accordion ─── */
.acc-item {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.acc-item.checked { border-color: var(--blue); background: #F6FAFE; }
.acc-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  cursor: pointer;
}
.acc-head .title { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); }
.acc-head .title small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.28s ease;
  padding: 0 14px;
}
.acc-body.open {
  max-height: 500px;
  padding: 0 14px 14px;
}
.acc-body p {
  font-size: 12px; line-height: 1.55; color: var(--ink-2);
  margin: 0 0 10px;
}

/* Ripples, wave decoration */
.wave-deco {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
}
