/* How it works sequence (HowItWorksSequence.tsx). Everything is scoped under .hw-root; tokens and fonts come from globals.css. */
.hw-root {
  --milk: #f6efe9; --ink: #2f221d; --muted: #6b574f; --rose: #c98f86; --velvet: #9f665d; --pencil: #9a6552; --line: rgba(43, 29, 24, 0.14);
  --fz: 6.2px; --pl: 5.2px; --ps: 4.2px;
  position: relative; height: 1250vh;
  background: var(--cream);
}
.hw-made-anchor { position: absolute; left: 0; top: 66%; width: 1px; height: 1px; }
.hw-inner { height: 100%; }

.hw-root .stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center;
  padding: 0 var(--gut); max-width: 1440px; margin: 0 auto;
}
.hw-root .art { position: relative; height: 100svh; }

/* the phone (generic hardware, Aura's app on screen) */
.hw-root .device {
  position: absolute; left: 50%; bottom: 5svh; height: min(72svh, 760px); aspect-ratio: 408 / 862; transform: translateX(-50%);
  border-radius: 14% / 6.6%; padding: 0;
  background: linear-gradient(150deg, #4a3e38 0%, #1a1411 45%, #2c231f 100%);
  box-shadow: 0 50px 90px -40px rgba(47, 34, 29, 0.6), 0 18px 30px -18px rgba(47, 34, 29, 0.35), inset 0 0 0 1.5px rgba(255, 255, 255, 0.1), inset 0 0 0 4px #0e0b09;
  will-change: opacity;
}
.hw-root .device::before, .hw-root .device::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a211d; }
.hw-root .device::before { left: -3px; top: 18%; height: 9%; }
.hw-root .device::after { right: -3px; top: 24%; height: 13%; }
/* inset as % of the device itself (padding % would follow the column width and leave a strip under the screen) */
.hw-root .screen { position: absolute; inset: 1.041% 2.2%; border-radius: 11.8% / 5.5%; overflow: hidden; background: #1e1714; container-type: inline-size; }
.hw-root .screen svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; --k: 1; }
.hw-root .glass { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 38%); }

/* svg type */
.hw-root .ui { font-family: var(--sans); }
.hw-root .mono { font-family: var(--mono); letter-spacing: 0.08em; }
.hw-root .disp { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 380; }
.hw-root .ln { stroke-width: calc(var(--k) * 1.3px); }
.hw-root .mesh { stroke-width: calc(var(--k) * 0.55px); }
.hw-root .cz { fill: var(--milk); font-size: var(--fz); }
.hw-root .cl { stroke: var(--milk); stroke-width: 0.45; }
.hw-root .plabel { fill: var(--ink); font-size: var(--pl); font-weight: 500; }
.hw-root .psub { fill: var(--pencil); font-size: var(--ps); }

/* Maddie, inside the app (sized in screen widths) */
.hw-root .chat { position: absolute; left: 5%; right: 5%; bottom: 13%; display: flex; flex-direction: column; gap: 2cqw; font: 3.3cqw/1.38 var(--sans); opacity: 0; pointer-events: none; }
.hw-root .maddie { display: flex; align-items: center; gap: 2cqw; font-weight: 600; color: #f0d9d2; }
.hw-root .maddie i { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: var(--rose); box-shadow: 0 0 3cqw var(--rose); }
.hw-root .msg { max-width: 84%; padding: 2.4cqw 3.2cqw; border-radius: 4cqw; opacity: 0; }
.hw-root .msg.m { background: rgba(246, 239, 233, 0.12); color: #f6efe9; border: 1px solid rgba(246, 239, 233, 0.1); border-bottom-left-radius: 1.4cqw; }
.hw-root .msg.u { align-self: flex-end; background: #f6efe9; color: #2f221d; border-bottom-right-radius: 1.4cqw; font-weight: 500; }
.hw-root .chips { display: flex; gap: 1.6cqw; flex-wrap: wrap; opacity: 0; }
.hw-root .chips span { font-size: 2.8cqw; padding: 1.3cqw 2.4cqw; border-radius: 99px; border: 1px solid rgba(201, 143, 131, 0.6); color: #f0d9d2; }

/* the real workshop, then her photo, opening out of the screen */
.hw-root .frame { position: absolute; left: 0; top: 0; border-radius: 22px; overflow: hidden; opacity: 0; background: #1e1714; box-shadow: 0 40px 80px -40px rgba(47, 34, 29, 0.55); will-change: left, top, width, height, opacity; }
.hw-root .frame video, .hw-root .frame img.her { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; }
.hw-root .frame img.her { object-position: 51% 32%; z-index: 1; }
.hw-root .frame video { z-index: 0; }
.hw-root .frame .tag { z-index: 2; }
.hw-root .frame .ticket { z-index: 3; }
.hw-root .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(47, 34, 29, 0.55), transparent 42%); pointer-events: none; opacity: var(--shade, 1); }
.hw-root .tag { position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2; color: #fff; display: grid; gap: 8px; opacity: 0; }
.hw-root .tag b { font: 400 clamp(22px, 2.4vw, 34px)/1.1 var(--display); font-variation-settings: "SOFT" 100; }
.hw-root .tag span { width: max-content; max-width: 100%; font: 500 11.5px var(--mono); letter-spacing: 0.04em; padding: 7px 12px; border-radius: 99px; background: rgba(246, 239, 233, 0.92); color: var(--ink); }
.hw-root .ticket { position: absolute; right: 16px; bottom: 16px; width: min(340px, calc(100% - 32px)); background: #fff; border-radius: 18px; padding: 18px 20px; z-index: 3; box-shadow: 0 30px 60px -30px rgba(47, 34, 29, 0.5); opacity: 0; }
.hw-root .ticket .t { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: 0.12em; color: var(--muted); }
.hw-root .ticket .t b { color: var(--ink); }
.hw-root .ticket h4 { font: 360 30px/1.05 var(--display); font-variation-settings: "SOFT" 100; color: var(--cocoa); margin: 10px 0 8px; }
.hw-root .ticket h4 em { color: var(--velvet); }
.hw-root .ticket dl { margin: 0; }
.hw-root .ticket dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.hw-root .ticket dt { color: var(--muted); }
.hw-root .ticket dd { margin: 0; font-weight: 600; text-align: right; color: var(--cocoa); }
.hw-root .popBra { position: absolute; left: 0; top: 0; height: auto; max-width: none; pointer-events: none; opacity: 0; will-change: transform, width, opacity;
  filter: drop-shadow(0 calc(var(--lift, 0) * 22px) calc(var(--lift, 0) * 26px) rgba(47, 34, 29, 0.3)); }

/* copy */
.hw-root .copy { position: relative; max-width: 460px; }
.hw-root .copy .eyebrow { margin-bottom: 18px; }
.hw-root .rail { display: flex; gap: 6px; margin-bottom: 28px; }
.hw-root .rail i { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.hw-root .rail b { position: absolute; inset: 0; background: var(--velvet); transform-origin: left; transform: scaleX(0); }
.hw-root .caps { position: relative; min-height: 280px; list-style: none; margin: 0; padding: 0; }
.hw-root .cap { position: absolute; inset: 0 0 auto 0; opacity: 0; visibility: hidden; }
.hw-root .cap:first-child { opacity: 1; visibility: visible; }
.hw-root .cap small { font: 500 12px var(--mono); letter-spacing: 0.14em; color: var(--rose-d); text-transform: uppercase; }
.hw-root .cap h3 { font: 360 clamp(34px, 3.8vw, 56px)/1.04 var(--display); font-variation-settings: "SOFT" 100, "opsz" 144; color: var(--cocoa); letter-spacing: -0.02em; margin: 0.35em 0 0.4em; text-wrap: balance; }
.hw-root .cap h3 em { font-style: italic; color: var(--rose-d); font-weight: 340; }
.hw-root .cap p { font-size: 18px; line-height: 1.6; color: var(--ink); margin: 0; max-width: 36ch; text-wrap: pretty; }

@media (max-width: 820px) {
  .hw-root { height: 1300vh; }
  .hw-root .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; padding-top: max(72px, 9svh); align-items: stretch; }
  .hw-root .copy { order: -1; max-width: none; }
  .hw-root .copy .eyebrow { display: none; }
  .hw-root .art { height: 100%; min-height: 0; }
  .hw-root .device { height: min(54svh, 600px); bottom: 3svh; }
  .hw-root .rail { margin-bottom: 10px; }
  .hw-root .caps { min-height: 150px; }
  .hw-root .cap h3 { font-size: 27px; }
  .hw-root .cap p { font-size: 14.5px; line-height: 1.5; }
  .hw-root .ticket { left: 12px; right: 12px; width: auto; top: 12px; bottom: auto; padding: 12px 14px; }
  .hw-root .ticket h4 { font-size: 22px; margin: 6px 0; }
  .hw-root .ticket dl div { font-size: 12px; padding: 6px 0; }
  .hw-root .ticket dl div:nth-child(2), .hw-root .ticket dl div:nth-child(4) { display: none; }
  /* closing ticket sits low on the photo, clear of her face */
  .hw-root .ticket { top: auto; bottom: 12px; }
  .hw-root .ticket.in-frame { padding: 10px 14px; }
  .hw-root .ticket.in-frame dl { display: none; }
  /* in-screen text too small to read on a phone */
  .hw-root .cz { display: none; }
  .hw-root .chat { font-size: max(3.3cqw, 9px); gap: 1.6cqw; bottom: 11%; }
  .hw-root .chips span { font-size: max(2.8cqw, 8px); }
}
@media (min-width: 600px) and (max-width: 820px) {
  .hw-root .copy { max-width: 600px; }
  .hw-root .caps { min-height: 220px; }
  .hw-root .cap h3 { font-size: 38px; }
  .hw-root .cap p { font-size: 17px; line-height: 1.55; max-width: 40ch; }
  .hw-root .device { height: min(60svh, 640px); bottom: 4svh; }
}

/* neutralise the older global .rail / .ticket / .msg rules this section shares names with */
.hw-root .rail { position: static; z-index: auto; padding: 0 !important; }
.hw-root .ticket { translate: none; }
.hw-root .msg { font-size: inherit; line-height: inherit; backdrop-filter: none; }

/* the closing ticket: beside her photo on desktop, low on the photo on phones */
.hw-root .ticket.in-copy { position: relative; right: auto; bottom: auto; top: auto; width: 100%; max-width: 400px; margin-top: 28px; box-shadow: 0 30px 60px -36px rgba(47, 34, 29, 0.45), 0 0 0 1px var(--line); }
.hw-root .ticket.in-frame { display: none; }
@media (max-width: 820px) {
  .hw-root .ticket.in-copy { display: none; }
  .hw-root .ticket.in-frame { display: block; }
}
