/* Japan Melanin Inhibitor: washi paper, sumi ink, the logo's vermilion, and the box's gold waves. */

:root {
  --washi: #fbf8f3;
  --paper: #ffffff;
  --sumi: #16171a;
  --ink-2: #625c55;
  --line: #ece4d8;
  --red: #e3121b;
  --red-deep: #a90d14;
  --gold: #c9a14a;
  --gold-lt: #ead7a0;
  --gold-dk: #9a7424;
  --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4.5vw, 80px);
  --max: 78rem;
  --radius: clamp(14px, 1.4vw, 22px);
  --header-h: 4.25rem;
  color-scheme: light;
}

html { font-size: clamp(100%, 0.3vw + 0.82rem, 134%); -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--washi);
  color: var(--sumi);
  font: 400 1rem/1.9 var(--sans);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  line-break: strict;
  word-break: auto-phrase; /* break Japanese at natural phrase boundaries where supported */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.wrap, .top-inner, .hero-inner, .benefits, .genuine, .foot-inner { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ── Header ───────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 5; transition: background-color 0.35s, box-shadow 0.35s; }
html.scrolled .top { background: rgb(251 248 243 / 0.85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.top-logo { height: clamp(30px, 2.6vw + 18px, 46px); width: auto; }

/* Hanko-style seal: 日本製 */
.seal {
  display: inline-grid;
  place-items: center;
  flex: none;
  writing-mode: vertical-rl;
  padding: 0.45em 0.3em;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  font: 900 0.875rem/1 var(--serif);
  letter-spacing: 0.18em;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.85), inset 0 0 0 3px var(--red);
  transform: rotate(-3deg);
}
.seal--lg { font-size: 1.05rem; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 55% at 85% 20%, rgb(234 215 160 / 0.35), transparent 70%),
    radial-gradient(45% 45% at 10% 85%, rgb(227 18 27 / 0.07), transparent 70%);
}
.waves { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: clamp(160px, 30vw, 360px); z-index: -1; pointer-events: none; }
.wave { fill: none; stroke: url(#gold); stroke-linecap: round; }
.w1 { stroke-width: 2.2; }
.w2 { stroke-width: 1.2; opacity: 0.7; }
.w3 { stroke-width: 1; opacity: 0.55; }
.dots { stroke-width: 3.2; stroke-dasharray: 0.1 14; opacity: 0.9; }
.leaf-mark { position: absolute; z-index: -1; width: clamp(220px, 34vw, 560px); inset-inline-start: -6%; top: 6%; opacity: 0.045; transform: rotate(-14deg); pointer-events: none; }

.hero-inner { display: grid; gap: clamp(24px, 4vw, 80px); padding-block: clamp(12px, 3vh, 40px) clamp(48px, 9vh, 120px); container-type: inline-size; }
@media (min-width: 900px), (min-width: 700px) and (orientation: landscape) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: calc(100svh - var(--header-h)); }
}

.kicker { font: 500 0.875rem/1.4 var(--sans); letter-spacing: 0.14em; color: var(--red); }
.name {
  margin-top: 0.6rem;
  font: 900 clamp(2.3rem, min(10.5cqi, 11vh), 5.6rem)/1.02 var(--serif);
  letter-spacing: -0.01em;
}
@media (min-width: 900px), (min-width: 700px) and (orientation: landscape) { .name { font-size: clamp(2.3rem, min(5.6cqi, 11vh), 5.6rem); } }
.name-a { display: block; color: var(--sumi); }
.name-b { display: block; color: var(--red); }
.dosage { margin-top: 0.5rem; font: italic 500 clamp(1rem, 0.7vw + 0.8rem, 1.35rem)/1.3 var(--sans); color: var(--red); letter-spacing: 0.01em; }

/* Price card: dark lacquer with gold foil figures */
.price {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15em;
  margin-top: clamp(20px, 3.5vh, 36px);
  padding: 0.9rem 1.4rem 0.95rem;
  border-radius: 16px;
  background: linear-gradient(150deg, #1d1e22, #0f1012);
  color: #f6ecd2;
  box-shadow: 0 24px 40px -26px rgb(22 23 26 / 0.7), inset 0 0 0 1px rgb(201 161 74 / 0.45);
}
.price-label { font: 500 0.9375rem/1 var(--sans); color: var(--gold-lt); }
.price-amount {
  font: 900 clamp(2rem, 2.6vw + 1.2rem, 3.4rem)/1 var(--serif);
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--gold-dk), var(--gold-lt) 30%, #fff6dc 45%, var(--gold) 60%, var(--gold-dk));
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-inline: 0.1em;
}
.price-unit { font: 700 1rem/1 var(--serif); color: var(--gold-lt); }

.admin { display: flex; align-items: flex-start; gap: 0.7rem; margin-top: 1.25rem; max-width: 30em; font-weight: 500; }
.admin-icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 14% 52% no-repeat,
    linear-gradient(#fff, #fff) center / 52% 14% no-repeat,
    var(--red);
}
.jump { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1rem; min-height: 44px; font-weight: 700; color: var(--red); text-decoration: none; }
.jump::after { content: ''; width: 0.5em; height: 0.5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-0.15em) rotate(45deg); transition: transform 0.25s var(--ease-out); }
.jump:hover::after { transform: translateY(0.05em) rotate(45deg); }

/* Photo with a gold offset frame and the box's vertical title beside it */
.hero-photo { position: relative; margin: 0; display: flex; align-items: flex-start; gap: clamp(10px, 1.6vw, 24px); }
.vertical {
  writing-mode: vertical-rl;
  font: 700 clamp(0.95rem, 0.7vw + 0.75rem, 1.35rem)/1 var(--serif);
  letter-spacing: 0.42em;
  color: var(--red);
  padding-top: 0.4rem;
  flex: none;
}
.frame { position: relative; flex: 1; min-width: 0; }
.frame::before {
  content: '';
  position: absolute;
  inset: 0;
  translate: clamp(8px, 1.1vw, 16px) clamp(8px, 1.1vw, 16px);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  z-index: -1;
}
.frame img { width: 100%; border-radius: var(--radius); box-shadow: 0 40px 70px -40px rgb(22 23 26 / 0.55); }

/* Phones: photo straight after the name, so it's the first thing people see */
.hero-copy { display: contents; }
.kicker { order: 1; }
.name { order: 2; }
.dosage { order: 3; }
.hero-photo { order: 4; margin-top: 1.25rem; }
.price { order: 5; justify-self: start; }
.admin { order: 6; }
.jump { order: 7; justify-self: start; }
@media (min-width: 900px), (min-width: 700px) and (orientation: landscape) {
  .hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
  .hero-photo { margin-top: 0; }
}

/* ── Benefits ─────────────────────────────────────────────────── */
.benefits { padding-block: clamp(48px, 8vw, 120px) clamp(32px, 5vw, 80px); scroll-margin-top: var(--header-h); }
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  font: 700 min(clamp(1.4rem, 1.5vw + 1rem, 2.25rem), 5.4vw)/1.3 var(--serif); /* shrinks on phones so it stays on one line */
  letter-spacing: 0.08em;
  white-space: nowrap;
  margin-bottom: clamp(24px, 4vw, 56px);
}
/* the client's ---- marks, kept as written and coloured gold */
.dash { color: var(--gold); letter-spacing: 0.12em; font-weight: 500; }
.benefit-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(10px, 1.2vw, 18px); grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); }
.benefit-grid li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-weight: 500;
  line-height: 1.75;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
/* the client's gem bullet, kept as written */
.benefit-grid .gem { flex: none; font-size: 1.05em; line-height: 1.7; }
.benefit-grid li:hover { border-color: var(--gold); box-shadow: 0 16px 30px -22px rgb(154 116 36 / 0.6); }

/* ── Authenticity ─────────────────────────────────────────────── */
.genuine { display: grid; gap: clamp(24px, 4vw, 72px); align-items: center; padding-block: clamp(32px, 5vw, 80px) clamp(56px, 8vw, 120px); }
@media (min-width: 820px) { .genuine { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.box-photo { margin: 0; justify-self: center; width: min(100%, 26rem); }
.box-photo img { width: 100%; border-radius: var(--radius); box-shadow: 0 40px 70px -40px rgb(22 23 26 / 0.5); }
.notice {
  position: relative;
  padding: clamp(20px, 3vw, 40px);
  padding-inline-end: clamp(64px, 7vw, 96px);
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--red);
}
.notice p { max-width: 38em; }
.notice p + p { margin-top: 0.9rem; }
.notice .strong { font-weight: 700; }
/* physical top/right on purpose: the seal is vertical text, so its own 'inline-end' would mean its bottom edge */
.notice .seal { position: absolute; top: clamp(18px, 2.5vw, 32px); right: clamp(18px, 2.5vw, 32px); }

/* ── Footer ───────────────────────────────────────────────────── */
.foot { background: var(--sumi); color: #eae4da; padding-block: clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.foot::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.foot-inner { display: grid; gap: 1.25rem; justify-items: start; }
@media (min-width: 720px) { .foot-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; } }
.foot-logo { height: 2.75rem; width: auto; padding: 0.55rem 0.9rem; background: #fff; border-radius: 12px; box-sizing: content-box; }

/* ── Scroll progress ──────────────────────────────────────────── */
.progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 10; background: linear-gradient(90deg, var(--gold-dk), var(--gold-lt), var(--red)); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* ══ Motion: one load sequence + gentle scroll reveals; all off with "reduce motion" ══ */
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes frame-in { from { opacity: 0; transform: translateY(26px) scale(0.98); } }
@keyframes foil { 0% { background-position: 100% 0; } 30%, 100% { background-position: 0% 0; } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-2.5%); } }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-3deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-3deg) scale(0.94); } 100% { transform: rotate(-3deg) scale(1); } }
@keyframes progress { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: no-preference) {
  .w1, .w2, .w3 { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease-out) forwards; }
  .w2 { animation-delay: 0.25s; }
  .w3 { animation-delay: 0.45s; }
  .dots { animation: rise 1.6s ease 1.2s both; }
  .waves { animation: drift 14s ease-in-out 2.6s infinite alternate; }
  .kicker { animation: rise 0.7s var(--ease-out) 0.1s both; }
  .name { animation: rise 0.8s var(--ease-out) 0.2s both; }
  .dosage { animation: rise 0.8s var(--ease-out) 0.35s both; }
  .hero-photo { animation: frame-in 1s var(--ease-out) 0.3s both; }
  .price, .admin, .jump { animation: rise 0.8s var(--ease-out) 0.55s both; }
  .price-amount { animation: foil 6s ease-in-out 1.4s infinite; }
  .top .seal { animation: stamp 0.6s var(--ease-out) 0.9s both; }

  @supports (animation-timeline: scroll()) {
    .progress { animation: progress linear both; animation-timeline: scroll(root); }
  }

  html.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: var(--d, 0ms); }
  html.js [data-reveal].in { opacity: 1; transform: none; }
}
