/* =========================================================
   BY.ARTISANS - Gin Blending Masterclass
   Monochrome identity per Brand Manual 2026
   ========================================================= */

:root {
  --black: #000000;
  --ink: #141414;
  --grey: #6a6a6a;          /* darker than before for legibility */
  --line: #cfcfcf;
  --soft: #e4e4e4;
  --paper: #f7f6f4;
  --white: #ffffff;
  --font: "Acumin Variable Concept", "Acumin Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --track: 0.12em;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

/* ---------- typography ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: var(--track); text-transform: uppercase; }
h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.12; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.9rem; color: var(--ink); }
p  { font-weight: 400; }
.small { font-size: 0.85rem; color: var(--grey); font-weight: 400; }
.rule { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.eyebrow { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); font-weight: 600; }

/* brand logos */
.logo-wordmark { height: 26px; width: auto; display: block; }
.logo-wordmark.lg { height: 40px; }
.logo-submark { height: 30px; width: auto; display: block; }
.logo-submark.lg { height: 64px; }

/* ---------- layout ---------- */
.screen {
  display: none;
  min-height: 100dvh;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5rem 1.4rem calc(2rem + env(safe-area-inset-bottom));
}
.screen.active { display: flex; }
.wide { max-width: 760px; }

header.app {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 1.1rem; border-bottom: 1.5px solid var(--black);
  margin-bottom: 1.6rem;
}

/* ---------- buttons + inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font); font-size: 0.88rem; font-weight: 700;
  letter-spacing: var(--track); text-transform: uppercase;
  background: var(--black); color: var(--white);
  border: 1.5px solid var(--black); border-radius: 0;
  padding: 1rem 1.4rem; width: 100%; cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:active { opacity: 0.75; }
.btn.ghost { background: transparent; color: var(--black); }
.btn.slim { padding: 0.65rem 1rem; width: auto; font-size: 0.78rem; }
.btn:disabled { background: var(--soft); border-color: var(--soft); color: var(--grey); cursor: default; }

label.field { display: block; margin-bottom: 1.3rem; }
label.field span {
  display: block; font-size: 0.76rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink); font-weight: 600; margin-bottom: 0.5rem;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; font-family: var(--font); font-size: 1.05rem; font-weight: 400;
  border: none; border-bottom: 1.5px solid var(--black); background: transparent;
  padding: 0.55rem 0; border-radius: 0; color: var(--ink); outline: none;
}
input:focus, textarea:focus, select:focus { border-bottom-width: 2.5px; }
.error-msg { color: var(--black); background: var(--soft); font-size: 0.85rem; font-weight: 500; padding: 0.7rem 0.9rem; margin-top: 0.9rem; display: none; }
.error-msg.show { display: block; }

/* ---------- intro ---------- */
#screen-intro { justify-content: space-between; text-align: left; }
.intro-hero { margin-top: 12vh; }
.intro-hero .sub { color: var(--ink); font-weight: 400; margin-top: 1.1rem; max-width: 32ch; font-size: 1.05rem; }
.intro-mark { margin-bottom: 2.2rem; }
.intro-hero h1 { margin-top: 1.1rem; }

/* ---------- presentation ---------- */
#screen-course { padding: 0; max-width: none; }
.deck { height: 100dvh; overflow: hidden; position: relative; background: var(--paper); }
.slides {
  display: flex; height: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.3, 1);
  touch-action: pan-y;
}
.slide {
  min-width: 100vw; height: 100%; overflow-y: auto;
  padding: 4.8rem 1.5rem 6.8rem;
  display: flex; flex-direction: column;
}
.slide-inner { max-width: 500px; margin: 0 auto; width: 100%; }
.slide.title-slide { justify-content: center; text-align: left; }
.slide .kicker { font-size: 0.74rem; letter-spacing: 0.22em; color: var(--grey); text-transform: uppercase; font-weight: 600; margin-bottom: 1.2rem; }
.slide h1 { margin-bottom: 1.1rem; }
.slide h1 .thin { font-weight: 300; }
.slide p { margin-bottom: 1rem; font-size: 1.02rem; }
.slide .lead-fig { margin: 0.4rem 0 1.4rem; color: var(--black); }
.slide .lead-fig svg { width: 100%; height: auto; display: block; }
.slide .fig-cap { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); text-align: center; margin-top: 0.5rem; font-weight: 600; }
.slide ul { list-style: none; margin-top: 0.6rem; }
.slide ul li {
  font-weight: 400; padding: 0.85rem 0;
  border-bottom: 1px solid var(--soft); font-size: 1rem; line-height: 1.55;
}
.slide ul li strong { font-weight: 700; display: block; margin-bottom: 0.1rem; }
.step-list { counter-reset: step; margin-top: 0.7rem; }
.step-list li { list-style: none; border-bottom: 1px solid var(--soft); padding: 1rem 0; display: flex; gap: 1.1rem; font-weight: 400; font-size: 1rem; line-height: 1.5; }
.step-list li::before { display: none; }
.step-list li .num { font-weight: 700; letter-spacing: 0.06em; min-width: 3.4rem; }

/* timeline */
.timeline li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--soft); }
.timeline .era { min-width: 5.6rem; }
.timeline .era b { display: block; font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; }
.timeline .era span { display: block; font-size: 0.72rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.timeline .ev { font-weight: 400; font-size: 0.98rem; line-height: 1.5; }

.deck-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, var(--paper) 42%);
  padding: 1.8rem 1.3rem calc(1.2rem + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 100vw;
}
.deck-dots { display: flex; gap: 0.42rem; }
.deck-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.deck-dots i.on { background: var(--black); }
.deck-top {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.3rem; background: linear-gradient(var(--paper) 62%, transparent);
  z-index: 5;
}
.deck-top .skip { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey); background: none; border: none; font-family: var(--font); font-weight: 600; cursor: pointer; }

/* ---------- blending sheet ---------- */
.blend-top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 0.9rem; margin-bottom: 0.2rem;
}
.icon-btn {
  background: none; border: none; font-family: var(--font); cursor: pointer;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0;
}

.sticky-profile {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper); border-bottom: 1.5px solid var(--black);
  margin: 0 -1.4rem; padding: 0.9rem 1.4rem 1rem;
}
.profile-row { display: flex; gap: 1.1rem; align-items: center; }
.radar-wrap { width: 148px; flex-shrink: 0; }
.radar-wrap svg { width: 100%; height: auto; overflow: visible; }
.profile-info { flex: 1; min-width: 0; }
.profile-info .style-tag { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.92rem; min-height: 1.1em; }
.stat-line { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.5rem; font-size: 0.78rem; color: var(--grey); letter-spacing: 0.03em; font-weight: 500; }
.stat-line b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.live-notes { font-size: 0.92rem; font-weight: 400; margin-top: 0.7rem; color: var(--ink); line-height: 1.5; }
.guidance { font-size: 0.8rem; color: var(--grey); margin-top: 0.55rem; font-weight: 500; }

.cat-head {
  margin: 1.9rem 0 0.4rem; display: flex; align-items: baseline; justify-content: space-between;
}
.cat-head h2 { font-size: 0.95rem; }
.cat-head span { font-size: 0.74rem; color: var(--grey); letter-spacing: 0.08em; font-weight: 600; }

.tincture-row {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--soft);
}
.tincture-row .t-icon {
  width: 48px; height: 48px; flex-shrink: 0; color: var(--black);
  border: 1.5px solid var(--line); padding: 6px; cursor: pointer; background: var(--white);
}
.tincture-row .t-icon svg { width: 100%; height: 100%; }
.tincture-row .t-body { flex: 1; min-width: 0; cursor: pointer; }
.tincture-row .t-name { font-weight: 700; font-size: 0.96rem; letter-spacing: 0.02em; }
.tincture-row .t-desc { font-size: 0.8rem; color: var(--grey); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.stepper button {
  width: 42px; height: 42px; border: 1.5px solid var(--black); background: var(--white);
  font-size: 1.3rem; font-family: var(--font); cursor: pointer; color: var(--black);
  display: flex; align-items: center; justify-content: center;
}
.stepper button:active { background: var(--black); color: var(--white); }
.stepper .count {
  width: 46px; text-align: center; font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 1rem; border-top: 1.5px solid var(--black); border-bottom: 1.5px solid var(--black);
  height: 42px; display: flex; align-items: center; justify-content: center; background: var(--white);
}
.stepper .count.has { background: var(--black); color: var(--white); }

.presets { margin-top: 1.2rem; }
.preset-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }

.sheet-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 1.3rem 0 0.4rem; margin-top: 1.2rem; }

/* ---------- tincture modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: none; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--white); width: 100%; max-width: 500px;
  padding: 1.8rem 1.5rem calc(1.9rem + env(safe-area-inset-bottom));
  border-top: 2.5px solid var(--black);
  max-height: 88dvh; overflow-y: auto;
  animation: rise 0.25s ease;
}
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .m-head { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.2rem; }
.modal .m-icon { width: 92px; height: 92px; flex-shrink: 0; border: 1.5px solid var(--black); padding: 11px; color: var(--black); }
.modal .m-icon svg { width: 100%; height: 100%; }
.modal .m-cat { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--grey); font-weight: 600; }
.modal h2 { font-size: 1.4rem; margin-top: 0.2rem; }
.modal .potency { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.4rem; font-weight: 600; }
.modal .m-detail { font-weight: 400; font-size: 1rem; line-height: 1.55; margin: 1rem 0 1.3rem; }
.mini-bars { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 0.9rem; align-items: center; margin-bottom: 1.4rem; }
.mini-bars .lbl { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.mini-bars .bar { height: 8px; background: var(--soft); position: relative; }
.mini-bars .bar i { position: absolute; inset: 0 auto 0 0; background: var(--black); }
.modal-close { position: sticky; top: 0; float: right; background: none; border: none; font-size: 1.8rem; cursor: pointer; font-family: var(--font); color: var(--grey); line-height: 1; }

/* ---------- recipe sheet ---------- */
.recipe-sheet {
  background: var(--white); border: 1.5px solid var(--black);
  padding: 2.2rem 1.7rem; position: relative;
}
.recipe-sheet::after {
  content: ""; position: absolute; inset: 7px; border: 1px solid var(--line); pointer-events: none;
}
.recipe-sheet .r-logo { display: flex; justify-content: center; margin-bottom: 0.4rem; }
.recipe-sheet .r-logo svg { height: 34px; width: auto; }
.recipe-sheet .r-sub { text-align: center; font-size: 0.66rem; letter-spacing: 0.26em; color: var(--grey); text-transform: uppercase; margin-top: 0.4rem; font-weight: 600; }
.recipe-sheet .r-name { text-align: center; margin: 1.6rem 0 0.3rem; font-size: 1.8rem; line-height: 1.1; }
.recipe-sheet .r-style { text-align: center; font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); font-weight: 600; }
.recipe-sheet .r-by { text-align: center; margin-top: 1.2rem; font-size: 0.98rem; font-weight: 400; }
.recipe-sheet .r-by b { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.recipe-sheet .r-date { text-align: center; font-size: 0.72rem; color: var(--grey); letter-spacing: 0.12em; margin-top: 0.3rem; font-weight: 500; }
.r-section { margin-top: 1.7rem; }
.r-section h3 { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--ink); border-bottom: 1.5px solid var(--black); padding-bottom: 0.45rem; margin-bottom: 0.6rem; font-weight: 700; }
.r-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.r-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--soft); font-weight: 400; }
.r-table td:nth-child(2), .r-table td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-table tr.total td { font-weight: 700; border-bottom: none; border-top: 1.5px solid var(--black); }
.r-notes { font-weight: 400; font-size: 0.98rem; line-height: 1.6; }
.r-radar { display: flex; justify-content: center; margin-top: 0.8rem; }
.r-radar svg { width: 210px; overflow: visible; }
.r-footer { text-align: center; margin-top: 1.8rem; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--grey); font-weight: 600; }

.send-status { text-align: center; font-size: 0.88rem; margin-top: 1rem; min-height: 1.2em; font-weight: 500; }
.send-status.ok { color: var(--ink); font-weight: 700; }

/* ---------- radar chart ---------- */
.radar-axis { stroke: var(--line); stroke-width: 1; fill: none; }
.radar-shape { fill: rgba(0,0,0,0.09); stroke: var(--black); stroke-width: 2; }
.radar-label { font-size: 9px; fill: var(--ink); font-family: var(--font); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; border-bottom: 1.5px solid var(--black); margin-bottom: 1.4rem; }
.admin-tabs button {
  flex: 1; background: none; border: none; font-family: var(--font);
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.9rem 0; cursor: pointer; color: var(--grey); border-bottom: 2.5px solid transparent; font-weight: 600;
}
.admin-tabs button.on { color: var(--black); border-bottom-color: var(--black); font-weight: 700; }
.admin-list-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0; border-bottom: 1px solid var(--soft); }
.admin-list-row .t-icon { width: 42px; height: 42px; border: 1.5px solid var(--line); padding: 5px; color: var(--black); flex-shrink: 0; }
.admin-list-row .t-icon svg { width: 100%; height: 100%; }
.admin-list-row .grow { flex: 1; min-width: 0; }
.admin-list-row .hidden-tag { font-size: 0.64rem; letter-spacing: 0.12em; color: var(--grey); text-transform: uppercase; border: 1px solid var(--line); padding: 0.12rem 0.45rem; font-weight: 600; }
.slider-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem 0.9rem; align-items: center; margin: 0.7rem 0 1.2rem; }
.slider-grid .lbl { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.slider-grid output { font-variant-numeric: tabular-nums; font-size: 0.85rem; width: 1.6em; text-align: right; font-weight: 700; }
input[type="range"] { width: 100%; accent-color: #000; }
.motif-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; margin: 0.7rem 0 1.2rem; }
.motif-grid .m-opt { border: 1.5px solid var(--line); padding: 6px; cursor: pointer; color: var(--black); background: var(--white); }
.motif-grid .m-opt.sel { border-color: var(--black); border-width: 2.5px; }
.motif-grid .m-opt svg { width: 100%; height: auto; }
.guest-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.guest-table th { text-align: left; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); padding: 0.55rem 0.4rem; border-bottom: 1.5px solid var(--black); font-weight: 700; }
.guest-table td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--soft); font-weight: 400; vertical-align: top; }

/* ---------- utility ---------- */
.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.mt1 { margin-top: 1.1rem; } .mt2 { margin-top: 2rem; }
.center { text-align: center; }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--grey); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
  .slide { padding-top: 5.8rem; }
  body.guest { background: var(--soft); }
  body.guest .screen { background: var(--paper); min-height: 100dvh; box-shadow: 0 0 40px rgba(0,0,0,0.06); }
}

/* ---------- print (recipe) ---------- */
@media print {
  body * { visibility: hidden; }
  .recipe-sheet, .recipe-sheet * { visibility: visible; }
  .recipe-sheet { position: absolute; inset: 0; border: none; }
}
