/* ==========================================================================
   Panelicious — Components
   Header, footer, panels, screen scenes, feature/sector/pricing cards, steps.
   ========================================================================== */

:root { --header-h: 80px; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}
/* Transparent over the dark hero (default), solid once scrolled */
.site-header.is-solid {
  background: rgba(250,247,245,0.85);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom-color: var(--hairline);
}

.brand { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.brand img { height: 35px; width: auto; }
.brand .logo-dark { display: none; }
.site-header.is-solid .brand .logo-light { display: none; }
.site-header.is-solid .brand .logo-dark  { display: block; }
.brand:hover { opacity: .8; }

.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-links {
  display: flex; align-items: center; gap: 0.2rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-link {
  display: block;
  padding: 0.5em 0.85em;
  font-size: 0.95rem;
  color: var(--ink-invert);
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
  opacity: 0.82;
}
.nav-link:hover { opacity: 1; background: rgba(250,247,245,0.08); }
.nav-link.active { opacity: 1; }
.nav-link.active::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--red); border-radius: 2px;
}
.site-header.is-solid .nav-link { color: var(--ink); }
.site-header.is-solid .nav-link:hover { background: rgba(36,39,44,0.05); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.site-header .btn--ghost { color: var(--ink-invert); border-color: var(--hairline-dark-strong); }
.site-header.is-solid .btn--ghost { color: var(--ink); border-color: var(--hairline-strong); }
.site-header .btn--ghost:hover { color: var(--ink-invert); background: rgba(36, 39, 44, .65); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent; border: 0; cursor: pointer;
  color: currentColor; padding: 9px;
}
.nav-toggle span { display: block; height: 2px; background: currentColor; border-radius: 2px; margin: 4px 0; transition: transform 0.3s var(--ease), opacity 0.2s; }
.site-header:not(.is-solid) .nav-toggle { color: var(--ink-invert); }
.site-header.is-solid .nav-toggle { color: var(--ink); }

@media (min-width: 860px) and (max-width: 1100px) {
  .brand img { height: 25px;
  }
}
@media (max-width: 860px) {
  .nav-links, .nav-actions .btn--ghost { display: none; }
  .nav-toggle { display: block; }
  .site-header .container { gap: 0.5rem; }
  .brand img { height: 28px; }
  .nav-actions .btn--primary { padding: 0.55em 0.9em; font-size: 0.88rem; }
  .nav-toggle { width: 36px; height: 36px; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--offwhite);
    border-bottom: 1px solid var(--hairline);
    padding: 0.75rem var(--pad-x) 1.25rem;
    gap: 0.15rem;
    box-shadow: var(--shadow-soft);
  }
  .nav.is-open .nav-link { color: var(--ink); font-size: 1.05rem; padding: 0.7em 0.5em; }
  .nav.is-open .nav-link.active::after { width: 24px; }
  body.nav-open { overflow: hidden; }
}
@media (min-width: 860px) and (max-width: 1000px) {
  .nav-actions .btn {
    padding: 0.55em 0.9em;
    font-size: 0.88rem;
  }
  a.nav-link {
    padding: 0.5em 0.5em;
  }
}

/* ==========================================================================
   Panel — the atomic shape (card echoing a screen)
   ========================================================================== */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}
.panel--dark { background: var(--panel-bg-dark); border-color: var(--hairline-dark); color: var(--ink-invert); }
/* Panels carry their own surface colour, so text stays correct even inside
   an .on-dark section (light panels = dark text, dark panels = light text). */
.panel h1, .panel h2, .panel h3, .panel h4 { color: var(--ink); }
.panel p { color: var(--ink-dim); }
.panel--dark h1, .panel--dark h2, .panel--dark h3, .panel--dark h4 { color: var(--ink-invert); }
.panel--dark p { color: var(--ink-invert-dim); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.85rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}
.panel--dark .panel__head { border-bottom-color: var(--hairline-dark); }

.panel-grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 560px) and (max-width: 1080px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Screen scene — stands in for a product screenshot (photography pending)
   A framed "screen" with content, a bezel, and a synced marker.
   ========================================================================== */
.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-dark);
  background: var(--darkgrey);
  overflow: hidden;
  color: var(--ink-invert);
  display: flex; flex-direction: column;
  isolation: isolate;
}
.screen__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.screen__label {
  position: absolute; left: 10px; bottom: 9px; z-index: 3;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: var(--ls-mono);
  color: rgba(250,247,245,0.55);
}
.screen__body { flex: 1; padding: clamp(0.9rem, 2.4vw, 1.4rem); padding-bottom: 1.9rem; display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; z-index: 2; min-height: 0; }
.screen__kicker { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.screen__title { font-family: var(--font-display); font-size: clamp(1.1rem, 3.2vw, 1.7rem); line-height: 1.15; margin: 0; color: var(--offwhite); }
.screen__meta { font-size: 0.85rem; opacity: 0.72; }

/* Scene flavours — one accent per panel, max */
.screen--promo   { background: radial-gradient(120% 120% at 0% 0%, #3a1210, var(--darkgrey) 60%); }
.screen--promo   .screen__kicker { color: var(--orange); }
.screen--menu    { background: radial-gradient(120% 120% at 100% 0%, #2c2338, var(--darkgrey) 60%); }
.screen--menu    .screen__kicker { color: var(--pink); }
.screen--photo   { background: linear-gradient(135deg, #4A2F46, #24272C 70%); }
.screen--weather { background: linear-gradient(160deg, #23303a, var(--darkgrey) 65%); }

/* Dashboard scene: little widget tiles */
.screen--dash { background: #1e2126; }
.screen--dash .screen__body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.dash-tile {
  border: 1px solid var(--hairline-dark); border-radius: 6px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px; background: rgba(250,247,245,0.03);
}
.dash-tile b { font-family: var(--font-display); font-size: 0.95rem; font-weight: 400; }
.dash-tile span { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; }
.dash-tile--accent { border-color: rgba(224,7,0,0.4); }
.dash-tile--accent b { color: var(--red); }

/* ==========================================================================
   Photo showcase — real screens in real places (framed in the panel motif)
   ========================================================================== */
.shots { display: grid; gap: var(--gap); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shots { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  display: block;
  background: var(--darkgrey);
}
.shot figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-top: 0.7rem;
}

/* ==========================================================================
   Feature pillar
   ========================================================================== */
.feature { padding: 1.6rem; }
.feature .mark {
  width: 40px; height: 40px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline-strong);
  margin-bottom: 1.1rem;
}
.feature .mark svg { width: 22px; height: 22px; stroke: var(--red); }
.feature h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature p { color: var(--ink-dim); font-size: 1rem; margin: 0; }

/* ==========================================================================
   Sector cards
   ========================================================================== */
.sector-card {
  display: flex; flex-direction: column;
  overflow: hidden; padding: 0;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.sector-card:hover { transform: translateY(-3px); border-color: var(--hairline-strong); }
.sector-card .screen { border-radius: 0; border: 0; border-bottom: 1px solid var(--hairline); }
.sector-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.sector-card__body h3 { font-size: 1.2rem; margin: 0; }
.sector-card__body p { color: var(--ink-invert); font-size: 0.98rem; margin: 0 0 0.4rem; }
.sector-card__body .link-arrow { margin-top: auto; }

/* ==========================================================================
   Steps — how it works
   ========================================================================== */
.steps { counter-reset: step; display: grid; gap: var(--gap-lg); }
.step { position: relative; padding-left: 3.4rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -2px;
  font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0.06em;
  color: var(--red);
  border: 1px solid var(--hairline-strong); border-radius: 8px;
  width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.step p { color: var(--ink-dim); margin: 0; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.price-card { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.6rem; }
.price-card--featured { border-color: var(--red); border-width: 1.5px; }
.price-card--featured:not(.panel--dark) { background: #FDECEC; }
.panel--dark.price-card--featured { background: #322329; }
.price-card__head { display: flex; flex-direction: column; gap: 0.15rem; }
.price-card__tier { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.price-card__tier h3 { font-size: 1.2rem; margin: 0; }
.price-card__sub { font-size: 0.85rem; color: var(--ink-dim); margin: 0; }
.panel--dark .price-card__sub { color: var(--ink-invert-dim); }
.tag {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--offwhite); background: var(--red); padding: 0.35em 0.6em; border-radius: 5px; white-space: nowrap;
}
.price { display: flex; align-items: baseline; gap: 0.3rem; min-height: 2.5rem; }
.price .amount { font-family: var(--font-display); font-size: 2.25rem; line-height: 1; }
.price .per { color: var(--ink-dim); font-size: 0.9rem; }
.panel--dark .price .per { color: var(--ink-invert-dim); }

/* Monthly / annual visibility (toggled on the .pricing container) */
.price-annual { display: none; }
.pricing.is-annual .price-monthly { display: none; }
.pricing.is-annual .price-annual { display: inline-flex; }
.price-sub { font-size: 0.8rem; color: var(--ink-dim); margin: -0.5rem 0 0; min-height: 1.1em; }
.panel--dark .price-sub { color: var(--ink-invert-dim); }
.price-sub .price-annual { display: none; }
.pricing.is-annual .price-sub .price-annual { display: inline; }
.pricing.is-annual .price-sub .price-monthly { display: none; }

.price-displays { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; margin: 0; padding-top: 0.95rem; border-top: 1px solid var(--hairline); }
.panel--dark .price-displays { border-top-color: var(--hairline-dark); }
.price-displays svg { width: 20px; height: 20px; stroke: var(--red); fill: none; flex: none; }
.price-displays b { color: var(--red); font-weight: 400; }

.price-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; align-content: start; }
.price-card li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.96rem; }
.price-card li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; background: var(--red); border-radius: 4px; -webkit-mask: var(--check) center/11px no-repeat; mask: var(--check) center/11px no-repeat; }
.price-card .btn { margin-top: auto; }
:root { --check: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>'); }

/* Billing toggle */
.pricing-billing { display: flex; justify-content: center; margin-bottom: 0.9rem; }
.pricing-note { text-align: center; margin: 0 auto var(--gap-lg); max-width: 46ch; color: var(--ink-invert-dim); font-size: 0.95rem; }
.pricing-note b { color: var(--offwhite); font-weight: 500; }
.pricing-contact {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap); flex-wrap: wrap;
  margin-top: var(--gap-lg); padding: 1.4rem 1.8rem;
  border: 1px solid var(--hairline-dark); border-radius: var(--radius-lg); background: var(--panel-bg-dark);
}
.pricing-contact__text h3 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.pricing-contact__text p { margin: 0; color: var(--ink-invert-dim); font-size: 0.98rem; }
.pricing-contact .btn { flex: none; }
.billing-toggle {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(36,39,44,0.06); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 4px;
}
.on-dark .billing-toggle { background: rgba(250,247,245,0.07); border-color: var(--hairline-dark); }
.billing-opt {
  font-family: var(--font-body); font-size: 0.92rem; color: inherit;
  background: transparent; border: 0; padding: 0.5em 1.1em; border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.5em;
  opacity: 0.72; transition: opacity 0.2s var(--ease), background-color 0.2s var(--ease);
}
.billing-opt:hover { opacity: 1; }
.billing-opt.is-active { opacity: 1; background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); }
.on-dark .billing-opt.is-active { background: #3a3f46; color: var(--offwhite); }
.billing-opt .save { font-size: 0.72rem; color: var(--red); }
.on-dark .billing-opt .save { color: #ff6a5f; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { text-align: center; }
.cta-band .actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* Generic action row */
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--gap-lg);
  align-items: start;
}
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-aside h2 { margin-bottom: 0.6rem; }
.contact-points { list-style: none; margin: var(--gap) 0 0; padding: 0; display: grid; gap: 1rem; }
.contact-points li {
  color: var(--ink-invert-dim); font-size: 0.98rem; line-height: 1.5;
  padding-left: 1rem; border-left: 2px solid var(--hairline-dark);
}
.contact-points span {
  display: block; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: var(--offwhite); margin-bottom: 0.25rem;
}

.contact-panel { padding: clamp(1.4rem, 3vw, 2rem); }
.contact-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase; color: var(--ink-invert-dim);
}
.field__opt { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.field input,
.field textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--fs-body); color: var(--ink-invert);
  background: rgba(250,247,245,0.04); border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-sm); padding: 0.75em 0.9em;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-invert-dim); }
.field input:hover,
.field textarea:hover { border-color: var(--hairline-dark-strong); }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--red); background: rgba(250,247,245,0.06); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field.has-error input,
.field.has-error textarea { border-color: var(--red); }

.contact-form__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.3rem; }
.contact-form__foot .btn[disabled] { opacity: 0.6; cursor: default; }
.contact-form__status { margin: 0; font-size: 0.95rem; color: var(--ink-invert-dim); }
.contact-form__status.is-ok { color: #4ccf6a; }
.contact-form__status.is-error { color: #ff6a5f; }
.contact-panel.is-sent .contact-form { display: none; }
.contact-sent { display: none; }
.contact-panel.is-sent .contact-sent { display: block; }
.contact-sent h3 { margin: 0 0 0.4rem; }
.contact-sent p { color: var(--ink-invert-dim); margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--darkgrey); color: var(--ink-invert); padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; }
.site-footer a { color: var(--ink-invert-dim); transition: color 0.2s var(--ease); }
.site-footer a:hover { color: var(--offwhite); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--gap-lg); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 60px; margin-bottom: 1.2rem; }
.footer-col h4 { font-family: var(--font-mono); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-invert-dim); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.95rem; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: clamp(2.5rem, 4vw, 3.5rem); padding-top: 1.5rem;
  border-top: 1px solid var(--hairline-dark);
  font-size: 0.85rem; color: var(--ink-invert-dim);
}

/* ==========================================================================
   How-it-works walkthrough — in-context animation (install → assign → live)
   A living-room TV shows a pairing code, a laptop assigns a playlist, the TV
   goes live. UI is drawn in CSS and overlaid on photos; internals scale with
   their container via container-query units (cqw).
   ========================================================================== */
.howto { width: 100%; }
.hw-stage {
  position: relative; aspect-ratio: 16 / 9; container-type: inline-size;
  border-radius: var(--radius-lg); overflow: hidden; background: #111;
  box-shadow: var(--shadow-soft);
}
.hw-scene {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.hw-scene.is-active { opacity: 1; visibility: visible; }
/* during the loop reset the scene swap happens instantly under the black cover,
   so the pairing screen is already in place before the black fades away */
.hw-stage.is-snapping .hw-scene { transition: none; }
.hw-room { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --- The TV screen overlay (rectangle mapped onto the TV in home.webp) --- */
.hw-tv {
  position: absolute;
  left: 27.5%; top: 7%; width: 36.9%; height: 37%;
  container-type: inline-size; overflow: hidden; background: transparent;
  border-radius: 0.7cqw;
}
.hw-tv-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 3cqw; padding: 3cqw;
}
.hw-tv-screen--pair { background: #0b0c0e; color: #fff; z-index: 2; }
.hw-pair__title { font-family: var(--font-body); font-weight: 700; font-size: 7cqw; margin: 0; }
.hw-pair__code { display: flex; gap: 3cqw; margin: 0; font-family: var(--font-body); font-size: 13cqw; line-height: 1; }
.hw-qr { width: 26cqw; height: 26cqw; color: #fff; }
.hw-pair__url { margin: 0; font-size: 4cqw; color: rgba(255,255,255,0.55); }
.hw-pair__url b { color: rgba(255,255,255,0.9); font-weight: 600; }
.hw-pair__wait { display: flex; align-items: center; gap: 2cqw; margin: 0; font-size: 4.4cqw; color: rgba(255,255,255,0.55); }
.hw-blip { width: 3cqw; height: 3cqw; border-radius: 50%; background: var(--red); flex: none; }
/* full-stage cover used to fade through black on the loop reset */
.hw-reset { position: absolute; inset: 0; z-index: 20; background: #0e0f11; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .hw-reset { transition: opacity 0.45s var(--ease); } }

/* --- The laptop (scene 2): photoreal plate + UI overlaid on the screen --- */
.hw-scene--laptop { background: #16181b; }
.hw-laptop-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hw-laptop-screen {
  position: absolute; left: 31.3%; top: 26.9%; width: 37.9%; height: 45%;
  overflow: hidden; container-type: inline-size; background: var(--offwhite);
  border-radius: 0.8cqw;
}
.hw-laptop-screen::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(36,39,44,0.2); }

/* --- Dashboard + modal (rendered inside the laptop screen) --- */
.hw-dash { width: 100%; height: 100%; padding: 5cqw; display: flex; flex-direction: column; gap: 2.6cqw; }
.hw-dash--behind { position: absolute; inset: 0; filter: blur(2px); opacity: 0.7; }
.hw-dash__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5cqw; }
.hw-dash__title { font-family: var(--font-display); font-size: 4.4cqw; color: var(--ink); }
.hw-ava { width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--darkgrey)); }
.hw-ico {
  display: inline-block; width: 5cqw; height: 5cqw; font-size: 0; flex: none;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324272C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E");
}
.hw-ico--red { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E00700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E"); }
.hw-card {
  display: flex; align-items: center; gap: 2.6cqw;
  padding: 3cqw 3.4cqw; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--white); box-shadow: var(--shadow-soft);
}
.hw-card__name { font-family: var(--font-body); font-weight: 600; font-size: 3.4cqw; color: var(--ink); flex: 1; }
.hw-pill {
  font-family: var(--font-mono); font-size: 2.6cqw; letter-spacing: 0.03em;
  padding: 1cqw 2.6cqw 1cqw 2.2cqw; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 1.4cqw; color: var(--ink-dim); background: #f1efec;
}
.hw-pill::before { content: ""; width: 2cqw; height: 2cqw; border-radius: 50%; background: currentColor; }
.hw-pill--online { color: #2f9e5b; background: rgba(47,158,91,0.14); }
.hw-modal {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80cqw; background: var(--white); border-radius: var(--radius);
  box-shadow: 0 6cqw 16cqw rgba(0,0,0,0.3); padding: 2.4cqw 3.2cqw 2.8cqw;
  display: flex; flex-direction: column; gap: 1.2cqw;
}
.hw-modal__head { display: flex; align-items: center; justify-content: space-between; }
.hw-modal__head b { font-family: var(--font-display); font-size: 3.5cqw; color: var(--ink); }
.hw-x { font-size: 4cqw; color: var(--ink-dim); line-height: 1; }
.hw-modal__disp { display: flex; align-items: center; gap: 1.6cqw; font-family: var(--font-body); font-weight: 700; font-size: 3cqw; color: var(--ink); }
.hw-lab { margin: 0.3cqw 0 0; font-family: var(--font-mono); font-size: 2.3cqw; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.hw-seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5cqw; }
.hw-seg__opt {
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 1cqw;
  padding: 1.4cqw 1cqw; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 2.6cqw; color: var(--ink-dim);
}
.hw-seg__ico { font-size: 3.2cqw; line-height: 1; }
.hw-seg__opt.is-active { border-color: var(--red); background: rgba(224,7,0,0.06); color: var(--red); font-weight: 700; }
.hw-select {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.7cqw 2.8cqw; border: 1px solid var(--red); border-radius: var(--radius-sm);
  background: rgba(224,7,0,0.03); font-family: var(--font-body); font-size: 2.9cqw; color: var(--ink);
}
.hw-caret { color: var(--ink-dim); font-size: 3.6cqw; line-height: 0.6; }
.hw-modal__actions { display: flex; justify-content: flex-end; gap: 1.6cqw; margin-top: 0.4cqw; }
.hw-btn { padding: 1.7cqw 3.2cqw; border-radius: var(--radius-sm); border: 1px solid var(--hairline); font-family: var(--font-body); font-weight: 600; font-size: 2.8cqw; color: var(--ink); background: var(--white); }
.hw-btn--primary { border-color: var(--red); background: var(--red); color: #fff; }

/* progress track under the frame */
.hw-track { display: flex; gap: 0.5rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.hw-track li {
  flex: 1; display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim); opacity: 0.55; transition: opacity 0.4s var(--ease);
}
.hw-track li span { flex: 1; height: 3px; border-radius: 3px; background: var(--hairline-strong); transition: background 0.4s var(--ease); }
.hw-track li.is-active { opacity: 1; color: var(--red); }
.hw-track li.is-active span { background: var(--red); }

/* left-column steps highlight in sync with the animation */
#how .step { transition: opacity 0.4s var(--ease); }
#how .steps.is-syncing .step { opacity: 0.5; }
#how .steps.is-syncing .step.is-active { opacity: 1; }

/* the TV flips from pairing to content: content sits underneath (always
   visible) and the pairing layer fades out on top to reveal it. JS sets the
   pairing overlay's inline opacity to 0 after a beat; the transition below
   makes it a smooth crossfade. */

/* motion flourishes — only when the user hasn't asked to reduce motion */
@media (prefers-reduced-motion: no-preference) {
  .hw-blip { animation: hwBlip 1.3s ease-in-out infinite; }
  .hw-scene--laptop.is-active .hw-modal { animation: hwPop 0.45s var(--ease) both; }
  .hw-scene--laptop.is-active [data-hw-update] { animation: hwPulse 1.6s ease-in-out 0.7s infinite; }
  .hw-scene--live .hw-tv-screen--pair { transition: opacity 0.7s var(--ease); }
}
@keyframes hwBlip { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes hwPop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes hwPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,7,0,0); } 50% { box-shadow: 0 0 0 1.4cqw rgba(224,7,0,0.3); } }

@media (max-width: 720px) {
  .howto { max-width: 520px; margin-inline: auto; }
}
