/* 67 Matcha House - kissaten theme. Cream paper, ink, matcha accents. */

:root {
  --bg: #f6f1e5;
  --bg-alt: #efe7d3;
  --panel: #fffdf6;
  --ink: #232a1e;
  --muted: #6f7263;
  --fine: #9a9c8c;
  --line: rgba(35, 42, 30, 0.14);
  --accent: #5c7a3a;
  --card-r: 18px;
  --font-d: "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --font-b: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --nav-h: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-b); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-word { font-family: var(--font-d); font-size: 52px; font-weight: 800; text-align: center; color: var(--accent); }
.loader-note { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 36px);
  background: rgba(246, 241, 229, 0.8);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--font-d); font-weight: 800; font-size: 24px; text-decoration: none; color: var(--accent); }
.nav-links { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav-links a { text-decoration: none; font-size: 13.5px; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-price { font-family: var(--font-d); font-weight: 700; font-size: 15px; color: var(--accent); }

/* ---------- hero / stage ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; }
.stage { position: absolute; inset: 0; }
.stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.hero-ui { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hero-ui button, .hero-ui a { pointer-events: auto; }

.hero-info {
  position: absolute; left: clamp(20px, 5vw, 72px); top: 50%;
  transform: translateY(-56%); max-width: 380px;
}
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--accent); margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(46px, 6vw, 84px); line-height: 1.02; letter-spacing: -0.01em;
}
.hero-desc { margin-top: 16px; font-size: 15px; color: var(--muted); line-height: 1.65; max-width: 320px; }
.buy-row { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.btn-cart {
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 14px; padding: 13px 30px; border-radius: 980px;
  transition: transform 0.15s ease, filter 0.2s;
}
.btn-cart:hover { filter: brightness(1.08); }
.btn-cart:active { transform: scale(0.97); }
.price { font-family: var(--font-d); font-weight: 700; font-size: 20px; }
.dots { display: flex; gap: 10px; margin-top: 26px; }
.dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(35, 42, 30, 0.35);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.dot:nth-child(1).active { background: #5c7a3a; border-color: #5c7a3a; }
.dot:nth-child(2).active { background: #3e6b8f; border-color: #3e6b8f; }
.dot:nth-child(3).active { background: #b07a3f; border-color: #b07a3f; }
.dot.active { transform: scale(1.25); }

.rail {
  position: absolute; right: clamp(16px, 3.5vw, 48px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px;
}
.rail-card {
  width: 172px; background: rgba(255, 253, 246, 0.88);
  border: 1px solid var(--line); border-radius: var(--card-r);
  padding: 14px; text-align: left;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.2s;
}
.rail-card:hover { transform: translateX(-4px); }
.rail-card.active { border-color: var(--accent); }
.rail-swatch { display: block; height: 64px; border-radius: 12px; background: var(--sw); }
.rail-name { display: block; margin-top: 10px; font-size: 13.5px; font-weight: 700; }
.rail-price { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.hero-foot {
  position: absolute; left: clamp(20px, 5vw, 72px); right: clamp(16px, 3.5vw, 48px); bottom: 26px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.promo-mini {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 253, 246, 0.88); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 16px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  max-width: 300px;
}
.promo-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 3px 8px;
  white-space: nowrap;
}
.promo-text { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.carousel { display: flex; gap: 8px; }
.car-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 253, 246, 0.88);
  font-size: 18px; color: var(--ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color 0.2s;
}
.car-btn:hover { border-color: var(--accent); }
.spec-chips { display: flex; gap: 10px; }
.chip {
  background: rgba(255, 253, 246, 0.88); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 18px; text-align: center;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.chip-num { display: block; font-family: var(--font-d); font-weight: 800; font-size: 22px; }
.chip-unit { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.chip-label { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.drag-hint {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 30px;
  font-size: 12px; color: var(--fine); z-index: 2; pointer-events: none;
}

/* ---------- bands ---------- */
.band { padding: clamp(80px, 11vh, 130px) 0; }
.band-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.h2 {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.01em; line-height: 1.08;
}
.body-copy { margin-top: 16px; font-size: 16px; color: var(--muted); max-width: 620px; line-height: 1.65; }

.variant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.variant-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--card-r);
  padding: 0; text-align: left; overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.variant-card:hover { transform: translateY(-4px); }
.variant-card.active { border-color: var(--accent); }
.variant-body { display: block; padding: 26px 26px 28px; }
.variant-name { display: block; font-family: var(--font-d); font-weight: 700; font-size: 21px; margin-bottom: 8px; }
.variant-desc { display: block; font-size: 14px; color: var(--muted); line-height: 1.6; }
.variant-price { display: block; margin-top: 14px; font-family: var(--font-d); font-weight: 700; font-size: 17px; color: var(--accent); }

/* anya */
.band-anya { background: var(--panel); border-top: 1px solid var(--line); }
.anya-wrap { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.anya-img {
  width: 100%; border-radius: 24px; border: 1px solid var(--line);
}
.anya-facts { display: flex; gap: 28px; margin-top: 30px; }
.anya-num { display: block; font-family: var(--font-d); font-weight: 800; font-size: 30px; color: var(--accent); }
.anya-unit { font-size: 15px; color: var(--muted); margin-left: 2px; }
.anya-label { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* specs */
.spec-table { margin-top: 44px; }
.spec-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 17px 0; border-bottom: 1px solid var(--line);
}
.spec-row:first-child { border-top: 1px solid var(--line); }
.spec-row dt { font-size: 14px; font-weight: 700; }
.spec-row dd { font-size: 14px; color: var(--muted); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); }
.foot-inner {
  max-width: 1080px; margin: 0 auto; padding: 26px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.fineprint { font-size: 12px; color: var(--fine); line-height: 1.55; max-width: 640px; }
.to-top {
  border: 1px solid var(--line); border-radius: 980px;
  padding: 8px 20px; font-size: 12px; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); border-radius: 12px;
  padding: 12px 22px; font-size: 14px; z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .rail {
    position: static; transform: none;
    flex-direction: row; overflow-x: auto;
    margin-top: 18px; padding-bottom: 4px;
  }
  .rail-card { min-width: 150px; }
  .rail-card:hover { transform: none; }
  .hero-ui {
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: calc(var(--nav-h) + 16px) 20px 96px;
  }
  .hero-info { position: static; transform: none; max-width: none; }
  .hero-title { font-size: clamp(40px, 11vw, 60px); }
  .hero-foot { position: static; margin-top: 16px; flex-wrap: wrap; }
  .promo-mini { display: none; }
  .drag-hint { display: none; }
  .variant-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .anya-wrap { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .spec-chips { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
