/* Entry 033 — The Tells
   Series: Interface Crimes.
   Scene art direction: a dune at last light (Ruedi Häberli) — a raking gold ridge
   falling out of deep sable shadow, one warm low light source. A frosted consumer
   checkout floats in the cool shadow, its glass borrowed from the sand so UI and
   desert share one colour world: it looks like a real, likeable product. One accent
   only — red-pen vermilion — and it is spent entirely on the marks. Resting, the panel
   is clean and warm; flip "show the tells" and red proof-marks bloom over every
   engineered element, each tagged with the lift it was shipped to buy. Display voices:
   Fraunces (the verdicts and tags — the soul) + Space Grotesk (product chrome — the
   machine). Pillowy 20px radii; the beauty is the point — marked wrong, kept anyway. */

:root {
  --deep: #241d18;
  --mid: #695447;
  --sand: #cc8a57;
  --sand-glow: #d8a781;
  --on-dark: #f7eee7;
  --mark: #d8402a;          /* the one accent — red pen */
  --mark-deep: #b32d1c;
  --radius: 20px;
}

.tells-scene {
  position: relative;
  display: grid;
  place-items: center;
  gap: 26px;
  min-height: 820px;
  padding: 104px 32px 96px;
  overflow: hidden;
  border-color: rgba(20, 15, 11, 0.7);
  /* background-first: the dune photograph carries the mood; a warm scrim, heavier at
     top-left where the panel sits, keeps the checkout legible without flattening the
     lit ridge lower-right. */
  background-image:
    linear-gradient(150deg, rgba(18, 13, 9, 0.80) 0%, rgba(26, 19, 14, 0.52) 40%, rgba(30, 22, 15, 0.20) 66%, rgba(40, 28, 18, 0.34) 100%),
    url("../../public/media/backgrounds/dark-warm-19-ruedi.jpg");
  background-size: cover, cover;
  background-position: center, center 58%;
  background-repeat: no-repeat, no-repeat;
}

/* mid layer — the warm bounce of the lit ridge, spilled and blurred behind the panel */
.dune-glow {
  position: absolute;
  z-index: 0;
  right: 2%;
  bottom: 6%;
  width: min(760px, 86%);
  height: 460px;
  background: radial-gradient(56% 56% at 60% 60%, rgba(216, 167, 129, 0.34), transparent 72%);
  filter: blur(58px);
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* THE COMPONENT — one frosted checkout that marks its own tricks      */
/* ------------------------------------------------------------------ */

.checkout {
  position: relative;
  z-index: 2;
  width: min(468px, 100%);
  display: grid;
  gap: 20px;
  padding: 26px 26px 22px;
  border-radius: var(--radius);
  font-family: "Space Grotesk", var(--ui-sans);
  color: var(--on-dark);
  /* frosted warm glass, sand-toned so it belongs to the photo */
  background:
    linear-gradient(166deg, rgba(247, 238, 231, 0.14), rgba(36, 29, 24, 0.42));
  border: 1px solid rgba(216, 167, 129, 0.26);
  box-shadow:
    0 1px 0 rgba(247, 238, 231, 0.20) inset,
    0 0 0 1px rgba(12, 8, 6, 0.24),
    0 60px 130px rgba(8, 5, 3, 0.60),
    0 18px 54px rgba(60, 38, 22, 0.34);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
}

/* --- header --- */
.co-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(247, 238, 231, 0.12);
}
.co-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.co-brand-soft { color: rgba(247, 238, 231, 0.6); font-weight: 400; }
.co-dot {
  width: 16px; height: 16px; border-radius: 6px;
  background: linear-gradient(145deg, var(--sand-glow), var(--sand));
  box-shadow: 0 0 14px rgba(216, 167, 129, 0.5);
}
.co-secure {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 238, 231, 0.5);
}

.co-body { display: grid; gap: 18px; }

/* --- plan + price --- */
.co-plan { display: grid; gap: 8px; }
.co-plan-name {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 238, 231, 0.56);
}
.co-price {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.co-was {
  font-size: 19px;
  color: rgba(247, 238, 231, 0.42);
  text-decoration: line-through;
  text-decoration-color: rgba(247, 238, 231, 0.4);
}
.co-now {
  font-family: "Fraunces", serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  color: var(--on-dark);
}
.co-per { font-size: 15px; color: rgba(247, 238, 231, 0.5); font-weight: 400; }

/* --- scarcity row --- */
.co-scarcity {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(20, 14, 10, 0.34);
  border: 1px solid rgba(247, 238, 231, 0.09);
}
.co-timer { position: relative; display: flex; align-items: center; gap: 10px; }
.co-timer-label {
  font-size: 13px; color: rgba(247, 238, 231, 0.62);
}
.co-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 15px;
  padding: 3px 9px;
  border-radius: 8px;
  color: var(--sand-glow);
  background: rgba(216, 167, 129, 0.14);
  border: 1px solid rgba(216, 167, 129, 0.22);
}
.co-stock {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(247, 238, 231, 0.78);
}
.co-stock strong { color: var(--on-dark); font-weight: 600; }
.co-stock-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sand-glow);
  box-shadow: 0 0 10px rgba(216, 167, 129, 0.7);
}

/* --- pre-ticked add-on --- */
.co-addon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(247, 238, 231, 0.05);
  border: 1px solid rgba(247, 238, 231, 0.1);
}
.co-addon input { position: absolute; opacity: 0; pointer-events: none; }
.co-check {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid rgba(216, 167, 129, 0.5);
  background: rgba(216, 167, 129, 0.1);
  position: relative;
  transition: background 0.2s ease;
}
.co-addon input:checked + .co-check {
  background: linear-gradient(145deg, var(--sand-glow), var(--sand));
  border-color: transparent;
}
.co-addon input:checked + .co-check::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 6px; height: 11px;
  border: solid #2a1c12;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
}
.co-addon-text { display: grid; gap: 2px; }
.co-addon-name { font-size: 14px; font-weight: 500; }
.co-addon-sub { font-size: 12px; color: rgba(247, 238, 231, 0.52); }

/* --- CTA --- */
.co-cta {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 13px;
  font-family: "Space Grotesk", var(--ui-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #241a10;
  cursor: pointer;
  background: linear-gradient(145deg, var(--sand-glow), var(--sand));
  box-shadow: 0 12px 30px rgba(140, 92, 46, 0.4), 0 1px 0 rgba(255, 240, 224, 0.4) inset;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.co-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(140, 92, 46, 0.48); }

/* --- confirm-shaming decline --- */
.co-decline {
  position: relative;
  text-align: center;
}
.co-decline a {
  font-size: 12.5px;
  color: rgba(247, 238, 231, 0.44);
  text-decoration: none;
  border-bottom: 1px dotted rgba(247, 238, 231, 0.3);
}

/* ================================================================== */
/* THE MARKS — red pen, hidden until the tells are shown              */
/* ================================================================== */

.mark {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9) rotate(-1deg);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  z-index: 3;
}
.mark svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: var(--mark);
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 3px rgba(179, 45, 28, 0.45));
}
.mark-strike { left: -6px; top: -2px; width: 118px; height: 46px; }
.mark-underline { left: 50%; transform: translateX(-50%) scale(0.9); bottom: -9px; width: 128px; height: 16px; }
.mark-underline.slim { width: 220px; }
.mark-circle { left: -8px; top: -8px; width: 150px; height: 46px; }
.mark-circle.wide { left: -8px; top: -6px; width: 44px; height: 42px; }

/* strike sits over the whole price cluster; nudge onto the "was" number */
.co-price .mark-strike { left: -6px; top: 2px; width: 70px; height: 34px; }

/* --- the tags — Fraunces, the verdict voice --- */
.tag {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(8px, -50%) scale(0.94);
  white-space: nowrap;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff2ee;
  background: linear-gradient(150deg, var(--mark), var(--mark-deep));
  box-shadow: 0 6px 16px rgba(179, 45, 28, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.co-addon .tag { top: auto; bottom: -12px; right: 8px; transform: translateY(6px) scale(0.94); }
.co-decline .tag { position: static; display: inline-block; margin-top: 8px; transform: translateY(6px) scale(0.94); }

/* reveal state */
#checkout.tells .mark { opacity: 1; }
#checkout.tells .mark-strike { transform: scale(1) rotate(-1deg); }
#checkout.tells .mark-underline { transform: translateX(-50%) scale(1); }
#checkout.tells .mark-circle { transform: scale(1) rotate(-1deg); }
#checkout.tells .tag,
#checkout.tells .co-addon .tag { opacity: 1; transform: translate(8px, -50%) scale(1); }
#checkout.tells .co-addon .tag { transform: translateY(0) scale(1); }
#checkout.tells .co-decline .tag { opacity: 1; transform: translateY(0) scale(1); }

/* staggered bloom */
#checkout.tells [data-tell="anchor"] .mark,
#checkout.tells [data-tell="anchor"] .tag { transition-delay: 0.02s; }
#checkout.tells [data-tell="timer"] .mark,
#checkout.tells [data-tell="timer"] .tag { transition-delay: 0.1s; }
#checkout.tells [data-tell="stock"] .mark,
#checkout.tells [data-tell="stock"] .tag { transition-delay: 0.18s; }
#checkout.tells [data-tell="preticked"] .mark,
#checkout.tells [data-tell="preticked"] .tag { transition-delay: 0.26s; }
#checkout.tells [data-tell="shame"] .mark,
#checkout.tells [data-tell="shame"] .tag { transition-delay: 0.34s; }

/* flagged rows lift slightly and warm their border when marked */
#checkout.tells [data-tell] { cursor: help; }
#checkout.tells [data-tell].co-scarcity,
#checkout.tells [data-tell].co-addon { transition: border-color 0.3s ease, background 0.3s ease; }
#checkout.tells [data-tell]:hover { }
#checkout.tells .co-addon[data-tell]:hover,
#checkout.tells .co-scarcity [data-tell]:hover { }

/* highlighted tell (hovered) */
#checkout.tells [data-tell].lit .mark svg { stroke-width: 3; }
#checkout.tells [data-tell].lit .tag { box-shadow: 0 8px 22px rgba(179, 45, 28, 0.6); }

/* --- verdict rail --- */
.co-verdict {
  display: grid;
  gap: 6px;
  padding: 15px 16px 4px;
  border-top: 1px solid rgba(216, 64, 42, 0.28);
}
.co-tally {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(247, 238, 231, 0.66);
}
.co-tally strong {
  font-family: "Fraunces", serif;
  font-size: 24px;
  color: var(--mark);
  font-weight: 600;
}
.co-tally-sub { font-size: 12px; color: rgba(247, 238, 231, 0.5); }
.co-readout {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(247, 238, 231, 0.82);
  min-height: 2.6em;
}

/* --- seam --- */
.seam {
  display: flex;
  gap: 8px;
  margin: 2px 2px 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(247, 238, 231, 0.5);
}
.seam-mark { color: var(--mark); font-style: normal; }

/* ------------------------------------------------------------------ */
/* the switch — the one control                                        */
/* ------------------------------------------------------------------ */
.co-switch-wrap { position: relative; z-index: 2; display: grid; place-items: center; }
.co-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Space Grotesk", var(--ui-sans);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(247, 238, 231, 0.82);
  background: rgba(20, 14, 10, 0.5);
  border: 1px solid rgba(247, 238, 231, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.co-switch-track {
  position: relative;
  width: 44px; height: 24px;
  border-radius: 999px;
  background: rgba(247, 238, 231, 0.16);
  transition: background 0.25s ease;
}
.co-switch-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--on-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.3, 0.8, 0.3, 1.2);
}
.co-switch[aria-pressed="true"] {
  color: #fff2ee;
  border-color: rgba(216, 64, 42, 0.55);
}
.co-switch[aria-pressed="true"] .co-switch-track { background: var(--mark); }
.co-switch[aria-pressed="true"] .co-switch-knob { transform: translateX(20px); }

/* ------------------------------------------------------------------ */
/* responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 560px) {
  .tells-scene { min-height: 760px; padding: 84px 18px 76px; }
  .checkout { width: 100%; padding: 22px 18px 18px; }
  .co-now { font-size: 34px; }
  .tag { font-size: 11px; }
  .mark-underline.slim { width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .mark, .tag, .co-switch-knob, .co-cta { transition: none; }
}
