/* ── Estie's Business ──────────────────────────────────────────
   Palette: cafe warmth. Layout: receipt. Type: hand-marked.
   Motion: none, except the one signature drag band.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #f4ead8;
  --bg-2: #efe2cb;
  --ink: #3a2415;
  --ink-soft: #6b5540;
  --accent: #6b1f1a;
  --secondary: #5a5e3a;
  --rule: rgba(58, 36, 21, 0.35);
  --card: #fbf5e9;
  --shadow: 0 1px 0 rgba(58, 36, 21, 0.18);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --bg: #1c1410;
  --bg-2: #241a14;
  --ink: #f0e3d0;
  --ink-soft: #bda98f;
  --accent: #e08a72;
  --secondary: #a8ad7c;
  --rule: rgba(240, 227, 208, 0.3);
  --card: #241a14;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

/* Hyper-stillness: no motion anywhere except the signature band. */
*,
*::before,
*::after {
  animation: none !important;
  transition: none !important;
}

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* Diagonal colour stripe under the content. */
  background-image:
    linear-gradient(15deg,
      transparent 0 38%,
      var(--accent) 38% 41%,
      transparent 41% 100%),
    linear-gradient(15deg,
      transparent 0 62%,
      var(--secondary) 62% 63.4%,
      transparent 63.4% 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-wrap: pretty;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-style: wavy; }

:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 99;
  background: var(--card);
  padding: 10px 14px;
  border: 1px solid var(--ink);
}

/* ── Header ─────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px dotted var(--rule);
}

.topbar-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-height: 44px;
}

.brand-mark { width: 34px; height: 34px; color: var(--accent); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover { color: var(--accent); text-decoration: underline; text-decoration-style: wavy; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.tt-icon {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
}

/* ── Receipt column ─────────────────────────────────────────── */

.col {
  max-width: 40ch;
  margin: 0 auto;
  padding: 0 20px;
}

.receipt-head { padding: 64px 0 40px; }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 18px;
}

h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}

.lede {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 30px;
}

/* Hand-drawn scribble mark */
mark.scribble {
  background: transparent;
  color: inherit;
  position: relative;
  padding: 0 2px;
  white-space: nowrap;
}
mark.scribble::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -0.28em;
  height: 0.5em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 13 C 30 4, 58 17, 88 9 S 148 3, 198 12' fill='none' stroke='%236b1f1a' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M6 17 C 40 11, 74 19, 112 13 S 168 9, 194 16' fill='none' stroke='%236b1f1a' stroke-width='1.5' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E");
}
html[data-theme="dark"] mark.scribble::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 13 C 30 4, 58 17, 88 9 S 148 3, 198 12' fill='none' stroke='%23e08a72' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M6 17 C 40 11, 74 19, 112 13 S 168 9, 194 16' fill='none' stroke='%23e08a72' stroke-width='1.5' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E");
}

/* Receipt slip block */
.slip {
  margin: 0 0 26px;
  border-top: 1px dotted var(--rule);
  border-bottom: 1px dotted var(--rule);
  padding: 14px 0;
}
.slip > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 4px 0;
}
.slip dt {
  flex: none;
  width: 9.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}
.slip dd {
  margin: 0;
  flex: 1;
  text-align: right;
  font-size: 0.82rem;
  color: var(--ink);
}

.stamp {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ── Sections ───────────────────────────────────────────────── */

section { padding: 44px 0; }

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  display: inline-block;
  position: relative;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: -8px;
  bottom: -0.22em;
  height: 0.42em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 12 C 44 5, 92 16, 132 8 S 176 6, 197 13' fill='none' stroke='%235a5e3a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .section-title::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 12 C 44 5, 92 16, 132 8 S 176 6, 197 13' fill='none' stroke='%23a8ad7c' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.section-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.group {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 30px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dotted var(--rule);
}

/* Item listing */
.list { list-style: none; margin: 0; padding: 0; }

.list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  padding: 11px 0;
  border-bottom: 1px dotted var(--rule);
}
.list li:last-child { border-bottom: 0; }

.item {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
}

.desc {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  white-space: nowrap;
  align-self: start;
  padding-top: 3px;
}

.list.tight li { padding: 9px 0; }
.list.tight .item { font-size: 0.82rem; font-family: var(--mono); font-weight: 700; letter-spacing: 0.04em; }

.foot-note {
  margin: 26px 0 0;
  padding: 14px 16px;
  background: var(--card);
  border-left: 3px solid var(--secondary);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ── Signature: drag band ───────────────────────────────────── */

.band-section { padding: 44px 0 52px; }

.band-head {
  max-width: 40ch;
  margin: 0 auto 18px;
  padding: 0 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.band-head .section-title { margin-bottom: 0; }

.band-hint {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0;
}

.band {
  overflow: hidden;
  cursor: grab;
  padding: 6px 0 14px;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}
.band.is-dragging { cursor: grabbing; }
.band:focus-visible { outline: 2px dashed var(--accent); outline-offset: -4px; }

.band-inner {
  display: flex;
  gap: 18px;
  padding: 0 20px;
  width: max-content;
  will-change: transform;
}

.card {
  margin: 0;
  width: 260px;
  flex: none;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

.card-img {
  aspect-ratio: 7 / 5;
  overflow: hidden;
  background: var(--bg-2);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card figcaption {
  padding: 10px 12px 12px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--secondary);
}

/* ── Story ──────────────────────────────────────────────────── */

.story p { font-size: 0.9rem; margin: 0 0 16px; }

.house-line {
  margin: 28px 0;
  padding: 18px 0 18px 18px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
}

/* ── Order form ─────────────────────────────────────────────── */

.order-form { margin: 0 0 30px; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 12px;
  min-height: 44px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-soft); opacity: 0.7; }
.field input:focus,
.field textarea:focus { border-color: var(--accent); }

.send {
  min-height: 48px;
  padding: 12px 26px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.send:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
html[data-theme="dark"] .send:hover { background: var(--bg); border-color: var(--bg); color: var(--ink); }

.form-status {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--secondary);
}
.form-status.is-error { color: var(--accent); }

hr.dotted {
  border: 0;
  border-top: 1px dotted var(--rule);
  margin: 30px 0;
}

/* ── Footer ─────────────────────────────────────────────────── */

.foot {
  border-top: 1px dotted var(--rule);
  padding: 34px 0 44px;
  margin-top: 20px;
}
.foot-brand {
  font-family: var(--serif);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 18px;
}
.foot-links a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
}
.foot-links a:hover { color: var(--accent); text-decoration: underline; }

.muted { font-size: 0.7rem; color: var(--ink-soft); margin: 0; }
.attribution a { color: var(--ink-soft); }

/* ── Small screens ──────────────────────────────────────────── */

@media (max-width: 560px) {
  .topbar-inner { padding: 8px 16px; gap: 10px; }
  .nav { order: 3; width: 100%; gap: 14px; }
  .nav a { padding: 8px 0; }
  .col, .band-head, .band-inner { padding-left: 16px; padding-right: 16px; }
  .slip dt { width: 7.5rem; }
  .slip > div { flex-direction: column; gap: 2px; }
  .slip dd { text-align: left; }
  .card { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
