/* ------------------------------------------------------------------
   minzu.crafts — shared design system (glass edition)
   ------------------------------------------------------------------ */
:root {
  /* palette */
  --ink: #1C1F17;
  --ink-2: #3E4436;
  --muted: #5B6152;
  --sage-50: rgba(220, 232, 205, .55);
  --sage-200: #CFE0BC;
  --sage-400: #9DB886;
  --sage-600: #4E6438;
  --sage-700: #3A4C29;
  --sage-900: #1F2A16;
  --lilac: #D9CCFF;
  --peach: #FFD6BF;
  --butter: #FFF1B8;
  --mint: #C9F0DD;
  --clay-100: #FFE3D3;
  --clay-700: #8A4A22;
  --danger: #A3311F;
  --ok: #2B6A37;

  /* glass */
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-soft: rgba(255, 255, 255, .35);
  --glass-line: rgba(255, 255, 255, .75);
  --glass-edge: rgba(28, 31, 23, .08);
  --blur: blur(22px) saturate(170%);
  --shadow: 0 10px 40px -12px rgba(46, 52, 36, .22), 0 2px 6px rgba(46, 52, 36, .06);
  --shadow-lg: 0 30px 80px -20px rgba(46, 52, 36, .35);

  --line: rgba(28, 31, 23, .1);
  --surface: var(--glass-strong);
  --ground: #F4F1EA;
  --radius: 24px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5;
  background-color: var(--ground);
  background-image:
    radial-gradient(42vw 42vw at 8% 6%, rgba(201, 240, 221, .9), transparent 62%),
    radial-gradient(38vw 38vw at 92% 12%, rgba(217, 204, 255, .85), transparent 60%),
    radial-gradient(46vw 46vw at 78% 78%, rgba(255, 214, 191, .85), transparent 62%),
    radial-gradient(36vw 36vw at 12% 88%, rgba(255, 241, 184, .8), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* soft moving orbs behind everything */
body::before, body::after {
  content: ''; position: fixed; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none;
}
body::before { width: 420px; height: 420px; left: -120px; top: 30vh; background: #B9D99F; animation: drift 22s ease-in-out infinite alternate; }
body::after { width: 380px; height: 380px; right: -100px; top: 55vh; background: #CDB8FF; animation: drift 26s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(80px, -60px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } * { scroll-behavior: auto !important; } }

img { max-width: 100%; display: block; }
a { color: var(--sage-700); }
a:hover { color: var(--sage-900); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sage-600); outline-offset: 2px; }

/* glass primitive */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.8);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 600 15px var(--body); cursor: pointer; text-decoration: none; transition: background .2s, transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 24px -8px rgba(28,31,23,.55); }
.btn-primary:hover { background: #000; color: #fff; box-shadow: 0 12px 28px -8px rgba(28,31,23,.6); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-sage { background: var(--sage-600); color: #fff; }
.btn-sage:hover { background: var(--sage-700); color: #fff; }
.btn-ghost { background: var(--glass); color: var(--ink); border-color: var(--glass-line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.btn-ghost:hover { background: var(--glass-strong); color: var(--ink); }
.btn-danger { background: rgba(255,255,255,.7); color: var(--danger); border-color: rgba(163,49,31,.25); }
.btn-danger:hover { background: #FDEDEA; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); position: relative; transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--glass-strong); transform: translateY(-1px); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint, .hint { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 16px; border-radius: 14px; border: 1px solid rgba(28,31,23,.12);
  background: rgba(255,255,255,.7); font: 15px var(--body); color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--sage-600); box-shadow: 0 0 0 4px rgba(78,100,56,.15); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--sage-600); }

/* Notices */
.notice { border-radius: 16px; padding: 12px 16px; font-size: 14px; }
.notice-warn { background: rgba(255,241,184,.85); color: #5E4510; }
.notice-err { background: rgba(253,228,223,.9); color: var(--danger); }
.notice-ok { background: rgba(214,240,214,.9); color: var(--ok); }

/* Dialogs / drawers */
dialog { border: 1px solid var(--glass-line); padding: 0; border-radius: 28px; max-width: min(660px, calc(100vw - 24px)); width: 100%; color: var(--ink);
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(30, 34, 24, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); z-index: 2; }
.dialog-head h2 { font-size: 24px; }
.dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.dialog-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(28,31,23,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 100; box-shadow: 0 12px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }

.placeholder-img { background: linear-gradient(135deg, rgba(207,224,188,.8), rgba(217,204,255,.6)); display: flex; align-items: center; justify-content: center; color: var(--sage-700); }
.placeholder-img svg { width: 40%; max-width: 64px; height: auto; stroke: currentColor; fill: none; stroke-width: 1.4; opacity: .5; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 4px; background: #9AA38E; display: inline-block; }
.live-dot.on { background: #34A853; box-shadow: 0 0 0 4px rgba(52,168,83,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(52,168,83,.05); } }

/* social icons */
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: transform .15s, background .2s; }
.social:hover { transform: translateY(-2px) rotate(-4deg); background: #fff; color: var(--ink); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
