:root {
  --ink: #241f1b;
  --paper: #f7f3ee;
  --card: #fbf8f5;
  --muted: #6e655c;
  --line: #e3dbd2;
  --accent: #8a4b32;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 7vw;
  background: rgba(247, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.top nav { display: flex; gap: 18px; margin-left: auto; font-size: 14px; }
.top nav a { text-decoration: none; }
.cart-btn, .pill {
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 0;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
}
.cart-btn { display: flex; gap: 8px; align-items: center; }
.count { font-variant-numeric: tabular-nums; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  padding: 64px 7vw 40px;
  align-items: end;
}
.kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 12px;
}
h1, h2 { font-family: var(--display); font-weight: 450; margin: 0; }
h1 { font-size: clamp(46px, 6vw, 76px); line-height: 0.96; font-weight: 450; }
h2 { font-size: 36px; }
h3 { margin: 0; font-size: 18px; font-weight: 500; }
.lead { font-size: 18px; max-width: 38ch; color: #3d362f; }
.note { color: var(--muted); font-size: 14px; }
.portrait { margin: 0; }
.portrait img { width: 100%; height: 420px; object-fit: cover; object-position: center top; }
.portrait figcaption { padding-top: 8px; font-size: 13px; color: var(--muted); }

.shop, .panel { padding: 28px 7vw 64px; }
.shop-head, .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.shop-head p, .panel p { color: var(--muted); max-width: 42ch; margin: 8px 0 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { display: flex; flex-direction: column; }
.swatch {
  height: 220px;
  display: grid;
  place-items: end start;
  padding: 16px;
  font-family: var(--display);
  font-size: 28px;
  border: 1px solid var(--line);
}
.card .body { padding: 14px 0 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: 14px; margin: 0; }
.add {
  margin-top: 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 12px;
  cursor: pointer;
}
.add:hover { background: var(--accent); border-color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps article { border-top: 1px solid var(--line); padding-top: 14px; }
.steps strong { display: block; font-family: var(--display); font-size: 22px; font-weight: 450; margin-bottom: 6px; }

footer {
  padding: 22px 7vw 48px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
footer a { color: var(--ink); }

.drawer-back {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 27, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 30;
}
.drawer-back.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: var(--paper);
  z-index: 31;
  transform: translateX(104%);
  transition: 0.25s;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}
.drawer.open { transform: none; }
.drawer header, .drawer footer { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.drawer header { border-bottom: 1px solid var(--line); }
.drawer header button {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.lines { flex: 1; overflow: auto; padding: 8px 18px 16px; }
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.qty { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.empty { color: var(--muted); }
.total { font-family: var(--display); font-size: 26px; }
.checkout { padding: 0 18px 16px; display: grid; gap: 8px; }
.checkout input, .checkout textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 10px;
  background: var(--card);
}
.pay {
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 12px;
  cursor: pointer;
}
.pay:hover { background: var(--accent); }
.fine { font-size: 12px; color: var(--muted); margin: 0; }
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 40;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.page { padding: 48px 7vw 80px; max-width: 720px; }
.page h1 { font-size: 52px; margin-bottom: 12px; }
.todo { border-left: 2px solid var(--accent); padding-left: 12px; color: #3d362f; }

@media (max-width: 860px) {
  .hero, .grid, .steps { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .portrait img { height: 280px; }
  footer { flex-direction: column; }
}
