/* ============================================================
   BASEBLOOM · Concept 08 — The Details Department
   Porcelain light · one indigo · timings printed on the glass
   ============================================================ */
:root {
  --porcelain: #f6f7f9;
  --card:      #ffffff;
  --ink:       #16181d;
  --ink-soft:  #565b66;
  --ink-faint: #9aa0ab;
  --indigo:    #5b5bd6;
  --indigo-soft: #eeeefc;
  --green:     #2fb673;
  --line:      #e4e7ec;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--porcelain); color: var(--ink-soft);
  font-family: var(--sans); font-weight: 300; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--indigo); color: #fff; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #ebedf1; }
::-webkit-scrollbar-thumb { background: #c6cbd4; border-radius: 10px; border: 2px solid #ebedf1; }
::-webkit-scrollbar-thumb:hover { background: var(--indigo); }

/* bar */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1.6rem;
  padding: 0.85rem clamp(1.2rem, 3.5vw, 2.6rem);
  background: rgba(246,247,249,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.bar-brand { font-weight: 850; font-size: 1rem; letter-spacing: -0.01em; color: var(--ink); }
.bar-note { margin-left: auto; font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.bar-cta { font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em;
  color: #fff; background: var(--indigo); padding: 0.55rem 1.1rem; border-radius: 8px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease); }
.bar-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(91,91,214,0.6); }

/* intro */
.intro { max-width: 46rem; margin: 0 auto; text-align: center;
  padding: clamp(4rem, 10vh, 6.5rem) 1.3rem clamp(2.5rem, 6vh, 4rem); }
.kicker { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--indigo); margin-bottom: 1.1rem; }
.headline { color: var(--ink); font-weight: 850; letter-spacing: -0.035em;
  font-size: clamp(2.1rem, 4.8vw, 3.6rem); line-height: 1.05; margin-bottom: 1.2rem; }
.headline em { font-style: normal; color: var(--indigo); }
.lede { font-size: clamp(0.96rem, 1.4vw, 1.08rem); max-width: 36rem; margin: 0 auto; }

/* bench */
.bench { max-width: 74rem; margin: 0 auto; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  padding: 0 clamp(1.2rem, 3.5vw, 2.6rem) clamp(3rem, 7vh, 5rem); }
.case { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: 0 20px 50px -35px rgba(22,24,29,0.35);
  display: flex; flex-direction: column; }
.case-stage { display: grid; place-items: center; min-height: 200px;
  background:
    radial-gradient(circle at 50% 40%, var(--indigo-soft), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 23px, #f0f1f5 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, #f0f1f5 23px 24px);
  border-bottom: 1px solid var(--line); padding: 2rem; }
.case-plate { padding: 1.3rem 1.4rem 1.5rem; }
.case-plate h2 { color: var(--ink); font-weight: 700; font-size: 0.98rem; margin-bottom: 0.45rem; }
.case-plate p { font-size: 0.88rem; margin-bottom: 0.8rem; }
.case-plate code { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.06em;
  color: var(--indigo); background: var(--indigo-soft);
  padding: 0.3rem 0.55rem; border-radius: 6px; }

/* № 1 magnetic button */
.mag-btn { position: relative; overflow: hidden; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 0.95rem; color: #fff;
  background: var(--indigo); border-radius: 12px; padding: 0.95rem 1.9rem;
  box-shadow: 0 10px 26px -10px rgba(91,91,214,0.65);
  transition: box-shadow 0.3s var(--ease); will-change: transform; }
.mag-btn:hover { box-shadow: 0 16px 34px -10px rgba(91,91,214,0.75); }
.mag-btn .rip { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%) scale(0); pointer-events: none;
  animation: rip 0.6s var(--ease) forwards; }
@keyframes rip { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

/* № 2 spring toggle */
.toggle { width: 74px; height: 42px; border-radius: 999px; border: 0; cursor: pointer;
  background: #d6d9e0; position: relative; transition: background 0.35s var(--ease); }
.toggle[aria-checked="true"] { background: var(--indigo); }
.knob { position: absolute; top: 4px; left: 4px; width: 34px; height: 34px;
  border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(22,24,29,0.25);
  transition: transform 0.42s var(--spring); }
.toggle[aria-checked="true"] .knob { transform: translateX(32px); }
.toggle.pressing .knob { transform: scaleX(1.15) scaleY(0.85); }
.toggle[aria-checked="true"].pressing .knob { transform: translateX(32px) scaleX(1.15) scaleY(0.85); }

/* № 3 inertial slider */
.slider { width: min(260px, 60vw); position: relative; padding: 1.4rem 0 0.4rem; cursor: pointer; outline-offset: 6px; }
.sl-track { height: 6px; border-radius: 999px; background: #e2e5ea; }
.sl-fill { height: 100%; width: 35%; border-radius: 999px;
  background: linear-gradient(90deg, #8f8fe6, var(--indigo)); }
.sl-thumb { position: absolute; top: 50%; left: 35%; width: 24px; height: 24px;
  transform: translate(-50%, -18%); border-radius: 50%; background: #fff;
  border: 2.5px solid var(--indigo); box-shadow: 0 3px 10px rgba(22,24,29,0.22);
  transition: transform 0.2s var(--spring); }
.slider:active .sl-thumb { transform: translate(-50%, -18%) scale(1.18); }
.sl-tip { position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500; color: #fff;
  background: var(--ink); border-radius: 6px; padding: 0.18rem 0.5rem;
  font-variant-numeric: tabular-nums; }

/* № 4 forgiving input */
.field { position: relative; width: min(280px, 64vw); display: flex; }
.field input { flex: 1; font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 1rem 3rem 1rem 1rem; outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.field input:focus { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(91,91,214,0.14); }
.field label { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); font-size: 0.95rem; pointer-events: none;
  transition: all 0.25s var(--ease); background: #fff; padding: 0 0.3rem; }
.field input:focus + label, .field input:not(:placeholder-shown) + label {
  top: 0; font-size: 0.66rem; color: var(--indigo); font-weight: 700; }
.field button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--indigo); color: #fff; font-size: 1rem;
  transition: transform 0.25s var(--spring), background 0.3s; }
.field button:hover { transform: translateY(-50%) scale(1.08); }
.field.error input { border-color: #e5484d; animation: shake 0.36s var(--ease); }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(1.2deg); }
  50% { transform: rotate(-1.2deg); } 75% { transform: rotate(0.8deg); } }
.field.ok input { border-color: var(--green); }
.field.ok button { background: var(--green); }

/* № 5 rating */
.rate { display: flex; gap: 0.4rem; }
.rate button { border: 0; background: none; cursor: pointer; font-size: 2rem;
  color: #d9dce2; transition: color 0.2s var(--ease), transform 0.3s var(--spring); }
.rate button.lit { color: #f5b53f; }
.rate button.pop { transform: translateY(-8px) scale(1.25); }
.spark { position: fixed; width: 6px; height: 6px; border-radius: 2px;
  background: #f5b53f; pointer-events: none; z-index: 99; }

/* closer */
.closer { text-align: center; border-top: 1px solid var(--line); background: #fff;
  padding: clamp(3.5rem, 9vh, 5.5rem) 1.3rem; }
.c-head { color: var(--ink); font-weight: 850; letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem); margin-bottom: 1rem; }
.c-head em { font-style: normal; color: var(--indigo); }
.c-text { max-width: 30rem; margin: 0 auto 1.8rem; }
.c-cta { display: inline-block; font-weight: 700; font-size: 0.95rem; color: #fff;
  background: var(--indigo); padding: 0.95rem 1.9rem; border-radius: 12px;
  transition: transform 0.25s var(--spring), box-shadow 0.3s var(--ease); }
.c-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(91,91,214,0.65); }

/* foot */
.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
  padding: 1.4rem clamp(1.2rem, 3.5vw, 2.6rem) 1.9rem;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
  border-top: 1px solid var(--line); }
.foot-right { margin-left: auto; color: var(--indigo); }

@media (max-width: 720px) { .bar-note { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .mag-btn, .knob, .sl-thumb, .rate button { transition: none !important; }
  .field.error input { animation: none; }
}
