/* MacBookFit — Blueprint design system
   Barlow/Barlow Condensed, sharp corners, hairline borders, MacBook Air 2025 palette.
   Scoped to index.html, quiz.html, results.html only. */

:root {
  --bg: #f7f8f9;
  --bg-alt: #fdfdfd;
  --text: #39404a;
  --text-muted: rgba(57, 64, 74, 0.6);
  --text-faint: rgba(57, 64, 74, 0.4);
  --border: rgba(57, 64, 74, 0.16);
  --border-strong: rgba(57, 64, 74, 0.3);

  --accent-50: #f2f6f9;
  --accent-100: #e2ebf0;
  --accent-200: #c7d8e0;
  --accent-300: #a6bfcb;
  --accent-400: #7e9fb0;
  --accent: #5e8397;
  --accent-600: #456a7d;
  --accent-700: #33525f;
  --accent-800: #26404b;
  --accent-900: #1c313a;

  --accent2-50: #fbf7f0;
  --accent2-100: #f6efe3;
  --accent2-200: #f0e5d3;
  --accent2-300: #e3d2b4;
  --accent2-400: #d2bc96;
  --accent2: #c9b392;
  --accent2-600: #b79e75;
  --accent2-700: #947c57;
  --accent2-800: #6c5a3e;
  --accent2-900: #453927;

  --font-body: 'Barlow', system-ui, sans-serif;
  --font-heading: 'Barlow Condensed', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body.bp {
  margin: 0;
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
}

a { color: var(--accent-700); text-decoration: none; }
a:hover { color: var(--accent); }

.bp-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px max(5%, calc((100% - 1000px) / 2));
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.bp-brand {
  font: 600 19px/1 var(--font-heading);
  letter-spacing: 0.04em;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}
.bp-brand:hover { color: var(--accent-700); }
.bp-brand-accent { color: var(--accent2-700); }
.bp-nav-note {
  font-size: 13px;
  color: var(--text-muted);
}
.bp-nav a.bp-nav-link {
  font-size: 13px;
  color: var(--text);
}
.bp-nav a.bp-nav-link:hover { color: var(--accent-700); }

.bp-shell {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 0 1px var(--border);
}
body.bp::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../assets/gold-macbook-mirrored.svg');
  background-repeat: no-repeat;
  background-position: center calc(50% - 20vh);
  background-size: 253%;
  opacity: 0.095;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.bp-shell > * {
  position: relative;
  z-index: 2;
}
.bp-shell > .landing-hero,
.bp-shell > .bp-page {
  z-index: auto;
}
.bp-shell > .landing-hero > *:not(.bgshape),
.bp-shell > .bp-page > *:not(.bgshape) {
  position: relative;
  z-index: 2;
}

/* — floating background shapes — */
@keyframes bp-spin { to { transform: rotate(360deg); } }
@keyframes bp-spin-rev { to { transform: rotate(-360deg); } }
@keyframes bp-floaty {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(26px, -30px) rotate(14deg); }
}
@keyframes bp-floaty2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-34px, 22px) rotate(-12deg); }
}
@keyframes bp-breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.bgshape {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
.bgshape.hex {
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}
.bgshape.diamond {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.bgshape.accent {
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 7.59%, transparent), color-mix(in srgb, var(--accent) 1.98%, transparent));
}
.bgshape.accent2 {
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent2) 14.85%, transparent), color-mix(in srgb, var(--accent2) 3.96%, transparent));
}
.bgshape.spin { animation: bp-spin 90s linear infinite; }
.bgshape.spin-rev { animation: bp-spin-rev 70s linear infinite; }
.bgshape.floaty { animation: bp-floaty 26s ease-in-out infinite; }
.bgshape.floaty2 { animation: bp-floaty2 30s ease-in-out infinite; }
.bgshape.breathe { animation: bp-spin-rev 60s linear infinite, bp-breathe 14s ease-in-out infinite; }

.bp-eyebrow {
  font: 400 10.5px/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin-bottom: 14px;
}

h1.bp-h1 {
  font: 600 60px/1.04 var(--font-heading);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  text-wrap: pretty;
}

h2.bp-h2 {
  font: 600 38px/1.06 var(--font-heading);
  margin: 0 0 10px;
}

p.bp-lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 30px;
}

.bp-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 0;
}
.bp-tag-accent { background: var(--accent-100); color: var(--accent-800); }
.bp-tag-accent2 { background: var(--accent2-100); color: var(--accent2-800); }
.bp-tag-outline { border: 1px solid var(--accent); color: var(--accent-700); }
.bp-tag-neutral { background: var(--accent2-50); color: var(--text-muted); }

/* — buttons — */
.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  border-radius: 0;
  border: 1px solid transparent;
  padding: 12px 26px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.bp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.bp-btn-primary { background: var(--accent2-700); color: var(--bg-alt); }
.bp-btn-primary:hover { background: var(--accent2-800); }
.bp-btn-secondary { border-color: var(--border-strong); color: var(--text); background: transparent; }
.bp-btn-secondary:hover { background: rgba(57, 64, 74, 0.06); }
.bp-btn-block { width: 100%; }

/* — progress bar — */
.bp-progress { display: flex; gap: 4px; }
.bp-progress i {
  display: block;
  width: 32px;
  height: 3px;
  background: var(--border);
}
.bp-progress i.filled { background: var(--accent); }
.bp-step-label {
  font: 400 10.5px/1 var(--font-body);
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

/* — quiz cards — */
.bp-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.bp-option {
  position: relative;
  border: 1px solid var(--border);
  padding: 20px 18px;
  cursor: pointer;
  background: var(--bg-alt);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.bp-option:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(57, 64, 74, 0.12); }
.bp-option.selected {
  background: var(--accent-100);
  border-color: var(--accent);
}
.bp-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.bp-option-title { font: 600 22px/1.1 var(--font-heading); margin-top: 6px; }
.bp-option-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.bp-option-badge {
  position: absolute;
  top: -19px;
  left: 18px;
  font: 600 10px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2-700);
  background: var(--bg-alt);
  padding: 2px 6px;
}

/* — drag-to-rank rows — */
.bp-rank-list { display: flex; flex-direction: column; gap: 10px; }
.bp-rank-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  cursor: grab;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  transition: background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.bp-rank-card:hover { box-shadow: 0 6px 16px rgba(57, 64, 74, 0.14); }
.bp-rank-card.dragging { cursor: grabbing; box-shadow: 0 10px 24px rgba(57, 64, 74, 0.2); }
.bp-rank-card.drag-ghost { opacity: 0; }
.bp-rank-num {
  flex: none;
  font: 600 26px/1 var(--font-heading);
  letter-spacing: 0.02em;
  color: var(--text-faint);
  width: 40px;
}
.bp-rank-card:first-child .bp-rank-num,
.bp-rank-card[data-rank="0"] .bp-rank-num { color: var(--accent-700); }
.bp-rank-body { flex: 1; }
.bp-rank-title { font: 600 20px/1.1 var(--font-heading); }
.bp-rank-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.bp-rank-drag-hint {
  font: 400 9.5px/1 var(--font-body);
  letter-spacing: 0.14em;
  color: var(--accent-700);
  float: right;
}
.bp-rank-grip {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-faint);
  pointer-events: none;
}
.bp-rank-grip i {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.bp-rank-card:hover .bp-rank-grip { color: var(--accent-700); }

/* — slider — */
input[type="range"].bp-range {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 0;
  outline: none;
  cursor: pointer;
  background: var(--border);
}
input[type="range"].bp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--text);
  border: 2px solid var(--bg);
  cursor: grab;
}
input[type="range"].bp-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--text);
  border: 2px solid var(--bg);
  cursor: grab;
  border-radius: 0;
}

/* — device mockup (realistic laptop photo + text caption overlaid on the screen) — */
.device-mockup {
  position: relative;
  display: flex;
  justify-content: center;
}
.device-mockup .device-photo {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
}
.device-mockup .device-caption {
  position: absolute;
  left: 49%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 68%;
  text-align: center;
  pointer-events: none;
}
.device-mockup .device-family {
  font: 600 12px/1.2 var(--font-heading);
  color: var(--text);
}
.device-mockup .device-chip-size {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* — layout helpers — */
.bp-page { position: relative; padding: 44px max(5%, calc((100% - 1000px) / 2)) 40px; }
.bp-flex { display: flex; align-items: center; gap: 14px; }
.bp-actions { display: flex; align-items: center; gap: 14px; margin-top: 34px; }
.bp-hint { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }

/* — results table — */
.bp-results-table {
  display: grid;
  grid-template-columns: 200px repeat(3, 1fr);
  border-top: 1px solid var(--border);
  margin: 0 max(5%, calc((100% - 1000px) / 2));
}
.bp-results-table .col-head {
  padding: 20px 16px 22px;
  border-left: 1px solid var(--border);
}
.bp-results-table .row-divider { grid-column: 1 / -1; height: 1px; background: var(--border); }
.bp-results-table .row-label {
  padding: 15px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 11.5px/1.3 var(--font-heading);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bp-results-table .cell {
  padding: 15px 16px;
  border-left: 1px solid var(--border);
}
.bp-results-table .cell.win-spec { background: var(--accent-200); box-shadow: inset 0 0 0 1px var(--accent); }
.bp-results-table .cell.win-value { background: var(--accent2-200); box-shadow: inset 0 0 0 1px var(--accent2-600); }
.bp-results-table .win-label {
  display: block;
  font: 400 9.5px/1 var(--font-body);
  letter-spacing: 0.13em;
  margin-top: 6px;
}
.bp-results-table .win-label.spec { color: var(--accent-700); }
.bp-results-table .win-label.value { color: var(--accent2-700); }

.bp-price-est { font-size: 11px; color: var(--text-faint); }
.bp-price-est::before { content: "≈ "; }

@media (max-width: 900px) {
  h1.bp-h1 { font-size: 40px; }
  .bp-rank-list { grid-template-columns: repeat(2, 1fr); }
  .bp-results-table { grid-template-columns: 1fr; }
  .bp-results-table .col-head, .bp-results-table .cell { border-left: none; border-top: 1px solid var(--border); }
}
