/* SOLSKIN conversion modules.
   Loaded after solskin-storefront.css. Tokens come from that file's :root.
   No new colour literals: every surface is a token or an oklab mix of two. */

/* Hover repairs --------------------------------------------------------
   --surface and --bg resolve to the same value, so every hover written
   against --surface was a no-op. These give the add-to-bag affordances a
   visible state without leaving the palette. */

.btn--ghost:hover {
  background: var(--sand);
  color: var(--fg);
  border-color: var(--muted);
}

.btn--text:hover {
  background: var(--sand);
  color: var(--accent-secondary);
}

.nav-text:hover,
.icon-btn:hover {
  background: var(--sand);
  color: var(--fg);
}

/* Ratings ------------------------------------------------------------- */

.stars {
  position: relative;
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  /* Cancel the tracking that trails the fifth star so the score sits at a
     true 8px from the row, matching every other gap in the card. */
  margin-right: -0.12em;
  white-space: nowrap;
  vertical-align: -1px;
}

.stars__base,
.stars__fill {
  display: block;
  font-family: var(--font-body);
}

.stars__base {
  color: var(--border);
}

.stars__fill {
  position: absolute;
  inset: 0;
  width: var(--pct, 100%);
  overflow: hidden;
  color: var(--accent);
}

.rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-secondary);
}

.rating__score {
  font-weight: 500;
}

.rating__count {
  color: var(--muted);
}

/* Hero social proof ----------------------------------------------------
   Faces, rating and reviewer count sitting under the hero subhead. Two
   grounds: the film hero already has a Milky White plate, so the default
   is chocolate on milky. The editorial hero sits directly on the campaign
   still, so --on-media inverts to milky type with the same shadow token as
   the claim rather than adding a second plate under the wordmark. */

.hero-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.hero-proof__faces {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-proof__faces li {
  width: 36px;
  height: 36px;
  margin-left: -10px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 0 0 2px var(--bg);
}

.hero-proof__faces li:first-child {
  margin-left: 0;
}

.hero-proof__faces img {
  display: block;
  width: 100%;
  height: 100%;
  /* Deliberate square crop of a 2:3 portrait — the source files are the
     128px avatar derivatives, so the ratio is already 1:1. */
  object-fit: cover;
}

.hero-proof__text {
  display: grid;
  gap: 4px;
  justify-items: start;
  /* The editorial lockup is centre-aligned; the proof column is not. */
  text-align: left;
}

.hero-proof__line {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--fg);
}

.hero-proof__line strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.hero-proof--on-media .hero-proof__faces li {
  box-shadow: 0 0 0 2px var(--bg), 0 1px 8px var(--accent-secondary);
}

.hero-proof--on-media .hero-proof__line {
  color: var(--bg);
  text-shadow: 0 1px 12px var(--accent-secondary);
}

/* Bronze loses to a photograph, so the filled stars go Milky White here
   and the empty track drops to a translucent mix of the same token. */
.hero-proof--on-media .stars__fill {
  color: var(--bg);
}

.hero-proof--on-media .stars__base {
  color: color-mix(in oklab, var(--bg) 45%, transparent);
}

.hero-proof--on-media .stars {
  filter: drop-shadow(0 1px 8px var(--accent-secondary));
}

@media screen and (max-height: 640px) {
  .hero-proof__faces li {
    width: 30px;
    height: 30px;
  }
}

/* Trust strip --------------------------------------------------------- */

.trust {
  background: var(--bg);
  border-bottom: var(--line) solid var(--border);
}

.trust__grid {
  display: grid;
  gap: 4px;
  padding: 20px 0;
}

.trust__item {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: var(--line) solid var(--border);
}

.trust__item:last-child {
  border-bottom: 0;
}

.trust__lead {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.trust__note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

@media screen and (min-width: 720px) {
  .trust__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .trust__item {
    padding: 4px 0;
    border-bottom: 0;
  }
}

/* Product card additions ---------------------------------------------- */

.product-card__rating {
  display: flex;
  align-items: center;
  min-height: 18px;
}

/* One slot for the error and the button so every card keeps the same six
   rows whether or not the error is showing. */
.product-card__action {
  display: grid;
  align-content: end;
  gap: 8px;
}

.shade {
  display: grid;
  align-content: start;
  gap: 6px;
}

.shade__label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Stacked, full-width chips: "Medium to Very Dark" cannot fit beside a
   sibling in a four-column grid, and wrapping inside the chip is safer
   than letting it push out of the card. */
.shade__options {
  display: grid;
  gap: 6px;
}

.shade__option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: var(--line) solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  cursor: pointer;
}

.shade__option:hover {
  background: var(--sand);
  color: var(--fg);
  border-color: var(--muted);
}

.shade__option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shade__option:has(input:checked) {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.shade__option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.shade__swatch {
  flex: none;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 99px;
  border: var(--line) solid var(--border);
  background: color-mix(in oklab, var(--sand), var(--fg) var(--tone, 30%));
}

.shade.is-invalid .shade__option {
  border-color: var(--accent-secondary);
}

.field-error {
  margin: 0;
  font-size: 13px;
  color: var(--accent-secondary);
  font-weight: 500;
}

.field-error[hidden] {
  display: none;
}

.grid-note {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Mitt attach --------------------------------------------------------- */

.attach {
  display: grid;
  gap: 16px;
  align-items: center;
  margin-top: 32px;
  padding: 16px;
  background: var(--sand);
  border: var(--line) solid var(--border);
  border-radius: var(--radius);
}

.attach__media {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.attach__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attach__title {
  margin: 0 0 2px;
  font-size: 16px;
}

.attach__copy {
  margin: 0;
  font-size: 14px;
  color: var(--accent-secondary);
}

.attach .btn {
  white-space: nowrap;
}

.attach__done {
  display: none;
  align-items: center;
  min-height: 48px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-secondary);
}

.attach.is-added .attach__add {
  display: none;
}

.attach.is-added .attach__done {
  display: inline-flex;
}

@media screen and (min-width: 720px) {
  .attach {
    grid-template-columns: auto 1fr auto;
    padding: 20px 24px;
  }
}

/* Shade ladder + live skin-only slider -------------------------------- */

.ladder-live {
  display: grid;
  gap: 20px;
}

@media screen and (min-width: 900px) {
  .ladder-live {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 32px;
    align-items: center;
  }
}

.ladder-live__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: var(--line) solid var(--border);
  background: var(--sand);
  aspect-ratio: 1536 / 1024;
}

.ladder-live__canvas {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.ladder-live__img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  pointer-events: none;
}

.ladder-live.is-ready .ladder-live__img {
  visibility: hidden;
}

.ladder-live__side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.ladder-live__tone {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--fg);
}

.ladder-live__result {
  margin: 0;
  max-width: 28ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--accent-secondary);
}

.ladder-live__slider {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.ladder-live__label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ladder-live__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  margin: 18px 0 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--bg), var(--fg) 12%),
    color-mix(in oklab, var(--bg), var(--fg) 28%),
    color-mix(in oklab, var(--bg), var(--fg) 48%),
    color-mix(in oklab, var(--bg), var(--fg) 68%)
  );
  outline: none;
  cursor: pointer;
}

.ladder-live__range:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 6px;
}

.ladder-live__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: var(--line) solid var(--fg);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--sand);
  cursor: grab;
}

.ladder-live__range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: var(--line) solid var(--fg);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--sand);
  cursor: grab;
}

.ladder-live__ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.ladder-live__tick {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  cursor: pointer;
}

.ladder-live__tick:hover {
  color: var(--fg);
  background: var(--sand);
}

.ladder-live__tick[aria-current="true"] {
  color: var(--fg);
  font-weight: 500;
}

.ladder-live__tick:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.ladder__caption {
  margin: 24px 0 0;
  max-width: 52ch;
  font-size: 14px;
  color: var(--accent-secondary);
}

/* Kit builder --------------------------------------------------------- */

.kit {
  display: grid;
  gap: 24px;
}

@media screen and (min-width: 900px) {
  .kit {
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
  }

  .kit__summary {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

.kit__options {
  display: grid;
  gap: 12px;
}

@media screen and (min-width: 560px) {
  .kit__options {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kit__option {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  background: var(--bg);
  border: var(--line) solid var(--border);
  border-radius: var(--radius);
}

.kit__option:hover {
  background: var(--sand);
  border-color: var(--muted);
}

.kit__option:has(input[type="checkbox"]:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kit__option:has(input[type="checkbox"]:checked) {
  background: var(--sand);
  border-color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--fg);
}

.kit__pick {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  cursor: pointer;
}

.kit__pick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.kit__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--sand);
}

.kit__name {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.kit__name::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: var(--line) solid var(--muted);
  border-radius: 3px;
  background: var(--bg);
}

.kit__option:has(input[type="checkbox"]:checked) .kit__name::before {
  background: var(--fg);
  border-color: var(--fg);
  box-shadow: inset 0 0 0 2px var(--sand);
}

.kit__meta {
  display: block;
  padding-left: 22px;
  font-size: 13px;
  color: var(--accent-secondary);
}

.kit__shade select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: var(--line) solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
}

.kit__shade select:hover {
  border-color: var(--muted);
}

.kit__row[hidden] {
  display: none;
}

.section__sub {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Products without variants keep the same slot as the chip stack, filled
   with an explanation rather than left as a hole under the price. */
.product-card__note {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: var(--line) solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.4;
  color: var(--accent-secondary);
}

.shade--fixed {
  align-content: stretch;
  grid-template-rows: auto 1fr;
}

.kit__summary {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius);
}

.kit__summary h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kit__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.kit__row--save {
  color: var(--sand);
  font-weight: 500;
}

.kit__row--total {
  padding-top: 12px;
  border-top: var(--line) solid var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.kit__hint {
  margin: 0;
  font-size: 13px;
  color: var(--border);
}

.kit__summary .btn--primary {
  background: var(--sand);
  color: var(--fg);
  border-color: var(--sand);
}

.kit__summary .btn--primary:hover {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
}

.kit__summary .btn--primary:active {
  background: var(--border);
  color: var(--accent-secondary);
  border-color: var(--border);
}

.kit__summary .btn--primary:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 3px;
}

.kit__summary .btn:disabled {
  background: var(--muted);
  color: var(--bg);
  border-color: var(--muted);
  cursor: not-allowed;
}

.kit__basis {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Reviews ------------------------------------------------------------- */

.review-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}

@media screen and (min-width: 760px) {
  .review-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Three shared slots: title, quote, attribution. Quotes differ in length,
   so without this the attribution lines finish at three heights. */
.review-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 20px;
  background: var(--bg);
  border: var(--line) solid var(--border);
  border-radius: var(--radius);
}

.review-card__title {
  margin: 0;
  align-self: start;
  font-size: 16px;
  text-wrap: balance;
}

.review-card blockquote {
  align-self: start;
}

.review-card blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.review-card figcaption {
  font-size: 13px;
  color: var(--muted);
}

.proof-bar {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--sand);
  border: var(--line) solid var(--muted);
  border-radius: var(--radius);
}

.proof-bar__lead {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
}

.proof-bar__note {
  margin: 0;
  font-size: 13px;
  color: var(--accent-secondary);
}

@media screen and (min-width: 720px) {
  .proof-bar {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 24px;
  }
}

/* FAQ ----------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 0;
  max-width: 46rem;
  border-top: var(--line) solid var(--border);
}

.faq__item {
  border-bottom: var(--line) solid var(--border);
}

.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 16px 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  font-size: 20px;
  line-height: 1;
  color: var(--accent-secondary);
}

.faq__item[open] summary::after {
  content: "–";
}

.faq__item summary:hover {
  background: var(--sand);
  color: var(--fg);
}

.faq__item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq__body {
  padding: 0 4px 20px;
  max-width: 60ch;
}

.faq__body p {
  margin: 0 0 12px;
  color: var(--accent-secondary);
}

.faq__body p:last-child {
  margin-bottom: 0;
}

/* Welcome offer ------------------------------------------------------- */

/* The footer sits on Very Dark Chocolate, so this block runs inverted. */

.welcome__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--border);
}

.welcome__perks {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--border);
}

.welcome__perks li {
  padding-left: 18px;
  position: relative;
}

.welcome__perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--border);
}

.welcome__done {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 16px;
  background: var(--sand);
  color: var(--accent-secondary);
  border: var(--line) solid var(--sand);
  border-radius: var(--radius);
  font-size: 14px;
}

.welcome__done[hidden] {
  display: none;
}

.welcome__done strong {
  font-weight: 500;
}

/* Sticky mobile bar --------------------------------------------------- */

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: var(--fg);
  color: var(--bg);
  border-top: var(--line) solid var(--accent-secondary);
}

.sticky-bar.is-visible {
  display: flex;
}

.sticky-bar__copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  min-width: 0;
}

.sticky-bar__copy strong {
  display: block;
  font-weight: 500;
}

.sticky-bar__copy span {
  font-size: 12px;
  color: var(--border);
}

.sticky-bar .btn {
  min-height: 44px;
  padding: 10px 18px;
  background: var(--sand);
  color: var(--fg);
  border-color: var(--sand);
  white-space: nowrap;
}

.sticky-bar .btn:hover {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
}

.sticky-bar .btn:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 3px;
}

@media screen and (min-width: 900px) {
  .sticky-bar.is-visible {
    display: none;
  }
}

/* Cart additions ------------------------------------------------------ */

.cart__assure {
  display: grid;
  gap: 4px;
  padding: 12px 20px 0;
  font-size: 13px;
  color: var(--accent-secondary);
}

.cart__assure p {
  margin: 0;
}
