/* Bento House — shared styles (design tokens + components)
 * Tailwind loads via CDN in _header.php for utilities. The styles here are
 * the bespoke, non-utility layer: the design system, typography scale,
 * nav, footer, hanko stamp, placeholder imagery, ticker — things that
 * don't fit cleanly as Tailwind utility combos.
 */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Shippori+Mincho:wght@400;500;600;700&family=Fragment+Mono&display=swap');

:root {
  --bg: oklch(0.96 0.008 85);
  --bg-2: oklch(0.93 0.012 85);
  --paper: oklch(0.98 0.006 85);
  --ink: oklch(0.22 0.012 60);
  --ink-soft: oklch(0.38 0.012 60);
  --ink-mute: oklch(0.56 0.012 60);
  --rule: oklch(0.85 0.012 70);
  --rule-soft: oklch(0.90 0.010 70);
  --accent: oklch(0.58 0.17 32);      /* shu-iro vermillion */
  --accent-ink: oklch(0.42 0.17 32);
  --moss: oklch(0.52 0.06 140);
  --radius: 2px;
  --container: 1240px;
  --font-display: 'Instrument Serif', 'Shippori Mincho', serif;
  --font-jp: 'Shippori Mincho', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'Fragment Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(color-mix(in oklch, var(--ink) 4%, transparent) 1px, transparent 1px),
    radial-gradient(color-mix(in oklch, var(--ink) 3%, transparent) 1px, transparent 1px);
  background-size: 28px 28px, 17px 17px;
  background-position: 0 0, 10px 12px;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex: 0 0 auto;
}
.brand, .brand * { white-space: nowrap !important; line-height: 1 !important; }
.brand .jp {
  font-family: var(--font-jp);
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
}
.nav-links {
  display: flex;
  gap: 34px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all .2s;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(56px, 8vw, 112px); line-height: 0.98; }
h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1.02; }
h3 { font-size: 28px; line-height: 1.2; }

/* ---------- Hanko stamp ---------- */
.hanko {
  width: 62px;
  height: 62px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-jp);
  font-size: 22px;
  display: grid;
  place-items: center;
  line-height: 1;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent);
  letter-spacing: 0;
  padding: 6px;
  text-align: center;
}
.hanko.sm { width: 42px; height: 42px; font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Footer ---------- */
footer.site-foot {
  border-top: 1px solid var(--rule);
  padding: 56px 0 36px;
  background: var(--bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.foot-grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 16px;
  font-weight: 400;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-grid a { color: var(--ink-soft); }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* ---------- Form flash messages (shared across contact + catering) ---------- */
.flash {
  padding: 16px 20px;
  border: 1px solid;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
}
.flash.ok {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, var(--paper));
  color: var(--accent-ink);
}
.flash.err {
  border-color: var(--ink);
  background: var(--bg-2);
  color: var(--ink);
}
.flash ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Form components (shared across /quote, /contact) ----------
 * These are patterns that don't fit cleanly as Tailwind utility chains:
 * each one has a nested selector, pseudo-element, or :has() state.
 * Anything that IS straightforward utility combo (padding, grid, colors)
 * belongs in the markup, not here.
 */

/* Bordered paper card for sidebars */
.side-card {
  padding: 24px 24px 22px;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.side-card h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 16px;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.side-card h5 .jp {
  font-family: var(--font-jp);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent-ink);
  text-transform: none;
}

/* Form field — underline-style inputs */
.fld { display: flex; flex-direction: column; }
.fld.full { grid-column: 1 / -1; }
.fld label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.fld label .req { color: var(--accent-ink); margin-left: 4px; }
.fld label .opt {
  font-family: var(--font-body);
  font-size: 11.5px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  font-style: italic;
  font-weight: 400;
}
.fld input,
.fld textarea,
.fld select {
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 6px 0 10px;
  transition: border-color .15s;
}
.fld textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.55;
  border: 1px solid var(--rule);
  padding: 14px 16px;
  background: var(--bg);
}
.fld select {
  appearance: none;
  cursor: pointer;
  padding-right: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12'><path d='M1 1l5 5 5-5' stroke='%23333' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
}
.fld input::placeholder,
.fld textarea::placeholder {
  color: color-mix(in oklch, var(--ink) 32%, transparent);
  font-style: italic;
}
.fld input:focus,
.fld textarea:focus,
.fld select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.fld textarea:focus { border-color: var(--accent); }

/* Checkbox chip (dietary options) */
.diet-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  user-select: none;
}
.diet-chip:hover { border-color: var(--ink); color: var(--ink); }
.diet-chip input { display: none; }
.diet-chip .mk {
  width: 13px;
  height: 13px;
  border: 1px solid var(--rule);
  position: relative;
  flex: 0 0 auto;
}
.diet-chip input:checked + .mk {
  background: var(--accent);
  border-color: var(--accent);
}
.diet-chip input:checked + .mk::after {
  content: "✓";
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 9.5px;
  display: grid;
  place-items: center;
  line-height: 1;
}
.diet-chip:has(input:checked) {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}

/* Segmented radio strip (frequency) */
.freq-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--ink);
  background: var(--bg);
}
.freq-strip input { display: none; }
.freq-strip label {
  padding: 13px 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  cursor: pointer;
  border-right: 1px dashed var(--rule);
  transition: all .15s;
  display: block;
  margin: 0;
}
.freq-strip label:last-of-type { border-right: 0; }
.freq-strip input:checked + label {
  background: var(--ink);
  color: var(--bg);
}

/* Rubber-stamp submit button */
.stamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 30px 18px 22px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 3px 3px 0 var(--ink);
}
.stamp-btn .kanji {
  font-family: var(--font-jp);
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1;
  padding: 2px 10px;
  border: 1.5px solid #fff;
  background: transparent;
  color: #fff;
}
.stamp-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.stamp-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* Progress dot (used on /quote) */
.progress-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  background: transparent;
  transition: background .2s, border-color .2s;
}
.progress-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
}

/* Section divider — thin rule with a kanji glyph in the middle */
.sec-rule {
  display: flex;
  align-items: center;
  gap: 18px;
}
.sec-rule::before,
.sec-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.sec-rule .glyph {
  font-family: var(--font-jp);
  font-size: 20px;
  color: var(--accent);
}

/* Flash animations for the received / error states */
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
}
@keyframes stamp-drop {
  0%   { opacity: 0; transform: translateY(-28px) rotate(-20deg) scale(1.3); }
  70%  { opacity: 1; transform: translateY(2px)   rotate(-4deg)  scale(1.02); }
  100% { opacity: 1; transform: translateY(0)     rotate(-6deg)  scale(1); }
}

/* ---------- Chip (toggleable — plain click state, used for time + diet on /contact) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip.accent.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Quantity stepper (pickup order) ---------- */
.counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  margin-bottom: 8px;
}
.counter-row .name {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
}
.counter-row .jp {
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.16em;
  margin-left: 10px;
}
.counter-row .price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-right: 16px;
}
.counter {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
}
.counter button {
  width: 30px; height: 30px;
  border: 0;
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
}
.counter button:hover { background: var(--ink); color: var(--bg); }
.counter .qty {
  min-width: 34px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0 4px;
}

/* ============================================================
 * PAGE-SPECIFIC STYLES
 * These were previously inline as $page_style in each PHP file.
 * Kept together here so every non-utility rule lives in one file.
 * Anything expressible as Tailwind utilities belongs in the markup.
 * ============================================================ */


/* ---------- /index — announce pulse dot ---------- */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0  color-mix(in oklch, var(--accent) 70%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0  transparent; }
}
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  animation: pulse 2.2s infinite;
}

/* ---------- /index — hero headline SVG underline wobble ---------- */
.wobble { position: relative; display: inline-block; }
.wobble::after {
  content: "";
  position: absolute;
  left: 2%; right: 2%; bottom: 0.06em;
  height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 6' preserveAspectRatio='none'><path d='M0 3 Q 15 0 30 3 T 60 3 T 90 3 T 120 3' fill='none' stroke='%23C2410C' stroke-width='2'/></svg>") repeat-x;
  background-size: 120px 6px;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: wobble-draw 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.6s forwards,
             wobble-shift 4s linear 2.2s infinite;
}
@keyframes wobble-draw {
  0%   { opacity: 0;   clip-path: inset(0 100% 0 0); }
  8%   { opacity: 0.9; }
  100% { opacity: 0.9; clip-path: inset(0 0 0 0); }
}
@keyframes wobble-shift {
  0%   { background-position-x: 0; }
  100% { background-position-x: -120px; }
}

/* ---------- /index — today-pot inset double border ---------- */
.today-pot { position: relative; }
.today-pot::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--rule);
  pointer-events: none;
}

/* ---------- /index — horizontal ticker marquee ----------
 * Each span owns its own trailing spacing via padding-right, so the track's
 * total width is exactly 2× one copy. That makes translateX(-50%) land on a
 * seamless loop. Using flex `gap` here would leave no trailing space after
 * the last item of copy 1, so -50% would fall short by half-a-gap and flash
 * a visible blank on every cycle.
 */
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-track span { padding-right: 48px; }
.ticker-track span::before {
  content: "◆";
  color: var(--accent);
  margin-right: 48px;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Vertical Japanese text decoration (used on hero) ---------- */
.vert-jp {
  writing-mode: vertical-rl;
  letter-spacing: 0.4em;
}

/* ---------- /index — hinomaru decoration layer on hero ----------
 * Layered vermillion shapes: sun, rings, glows — staggered page-load fade-in. */
.deco {
  opacity: 0;
  animation: deco-in 1.2s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes deco-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.deco-sun {
  background: radial-gradient(circle at 42% 42%,
    color-mix(in oklch, var(--accent) 30%, transparent) 0%,
    color-mix(in oklch, var(--accent) 18%, transparent) 45%,
    transparent 72%);
  filter: blur(2px);
  animation-delay: .1s;
  animation-duration: 1.9s;
}
.deco-ring-lg {
  border: 1.5px solid color-mix(in oklch, var(--accent-ink) 42%, transparent);
  animation-delay: .35s;
}
.deco-ring-dash {
  border: 1.2px dashed color-mix(in oklch, var(--accent) 55%, transparent);
  animation-delay: .5s;
}
.deco-ring-alt {
  border: 1px solid color-mix(in oklch, var(--accent-ink) 28%, transparent);
  animation-delay: .6s;
}
.deco-glow {
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  filter: blur(3px);
  animation-delay: .7s;
  animation-duration: 1.6s;
}
.deco-glow-2 {
  background: color-mix(in oklch, var(--accent) 16%, transparent);
  filter: blur(2px);
  animation-delay: .85s;
  animation-duration: 1.6s;
}
.deco-dot-ring {
  border: 1.5px solid color-mix(in oklch, var(--accent) 55%, transparent);
  animation-delay: 1.1s;
}
/* .deco-dot (solid fill) — animation-delay set inline per instance */

@media (prefers-reduced-motion: no-preference) {
  .deco-sun  { animation: deco-in 1.9s cubic-bezier(.2,.7,.2,1) .1s both, sun-breathe 10s ease-in-out 2s infinite; }
  .deco-glow { animation: deco-in 1.6s cubic-bezier(.2,.7,.2,1) .7s both, glow-drift 14s ease-in-out 3s infinite; }
}
@keyframes sun-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}
@keyframes glow-drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .deco { animation: none !important; opacity: 1; }
}


/* ---------- /contact — animated pin-and-roads map ---------- */
.map {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg,  color-mix(in oklch, var(--ink) 6%, transparent) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, color-mix(in oklch, var(--ink) 6%, transparent) 0 1px, transparent 1px 40px),
    var(--bg-2);
}
.map .road {
  position: absolute;
  background: color-mix(in oklch, var(--ink) 18%, transparent);
  transform-origin: left center;
  animation: road-draw 1.6s cubic-bezier(.2,.7,.2,1) both;
}
.map .r3, .map .r4 { transform-origin: top center; animation-name: road-draw-v; }
@keyframes road-draw   { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes road-draw-v { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.map .r1 { animation-delay: .15s; top: 42%; left: 0; right: 0; height: 10px; }
.map .r2 { animation-delay: .35s; top: 68%; left: 0; right: 0; height: 6px; }
.map .r3 { animation-delay: .55s; left: 34%; top: 0; bottom: 0; width: 7px; }
.map .r4 { animation-delay: .75s; left: 72%; top: 0; bottom: 0; width: 5px; }
.map .canal {
  position: absolute; top: 18%; left: 0; right: 0; height: 30px;
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  border-top:    1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  transform-origin: left center; transform: scaleX(0); opacity: 0;
  animation: canal-draw 1.8s cubic-bezier(.2,.7,.2,1) .05s forwards;
}
@keyframes canal-draw { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.map .pin {
  position: absolute; top: 52%; left: 41%;
  width: 18px; height: 18px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--accent);
  transform: translate(-50%, -50%) scale(0); opacity: 0;
  animation: pin-drop .5s cubic-bezier(.5,1.6,.4,1) 1.1s forwards,
             pin-pulse 2.2s ease-in-out 1.6s infinite;
}
@keyframes pin-drop {
  from { transform: translate(-50%, -80%) scale(0); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes pin-pulse {
  0%,100% { box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--accent), 0 0 0 5px  color-mix(in oklch, var(--accent) 0%, transparent); }
  50%     { box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--accent), 0 0 0 14px color-mix(in oklch, var(--accent) 0%, transparent); }
}
.map .pin::before {
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%; border: 1px solid var(--accent); opacity: 0;
  animation: pin-ring 2.2s ease-out 1.6s infinite;
}
@keyframes pin-ring { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }
.map .pin::after {
  content: "Bento House · 弁当屋";
  position: absolute; left: 22px; top: -2px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--paper); border: 1px solid var(--ink);
  padding: 4px 8px; color: var(--ink);
  opacity: 0; transform: translateX(-6px);
  animation: label-in .5s ease 1.5s forwards;
}
@keyframes label-in { to { opacity: 1; transform: translateX(0); } }

/* ---------- /contact — in-copy contact links (tel:, mailto:, maps) ----------
 * A drawn-underline-on-hover for anchors embedded inside the Visit / Call / Write
 * cards (and anywhere else the same treatment fits). Underline sits below the
 * baseline as a 1px vermillion rule that scales in from the left on hover,
 * paired with a colour shift from ink → accent-ink. The arrow glyph (if any)
 * nudges right on hover, matching the .btn .arrow pattern used elsewhere.
 */
.info-link {
  color: var(--ink);
  font-weight: 500;
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  transition: color .25s ease;
  text-decoration: none;
}
.info-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.info-link .info-link-arrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent-ink);
  transform: translateX(0);
  transition: transform .25s ease, color .25s ease;
}
.info-link:hover           { color: var(--accent-ink); }
.info-link:hover::after    { transform: scaleX(1); }
.info-link:hover .info-link-arrow { transform: translateX(4px); }

/* ---------- /contact — pulse ring overlay on top of the Google Maps iframe pin ----------
 * Google's red pin sits at the map's center with its tip at the geographic coordinate.
 * Our overlay is absolutely positioned at the iframe centre, offset upward so the
 * vermillion ring expands around Google's pin body (the teardrop) rather than the tip.
 * Reuses the existing pin-ring keyframe from the old animated map. Two rings are
 * staggered so the pulse feels continuous rather than rhythmic-break.
 */
.pin-pulse-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, calc(-50% - 18px));
  pointer-events: none;
  z-index: 2;
}
.pin-pulse-overlay::before,
.pin-pulse-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pin-ring 2.2s ease-out infinite;
}
.pin-pulse-overlay::after { animation-delay: 1.1s; }


/* ---------- /quote — floating kanji label + success hanko ---------- */
.q-form-wrap::before {
  content: "見 積 依 頼";
  position: absolute;
  top: -12px;
  left: 40px;
  background: var(--bg);
  padding: 0 14px;
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--accent-ink);
}
.received {
  animation: flash-in 0.5s cubic-bezier(.3, .1, .2, 1.1) both;
  background: color-mix(in oklch, var(--accent) 10%, var(--paper));
}
.received .kanji-stamp {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-jp);
  font-size: 22px;
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--accent);
  animation: stamp-drop 0.5s cubic-bezier(.3, .1, .2, 1.4) 0.2s both;
}
@media (max-width: 740px) {
  .received .kanji-stamp { position: static; margin: 0 0 14px; }
  .received h4, .received p { padding-right: 0 !important; }
  .q-form-wrap::before { left: 20px; font-size: 11px; }
}


/* ---------- /about — journey rail choreography ----------
 * 4-stop route (Zhejiang → Guangdong → Rotterdam → Amsterdam). The dashed rail
 * draws itself left-to-right via clip-path; a vermillion traveller glow rides
 * its leading edge; each stop's dot drops in with a slight overshoot as the
 * rail reaches it, followed by staggered label + brush-in reveals. The final
 * (Amsterdam) stop's halo pulses outward once the journey completes.
 * Triggered by AOS adding .aos-animate to the section on scroll-into-view.
 */

.j-rail-wrap { pointer-events: none; }

.j-rail {
  position: absolute;
  top: 1px; left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    color-mix(in oklch, var(--ink) 22%, transparent) 0 4px,
    transparent 4px 9px
  );
}

.j-traveller {
  position: absolute;
  top: -4px;
  left: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent),
    0 0 18px 3px color-mix(in oklch, var(--accent) 50%, transparent);
}

.j-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

/* Initial (pre-animate) states — the scene holds still until AOS fires */
[data-aos="journey-play"] .j-rail        { clip-path: inset(0 100% 0 0); }
[data-aos="journey-play"] .j-traveller   { opacity: 0; }
[data-aos="journey-play"] .j-stop .j-dot { transform: translateY(-14px) scale(0); opacity: 0; }
[data-aos="journey-play"] .j-stop .j-when,
[data-aos="journey-play"] .j-stop .j-place,
[data-aos="journey-play"] .j-stop .j-note { opacity: 0; transform: translateY(6px); }
[data-aos="journey-play"] .j-stop .j-cn   { opacity: 0; clip-path: inset(0 0 100% 0); }
[data-aos="journey-play"] .j-stop--last .j-halo { opacity: 0; transform: scale(.5); }

/* Reveal states — fire when AOS adds .aos-animate */
[data-aos="journey-play"].aos-animate .j-rail      { animation: j-rail-draw 2.2s cubic-bezier(.2, .7, .2, 1) .1s forwards; }
[data-aos="journey-play"].aos-animate .j-traveller { animation: j-traveller-run 2.2s cubic-bezier(.2, .7, .2, 1) .1s forwards; }

[data-aos="journey-play"].aos-animate .j-stop .j-dot   { animation: j-dot-drop .7s cubic-bezier(.3, 1.5, .5, 1) both; }
[data-aos="journey-play"].aos-animate .j-stop .j-when,
[data-aos="journey-play"].aos-animate .j-stop .j-place,
[data-aos="journey-play"].aos-animate .j-stop .j-note  { animation: j-label-up .55s cubic-bezier(.2, .7, .2, 1) both; }
[data-aos="journey-play"].aos-animate .j-stop .j-cn    { animation: j-brush-in .65s cubic-bezier(.4, .1, .2, 1) both; }

/* Per-stop cascade — each stop lands in sequence matching the rail's position */
[data-aos="journey-play"].aos-animate .j-stop:nth-child(1) .j-dot   { animation-delay: .20s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(1) .j-when  { animation-delay: .36s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(1) .j-place { animation-delay: .44s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(1) .j-cn    { animation-delay: .52s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(1) .j-note  { animation-delay: .62s; }

[data-aos="journey-play"].aos-animate .j-stop:nth-child(2) .j-dot   { animation-delay: .85s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(2) .j-when  { animation-delay: 1.01s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(2) .j-place { animation-delay: 1.09s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(2) .j-cn    { animation-delay: 1.17s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(2) .j-note  { animation-delay: 1.27s; }

[data-aos="journey-play"].aos-animate .j-stop:nth-child(3) .j-dot   { animation-delay: 1.50s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(3) .j-when  { animation-delay: 1.66s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(3) .j-place { animation-delay: 1.74s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(3) .j-cn    { animation-delay: 1.82s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(3) .j-note  { animation-delay: 1.92s; }

[data-aos="journey-play"].aos-animate .j-stop:nth-child(4) .j-dot   { animation-delay: 2.15s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(4) .j-when  { animation-delay: 2.31s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(4) .j-place { animation-delay: 2.39s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(4) .j-cn    { animation-delay: 2.47s; }
[data-aos="journey-play"].aos-animate .j-stop:nth-child(4) .j-note  { animation-delay: 2.57s; }

/* Arrival halo: fades in after Amsterdam dot lands, then pulses indefinitely */
[data-aos="journey-play"].aos-animate .j-stop--last .j-halo {
  animation:
    j-halo-in   .45s ease-out 2.70s forwards,
    j-halo-pulse 2.6s ease-out 3.15s infinite;
}

/* Keyframes */
@keyframes j-rail-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes j-traveller-run {
  0%   { left: 0;    opacity: 0; }
  6%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes j-dot-drop {
  0%   { transform: translateY(-14px) scale(0);   opacity: 0; }
  65%  { transform: translateY(0)     scale(1.18); opacity: 1; }
  100% { transform: translateY(0)     scale(1);    opacity: 1; }
}
@keyframes j-label-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes j-brush-in {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes j-halo-in {
  from { opacity: 0; transform: scale(.5); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes j-halo-pulse {
  0%, 100% { box-shadow: 0 0 0 0   color-mix(in oklch, var(--accent) 55%, transparent); }
  60%      { box-shadow: 0 0 0 18px color-mix(in oklch, var(--accent) 0%,  transparent); }
}

/* Respect the user's motion preference — show everything in final state */
@media (prefers-reduced-motion: reduce) {
  [data-aos="journey-play"] .j-rail,
  [data-aos="journey-play"] .j-traveller,
  [data-aos="journey-play"] .j-stop .j-dot,
  [data-aos="journey-play"] .j-stop .j-when,
  [data-aos="journey-play"] .j-stop .j-place,
  [data-aos="journey-play"] .j-stop .j-cn,
  [data-aos="journey-play"] .j-stop .j-note,
  [data-aos="journey-play"] .j-stop--last .j-halo {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}


@media (max-width: 860px) {
  .nav-links { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
