/* "See how it works" on the landing (owner, 2026-09-26): the how-to Short,
   "here's how to make your own invitation at weddingisblooming.com".
   A still of the video until it is pressed, so the landing never loads
   YouTube for a visitor who does not ask for it. */

.wtut {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: #1c2618;
  box-shadow: 0 24px 60px rgba(41, 59, 44, .22), 0 0 0 1px rgba(255, 255, 255, .6), 0 0 0 7px rgba(255, 253, 247, .72);
}
.wtut-play,
.wtut iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.wtut-play {
  display: block;
  padding: 0;
  background: none;
  cursor: pointer;
}
.wtut-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wtut-play::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 38, 24, 0) 55%, rgba(28, 38, 24, .42) 100%);
}
.wtut-badge {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 253, 247, .92);
  color: #1c2618;
  box-shadow: 0 10px 30px rgba(28, 38, 24, .3);
  transform: translate(-50%, -50%);
  transition: transform .2s ease;
}
.wtut-badge svg { width: 30px; height: 30px; margin-left: 5px; }
.wtut-play:hover .wtut-badge { transform: translate(-50%, -50%) scale(1.06); }
.wtut-play:focus-visible { outline: 3px solid #b08a4a; outline-offset: -3px; }
.wtut-caption {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: #fffdf7;
  font: 600 13px/1.35 "DM Sans", system-ui, sans-serif;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

/* Desktop band: the copy beside the phone-shaped video. */
.band-tutorial {
  padding: clamp(64px, 9vw, 120px) 0;
  background-color: #f3ddd6;
}
/* Its top fades into the bouquet band; without its own layer the bouquet
   (z-index 2) painted over that fade and left a hard seam. Lace (3) stays above. */
.view-home > .band-tutorial { z-index: 2; }
.band-tutorial .home-wrap {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
}
.band-tutorial .wtut { width: 320px; }
.band-tutorial .home-actions { margin-top: 8px; }
.band-tutorial .tut-copy h2 {
  margin: 0 0 var(--s4, 16px);
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1.05;
}

/* Phone landing section. */
.mobile-landing .ml-tutorial {
  padding: 56px 20px 64px;
  text-align: center;
}
.mobile-landing .ml-tutorial h2 {
  margin: 10px auto 12px;
  font-size: 34px;
  line-height: 1.08;
}
.mobile-landing .ml-tutorial .ml-tutorial-lede {
  max-width: 30ch;
  margin: 0 auto 26px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(41, 59, 44, .72);
}
.mobile-landing .ml-tutorial .wtut { width: min(100%, 300px); }

@media (prefers-reduced-motion: reduce) {
  .wtut-badge { transition: none; }
}

/* "See how it works" on the desk (owner 2026-10-07). A glass Help pill beside
   the wedding tabs, and a sidebar row, open the landing page's tutorial video
   as its own page: full screen on a phone, a lifted glass card on a larger
   screen. One clock from the tap: scrim, then the page rising, then its
   heading, line and video one beat apart. Closing runs in reverse, faster,
   and finishes before the dialog closes (wedding-tutorial.js). */
.dash-tut-disc {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--create-glass-edge, rgba(255, 255, 255, 0.7));
  border-radius: 999px;
  background: color-mix(in srgb, #fffdf8 62%, transparent);
  color: var(--ink, #1c2618);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 8px rgba(37, 53, 35, 0.08);
  cursor: pointer;
  transition: transform 140ms ease-out, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.dash-tut-disc {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.dash-tut-disc:active { transform: scale(0.92); background: color-mix(in srgb, #fffdf8 82%, transparent); }
.dash-tut-disc:focus-visible { outline: 2px solid var(--ink, #1c2618); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .dash-tut-disc:hover { background: color-mix(in srgb, #fffdf8 80%, transparent); }
}
.dash-tut-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0 0 2px;
  padding: 0 12px 0 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink, #1c2618);
  font: 500 0.95rem/1.2 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.dash-tut-row .dash-tut-disc { min-width: 30px; width: 30px; height: 30px; padding: 0; font: 500 1.05rem/1 var(--serif); letter-spacing: 0; text-transform: none; }
/* Help's own drawing (owner 2026-10-08: "a dedicated whimsical icon"): a
   speech bubble whose question mark grows like a vine into a blossom, in the
   rail's hand-drawn stationery (art/studio). The same in both sections, on the
   rail beside its word and alone in the phone bar's round button. */
.dash-help-ico {
  display: block;
  flex: 0 0 36px;
  width: 36px;
  height: 30px;
  background: url('/art/studio/help.svg?v=1') center / contain no-repeat;
  pointer-events: none;
  transform-origin: 40% 85%;
}
/* The rail masks every <i> as a one-colour glyph (styles.css .dash-nav i); this one is a drawing. */
.dash-nav .dash-help-ico, .dash-phone-nav .dash-help-ico {
  flex: 0 0 36px;
  width: 36px;
  height: 30px;
  -webkit-mask: none; mask: none;
  background: url('/art/studio/help.svg?v=1') center / contain no-repeat;
  opacity: 1;
}
.dash-phone-nav .dash-help-disc .dash-help-ico { flex-basis: 30px; width: 30px; height: 26px; }
.dash-tut-row { gap: 8px; padding-left: 12px; } /* icon and word line up with the rows below */
.dash-help-disc { width: 44px; min-width: 44px; padding: 0; }
.dash-help-disc .dash-help-ico { flex-basis: 30px; width: 30px; height: 26px; }
@media (hover: hover) and (pointer: fine) {
  .dash-tut-row:hover .dash-help-ico, .dash-help-disc:hover .dash-help-ico { animation: dash-help-nod 900ms ease-in-out; }
}
/* First visit: the bubble nods now and then until a tutorial is opened. */
html.wedding-tutorial-new .dash-tut-row .dash-help-ico { animation: dash-help-nod 2.6s ease-in-out infinite; }
@keyframes dash-help-nod {
  0%, 60%, 100% { transform: none; }
  70% { transform: rotate(-9deg) translateY(-1px); }
  80% { transform: rotate(6deg); }
  90% { transform: rotate(-3deg); }
}
.dash-tut-row:active .dash-tut-disc { transform: scale(0.92); }
.dash-tut-row:focus-visible { outline: 2px solid var(--ink, #1c2618); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .dash-tut-row:hover { background: color-mix(in srgb, #ffffff 30%, transparent); }
}
/* First visit: a soft ivory halo, not a colour change. The ring is its own
   element moved by transform and opacity only. As an animated box-shadow on
   the disc it repainted the whole screen on every frame for every sender who
   had not opened a tutorial yet: 60 full-screen paints a second and about
   45% of the GPU on a Redmi 13 with the page idle, which is what made the
   composer stutter there (traced 2026-10-11). */
html.wedding-tutorial-new .dash-tut-disc { position: relative; }
html.wedding-tutorial-new .dash-tut-disc::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 2px solid rgba(255, 253, 248, 0.9);
  border-radius: inherit;
  pointer-events: none;
  will-change: transform, opacity;
  animation: dash-tut-halo 2.2s ease-in-out infinite;
}
@keyframes dash-tut-halo {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0; transform: scale(1.34); }
}

.dash-tutorial {
  --tut-in: 360ms;
  --tut-out: 260ms;
  --tut-ease-in: cubic-bezier(0.22, 1, 0.36, 1);
  --tut-ease-out: cubic-bezier(0.4, 0, 1, 1);
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--create-glass-edge, rgba(255, 255, 255, 0.7));
  border-radius: 28px;
  /* Near-solid paper: a video page has to read cleanly even where a browser
     skips the blur behind a modal (CMUX's WebKit does). */
  background-color: color-mix(in srgb, var(--paper, #f6efe6) 93%, transparent);
  background-image: var(--create-glass-sheen, none);
  box-shadow: var(--create-glass-inset, none), 0 30px 90px rgba(20, 37, 30, 0.22);
  -webkit-backdrop-filter: var(--create-glass-blur, blur(22px) saturate(1.7));
  backdrop-filter: var(--create-glass-blur, blur(22px) saturate(1.7));
  color: var(--ink, #1c2618);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dash-tutorial::backdrop {
  background: rgba(21, 39, 29, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dash-tutorial-sheet {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 22px 20px 20px;
}
.dash-tutorial-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--create-glass-edge, rgba(255, 255, 255, 0.7));
  border-radius: 999px;
  background: color-mix(in srgb, #fffdf8 62%, transparent);
  color: var(--ink, #1c2618);
  cursor: pointer;
  transition: transform 140ms ease-out;
}
.dash-tutorial-x svg { width: 18px; height: 18px; }
.dash-tutorial-x:active { transform: scale(0.92); }
.dash-tutorial-x:focus-visible { outline: 2px solid var(--ink, #1c2618); outline-offset: 2px; }
.dash-tutorial-k {
  margin: 0;
  color: var(--muted, #4a5344);
  font: 600 0.68rem/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dash-tutorial h2 { margin: 0 48px 0 0; font: 400 1.75rem/1.1 var(--serif); }
.dash-tutorial-lede { margin: 0 0 8px; color: var(--muted, #4a5344); font: 400 0.9rem/1.45 var(--sans); }
.dash-tutorial .wtut { width: min(100%, calc((100dvh - 250px) * 0.5625)); justify-self: center; }

/* Digital gifts (#dashGiftTutorial): the tutorial's wide cut on a tablet or a
   computer, so the sheet and the frame go landscape; a phone keeps the Short. */
.dash-tutorial.is-wide { width: min(880px, calc(100vw - 32px)); }
.dash-tutorial.is-wide .wtut { width: min(100%, calc((100dvh - 250px) * 1.7778)); aspect-ratio: 16 / 9; border-radius: 20px; }
.wtut-play picture { display: contents; }
@media (max-width: 767px) {
  .dash-tutorial.is-wide .wtut { width: min(100%, calc((100dvh - 250px) * 0.5625)); aspect-ratio: 9 / 16; border-radius: 28px; }
}
@media (min-width: 601px) and (max-width: 767px) {
  .dash-tutorial.is-wide { width: min(440px, calc(100vw - 32px)); }
}
@media (max-width: 600px) {
  .dash-tutorial.is-wide { width: 100vw; }
  .dash-tutorial.is-wide .wtut { width: min(100%, calc((100dvh - 230px) * 0.5625)); }
}

/* A page of its own on a phone: edge to edge, the video as large as fits. */
@media (max-width: 600px) {
  .dash-tutorial {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    /* A page, not a pane over the desk: solid paper, so nothing behind
       ghosts through the heading. */
    background-color: color-mix(in srgb, var(--paper, #f6efe6) 97%, transparent);
    box-shadow: none;
  }
  .dash-tutorial-sheet {
    min-height: 100%;
    align-content: start;
    padding: calc(env(safe-area-inset-top, 0px) + 22px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  }
  .dash-tutorial-x { top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; }
  .dash-tutorial h2 { font-size: 2rem; }
  .dash-tutorial .wtut { width: min(100%, calc((100dvh - 230px) * 0.5625)); }
}

/* Enter: scrim 0ms, page 0ms (rises), heading 90ms, line 140ms, video 190ms. */
.dash-tutorial[open] { animation: dash-tut-rise var(--tut-in) var(--tut-ease-in) both; }
.dash-tutorial[open]::backdrop { animation: dash-tut-fade calc(var(--tut-in) * 0.7) ease-out both; }
.dash-tutorial[open] :is(.dash-tutorial-k, h2, .dash-tutorial-lede, .wtut) {
  animation: dash-tut-lift var(--tut-in) var(--tut-ease-in) both;
}
.dash-tutorial[open] :is(.dash-tutorial-k, h2) { animation-delay: 90ms; }
.dash-tutorial[open] .dash-tutorial-lede { animation-delay: 140ms; }
.dash-tutorial[open] .wtut { animation-delay: 190ms; }
/* Exit: everything leaves together, faster than it came. */
.dash-tutorial.is-closing { animation: dash-tut-sink var(--tut-out) var(--tut-ease-out) both; }
.dash-tutorial.is-closing::backdrop { animation: dash-tut-fade var(--tut-out) ease-in reverse both; }
.dash-tutorial.is-closing :is(.dash-tutorial-k, h2, .dash-tutorial-lede, .wtut) { animation: none; }
@keyframes dash-tut-rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes dash-tut-sink { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(16px) scale(0.985); } }
@keyframes dash-tut-lift { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dash-tut-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  @keyframes dash-tut-rise { from { opacity: 0.6; transform: translateY(100%); } to { opacity: 1; transform: none; } }
  @keyframes dash-tut-sink { from { opacity: 1; transform: none; } to { opacity: 0.6; transform: translateY(100%); } }
}

html[data-preview-tier="low"] .dash-tutorial { background-color: color-mix(in srgb, var(--paper, #f6efe6) 96%, transparent); }
@media (prefers-reduced-motion: reduce) {
  html.wedding-tutorial-new .dash-tut-disc::after { display: none; }
  .dash-help-ico { animation: none !important; }
  .dash-tut-disc, .dash-tutorial-x { transition: none; }
  /* State still reads: the page crossfades in and out, nothing travels. */
  .dash-tutorial[open],
  .dash-tutorial.is-closing { animation-name: dash-tut-fade; animation-duration: 180ms; }
  .dash-tutorial.is-closing { animation-direction: reverse; }
  .dash-tutorial[open] :is(.dash-tutorial-k, h2, .dash-tutorial-lede, .wtut) { animation: none; }
}
