/* The walkthrough (/how-it-works): seven scenes, each a short animation of a real screen.
   Every rule below describes a scene's finished state. Only with JavaScript on (html.js)
   does a scene start hidden and play when it scrolls into view (.play): .a fades up,
   .c grows into a chat or list, .pick changes to picked, each after its --d delay.
   With reduced motion, every scene simply shows its finished state. */

.tour { max-width: 1040px; margin: 0 auto; padding: 0 24px 24px; }
.tour-intro { max-width: 640px; margin: 48px auto 0; text-align: center; }
.tour-intro .lede { margin-bottom: 28px; }
.tour-steps {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 760px; margin: 0 auto 40px; counter-reset: step;
}
.tour-steps a {
  display: inline-block; padding: 6px 12px; background: var(--white); border: 1px solid var(--border);
  font-size: .72rem; letter-spacing: .08em; text-decoration: none; transition: border-color .2s;
}
.tour-steps a:hover { border-color: var(--gold); }

.scene {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: center;
  padding: 72px 0; border-top: 1px solid var(--border); scroll-margin-top: 64px;
}
.scene:nth-of-type(even) .scene-text { order: 2; }
.scene-text .step { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--rose); margin-bottom: 10px; }
.scene-text h2 {
  font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(1.9rem, 4.6vw, 2.5rem);
  line-height: 1.15; margin: 0 0 14px;
}
.scene-text p { opacity: .85; }
.scene-text p + p { margin-top: 10px; }
.highlights { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.highlights li {
  position: relative; padding: 6px 12px 6px 30px; background: var(--white); border: 1px solid var(--border);
  font-size: .84rem;
}
.highlights li::before {
  content: ''; position: absolute; left: 12px; top: 12px; width: 9px; height: 5px;
  border-left: 1.5px solid var(--rose); border-bottom: 1.5px solid var(--rose); transform: rotate(-45deg);
}
.replay {
  display: none; margin-top: 18px; padding: 4px 0; background: none; border: 0; border-bottom: 1px solid var(--gold-light);
  font: inherit; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rose); cursor: pointer;
}
.js .replay { display: inline-block; }
.scene-visual { display: flex; justify-content: center; }

/* ── Frames ───────────────────────────────────────────── */
.phone {
  position: relative; width: 300px; height: 600px; padding: 11px; border-radius: 46px; background: #221c18;
  box-shadow: 0 30px 70px rgba(74, 55, 40, .22), inset 0 0 0 1.5px #3d342e; flex: none;
}
.phone::before {
  content: ''; position: absolute; top: 19px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 86px; height: 24px; border-radius: 14px; background: #221c18;
}
.screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--cream);
  display: flex; flex-direction: column; font-size: 12px; line-height: 1.45;
}
.status { display: flex; justify-content: space-between; padding: 17px 28px 8px; font-size: 11px; font-weight: 500; flex: none; }
.app-bar {
  flex: none; padding: 8px 16px 10px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .7);
  text-align: center;
}
.app-bar .t { font-weight: 500; font-size: 12.5px; }
.app-bar .s { font-size: 10.5px; opacity: .6; }
.app-bar .icon {
  width: 40px; height: 40px; margin: 2px auto 6px; border-radius: 50%; background: var(--blush);
  display: flex; align-items: center; justify-content: center; color: var(--rose);
}
.app-bar .icon svg { width: 20px; height: 20px; }
.pane { flex: 1; overflow: hidden; padding: 14px 16px; position: relative; }

.browser {
  width: 100%; max-width: 420px; border-radius: 12px; overflow: hidden; background: var(--white);
  box-shadow: 0 30px 70px rgba(74, 55, 40, .2); border: 1px solid var(--border); font-size: 12px; line-height: 1.45;
}
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f3ece4; }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: #dccdbd; }
.browser .url {
  flex: 1; margin-left: 8px; padding: 3px 10px; border-radius: 6px; background: var(--white);
  font-size: 10.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Bits of the real screens ─────────────────────────── */
.mini-eyebrow { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); margin-bottom: 4px; }
.mini-h { font-family: 'Cormorant Garamond', serif; font-size: 21px; line-height: 1.15; margin-bottom: 10px; }
.mini-label { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; margin: 12px 0 6px; }
.mini-btn {
  display: block; text-align: center; padding: 9px; background: var(--brown); color: var(--cream);
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
}
.field { display: flex; gap: 6px; }
.field span { flex: 1; padding: 7px 10px; background: var(--white); border: 1px solid var(--border); }
.field b { padding: 7px 10px; border: 1px solid var(--brown); font-weight: 400; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.num {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-top: 6px; background: var(--white);
  border: 1px solid var(--border);
}
.num::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #cbb9a8; }
.num .n { font-family: 'Cormorant Garamond', serif; font-size: 16px; }
.num .p { font-size: 10px; opacity: .6; margin-left: auto; }
.num.pick { border-color: var(--rose); background: #fbf3ee; }
.num.pick::before { border: 4px solid var(--rose); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 22px; background: var(--white);
  border-top: 1px solid var(--border); box-shadow: 0 -12px 30px rgba(74, 55, 40, .12); text-align: center;
  border-radius: 18px 18px 0 0;
}
.sheet .big { font-family: 'Cormorant Garamond', serif; font-size: 26px; color: var(--rose); margin: 2px 0 4px; }

.card-mini { background: var(--white); border: 1px solid var(--border); padding: 11px 12px; margin-bottom: 10px; }
.rec { display: flex; align-items: center; gap: 10px; }
.rec-dot {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--rose); position: relative;
}
.rec-dot::after { content: ''; position: absolute; inset: 11px; border-radius: 3px; background: #fff; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 26px; flex: 1; }
.wave span { flex: 1; height: 100%; border-radius: 2px; background: var(--rose); opacity: .75; transform: scaleY(var(--h, .5)); }
.note { font-size: 10px; opacity: .65; margin-top: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips span { padding: 3px 8px; border: 1px solid var(--border); background: var(--white); font-size: 10px; }
.chips span.on { border-color: var(--rose); color: var(--rose); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.swatches button {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--white); outline: 1px solid var(--border); cursor: pointer;
  padding: 0; background: linear-gradient(135deg, var(--sw-blush) 0 50%, var(--sw-rose) 50% 100%);
}
.swatches button[aria-pressed="true"] { outline: 2px solid var(--brown); }
.preview {
  margin-top: 10px; padding: 14px 10px; text-align: center; border: 1px solid var(--p-border);
  background: linear-gradient(160deg, #fff 0%, var(--p-cream) 55%, var(--p-blush) 100%); color: var(--p-brown);
  transition: background .5s, color .5s, border-color .5s;
}
.preview .e { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--p-rose); transition: color .5s; }
.preview .h { font-family: 'Cormorant Garamond', serif; font-size: 22px; line-height: 1.1; }
.preview .d { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--p-gold); margin-top: 2px; transition: color .5s; }

/* The printed table card, on a table. */
.tabletop {
  width: 100%; max-width: 420px; height: 470px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 20%, #f7efe6 0%, #eadccb 55%, #dcc9b4 100%);
  box-shadow: inset 0 0 60px rgba(74, 55, 40, .12);
}
.paper {
  width: 236px; padding: 20px 18px 16px; background: #fffdf9; text-align: center; transform: rotate(-2.5deg);
  box-shadow: 0 2px 2px rgba(74, 55, 40, .08), 0 18px 36px rgba(74, 55, 40, .2);
}
.paper .mini-h { font-size: 24px; margin-bottom: 8px; }
.paper p { font-size: 10px; }
.paper .num-big { font-family: 'Cormorant Garamond', serif; font-size: 21px; color: var(--rose); margin: 1px 0 8px; }
.paper .qr { width: 104px; height: 104px; margin: 0 auto 4px; }
.paper .qr svg { width: 100%; height: 100%; }
.paper .disc { font-size: 6.5px; line-height: 1.35; opacity: .7; margin-top: 8px; }

/* Calls and texts read as a conversation, newest at the bottom. */
.chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 6px 12px 14px; overflow: hidden; }
.bubble { max-width: 84%; margin-top: 7px; padding: 7px 11px; border-radius: 16px; font-size: 11.5px; line-height: 1.4; }
.bubble.in { align-self: flex-start; background: var(--white); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.bubble.out { align-self: flex-end; background: var(--rose); color: #fff; border-bottom-right-radius: 5px; }
.bubble.sys {
  align-self: center; max-width: 100%; padding: 3px 10px; border-radius: 10px; background: rgba(74, 55, 40, .07);
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .75;
}
.bubble .who { display: block; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; margin-bottom: 2px; }
.bubble.media { padding: 3px; }
.bubble .wave { height: 18px; width: 120px; padding: 0 8px 2px; }
.bubble .wave span { background: #fff; }
.key {
  align-self: flex-end; width: 32px; height: 32px; margin-top: 7px; border-radius: 50%; background: var(--brown); color: var(--cream);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.photo { display: block; width: 168px; height: 118px; border-radius: 13px; }

/* A memory site in a browser. */
.site-hero { padding: 18px 12px 12px; text-align: center; background: linear-gradient(160deg, #fff 0%, var(--cream) 60%, var(--blush) 100%); }
.site-hero .h { font-family: 'Cormorant Garamond', serif; font-size: 27px; line-height: 1.1; }
.site-hero .d { font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-top: 2px; }
.site-nav-mini { display: flex; justify-content: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.site-nav-mini span { padding: 3px 7px; border: 1px solid var(--border); }
.site-list { height: 320px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 12px 12px; background: var(--cream); overflow: hidden; }
.entry { margin-top: 9px; padding: 10px 12px; background: var(--white); border: 1px solid var(--border); }
.entry .from { display: flex; justify-content: space-between; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.entry .from em { font-style: normal; color: var(--brown); opacity: .45; letter-spacing: .04em; text-transform: none; }
.entry .play-bar { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.entry .play-bar i { width: 18px; height: 18px; border-radius: 50%; background: var(--rose); flex: none; position: relative; }
.entry .play-bar i::after { content: ''; position: absolute; left: 7px; top: 5px; border: 4px solid transparent; border-left: 6px solid #fff; }
.entry .play-bar b { flex: 1; height: 3px; background: var(--border); position: relative; }
.entry .play-bar b::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 35%; background: var(--rose); }
.entry .q { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 13px; line-height: 1.4; border-left: 2px solid var(--gold-light); padding-left: 8px; }
.entry .body { font-family: 'Cormorant Garamond', serif; font-size: 13.5px; line-height: 1.4; }
.entry.pic { display: flex; gap: 10px; align-items: center; }
.entry.pic .photo { width: 92px; height: 64px; border-radius: 3px; flex: none; }

/* The keepsake email. */
.mail { font-size: 11.5px; }
.mail .from { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.mail .from i {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brown); color: var(--cream); flex: none;
  display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond', serif; font-style: normal; font-size: 15px;
}
.mail .subj { font-weight: 500; font-size: 13px; line-height: 1.3; margin-bottom: 10px; }
.mail p { margin-bottom: 8px; opacity: .85; }
.file {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px; background: var(--white); border: 1px solid var(--border);
}
.file svg { width: 26px; height: 26px; color: var(--rose); flex: none; }
.file b { display: block; font-weight: 500; font-size: 11px; line-height: 1.3; }
.file span { font-size: 9.5px; opacity: .6; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dates div { padding: 9px 10px; background: var(--white); border: 1px solid var(--border); }
.dates b { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 17px; color: var(--rose); line-height: 1.1; }
.dates span { font-size: 9.5px; opacity: .7; }

.tour-end { text-align: center; padding: 72px 0 24px; border-top: 1px solid var(--border); }
.tour-end h2 { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(2rem, 5vw, 2.6rem); margin: 0 0 10px; }
.tour-end .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; max-width: 520px; margin: 22px auto 0; }
.tour-end .cta .btn { width: auto; flex: 1 1 200px; margin-top: 0; }

/* ── Motion ───────────────────────────────────────────── */
.js .scene:not(.play) .a { opacity: 0; }
.js .scene.play .a { animation: rise .55s ease var(--d, 0s) both; }
.js .scene:not(.play) .c { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
.js .scene.play .c { animation: grow .5s ease var(--d, 0s) both; }
.js .scene:not(.play) .pick { border-color: var(--border); background: var(--white); }
.js .scene:not(.play) .pick::before { border: 1px solid #cbb9a8; }
.js .scene.play .pick, .js .scene.play .pick::before { animation: pick .35s ease var(--d, 0s) both; }
.js .scene:not(.play) .sheet { transform: translateY(105%); }
.js .scene.play .sheet { animation: sheet .6s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.js .scene:not(.play) .paper { opacity: 0; }
.js .scene.play .paper { animation: drop .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both; }
.js .scene.play .wave.live span { animation: wave .8s ease-in-out calc(var(--i) * -.11s) 9 alternate; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes grow { from { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } to { max-height: 260px; } }
@keyframes pick { from { border-color: var(--border); background: var(--white); } }
@keyframes sheet { from { transform: translateY(105%); } }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) rotate(-10deg) scale(1.04); } }
@keyframes wave { from { transform: scaleY(.2); } to { transform: scaleY(1); } }

/* Reduced motion: the script marks every scene played at once, and nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .js .scene *, .js .scene *::before { animation: none !important; }
  .js .replay { display: none; }
}

@media (max-width: 820px) {
  .tour { padding: 0 16px 16px; }
  .scene { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 52px 0; }
  .scene:nth-of-type(even) .scene-text { order: 0; }
  .phone { width: 280px; height: 570px; }
  .tabletop { height: 430px; }
}
