/* intièra — design tokens */
:root {
  --bone: #F5F1EA;
  --ivory: #FAF7F2;
  --paper: #FFFDF8;
  --ink: #1F1B17;
  --ink-soft: #3A332C;
  --ink-mute: #8A8278;
  --line: #E6DFD3;
  --line-soft: #EFE9DD;
  --ochre: #B7895A;
  --ochre-deep: #946A3F;
  --sage: #697355;
  --clay: #C97B5C;
  --cream: #EFE3CC;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Onest", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Menlo", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea, select { font-family: inherit; color: inherit; }

.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }

/* Layout shell */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--ivory);
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.main {
  min-height: 100vh;
  position: relative;
}

/* Brand */
.logo {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
}
.logo-mark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--line); color: var(--ink-mute); cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bone); }
.btn-text {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-size: 14px;
}
.btn-text:hover { color: var(--ochre-deep); }

/* Inputs */
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--ink); }
.input::placeholder { color: var(--ink-mute); }
.label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.moodboard-stage {
  background: var(--paper);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.mood-tile {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bone);
  box-shadow: 0 1px 0 rgba(31,27,23,0.04), 0 8px 24px rgba(31,27,23,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mood-tile:hover { transform: translateY(-2px); box-shadow: 0 2px 0 rgba(31,27,23,0.04), 0 12px 32px rgba(31,27,23,0.1); }
.mood-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mood-tile-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 11px;
}
.mood-tile-tag .nm { font-weight: 500; color: var(--ink); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.mood-tile-tag .pr { font-family: var(--mono); color: var(--ink-soft); flex-shrink: 0; }
.packshot-tag {
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}
.packshot-tag .nm { font-weight: 500; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.packshot-tag .pr { font-family: var(--mono); flex-shrink: 0; }

/* Hairline */

.hairline { height: 1px; background: var(--line); border: none; margin: 0; }

/* Step list (sidebar) */
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 14px;
  color: var(--ink-mute);
}
.step:hover { background: var(--bone); color: var(--ink); }
.step .num {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  width: 20px;
  text-align: center;
  color: var(--ink-mute);
}
.step.active { color: var(--ink); }
.step.active .num { color: var(--ochre); }
.step.done .num { color: var(--ink); }
.step.done::after {
  content: "✓";
  margin-left: auto;
  font-size: 11px;
  color: var(--sage);
}

/* Page container */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 64px 160px;
}
.page-narrow { max-width: 720px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
  font-weight: 500;
  margin-bottom: 16px;
}
.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  padding-bottom: 4px;
  text-wrap: pretty;
}
.h-display em { font-style: italic; color: var(--ochre); font-weight: 400; }
.h-section {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.lede {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 56ch;
  line-height: 1.55;
}

/* Selection grid (visual choice questions) */
.choice-grid {
  display: grid;
  gap: 16px;
}
.choice-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.choice {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.choice:hover { border-color: var(--ink-mute); transform: translateY(-2px); }
.choice.selected { border-color: var(--ink); border-width: 2px; }
.choice.selected::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: var(--ink);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M3 8l3.5 3.5L13 5' stroke='%23FFFDF8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.choice-image {
  aspect-ratio: 4 / 3;
  background: var(--bone);
  position: relative;
  overflow: hidden;
}
.choice-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.choice-body { padding: 14px 16px; }
.choice-title { font-size: 15px; font-weight: 500; margin: 0 0 2px; color: var(--ink); }
.choice-sub { font-size: 13px; color: var(--ink-mute); margin: 0; }

/* Striped placeholder */
.placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(31,27,23,0.04) 8px 9px),
    var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Floating action bar */
.action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 160px; /* compensate sidebar */
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 4px 24px rgba(31,27,23,0.06);
  z-index: 50;
}
.action-bar .progress {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}

/* Top bar (when no sidebar) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid var(--line);
}

/* Pin/box overlay */
.pinpoint-stage {
  position: relative;
  background: var(--bone);
  border-radius: 6px;
  overflow: hidden;
  user-select: none;
  cursor: crosshair;
}
.pin {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--ink);
  color: var(--paper);
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(31,27,23,0.2);
}
.pin span { transform: rotate(45deg); }

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 0;
}
.tab {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--ink-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-color: var(--ink); }

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bone);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.pill.ochre { background: var(--cream); color: var(--ochre-deep); }
.pill.sage { background: #E5E8DC; color: var(--sage); }

/* Slider */
.slider-track {
  position: relative;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
}
.slider-fill {
  position: absolute;
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
}
.slider-thumb {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  transform: translate(-50%, -50%);
  cursor: grab;
}

/* Specific theme variants */
[data-theme="quiet"] {
  --ochre: #4A4A48;
  --ochre-deep: #2A2A28;
  --cream: #ECEAE6;
  --bone: #F2EFEA;
}
[data-theme="sage"] {
  --ochre: #697355;
  --ochre-deep: #4D553D;
  --cream: #E5E8DC;
  --bone: #F0EFE8;
}

/* Demo jump menu */
.dev-jump {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
}
