/* ============================================================
   BACKLAB — Shared Design System
   ============================================================ */

:root {
  --navy:    #29436C;
  --charcoal:#3A3A37;
  --bg:      #EEEFF0;
  --white:   #ffffff;
  --radius:  10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--charcoal);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
}

img { display: block; }
a   { color: inherit; text-decoration: none; }

/* ---- Typography utilities ---- */

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ---- Button ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.9rem 1.75rem;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 52px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-navy  { background: var(--navy); color: white; box-shadow: 3px 3px 0 #1a2c47; }
.btn-white { background: white; color: var(--navy); box-shadow: 3px 3px 0 rgba(41,67,108,.3); }

.btn-navy:hover  { background: #1f3356; transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1a2c47; }
.btn-white:hover { background: var(--bg); transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(41,67,108,.3); }
.btn-navy:active  { background: #1a2c47; transform: translate(3px, 3px); box-shadow: none; }
.btn-white:active { background: #e2e3e4; transform: translate(3px, 3px); box-shadow: none; }

.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

.btn-full { width: 100%; }

/* ---- Stars ---- */
.stars { color: var(--navy); font-size: 1rem; letter-spacing: 0.04em; }

/* ================================================================
   Before / After Slider
================================================================ */

[data-slider] {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.s-after,
.s-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.s-after  { object-position: 48% 50%; }
.s-before { object-position: 48% 64%; }

/* Before: clipped on the right */
.s-before {
  clip-path: inset(0 50% 0 0);
  z-index: 1;
}

/* Divider + knob */
.s-handle {
  position: absolute;
  top: 0;
  left: 50%;               /* JS updates this */
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  pointer-events: none;
  will-change: left;
}

.s-line {
  flex: 1;
  width: 2px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 6px rgba(0,0,0,.2);
}

.s-knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: all;
  cursor: ew-resize;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  font-family: 'Space Mono', monospace;
  font-size: 0.625rem;
  color: var(--charcoal);
  letter-spacing: 0.04em;
  outline: none;
}

.s-knob:focus-visible { box-shadow: 0 0 0 3px var(--navy), 0 2px 12px rgba(0,0,0,.25); }

/* Corner labels */
.s-label {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.625rem 1.125rem;
  border-radius: 100px;
  z-index: 3;
  pointer-events: none;
}

.s-label--before { top: 1.25rem; left: 1.25rem;  background: var(--navy); color: white; }
.s-label--after  { top: 1.25rem; right: 1.25rem; background: var(--navy); color: white; }

/* Drag hint — always visible, fades out after first interaction */
.s-hint {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
  background: var(--navy);
  padding: 0.625rem 1.25rem;
  border-radius: 100px;
  opacity: 0.95;
  transition: opacity 0.5s ease;
  animation: hint-nudge 2.2s ease-in-out 1.4s 3;
}

[data-slider].s-interacted .s-hint { opacity: 0; }

@keyframes hint-nudge {
  0%, 100% { transform: translateX(-50%); }
  40%       { transform: translateX(calc(-50% - 12px)); }
}
