/* MiNa — shared tokens, reset and controls */
:root {
  --orange: #ff6a00;
  --orange-deep: #e85f00;
  --yellow: #ffb703;
  --cream: #fff5e6;
  --red: #e63946;
  --light: #ffd166;
  --ink: #3a2617;          /* roasted-tea brown, used instead of black */
  --ink-soft: #6b5544;
  --muted: #8c735f;
  --line: #f1e2cc;
  --paper: #ffffff;
  --green: #2f9e5b;
  --sky: #2a7fc1;

  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgb(58 38 23 / .06), 0 6px 18px -8px rgb(58 38 23 / .18);
  --focus: 0 0 0 3px rgb(255 106 0 / .35);
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.1rem;
  border: 0; border-radius: var(--r-md);
  font-weight: 800; text-decoration: none; white-space: nowrap;
  background: var(--cream); color: var(--ink);
  transition: background-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgb(58 38 23 / .06); }
.btn-danger { background: transparent; color: var(--red); }
.btn-danger:hover { background: rgb(230 57 70 / .08); }
.btn-outline { background: transparent; box-shadow: inset 0 0 0 2px var(--orange); color: var(--orange); }
.btn-sm { min-height: 36px; padding: 0 .8rem; font-size: .9rem; border-radius: var(--r-sm); }
.btn-lg { min-height: 56px; padding: 0 1.4rem; font-family: var(--display); font-size: 1.15rem; border-radius: 18px; }
.btn-block { width: 100%; }

/* Form fields */
.field { display: block; }
.field > span, .field-label { display: block; margin-bottom: .35rem; font-weight: 800; }
.input {
  width: 100%; min-height: 50px; padding: .7rem 1rem;
  border: 2px solid var(--light); border-radius: var(--r-md);
  background: var(--cream); outline: none;
  transition: border-color .15s, background-color .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--orange); background: #fff; box-shadow: none; }
.input[aria-invalid="true"] { border-color: var(--red); }
.field-error { display: block; margin-top: .3rem; color: var(--red); font-weight: 700; font-size: .9rem; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); }

/* Quantity stepper */
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--cream); }
.stepper button {
  width: 40px; height: 40px; border: 0; border-radius: 11px;
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; line-height: 1;
  background: #fff; color: var(--orange); box-shadow: 0 1px 2px rgb(58 38 23 / .12);
}
.stepper button + span + button { background: var(--orange); color: #fff; }
.stepper button:disabled { opacity: .35; }
.stepper span { min-width: 2ch; text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.stepper.is-lg button { width: 48px; height: 48px; }

/* The illustrated cup (see templatetags/mina.py) */
.cup { width: 100%; height: 100%; }
.cup-body { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.cup-lid, .cup-straw { stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; }
.cup-tea { fill: var(--tea); }
.cup-pearls { fill: var(--ink); }
.drink-art {
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--tea) 26%, #fff);
  border-radius: var(--r-md); overflow: hidden;
}
.drink-art > img { width: 100%; height: 100%; object-fit: cover; }
.drink-art > .cup { width: 64%; height: 64%; }

/* Toast */
.toasts { position: fixed; z-index: 90; left: 50%; top: 16px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; padding: .8rem 1rem; border-radius: var(--r-md);
  background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow);
  animation: toast-in .25s ease-out;
}
.toast.is-error { background: var(--red); }
.toast.is-success { background: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
