/* ==========================================================================
   DermaScan public website — app look
   --------------------------------------------------------------------------
   Loaded after site.css by layouts/public.blade.php and layouts/auth.blade.php.
   Mirrors the Flutter app: warm canvas, Fraunces display headings, Manrope UI
   text, deep-green gradient surfaces, soft 24px cards and pill controls.
   ========================================================================== */

.web-ui {
  --bg: #F7F5F1;
  --surface: #FFFFFF;
  --surface-2: #F0ECE5;
  --linen: #F4EEE4;
  --ink: #16211E;
  --ink-2: #55605C;
  --ink-3: #858E8A;
  --line: #E8E3DA;
  --line-2: #D9D2C6;
  --brand-soft: #E3EEEA;
  --brand-tint: #F1F6F4;
  --deep: #163A34;
  --copper: #B27A4B;
  --copper-soft: #F7ECE1;
  --grad: linear-gradient(135deg, #2B6658 0%, var(--brand) 52%, var(--deep) 100%);
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(22, 33, 30, .04), 0 6px 18px -10px rgba(22, 58, 52, .18);
  --shadow-md: 0 18px 40px -22px rgba(22, 58, 52, .35);
  --shadow-lg: 0 30px 60px -30px rgba(22, 58, 52, .45);
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
}

/* ---- Type ---------------------------------------------------------------- */
.web-ui h1, .web-ui h2 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.025em; }
.web-ui .brand-name { font-family: var(--font-body); font-weight: 800; }
.web-ui h3, .web-ui h4, .web-ui h5 { font-family: var(--font-body); font-weight: 800; letter-spacing: -0.015em; }
.web-ui .lead { color: var(--ink-2); }
.web-ui .eyebrow { width: fit-content; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--copper-soft); color: var(--copper); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.web-ui .eyebrow::before { width: 6px; height: 6px; border-radius: 50%; }
.web-ui .eyebrow.plain { background: none; padding: 0; }
.web-ui .section-head h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.08; }

/* ---- Controls ------------------------------------------------------------ */
.web-ui .btn { border-radius: 16px; font-weight: 800; letter-spacing: -0.005em; }
.web-ui .btn-sm { border-radius: 12px; }
.web-ui .btn-lg { border-radius: 18px; min-height: 56px; }
.web-ui .btn-primary { --btn-bd: transparent; background: var(--grad); box-shadow: 0 12px 24px -14px rgba(22, 58, 52, .7); }
.web-ui .btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.web-ui .btn-light { box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .35); }
.web-ui .card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--shadow-sm); }
.web-ui .card-link:hover { box-shadow: var(--shadow-md); }
.web-ui .input, .web-ui .select, .web-ui .textarea { border-radius: 14px; border-color: var(--line); background: #fff; }
.web-ui .alert { border-radius: 16px; }
.web-ui .media { border-radius: 18px; }
.web-ui .icon-tile { border-radius: 14px; }

/* ---- Header (full width, glass) ----------------------------------------- */
.web-ui { --header-h: 76px; --wide: 1360px; }
.web-ui .site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h); padding: 0;
  background: rgba(247, 245, 241, .72); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
.web-ui .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0; transition: opacity .3s var(--ease);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--brand) 35%, transparent) 30%, color-mix(in oklab, var(--copper) 45%, transparent) 70%, transparent);
}
.web-ui .site-header > .container {
  max-width: var(--wide); height: 100%; padding-inline: clamp(16px, 3vw, 40px); gap: clamp(12px, 2vw, 28px);
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.web-ui .site-header.is-scrolled { --header-h: 66px; background: rgba(255, 255, 255, .9); border-bottom-color: rgba(232, 227, 218, .7); box-shadow: 0 14px 34px -26px rgba(22, 58, 52, .5); }
.web-ui .site-header.is-scrolled::after { opacity: 1; }
.web-ui .site-header .brand img { height: 36px; }
.web-ui .brand-mark { width: 40px; height: 40px; background: var(--grad); border-radius: 13px; box-shadow: 0 10px 20px -12px rgba(22, 58, 52, .8), inset 0 1px 0 rgba(255,255,255,.18); }
.web-ui .brand-mark svg { width: 22px; height: 22px; }
.web-ui .site-header .brand-name { font-size: 1.3rem; }
.web-ui .auth-aside .brand-mark, .web-ui .site-footer .brand-mark { background: #fff; box-shadow: none; }

.web-ui .nav { margin-inline: auto; gap: clamp(2px, .6vw, 10px); padding: 0; background: none; border: 0; box-shadow: none; }
.web-ui .nav a {
  position: relative; padding: 10px 12px; border-radius: 0; background: none; font-weight: 700; font-size: .92rem; color: var(--ink-2); white-space: nowrap;
  transition: color .2s var(--ease);
}
.web-ui .nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--copper)); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.web-ui .nav a:hover { color: var(--ink); background: none; }
.web-ui .nav a:hover::after { transform: scaleX(1); }
.web-ui .nav a[aria-current="page"] { color: var(--brand); background: none; box-shadow: none; }
.web-ui .nav a[aria-current="page"]::after { transform: scaleX(1); }
.web-ui .header-actions { gap: 8px; }
.web-ui .header-actions .btn-ghost { font-weight: 800; color: var(--ink); border-radius: 999px; padding-inline: 16px; }
.web-ui .header-actions .btn-ghost:hover { background: rgba(240, 236, 229, .9); }
.web-ui .header-actions .btn-primary { border-radius: 999px; padding-inline: 20px 16px; gap: 8px; }
.web-ui .header-actions .btn-primary .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.web-ui .header-actions .btn-primary:hover .icon { transform: translateX(3px); }
.web-ui .menu-toggle { border-radius: 14px; background: #fff; border: 1px solid var(--line); width: 44px; height: 44px; }
@media (max-width: 1280px) {
  .web-ui .nav a { padding: 10px 8px; font-size: .88rem; }
  .web-ui .nav a::after { left: 8px; right: 8px; }
}
@media (max-width: 1080px) {
  .web-ui { --header-h: 64px; }
  .web-ui .site-header .brand-name { font-size: 1.15rem; }
  .web-ui .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
}
.web-ui .mobile-menu { background: var(--bg); top: var(--header-h); padding-top: 24px; z-index: 59; }
.web-ui .mobile-menu a.m-link { font-family: var(--font-serif); font-weight: 500; font-size: 1.45rem; }
.web-ui .announce { background: var(--deep); }

/* ---- Hero ---------------------------------------------------------------- */
.web-ui .hero2::before { background: radial-gradient(60% 60% at 15% 10%, rgba(143, 227, 190, .18), transparent 60%), radial-gradient(50% 50% at 90% 0%, rgba(178, 122, 75, .12), transparent 60%); }
.web-ui .hero2 h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; }
.web-ui .hero2 h1 .hl { font-style: italic; }
.web-ui .hero-pill { border-radius: 999px; background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm); font-weight: 800; }
.web-ui .hero2 .hero-meta { border-top: 0; padding-top: 0; }
.web-ui .hero2 .hero-meta span { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--ink-2); }
.web-ui .float-card { border-radius: 16px; box-shadow: var(--shadow-md); }

/* Trust strip → floating stat cards */
.web-ui .trust-strip { background: transparent; border: 0; margin-top: -24px; position: relative; z-index: 2; }
.web-ui .trust-strip .container { gap: 12px; padding-inline: var(--gutter) !important; }
.web-ui .trust-item { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 18px; }
.web-ui .trust-item + .trust-item { border-left: 1px solid var(--line); }
.web-ui .trust-item strong { font-family: var(--font-body); font-weight: 800; }
.web-ui .trust-item .icon-tile { background: var(--brand-soft); color: var(--brand); }

/* ---- Sections ------------------------------------------------------------ */
.web-ui .section-linen { background: linear-gradient(180deg, var(--linen), var(--bg)); }
.web-ui .section-surface { background: #fff; border: 0; }
.web-ui .process-section { background: var(--grad); }
.web-ui .process-section h2 { font-family: var(--font-serif); font-weight: 500; }
.web-ui .process-section .eyebrow { background: rgba(255, 255, 255, .12); color: #F3D9BC; }
.web-ui .page-hero { background: radial-gradient(70% 90% at 10% 0%, rgba(143, 227, 190, .16), transparent 60%), linear-gradient(180deg, var(--linen), var(--bg)); border-bottom: 0; }
.web-ui .page-hero h1 { font-weight: 500; line-height: 1.05; }
.web-ui .coach-card { border-radius: 32px; box-shadow: var(--shadow-lg); }
.web-ui .quote-card { border-radius: 24px; }
.web-ui .quote-card blockquote { font-family: var(--font-serif); font-size: 1.12rem; }
.web-ui .product-card { border-radius: 24px; }
.web-ui .product-card h3 { font-family: var(--font-body); font-weight: 800; }

/* FAQ accordions as cards */
.web-ui main details { background: #fff; border: 1px solid var(--line) !important; border-radius: 18px; padding: 2px 18px; margin-bottom: 10px; transition: box-shadow var(--dur-2); }
.web-ui main details[open] { box-shadow: var(--shadow-sm); }
.web-ui main details summary { font-weight: 800; }

/* CTA band */
.web-ui .cta-band { background: var(--grad); border-radius: 32px; box-shadow: var(--shadow-lg); }
.web-ui .cta-band h2 { font-family: var(--font-serif); font-weight: 500; }

/* Footer */
.web-ui .site-footer { background: var(--deep); border-radius: 36px 36px 0 0; margin-top: 24px; }
.web-ui .site-footer h4 { font-family: var(--font-body); letter-spacing: .14em; }

/* ---- Mobile sticky CTA (like the app's primary button) ---------------------- */
.web-cta-bar { display: none; }
@media (max-width: 767px) {
  .web-cta-bar {
    display: flex; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45;
    padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(22, 58, 52, .5);
    transform: translateY(140%); transition: transform .35s var(--ease);
  }
  .web-cta-bar.is-on { transform: none; }
  .web-cta-bar .btn { flex: 1; min-height: 48px; }
  .web-cta-bar .btn.sec { flex: 0 0 auto; padding: 0 16px; background: var(--surface-2); border-color: transparent; }
  body.web-ui.has-cta-bar .site-footer { padding-bottom: 90px; }
}

/* ---- Responsive refinements -------------------------------------------------- */
@media (max-width: 900px) {
  .web-ui .trust-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .web-ui .trust-item { flex-direction: column; align-items: flex-start; padding: 14px; }
  .web-ui .trust-item + .trust-item { border-left: 1px solid var(--line); }
  .web-ui .trust-item:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
}
@media (max-width: 640px) {
  .web-ui .section { padding-block: clamp(48px, 12vw, 64px); }
  .web-ui .hero2 .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .web-ui .hero2 .hero-actions .btn { width: 100%; }
  .web-ui .hero2 .hero-meta { gap: 8px; }
  .web-ui .grid-4:has(.product-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .web-ui .product-card { padding: 10px !important; gap: 10px; }
  .web-ui .product-card h3 { font-size: .92rem; }
  .web-ui .cta-band { border-radius: 26px; }
  .web-ui .cta-band .cluster { display: grid; grid-template-columns: 1fr; }
  .web-ui .cta-band .cluster .btn { width: 100%; }
  .web-ui .site-footer { border-radius: 26px 26px 0 0; }
  .web-ui .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .web-ui .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---- Auth pages -------------------------------------------------------------- */
.web-ui .auth-aside, .web-ui .auth-side { background: var(--grad); }
.web-ui .auth-card, .web-ui .auth-panel .card { border-radius: 28px; }

/* ---- Stories carousel (app style) ------------------------------------------ */
.web-ui .stories-section { background: radial-gradient(60% 70% at 100% 0%, rgba(178, 122, 75, .10), transparent 60%), linear-gradient(180deg, #fff 0%, var(--linen) 100%); border: 0; }
.web-ui .stories-section::before { opacity: .5; }
.web-ui .stories-head { align-items: flex-end; }
.web-ui .stories-head h2 { font-family: var(--font-serif); font-weight: 500; }
.web-ui .stories-score { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.web-ui .stories-score .score-num { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-serif); font-size: 1.7rem; letter-spacing: -.02em; }
.web-ui .stories-score > div { display: grid; gap: 3px; }
.web-ui .stories-score > div > span:not(.stars) { font-size: .8rem; font-weight: 700; color: var(--ink-3); }

.web-ui .stories-viewport { padding-block: 10px 18px; }
.web-ui .story-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 24px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.web-ui .story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.web-ui .story-card .story-quote { position: absolute; right: 18px; top: 16px; width: 56px; height: 42px; color: var(--copper); opacity: .14; }
.web-ui .story-person { display: flex; align-items: center; gap: 12px; padding-right: 54px; }
.web-ui .story-person .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--brand-soft); }
.web-ui .story-who strong { font-size: .98rem; font-weight: 800; }
.web-ui .story-who span { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.web-ui .story-card blockquote { margin: 0; flex: 1; font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); line-height: 1.5; letter-spacing: -.01em; color: var(--ink); }
.web-ui .story-card.has-photos blockquote { font-size: 1.02rem; }
.web-ui .story-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.web-ui .story-verified { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; color: #2E7552; }
.web-ui .story-verified .icon { width: 16px; height: 16px; }
.web-ui .story-badge { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--copper-soft); color: var(--copper); }
.web-ui .story-photos { margin: -10px -10px 0; }
.web-ui .story-photos figure { border-radius: 18px; }

.stories-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.stories-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stories-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: width .35s var(--ease), background .3s var(--ease); }
.stories-dot:hover { background: var(--ink-3); }
.stories-dot.is-active { width: 28px; background: var(--brand); }
.stories-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.stories-controls { display: flex; gap: 8px; }
.stories-arrow { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: transform var(--dur-1), box-shadow var(--dur-1); }
.stories-arrow:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stories-arrow.is-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 12px 24px -14px rgba(22, 58, 52, .7); }
.stories-arrow .icon { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .web-ui .stories-head { gap: 16px; }
  .web-ui .stories-score { width: 100%; }
  .web-ui .story-card { padding: 20px; border-radius: 22px; }
  .stories-arrow { width: 44px; height: 44px; border-radius: 14px; }
}

/* ==========================================================================
   Home hero slider (partials/hero-slider.blade.php)
   ========================================================================== */
.hs { position: relative; overflow: hidden; isolation: isolate; padding: clamp(28px, 4vw, 56px) 0 clamp(96px, 9vw, 136px); }
/* The stat cards under the slider sit clear of the dots (they used to overlap the old hero). */
.web-ui .hs + .trust-strip { margin-top: clamp(8px, 1.5vw, 20px); }
.hs-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.hs-bg .b1, .hs-bg .b2 { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: hs-float 18s ease-in-out infinite alternate; }
.hs-bg .b1 { width: 46vw; height: 46vw; left: -14vw; top: -18vw; background: radial-gradient(circle, rgba(143, 227, 190, .55), transparent 65%); }
.hs-bg .b2 { width: 40vw; height: 40vw; right: -10vw; bottom: -16vw; background: radial-gradient(circle, rgba(178, 122, 75, .32), transparent 65%); animation-delay: -6s; }
.hs-bg .grid {
  position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(color-mix(in oklab, var(--brand) 16%, transparent) 1px, transparent 1.2px); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(55% 70% at 74% 48%, #000 15%, transparent 72%); mask-image: radial-gradient(55% 70% at 74% 48%, #000 15%, transparent 72%);
}
@keyframes hs-float { to { transform: translate3d(4vw, 3vw, 0) scale(1.08); } }

.hs-inner { max-width: var(--wide, 1360px); padding-inline: clamp(16px, 5.5vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(24px, 4vw, 64px); align-items: center; }

/* ---- copy ---------------------------------------------------------------- */
.hs-copy { display: grid; align-content: center; min-height: clamp(460px, 52vw, 600px); }
.hs-slide { grid-area: 1 / 1; align-self: center; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease), visibility 0s .5s; }
.hs-slide.is-active { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .5s var(--ease), visibility 0s; }
.hs-slide > * { transform: translateY(18px); opacity: 0; transition: transform .7s var(--ease), opacity .7s var(--ease); }
.hs-slide.is-active > * { transform: none; opacity: 1; }
.hs-slide.is-active > :nth-child(2) { transition-delay: .08s; }
.hs-slide.is-active > :nth-child(3) { transition-delay: .16s; }
.hs-slide.is-active > :nth-child(4) { transition-delay: .24s; }
[data-dir="prev"] .hs-slide > * { transform: translateY(-18px); }
[data-dir="prev"] .hs-slide.is-active > * { transform: none; }

.hs-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 6px 16px 6px 8px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 800; font-size: .88rem; color: var(--ink-2);
}
.hs-eyebrow .dot { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--copper-soft); display: grid; place-items: center; }
.hs-eyebrow .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hs-eyebrow .dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); animation: pulse-ring 2.4s var(--ease) infinite; opacity: 0; }

.hs-title { margin-top: 22px; font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.7rem); line-height: 1.03; letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; }
.hs-title .hl { position: relative; color: var(--brand); font-style: italic; white-space: nowrap; }
.hs-title .hl svg { position: absolute; left: -2%; bottom: -0.04em; width: 104%; height: .22em; color: var(--accent); overflow: visible; }
.hs-title .hl svg path { stroke-dasharray: 260; stroke-dashoffset: 260; }
.hs-slide.is-active .hs-title .hl svg path { animation: draw 1.1s .45s var(--ease) forwards; }
.hs-lead { margin-top: 22px; max-width: 52ch; font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); line-height: 1.6; color: var(--ink-2); }
.hs-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hs-actions .btn-primary .icon { transition: transform .2s var(--ease); }
.hs-actions .btn-primary:hover .icon { transform: translateX(4px); }
.hs-secondary { background: rgba(255, 255, 255, .8); border-color: var(--line); }
.hs-secondary:hover { background: #fff; border-color: var(--line-2); }

/* ---- arrows (left / right edges) + dot indicators -------------------------- */
.hs-arrow {
  position: absolute; top: 50%; z-index: 6; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .85); color: var(--ink); border: 1px solid rgba(232, 227, 218, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 14px 30px -18px rgba(22, 58, 52, .55);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.hs-arrow.prev { left: clamp(10px, 1.6vw, 28px); }
.hs-arrow.next { right: clamp(10px, 1.6vw, 28px); }
.hs-arrow:hover { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 16px 30px -14px rgba(22, 58, 52, .8); }
.hs-arrow.prev:hover { transform: translateY(-50%) translateX(-3px); }
.hs-arrow.next:hover { transform: translateY(-50%) translateX(3px); }
.hs-arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.hs-arrow .icon { width: 20px; height: 20px; }

.hs-dots { position: absolute; left: 50%; bottom: clamp(36px, 3.6vw, 56px); z-index: 6; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; }
.hs-dot {
  position: relative; width: 10px; height: 10px; padding: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in oklab, var(--brand) 22%, transparent); border: 0;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.hs-dot::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; } /* bigger tap target */
.hs-dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--brand);
  opacity: 0; transform: scale(.4); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.hs-dot:hover { background: color-mix(in oklab, var(--brand) 50%, transparent); transform: scale(1.15); }
.hs-dot.is-active { background: var(--brand); transform: none; }
.hs-dot.is-active::after { opacity: 1; transform: none; }
.hs-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }

/* ---- stage ---------------------------------------------------------------- */
.hs-stage { position: relative; width: 100%; max-width: 640px; margin-inline: auto; aspect-ratio: 560 / 600; }
.hs-orbit { position: absolute; inset: 1% -2% -1% -4%; pointer-events: none; }
.hs-orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed color-mix(in oklab, var(--brand) 18%, transparent); animation: spin 60s linear infinite; }
.hs-orbit span + span { inset: 9%; border-style: solid; border-color: color-mix(in oklab, var(--copper) 18%, transparent); animation-duration: 90s; animation-direction: reverse; }
.hs-orbit span::after { content: ""; position: absolute; top: 50%; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 18%, transparent); }
.hs-orbit span + span::after { left: auto; right: -4px; top: 30%; width: 8px; height: 8px; background: var(--brand); box-shadow: 0 0 0 5px color-mix(in oklab, var(--brand) 14%, transparent); }
.hs-plate { position: absolute; left: 4%; top: 10%; width: 88%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffdf9, var(--linen) 70%); box-shadow: inset 0 1px 0 #fff, 0 40px 80px -40px rgba(22, 58, 52, .45); }
.hs-stage .hs-scalp { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .9s var(--ease); }

/* scene tweaks on the shared scalp */
.hs-stage .ss-scan, .hs-stage .ss-lens, .hs-stage .ss-lens-halo, .hs-stage .ss-lens-rim, .hs-stage .ss-leader, .hs-stage [clip-path="url(#ss-lens)"] { transition: opacity .6s var(--ease); }
.hs-stage:not([data-scene="scan"]) .ss-scan { opacity: 0; }
.hs-stage[data-scene="kit"] .hs-scalp { transform: scale(.88) translate(-6%, -4%); }
.hs-stage[data-scene="care"] .hs-scalp { transform: scale(.86) translate(4%, -6%); }
.hs-stage[data-scene="kit"] :is(.ss-lens, .ss-lens-halo, .ss-lens-rim, .ss-leader, [clip-path="url(#ss-lens)"]),
.hs-stage[data-scene="care"] :is(.ss-lens, .ss-lens-halo, .ss-lens-rim, .ss-leader, [clip-path="url(#ss-lens)"]) { opacity: 0; }
.hs-stage[data-scene="progress"] .ss-hair.h1 { animation: hs-regrow 3.6s var(--ease) infinite alternate; }
.hs-stage[data-scene="progress"] .ss-zone { animation: hs-zone 3.6s var(--ease) infinite alternate; }
.hs-stage[data-scene="causes"] .ss-marker circle.pulse { animation-duration: 1.6s; }
@keyframes hs-regrow { from { opacity: .3; stroke-width: .7; } to { opacity: 1; stroke-width: 1.25; } }
@keyframes hs-zone { from { opacity: 1; } to { opacity: .25; } }

/* layers */
.hs-layer { position: absolute; inset: 0; pointer-events: none; }
.hs-layer > * { opacity: 0; }
.hs-layer.is-active > * { animation: hs-pop .7s var(--ease) both; animation-delay: var(--d, 0ms); }
.hs-layer.is-active .hs-links { animation: none; opacity: 1; }
@keyframes hs-pop { from { opacity: 0; transform: translate(var(--tx, 0), calc(var(--ty, 0px) + 14px)) scale(.94); } to { opacity: 1; transform: translate(var(--tx, 0), var(--ty, 0px)); } }

.hs-chip {
  position: absolute; --tx: -50%; --ty: -50%; transform: translate(-50%, -50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.95); border: 1px solid var(--line); box-shadow: var(--shadow-md); font-weight: 800; font-size: .8rem; color: var(--ink);
}
.hs-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 14%, transparent); }
.hs-chip.accent::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent); }
.hs-chip.cause::before { display: none; }
.hs-chip.cause i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: .68rem; }
.hs-layer.is-active .hs-chip { animation-name: hs-pop, hs-bob; animation-duration: .7s, 4s; animation-delay: var(--d, 0ms), calc(var(--d, 0ms) + .7s); animation-iteration-count: 1, infinite; animation-direction: normal, alternate; animation-timing-function: var(--ease), ease-in-out; animation-fill-mode: both, none; }
@keyframes hs-bob { from { transform: translate(-50%, -50%); } to { transform: translate(-50%, calc(-50% - 6px)); } }

.hs-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hs-links line { stroke: color-mix(in oklab, var(--brand) 40%, transparent); stroke-width: .35; stroke-dasharray: 1 1.4; vector-effect: non-scaling-stroke; stroke-width: 1.4; opacity: 0; }
.hs-layer.is-active .hs-links line { animation: hs-fade .6s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes hs-fade { to { opacity: 1; } }

.hs-card { position: absolute; z-index: 4; padding: 14px 16px; border-radius: 20px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(232,227,218,.95); box-shadow: 0 24px 50px -28px rgba(22, 58, 52, .55); }
.hs-card b { display: block; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.hs-card small { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-3); }

.hs-stat { display: flex; align-items: center; gap: 12px; max-width: 280px; }
.hs-stat.at-tr { top: 4%; right: -2%; }
.hs-stat.at-tl { top: 4%; left: -2%; }
.hs-stat .badge-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.hs-stat .badge-ic .icon { width: 20px; height: 20px; }
.hs-stat .ring { width: 44px; height: 44px; flex: none; }
.hs-stat .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hs-stat .ring circle { fill: none; stroke: var(--brand-soft); stroke-width: 4; }
.hs-stat .ring .arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; }
.hs-layer.is-active .hs-stat .ring .arc { animation: hs-arc 1.6s 1.1s var(--ease) forwards; }
@keyframes hs-arc { to { stroke-dashoffset: 8; } }

/* scan HUD */
.hs-hud { left: -3%; bottom: 3%; min-width: 230px; }
.hud-top { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .82rem; color: var(--ink); }
.hud-top .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: hs-blink 1.2s steps(2) infinite; }
@keyframes hs-blink { 50% { opacity: .2; } }
.hud-angles { display: flex; gap: 6px; margin-top: 10px; }
.hud-angles span { display: grid; justify-items: center; gap: 5px; font-size: .64rem; font-weight: 700; color: var(--ink-3); }
.hud-angles i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; }
.hs-layer.is-active .hud-angles i { animation: hs-angle .5s var(--ease) forwards; animation-delay: calc(900ms + var(--k) * 450ms); }
@keyframes hs-angle { to { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; } }
.hud-stat { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.hud-stat b { display: inline; color: var(--brand); font-size: .92rem; }

/* kit */
.hs-kit { right: -2%; bottom: 2%; width: min(62%, 300px); padding: 16px; }
.kit-shelf { display: flex; align-items: flex-end; justify-content: center; gap: 12px; height: 104px; padding: 12px 10px 0; border-radius: 16px; background: linear-gradient(180deg, var(--brand-tint), var(--copper-soft)); overflow: hidden; }
.kit-shelf .p { position: relative; display: block; border-radius: 10px 10px 8px 8px; box-shadow: inset -6px 0 0 rgba(0,0,0,.06), 0 10px 16px -10px rgba(22,58,52,.6); animation: hs-bottle 3s ease-in-out infinite alternate; }
.kit-shelf .p i { position: absolute; left: 18%; right: 18%; top: 40%; height: 22%; border-radius: 4px; background: rgba(255,255,255,.85); }
.kit-shelf .serum { width: 30px; height: 70px; background: var(--grad); border-radius: 8px 8px 10px 10px; }
.kit-shelf .serum::before { content: ""; position: absolute; left: 9px; right: 9px; top: -16px; height: 16px; border-radius: 6px 6px 2px 2px; background: var(--copper); }
.kit-shelf .tub { width: 52px; height: 44px; background: #fff; border: 1px solid var(--line); animation-delay: -1s; }
.kit-shelf .tub::before { content: ""; position: absolute; left: -3px; right: -3px; top: -8px; height: 10px; border-radius: 6px; background: var(--brand); }
.kit-shelf .tub i { background: var(--copper-soft); }
.kit-shelf .bottle { width: 38px; height: 84px; background: linear-gradient(160deg, #d9a97c, var(--copper)); border-radius: 12px 12px 10px 10px; animation-delay: -2s; }
.kit-shelf .bottle::before { content: ""; position: absolute; left: 11px; right: 11px; top: -12px; height: 12px; border-radius: 4px 4px 0 0; background: var(--deep); }
@keyframes hs-bottle { to { transform: translateY(-5px); } }
.hs-kit ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.hs-kit li { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .84rem; color: var(--ink); opacity: 0; }
.hs-layer.is-active .hs-kit li { animation: hs-fade .5s var(--ease) forwards; animation-delay: var(--d); }
.hs-kit .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.hs-kit .tick .icon { width: 13px; height: 13px; }

/* progress */
.hs-timeline { left: -3%; bottom: 3%; width: min(58%, 270px); }
.tl-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .84rem; color: var(--ink); }
.tl-head .icon { width: 18px; height: 18px; color: var(--success, #2E7552); }
.tl-bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: 12px; }
.tl-bars span { flex: 1; height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 4px; }
.tl-bars i { align-self: end; height: var(--h); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 55%, white), var(--brand)); transform: scaleY(0); transform-origin: bottom; }
.tl-bars span:last-child i { background: linear-gradient(180deg, #e2b48a, var(--accent)); }
.tl-bars small { text-align: center; font-size: .64rem; font-weight: 800; color: var(--ink-3); }
.hs-layer.is-active .tl-bars i { animation: hs-bar .7s var(--ease) forwards; animation-delay: calc(500ms + var(--k) * 160ms); }
@keyframes hs-bar { to { transform: scaleY(1); } }
/* care / chat */
.hs-chat { position: absolute; right: -2%; bottom: 4%; width: min(70%, 330px); display: grid; gap: 10px; opacity: 1 !important; animation: none !important; }
.hs-chat .bubble { display: flex; align-items: flex-end; gap: 8px; opacity: 0; transform: translateY(10px); }
.hs-layer.is-active .hs-chat .bubble { animation: hs-bubble .55s var(--ease) forwards; animation-delay: var(--d); }
.hs-chat .bubble p { margin: 0; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); font-weight: 600; font-size: .86rem; line-height: 1.4; color: var(--ink); }
.hs-chat .bubble.me { justify-content: flex-end; }
.hs-chat .bubble.me p { border-radius: 18px 18px 6px 18px; background: var(--grad); color: #fff; border-color: transparent; }
.hs-chat .av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--copper-soft); color: var(--copper); border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.hs-chat .av .icon { width: 16px; height: 16px; }
.hs-chat .typing p { display: flex; gap: 4px; padding: 13px 14px; }
.hs-chat .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: hs-typing 1s ease-in-out infinite; }
.hs-chat .typing i:nth-child(2) { animation-delay: .15s; }
.hs-chat .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hs-bubble { to { opacity: 1; transform: none; } }
@keyframes hs-typing { 50% { transform: translateY(-4px); opacity: .4; } }

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .hs-stat.at-tr, .hs-stat.at-tl { top: 0; }
  .hs-hud, .hs-timeline { left: 0; }
  .hs-kit, .hs-chat { right: 0; }
}
@media (max-width: 960px) {
  .hs-inner { grid-template-columns: minmax(0, 1fr); }
  .hs-copy { min-height: 0; }
  .hs-stage { max-width: 520px; order: -1; margin-bottom: 8px; }
  .hs-arrow { top: calc(12px + min(520px, 100vw - 32px) * .54); width: 44px; height: 44px; }
}
@media (max-width: 640px) {
  .hs { padding-top: 12px; }
  .hs-actions { display: grid; grid-template-columns: 1fr; }
  .hs-actions .btn { width: 100%; }
  .hs-chip { font-size: .7rem; padding: 5px 10px; }
  .hs-card { padding: 10px 12px; border-radius: 16px; }
  .hs-card b { font-size: .9rem; }
  .hs-stat { max-width: 190px; gap: 8px; }
  .hs-stat .badge-ic, .hs-stat .ring { width: 34px; height: 34px; }
  .hs-hud { min-width: 0; }
  .hud-angles i { width: 18px; height: 18px; }
  .kit-shelf { height: 80px; transform-origin: bottom; }
  .kit-shelf .p { transform: scale(.85); }
  .tl-bars { height: 64px; }
  .hs-chat .bubble p { font-size: .76rem; padding: 8px 11px; }
  .hs-arrow { width: 40px; height: 40px; }
  .hs-arrow .icon { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-bg .b1, .hs-bg .b2, .hs-orbit span, .hs-layer.is-active .hs-chip { animation: none !important; }
  .hs-slide > *, .hs-slide.is-active > * { transition: none; transform: none; }
  .hs-title .hl svg path { stroke-dashoffset: 0; }
}
