/* Invisihome — investor deck
   Claude-ish restraint (serif display, hairline rules, generous air)
   on the Invisihome palette, over white. */

:root {
  /* Brand, lifted straight from lib/core/theme.dart */
  --charcoal:   #2D3436;
  --teal:       #4E8D8D;
  --teal-deep:  #3C7373;
  --light-teal: #9BB5B5;
  --sage:       #8BA888;
  --beige:      #C4B9A4;

  /* Surfaces */
  --bg:        #FFFFFF;
  --panel:     #FBFAF8;
  --panel-2:   #F5F2ED;
  --line:      #EBE7E0;
  --line-soft: #F2EFE9;

  /* Ink */
  --ink:       #2D3436;
  --ink-muted: #6B7472;
  --ink-faint: #9AA2A0;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --pad: clamp(28px, 5vw, 88px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow: hidden; }
body.scrollable { overflow: auto; }

/* ───────────────────────────── chrome ───────────────────────────── */

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--line-soft); z-index: 60;
}
.progress__bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--sage));
  transition: width 620ms var(--ease);
}

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 14px; letter-spacing: -0.01em; font-weight: 600;
  color: var(--ink); text-decoration: none;
}
.brand__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  align-self: center;
}
.brand__section {
  font-weight: 400; font-size: 12.5px; color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.topbar__right { display: flex; align-items: center; gap: 8px; }

.ghost-btn {
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 200ms var(--ease-soft), color 200ms var(--ease-soft),
              border-color 200ms var(--ease-soft);
}
.ghost-btn:hover { background: var(--panel-2); color: var(--ink); border-color: var(--beige); }

.counter {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px; color: var(--ink-faint);
  padding: 7px 4px 7px 10px;
}
.counter b { color: var(--ink); font-weight: 600; }

/* ───────────────────────────── stage ───────────────────────────── */

.stage {
  position: relative;
  height: 100vh; height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.slide {
  position: absolute; inset: 0;
  display: grid;
  align-content: center;
  padding: 92px var(--pad) 84px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }

/* two-column feature slide */
.slide--feature .inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.slide--statement .inner,
.slide--cover .inner,
.slide--closing .inner { max-width: 940px; margin: 0 auto; }

.slide--grid .inner { max-width: 1180px; margin: 0 auto; width: 100%; }

/* ───────────────────────────── copy ───────────────────────────── */

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--beige);
}

h1.title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.021em;
  line-height: 1.09;
  color: var(--ink);
  font-size: clamp(30px, 3.5vw, 50px);
  text-wrap: balance;
}
.slide--statement h1.title { font-size: clamp(30px, 4.1vw, 58px); line-height: 1.12; }
.slide--cover h1.title    { font-size: clamp(52px, 9vw, 116px); line-height: 1; letter-spacing: -0.035em; }
.slide--closing h1.title  { font-size: clamp(44px, 7vw, 88px); letter-spacing: -0.03em; }

.lede {
  margin-top: 20px;
  font-size: clamp(15px, 1.15vw, 17.5px);
  line-height: 1.62;
  color: var(--ink-muted);
  max-width: 60ch;
  text-wrap: pretty;
}
.slide--statement .lede,
.slide--cover .lede { font-size: clamp(16px, 1.35vw, 20px); max-width: 62ch; }
.slide--cover .lede { margin-top: 30px; }

.footnote {
  margin-top: 40px;
  font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--ink-faint);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: inline-block;
}

/* bullets */
.bullets { list-style: none; margin-top: 34px; display: grid; gap: 17px; }
.bullets li {
  position: relative;
  padding-left: 26px;
  font-size: clamp(14px, 1.05vw, 15.6px);
  line-height: 1.58;
  color: var(--ink);
  max-width: 54ch;
}
.bullets li::before {
  content: "";
  position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--teal);
  opacity: 0.85;
}
.bullets li:nth-child(2)::before { background: var(--sage); }
.bullets li:nth-child(3)::before { background: var(--beige); }
.bullets li:nth-child(4)::before { background: var(--light-teal); }

/* grid slides */
.cards {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cards--2, .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards {
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.card {
  background: var(--bg);
  padding: clamp(20px, 2vw, 30px);
  transition: background 260ms var(--ease-soft);
}
.card:hover { background: var(--panel); }
.card__k {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal);
  margin-bottom: 12px;
}
.card__v { font-size: 14.4px; line-height: 1.56; color: var(--ink-muted); }

.note {
  margin-top: 26px; font-size: 12.5px; line-height: 1.6;
  color: var(--ink-faint); max-width: 78ch;
  padding-left: 14px; border-left: 2px solid var(--line);
}

/* ─────────────────────────── device frame ─────────────────────────── */

.shotwrap { display: flex; justify-content: center; align-items: center; min-width: 0; }

.phone {
  position: relative;
  /* Height-led, so the frame never collides with the top bar or the footer
     nav on a short laptop screen. Width follows from the aspect ratio. */
  height: min(clamp(340px, calc(100dvh - 248px), 640px), 78vw * 852 / 393);
  width: auto;
  aspect-ratio: 393 / 852;
  border-radius: 46px;
  background: var(--charcoal);
  padding: 9px;
  box-shadow:
    0 1px 1px rgba(45, 52, 54, 0.10),
    0 34px 60px -22px rgba(45, 52, 54, 0.34),
    0 90px 120px -60px rgba(78, 141, 141, 0.22);
}
.phone::after {
  /* the pill */
  content: "";
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 22px; border-radius: 999px;
  background: var(--charcoal); z-index: 3;
}
.phone__screen {
  position: relative;
  height: 100%; width: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: var(--panel-2);
  display: grid; place-items: center;
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── gallery: more than one screenshot per slide ── */

.gallery { position: relative; display: flex; flex-direction: column; align-items: center; }

.gallery.is-multi .phone__screen,
.gallery.is-multi .wide .phone__screen {
  cursor: grab;
  touch-action: pan-y;          /* let the page scroll vertically, we take X */
  -webkit-user-select: none;
  user-select: none;
}
.gallery.is-multi.is-dragging .phone__screen { cursor: grabbing; }

.track {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
  transition: transform 520ms var(--ease);
}
.cell { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }

.gal-dots {
  display: flex; gap: 7px; align-items: center;
  margin-top: 18px;
}
.gal-dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: var(--line);
  transition: background 240ms var(--ease-soft), transform 300ms var(--ease);
}
.gal-dot:hover { background: var(--beige); }
.gal-dot.is-on { background: var(--teal); transform: scale(1.28); }

.gal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(45, 52, 54, 0.4);
  /* Visible but quiet by default: discoverability should not depend on hover,
     since the primary gesture here is a drag. */
  opacity: 0.5;
  transition: opacity 240ms var(--ease-soft), transform 240ms var(--ease),
              background 200ms var(--ease-soft);
}
.gal-arrow svg { width: 15px; height: 15px; }
.gal-arrow--prev { left: -17px; }
.gal-arrow--next { right: -17px; }
.gallery.is-multi:hover .gal-arrow { opacity: 1; }
.gal-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); opacity: 1; }
.gal-arrow:disabled { opacity: 0; pointer-events: none; }
.gallery.is-dragging .gal-arrow { opacity: 0; }

/* Coarse pointers have no hover, and swiping is the obvious gesture there. */
@media (hover: none) { .gal-arrow { display: none; } }

.wide {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 210px);
  aspect-ratio: 16 / 10.4;
  border-radius: 14px;
  background: var(--charcoal);
  padding: 8px;
  box-shadow:
    0 1px 1px rgba(45, 52, 54, 0.10),
    0 30px 56px -20px rgba(45, 52, 54, 0.30);
}
.wide .phone__screen { border-radius: 8px; }

/* placeholder shown until a screenshot is dropped in /shots */
.ph {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 10px; justify-items: center;
  background:
    repeating-linear-gradient(45deg,
      var(--panel) 0 12px, var(--panel-2) 12px 24px);
  text-align: center; padding: 24px;
}
.ph__label {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.ph__file {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--teal-deep);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px;
  max-width: 100%; overflow-wrap: anywhere;
}

/* ───────────────────────── entrance animation ───────────────────────── */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes deviceIn {
  from { opacity: 0; transform: translateY(28px) scale(0.965); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide.is-active .anim {
  animation: riseIn 720ms var(--ease) both;
  animation-delay: var(--d, 0ms);
}
.slide.is-active .shotwrap > * {
  animation: deviceIn 900ms var(--ease) both;
  animation-delay: 120ms;
}
.slide.is-exiting { animation: fadeIn 240ms var(--ease-soft) reverse both; }

/* ───────────────────────────── footer nav ───────────────────────────── */

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 0 var(--pad) 24px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.dots { display: flex; gap: 5px; align-items: center; flex: 0 1 auto; overflow: hidden; }
.dot {
  width: 16px; height: 3px; border-radius: 2px;
  background: var(--line);
  border: 0; padding: 0; cursor: pointer;
  transition: background 260ms var(--ease-soft), width 320ms var(--ease);
}
.dot:hover { background: var(--beige); }
.dot.is-on { background: var(--teal); width: 26px; }

.arrows { display: flex; gap: 8px; }
.arrow {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  transition: transform 220ms var(--ease), background 220ms var(--ease-soft),
              border-color 220ms var(--ease-soft), opacity 220ms var(--ease-soft);
}
.arrow:hover { background: var(--panel-2); border-color: var(--beige); transform: translateY(-1px); }
.arrow:disabled { opacity: 0.3; cursor: default; transform: none; }
.arrow svg { width: 16px; height: 16px; }

.hint {
  font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.03em;
  white-space: nowrap;
}
.hint kbd {
  font-family: var(--sans); font-size: 11px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 5px; color: var(--ink-muted);
  background: var(--panel);
}

/* ───────────────────────────── overview ───────────────────────────── */

.overview {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  padding: 78px var(--pad) 40px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity 320ms var(--ease-soft), visibility 320ms;
}
.overview.is-open { opacity: 1; visibility: visible; }

.ov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-width: 1240px; margin: 0 auto;
}
.ov-card {
  text-align: left; cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 18px;
  transition: transform 260ms var(--ease), border-color 220ms var(--ease-soft),
              box-shadow 260ms var(--ease);
}
.ov-card:hover {
  transform: translateY(-3px);
  border-color: var(--light-teal);
  box-shadow: 0 14px 28px -16px rgba(45, 52, 54, 0.22);
}
.ov-card.is-on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
.ov-card__n {
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--ink-faint); margin-bottom: 8px; letter-spacing: 0.05em;
}
.ov-card__t {
  font-family: var(--serif); font-size: 16.5px; line-height: 1.28;
  color: var(--ink); letter-spacing: -0.012em;
}
.ov-card__s { margin-top: 10px; font-size: 11px; color: var(--teal); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

.ov-head {
  max-width: 1240px; margin: 0 auto 26px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
}
.ov-head h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.02em; }

/* ───────────────────────────── responsive ───────────────────────────── */

@media (max-width: 1180px) { .hint { display: none; } }
@media (max-width: 1040px) { .dots { display: none; } }

@media (max-width: 980px) {
  .slide--feature .inner { grid-template-columns: 1fr; gap: 34px; }
  .slide--feature .shotwrap { order: -1; }
  .phone { height: min(44vh, 370px); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide { align-content: start; overflow-y: auto; padding-top: 84px; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .brand__section { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ───────────────────────── shot list page ───────────────────────── */

.doc {
  max-width: 900px; margin: 0 auto; padding: 72px var(--pad) 120px;
}
.doc h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.028em; line-height: 1.06;
}
.doc .lede { margin-top: 18px; }
.doc h2 {
  font-family: var(--serif); font-weight: 400; font-size: 24px;
  letter-spacing: -0.02em; margin: 56px 0 6px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.doc h2:first-of-type { margin-top: 44px; }
.doc p.sec-note { font-size: 13.5px; color: var(--ink-faint); margin-bottom: 20px; }

.shot-item {
  display: grid; grid-template-columns: 28px 1fr; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line-soft);
}
.shot-item input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.shot-item.done .shot-title, .shot-item.done .shot-how { opacity: 0.42; text-decoration: line-through; }
.shot-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.shot-file {
  display: inline-block; margin-top: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--teal-deep);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 8px;
}
.shot-how { margin-top: 9px; font-size: 13.6px; line-height: 1.58; color: var(--ink-muted); }
.shot-how b { color: var(--ink); font-weight: 600; }
.pill {
  display: inline-block; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; margin-left: 8px;
  vertical-align: 2px;
}
.pill--buyer { background: rgba(78,141,141,0.11); color: var(--teal-deep); }
.pill--owner { background: rgba(139,168,136,0.16); color: #5C7A59; }
.pill--admin { background: rgba(196,185,164,0.24); color: #7A6F58; }
.callout {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px 24px; margin: 32px 0;
  font-size: 14px; line-height: 1.62; color: var(--ink-muted);
}
.callout strong { color: var(--ink); }
.callout code, .doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.6px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; color: var(--teal-deep);
}
.doc ul { margin: 14px 0 0 20px; display: grid; gap: 9px; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.progress-note {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
  padding: 14px 0; margin-bottom: -14px;
  font-size: 13px; color: var(--ink-muted);
  border-bottom: 1px solid var(--line-soft);
}
.progress-note b { color: var(--teal-deep); font-variant-numeric: tabular-nums; }

.pill--seq { background: var(--panel-2); color: var(--ink-muted); }
