/* Katana Inu Mint — shared design system ("Sumi & Washi")
   Tokens shared with burn.katanainu.com: sumi (ink black), washi (paper), shu (vermilion), kin (gold). */
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/bebas-neue-400.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho B1'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/shippori-mincho-b1-500.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho B1'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/shippori-mincho-b1-700.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho B1'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/shippori-mincho-b1-800.woff2') format('woff2'); }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/zen-kaku-gothic-new-400.woff2') format('woff2'); }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/zen-kaku-gothic-new-500.woff2') format('woff2'); }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/zen-kaku-gothic-new-700.woff2') format('woff2'); }

:root {
  /* paper (light) */
  --paper: oklch(0.962 0.012 82);
  --paper-2: oklch(0.938 0.016 80);
  --paper-3: oklch(0.905 0.02 78);
  --ink: oklch(0.2 0.012 60);
  --ink-2: oklch(0.4 0.014 60);
  --ink-3: oklch(0.52 0.014 62);
  --rule: oklch(0.2 0.012 60 / 0.13);
  --rule-strong: oklch(0.2 0.012 60 / 0.28);
  /* sumi (dark) */
  --sumi: oklch(0.16 0.008 55);
  --sumi-2: oklch(0.205 0.01 55);
  --sumi-3: oklch(0.265 0.012 55);
  --washi: oklch(0.925 0.014 85);
  --washi-2: oklch(0.76 0.014 80);
  --washi-3: oklch(0.62 0.014 78);
  --rule-d: oklch(0.925 0.014 85 / 0.12);
  --rule-d-strong: oklch(0.925 0.014 85 / 0.24);
  /* accents — rare on purpose */
  --shu: oklch(0.55 0.185 28);
  --shu-deep: oklch(0.46 0.16 28);
  --shu-soft: oklch(0.68 0.15 30);
  --coral: oklch(0.72 0.145 32);
  --coral-deep: oklch(0.66 0.16 30);
  --kin: oklch(0.74 0.12 85);
  --kin-ink: oklch(0.5 0.095 80);
  --jade: oklch(0.58 0.1 165);

  --f-display: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --f-body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --f-num: 'Bebas Neue', 'Zen Kaku Gothic New', sans-serif;

  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px; --space-4xl: 96px;
  --section: clamp(64px, 9vw, 128px);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --radius: 2px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* washi fibre — fixed, pointer-free, never on scrolling containers */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
::selection { background: var(--shu); color: var(--washi); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; margin: 0; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
.h-xl { font-size: clamp(2.6rem, 6.2vw, 5.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }
.h-lg { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.h-md { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.h-sm { font-size: 1.25rem; }
.caps { text-transform: uppercase; letter-spacing: 0.06em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.num { font-family: var(--f-num); letter-spacing: 0.02em; font-weight: 400; line-height: 1; }
.tnum { font-variant-numeric: tabular-nums; }
.jp { font-family: var(--f-display); font-weight: 800; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 0.75rem/1 var(--f-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.eyebrow--shu { color: var(--shu-deep); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.stack > * + * { margin-top: var(--flow, var(--space-md)); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* dark band — sumi ink */
.dark { background: var(--sumi); color: var(--washi); --ink: var(--washi); --rule: var(--rule-d); --rule-strong: var(--rule-d-strong); --ink-2: var(--washi-2); --ink-3: var(--washi-3); }
.dark .eyebrow--shu { color: var(--shu-soft); }
.dark .lede, .dark .muted { color: var(--washi-2); }
.paper { background: var(--paper); }
.paper-2 { background: var(--paper-2); }

/* brush edge between paper and ink */
.brush-top, .brush-bottom { position: relative; }
.brush-top::before, .brush-bottom::after {
  content: ''; position: absolute; left: 0; right: 0; height: 28px; background: inherit; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28V16C60 13 110 19 170 15S270 8 340 11 450 18 520 14 610 6 690 9 790 17 870 14 960 8 1040 10 1150 16 1230 13 1330 7 1440 11V28Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 28' preserveAspectRatio='none'%3E%3Cpath d='M0 28V16C60 13 110 19 170 15S270 8 340 11 450 18 520 14 610 6 690 9 790 17 870 14 960 8 1040 10 1150 16 1230 13 1330 7 1440 11V28Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.brush-top::before { top: -27px; }
.brush-bottom::after { bottom: -27px; transform: scaleY(-1); z-index: 1; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in oklch, var(--paper) 94%, transparent); border-bottom: 1px solid var(--rule); }
.nav.dark { background: color-mix(in oklch, var(--sumi) 94%, transparent); }
.nav__in { display: flex; align-items: center; gap: var(--space-xl); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
@media (max-width: 520px) { .brand__sub { display: none; } }
.brand__mark { font: 800 1.08rem/1 var(--f-display); letter-spacing: 0.14em; }
.brand__sub { font: 500 0.68rem/1 var(--f-body); letter-spacing: 0.3em; color: var(--ink-3); padding-left: 12px; border-left: 1px solid var(--rule-strong); }
.nav__links { display: flex; gap: var(--space-lg); margin-left: auto; font-size: 0.9rem; }
.nav__links a { color: var(--ink-2); padding-block: 6px; transition: color 160ms ease; }
.nav__links a[aria-current] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--shu); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); } }
@media (max-width: 860px) { .nav__links { display: none; } .nav__in { justify-content: space-between; } }

.seal {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  background: var(--shu); color: var(--washi); border-radius: 3px;
  font: 800 1.05rem/1 var(--f-display);
  box-shadow: inset 0 0 0 2px color-mix(in oklch, var(--shu) 70%, var(--washi)), inset 0 0 0 3px var(--shu);
}
.seal--lg { width: 64px; height: 64px; font-size: 2rem; }
.seal--ink { background: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--coral); --fg: var(--sumi);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  background: var(--bg); color: var(--fg);
  font: 700 0.8rem/1 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--ink { --bg: var(--ink); --fg: var(--paper); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.dark .btn--ghost { --fg: var(--washi); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 0.72rem; }
.btn--block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { --bg: var(--coral-deep); }
  .btn--ink:hover { --bg: var(--sumi-3); }
  .btn--ghost:hover { --bg: transparent; box-shadow: inset 0 0 0 1px currentColor; }
}
.link svg { width: 14px; height: 14px; flex: none; }
.link { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; transition: border-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { border-color: var(--shu); } }

/* ---------- data bits ---------- */
.meter { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--v); background: var(--shu); transform-origin: left; }
.js .meter > i { transform: scaleX(0); transition: transform 1100ms var(--ease-out) 200ms; }
.js .is-in .meter > i, .js .meter.is-in > i { transform: scaleX(1); }

.tag { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font: 500 0.7rem/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 9px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-2); }
.tag--live { color: var(--jade); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--jade) 45%, transparent); }
.tag--live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: breathe 2.4s ease-in-out infinite; }
.tag--soon { color: var(--kin-ink); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--kin-ink) 45%, transparent); }
.dark .tag--soon { color: var(--kin); }
.tag--out { color: var(--ink-3); }
.tag--shu { color: var(--shu-deep); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--shu) 40%, transparent); }
.dark .tag--shu { color: var(--shu-soft); }
@keyframes breathe { 50% { opacity: .35; } }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0; font-size: 0.92rem; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font: 500 0.7rem/1 var(--f-body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding: 0 12px 14px 0; border-bottom: 1px solid var(--rule-strong); }
.tbl td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl .r { text-align: right; padding-right: 0; }
.addr { font-family: ui-monospace, 'Cascadia Mono', monospace; font-size: 0.84rem; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule-strong); font-size: 0.86rem; color: var(--ink-2); transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); box-shadow: none; }
.dark .chip[aria-pressed='true'] { background: var(--washi); color: var(--sumi); }

.qty { display: inline-flex; align-items: center; box-shadow: inset 0 0 0 1px var(--rule-strong); border-radius: var(--radius); }
.qty button { width: 44px; height: 46px; display: grid; place-items: center; font-size: 1.15rem; color: var(--ink-2); }
.qty button:active { transform: scale(0.94); }
.qty output { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 500; }

/* mint button states (demo) */
[data-mint] .when-busy, [data-mint] .when-done { display: none; }
[data-mint][data-state='busy'] .when-idle, [data-mint][data-state='done'] .when-idle { display: none; }
[data-mint][data-state='busy'] .when-busy { display: inline; }
[data-mint][data-state='done'] .when-done { display: inline; }
[data-mint][data-state='busy'] { --bg: var(--sumi-3); --fg: var(--washi); pointer-events: none; }
[data-mint][data-state='done'] { --bg: var(--jade); }

/* art frame — never crop faces hard, keep paper edge */
.frame { position: relative; overflow: hidden; background: var(--paper-3); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.dark .frame { background: var(--sumi-2); }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.foot { background: var(--sumi); color: var(--washi-2); font-size: 0.88rem; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--space-2xl); padding-block: var(--space-3xl); }
.foot h4 { font: 500 0.7rem/1 var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--washi-3); margin-bottom: 18px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { color: var(--washi); transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--shu-soft); } }
.foot__legal { border-top: 1px solid var(--rule-d); padding-block: var(--space-lg); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); font-size: 0.78rem; color: var(--washi-3); }
.foot__legal p { max-width: 76ch; }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-md); }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__grid > :first-child { grid-column: 1 / -1; } }

.demo-flag { display: inline-flex; gap: 8px; align-items: center; color: var(--kin); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .js [data-reveal] { transform: none; transition: opacity 300ms ease; }
  .js .meter > i { transition: none; transform: none; }
}
