/* Experience TILOTS — walkthrough styles
   Palette derived from the supplied TILOTS screens:
   warm cream surfaces, sage controls, deep navy type. */

:root {
  --cream: #EDE5D9;
  --cream-deep: #E7DED0;
  --surface: #FBF7F0;
  --navy: #14364A;
  --navy-soft: #3C4A52;
  --sage: #A9C89C;
  --sage-hover: #9BBF8C;
  --sage-deep: #3F5E3A;
  --muted: #6B7A6B;
  --hairline: rgba(20, 54, 74, 0.10);
  --hairline-strong: rgba(20, 54, 74, 0.24);
  --ease: cubic-bezier(0, 0, 0.2, 1);
}

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

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--navy);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--sage-deep); }

button { font: inherit; }

:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; border-radius: 4px; }

/* ── Bars ─────────────────────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 2.8vw, 28px) clamp(18px, 4vw, 52px);
}

.bar--top { border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.bar--bottom {
  position: sticky;
  bottom: 0;
  z-index: 20;
  flex-wrap: wrap;
  padding-top: clamp(14px, 2.2vw, 22px);
  padding-bottom: clamp(14px, 2.2vw, 22px);
  border-top: 1px solid var(--hairline);
  background: var(--cream-deep);
}

.ident { display: flex; align-items: baseline; gap: 14px; }

.wordmark { font-size: 16px; font-weight: 700; letter-spacing: 0.22em; }

.rule { display: inline-block; width: 1px; height: 14px; background: rgba(20, 54, 74, 0.2); }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5C6B63;
}

.progress { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn--music {
  padding: 9px 16px;
  min-height: 40px;
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--navy);
}
.btn--music:hover { border-color: var(--sage-deep); }
.btn--music[aria-pressed="true"] { background: var(--sage); border-color: var(--sage); }

.music-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(20, 54, 74, 0.3);
}
.btn--music[aria-pressed="true"] .music-dot { background: var(--sage-deep); }

.music-state { font-weight: 400; color: var(--navy-soft); }

.dots { display: flex; align-items: center; gap: 7px; }

.dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(20, 54, 74, 0.32);
  transition: background 320ms var(--ease), border-color 320ms var(--ease);
}
.dots span.is-past { background: var(--sage); border-color: var(--sage); }
.dots span.is-current { width: 9px; height: 9px; background: var(--navy); border-color: var(--navy); }

.counter {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  min-width: 74px;
  text-align: right;
}

.footnote { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }

/* ── Main ─────────────────────────────────────────────── */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 44px) clamp(18px, 4vw, 52px) clamp(104px, 14vh, 132px);
}

.view { width: 100%; max-width: 1060px; }

@media (prefers-reduced-motion: no-preference) {
  .view[data-enter] { animation: rise 520ms var(--ease) both; }
}

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

.opening {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.label {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  margin: 0 0 22px;
  font-family: 'Playwrite US Modern', 'Nunito Sans', cursive;
  font-weight: 300;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.display--sm { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.34; margin-bottom: 24px; }

.lede {
  margin: 0 0 34px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--navy-soft);
  max-width: 44ch;
  text-wrap: pretty;
}

/* ── Screenshot ───────────────────────────────────────── */

.shot { margin: 0 0 clamp(20px, 2.4vw, 30px); display: flex; flex-direction: column; }

.shot__frame {
  align-self: center;
  height: clamp(240px, calc(100vh - 390px), 620px);
  aspect-ratio: 1280 / 757;
  width: auto;
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(20, 54, 74, 0.08);
  box-shadow: 0 18px 44px rgba(20, 54, 74, 0.10);
}

.shot__frame img { display: block; width: 100%; height: 100%; object-fit: contain; }

.view--opening .shot__frame { height: auto; aspect-ratio: 1280 / 742; width: 100%; }

.view--opening .shot__frame img { object-fit: cover; }

.shot__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.note { font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 62ch; }

.shot__tools { display: flex; align-items: center; gap: 18px; margin-left: auto; }

.thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid rgba(20, 54, 74, 0.12);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 320ms var(--ease);
}
.thumb:hover { border-color: rgba(20, 54, 74, 0.3); }
.thumb img { display: block; width: 96px; height: 57px; object-fit: cover; border-radius: 7px; }
.thumb span { font-size: 13px; line-height: 1.4; color: var(--navy-soft); padding-right: 8px; }

.linkish {
  padding: 8px 4px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  color: var(--navy);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 320ms var(--ease);
}
.linkish:hover { border-color: var(--sage-deep); }

/* ── Copy ─────────────────────────────────────────────── */

.copy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 3.4vw, 48px);
  align-items: start;
}

.headline {
  margin: 0;
  font-size: clamp(24px, 2.9vw, 34px);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.body { margin: 0; font-size: 17px; line-height: 1.72; color: var(--navy-soft); max-width: 52ch; text-wrap: pretty; }
.body--wide { max-width: none; margin-bottom: 40px; }

.closing { max-width: 760px; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  min-height: 46px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 320ms var(--ease), border-color 320ms var(--ease);
}

.btn--lg { padding: 15px 28px; min-height: 48px; font-size: 16px; }

.btn--primary { background: var(--sage); border: 1px solid var(--sage); color: var(--navy); }
.btn--primary:hover { background: var(--sage-hover); border-color: var(--sage-hover); color: var(--navy); }

.btn--ghost { background: transparent; border: 1px solid var(--hairline-strong); color: var(--navy); }
.btn--ghost:hover { border-color: var(--sage-deep); color: var(--navy); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn--primary[disabled] { background: #D6DFD0; border-color: #D6DFD0; }
.btn--ghost[disabled] { color: rgba(20, 54, 74, 0.45); }

/* ── Lightbox ─────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(20, 54, 74, 0.78);
}

.lightbox[hidden] { display: none; }

.lightbox img { display: block; max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35); }

.btn--close {
  position: fixed;
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  background: var(--surface);
  border: none;
  color: var(--navy);
  font-size: 14px;
  padding: 11px 20px;
  min-height: 44px;
}

@media (max-width: 720px) {
  .bar--bottom { flex-wrap: wrap; }
  .footnote { order: 3; width: 100%; }
  .shot__tools { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
