/* アルカリ太郎 商品サイト — 定数は design-brief.md */
:root {
  --c-base: #FFFFFF;
  --c-pale: #EEF5FC;
  --c-ink: #1B2A3A;
  --c-brand: #1E5AA8;
  --c-brand-dark: #16457F;
  --c-gray: #5B6776;
  --c-line: #D5DEE8;
  --c-mist: #F5F7FA;
  --c-soldout: #B3261E;
  --c-ng-pale: #FBEDEC;

  --font-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-logo: "Zen Maru Gothic", "Noto Sans JP", sans-serif;

  --r-card: 12px;
  --r-pill: 999px;
  --header-h: 64px;
  --container: 1120px;
  --sec-y: 64px;
  --gutter: 20px;
}
@media (min-width: 900px) {
  :root { --sec-y: 104px; --gutter: 32px; --header-h: 76px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-ink);
  background: var(--c-base);
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: var(--c-brand); }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h2, h3, .fv__catch { text-wrap: balance; }
.nb { display: inline-block; }
p { text-wrap: pretty; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 差し込み口 ---------- */
.slot {
  border: 2px dashed var(--c-line);
  border-radius: var(--r-card);
  color: var(--c-gray);
  font-size: 14px;
  line-height: 1.6;
}
.slot--photo {
  display: flex; align-items: center; justify-content: center;
  background: var(--c-mist);
  text-align: center; padding: 16px;
}
.slot--text { display: inline-block; padding: 2px 12px; background: var(--c-mist); }
.slot--illust {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255, 255, 255, .7); font-size: 12px;
}
.tag-kari { font-size: 13px; color: var(--c-gray); }

/* ---------- 文字ロゴ（仮）：輪郭に沿ったふち取り ---------- */
.logo-text {
  font-family: var(--font-logo);
  font-weight: 900;
  color: var(--c-brand);
  letter-spacing: .04em;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  paint-order: stroke fill;
  -webkit-text-stroke: 0;
}
.logo-text--sm { font-size: 24px; }
.logo-text--lg {
  display: block;
  font-size: clamp(40px, 14vw, 128px);
  -webkit-text-stroke: .14em #fff;
  filter: drop-shadow(0 3px 0 rgba(30, 90, 168, .18));
}
.logo-text--footer { font-size: 30px; color: #fff; }

/* ---------- ボタン・リンク ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 32px;
  border: 0; border-radius: var(--r-pill);
  background: var(--c-brand); color: #fff;
  font: 700 16px/1.4 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.btn:hover { background: var(--c-brand-dark); transform: translateY(-1px); }
.btn:focus-visible, .tabs__btn:focus-visible, a:focus-visible { outline: 3px solid #8DB8E8; outline-offset: 3px; }
.btn--wide { width: 100%; max-width: 400px; }
.text-link { font-weight: 700; white-space: nowrap; text-underline-offset: 4px; }
.text-link::after { content: " →"; }

/* ---------- 1. ヘッダー ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.header__inner {
  height: 100%; max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.header__logo { text-decoration: none; }
.gnav { display: none; }
.gnav__list { display: flex; align-items: center; gap: 28px; }
.gnav__list a {
  color: var(--c-ink); text-decoration: none; font-size: 15px; font-weight: 700; white-space: nowrap;
}
.gnav__list a:hover { color: var(--c-brand); }
.gnav__list .gnav__contact {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  border-radius: var(--r-pill); background: var(--c-brand); color: #fff;
}
.gnav__list .gnav__contact:hover { background: var(--c-brand-dark); color: #fff; }

.menu-btn {
  width: 48px; height: 48px; margin-right: -8px;
  border: 0; background: none; cursor: pointer;
  display: grid; place-content: center; gap: 6px;
}
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--c-ink); transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.drawer {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49;
  background: #fff; overflow-y: auto;
  padding: 8px var(--gutter) 40px;
}
.drawer__list li { border-bottom: 1px solid var(--c-line); }
.drawer__list a {
  display: block; padding: 18px 4px;
  color: var(--c-ink); text-decoration: none; font-size: 17px; font-weight: 700;
}
body.is-menu-open { overflow: hidden; }

/* 実測：ロゴ＋6項目が1行に収まるのは 1040px 以上 */
@media (min-width: 1040px) {
  .gnav { display: block; }
  .menu-btn, .drawer { display: none !important; }
}

/* ---------- 2. ファーストビュー（背景固定） ---------- */
.fv {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; min-height: 520px;
  display: flex; align-items: center; justify-content: center;
  padding: var(--header-h) var(--gutter) 64px;
  overflow: hidden;
}
.fv__bg {
  position: absolute; inset: 0;
  background-color: var(--c-pale);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='4' cy='4' r='2.2' fill='%231E5AA8' fill-opacity='.13'/%3E%3Ccircle cx='18' cy='18' r='2.2' fill='%231E5AA8' fill-opacity='.13'/%3E%3C/svg%3E");
}
.fv__inner { position: relative; text-align: center; }
.fv__title { display: block; font-weight: 400; }
.fv__kind {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 16px; border-radius: var(--r-pill);
  background: #fff; color: var(--c-brand);
  font-size: 14px; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
}
.fv__catch { display: inline-block; margin-top: 24px; padding: 6px 20px; font-size: 16px; background: rgba(255,255,255,.8); }
.fv__note { margin-top: 12px; font-size: 12px; color: var(--c-gray); }
.fv__illust { position: absolute; }
.fv__illust--a { top: calc(var(--header-h) + 24px); left: 6%; }
.fv__illust--b { bottom: 96px; right: 6%; }
.fv__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 13px; font-weight: 700; color: var(--c-brand); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fv__scroll::after {
  content: ""; width: 1px; height: 32px; background: var(--c-brand);
  animation: scrollLine 2.2s ease-in-out infinite; transform-origin: top;
}
@keyframes scrollLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 本文（ファーストビューの上に流れる） ---------- */
.main { position: relative; z-index: 1; }
.sec { position: relative; padding: var(--sec-y) 0; color: var(--c-ink); }
.sec--genre, .sec--usage, .sec--column { background: var(--c-base); --wave: var(--c-base); }
.sec--about, .sec--product { background: var(--c-pale); --wave: var(--c-pale); }
.sec--contact { background: var(--c-mist); --wave: var(--c-mist); }

/* 波の区切り（手で引いたような曲線） */
.wave { position: absolute; left: 0; width: 100%; height: 36px; pointer-events: none; }
.wave path { fill: var(--wave); }
.wave--top { top: -35px; }
@media (min-width: 900px) { .wave { height: 56px; } .wave--top { top: -55px; } }

.sec-head { margin-bottom: 40px; text-align: center; }
.sec-head--left { text-align: left; }
.sec-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; text-align: left; }
.sec-head__en {
  font-family: var(--font-logo); font-weight: 900;
  font-size: 15px; letter-spacing: .12em; color: var(--c-brand);
}
.sec-head__title { margin-top: 4px; font-size: clamp(22px, 5.6vw, 32px); font-weight: 900; line-height: 1.5; }

/* ---------- 3. ジャンル別（タブ） ---------- */
.tabs__list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  max-width: 720px; margin: 0 auto 32px;
  padding: 6px; border-radius: var(--r-pill); background: var(--c-pale);
}
.tabs__btn {
  min-height: 50px; padding: 0 8px;
  border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--c-brand);
  font: 700 15px/1.3 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tabs__btn[aria-selected="true"] { background: var(--c-brand); color: #fff; }
.tabs__btn:not([aria-selected="true"]):hover { background: #fff; }

.genre {
  display: grid; gap: 24px;
  border: 1px solid var(--c-line); border-radius: var(--r-card);
  padding: 16px; background: #fff;
}
.genre__img { aspect-ratio: 4 / 3; }
.genre__body { padding: 0 4px 8px; }
.genre__title { font-size: 24px; font-weight: 900; color: var(--c-brand); }
.genre__lead { margin-top: 8px; font-size: 18px; font-weight: 700; }
.genre__text { margin-top: 12px; color: var(--c-ink); }
.genre .tag-kari { margin-top: 8px; }
.genre .btn { margin-top: 24px; width: 100%; max-width: 360px; padding: 0 20px; }
@media (min-width: 900px) {
  .genre { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; padding: 24px; }
  .genre__body { padding: 0 24px 0 0; }
}

/* ---------- 4. アルカリ太郎について ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.about__text { margin-top: 8px; }
.about .sec-head { margin-bottom: 16px; }
.video-btn {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9; border-radius: var(--r-card);
  background: var(--c-brand-dark); color: #fff; text-decoration: none;
}
.video-btn__media { position: absolute; inset: 0; }
.video-btn__media iframe {
  position: absolute; top: 50%; left: 50%;
  width: 177.78%; height: 177.78%; min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%); border: 0; pointer-events: none;
}
.video-btn__slot {
  position: absolute; inset: 12px;
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 8px 12px;
  border: 2px dashed rgba(255,255,255,.45); border-radius: 8px;
  font-size: 13px; color: rgba(255,255,255,.85);
}
.video-btn__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; background: rgba(22, 69, 127, .88);
  font-size: 18px; font-weight: 700; white-space: nowrap;
}
.video-btn__arrow {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--c-brand); transition: transform .2s;
}
.video-btn:hover .video-btn__arrow { transform: translateX(4px); }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.3fr; gap: 64px; } }

/* ---------- 5. 使い方と素材 ---------- */
.usage { display: grid; gap: 40px; }
.usage__title {
  padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 2px solid var(--c-brand);
  font-size: 20px; font-weight: 900;
}
.steps { display: grid; gap: 12px; counter-reset: none; }
.steps__item { display: flex; align-items: center; gap: 16px; }
.steps__num {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-brand); color: #fff; font-weight: 900;
}
.usage__more { margin-top: 20px; }
.mat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mat__panel { border-radius: var(--r-card); padding: 16px 12px 14px; border: 2px solid; }
.mat__panel--ok { border-color: var(--c-brand); background: var(--c-pale); }
.mat__panel--ng { border-color: var(--c-soldout); background: var(--c-ng-pale); }
.mat__head {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 14px; font-size: 18px; font-weight: 900; line-height: 1.3; white-space: nowrap;
}
.mat__panel--ok .mat__head { color: var(--c-brand); }
.mat__panel--ng .mat__head { color: var(--c-soldout); }
.mat__sign { position: relative; width: 52px; height: 52px; }
.mat__sign--ok { border: 7px solid var(--c-brand); border-radius: 50%; }
.mat__sign--ng::before, .mat__sign--ng::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 62px; height: 8px; margin: -4px 0 0 -31px; border-radius: 4px; background: var(--c-soldout);
}
.mat__sign--ng::before { transform: rotate(45deg); }
.mat__sign--ng::after { transform: rotate(-45deg); }
.mat__list { display: grid; gap: 8px; }
.mat__item {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 6px 8px;
  border-radius: 8px; background: #fff; text-align: center;
  font-size: 18px; font-weight: 700; line-height: 1.4;
}
.mat__panel--ng .mat__item { color: var(--c-soldout); font-size: 20px; }
.mat__item--slot { border: 2px dashed var(--c-line); color: var(--c-gray); font-size: 13px; font-weight: 400; }
@media (min-width: 600px) {
  .mat { gap: 20px; max-width: 880px; }
  .mat__panel { padding: 24px 20px 20px; }
  .mat__head { flex-direction: row; justify-content: center; gap: 12px; font-size: 22px; }
  .mat__sign { width: 40px; height: 40px; }
  .mat__sign--ok { border-width: 6px; }
  .mat__sign--ng::before, .mat__sign--ng::after { width: 48px; height: 7px; margin: -3.5px 0 0 -24px; }
}
.usage__caution { margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--c-soldout); }
@media (min-width: 900px) {
  .usage { gap: 56px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

/* ---------- 6. 商品 ---------- */
.product {
  display: grid; gap: 24px;
  max-width: 960px; margin: 0 auto;
  padding: 16px; border: 1px solid var(--c-line); border-radius: var(--r-card); background: #fff;
}
.product > *, .genre > * { min-width: 0; }
.product__img { aspect-ratio: 1 / 1; }
.product__body { padding: 0 4px 8px; }
.product__kind { font-size: 14px; font-weight: 700; color: var(--c-brand); }
.product__name { font-size: 26px; font-weight: 900; line-height: 1.4; }
.sizes { margin: 20px 0 20px; padding: 0; border: 0; min-width: 0; display: grid; gap: 10px; }
.sizes__legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--c-gray); }
.sizes__item {
  display: grid; grid-template-columns: 22px 48px 1fr; align-items: center; gap: 10px;
  min-height: 60px; padding: 8px 16px;
  border: 2px solid var(--c-line); border-radius: var(--r-card); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.sizes__item input { width: 20px; height: 20px; margin: 0; accent-color: var(--c-brand); }
.sizes__item:has(input:checked) { border-color: var(--c-brand); background: var(--c-pale); }
.sizes__item:has(input:focus-visible) { outline: 3px solid #8DB8E8; outline-offset: 2px; }
.sizes__vol { font-size: 20px; font-weight: 900; }
.sizes__price { font-size: 22px; font-weight: 700; white-space: nowrap; }
.sizes__price small { font-size: 13px; font-weight: 400; margin-left: 2px; }
.stock {
  margin-top: 16px; padding: 16px; border-radius: var(--r-card);
  background: var(--c-ng-pale);
}
.stock__msg { font-weight: 700; color: var(--c-soldout); margin-bottom: 12px; }
.btn--line { background: #fff; color: var(--c-brand); box-shadow: inset 0 0 0 2px var(--c-brand); }
.btn--line:hover { background: var(--c-brand); color: #fff; }
.product__note { margin-top: 10px; font-size: 13px; color: var(--c-gray); }
@media (min-width: 900px) {
  .product { grid-template-columns: 1fr 1fr; gap: 48px; padding: 24px; align-items: center; }
  .product__body { padding: 0 24px 0 0; }
}

/* ---------- 7. コラム（横に流れるスライダー） ---------- */
.sec--column .sec-head { margin-bottom: 32px; }
.marquee { overflow: hidden; }
.marquee__track { display: flex; gap: 20px; width: max-content; padding: 4px 0; }
.marquee.is-running .marquee__track { animation: marquee var(--marquee-dur, 40s) linear infinite; }
.marquee.is-running:hover .marquee__track,
.marquee.is-running:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 10px)); } }
.col-card { flex: none; width: 260px; }
.col-card a { display: block; color: var(--c-ink); text-decoration: none; }
.col-card__img { aspect-ratio: 3 / 2; }
.col-card__date { display: block; margin-top: 10px; font-size: 13px; color: var(--c-gray); }
.col-card__title { display: block; font-weight: 700; line-height: 1.6; }
.col-card a:hover .col-card__title { color: var(--c-brand); text-decoration: underline; }
@media (min-width: 900px) { .col-card { width: 300px; } }

/* ---------- 8. お問い合わせ ---------- */
.contact { position: relative; text-align: center; }
.contact__title { font-size: clamp(24px, 6vw, 32px); font-weight: 900; }
.contact__text { margin: 12px auto 28px; max-width: 32em; }
.contact__illust { margin: 0 auto 12px; }

/* ---------- 9. フッター ---------- */
.footer { position: relative; z-index: 1; color: #fff; }
.wave--footer { position: relative; display: block; height: 40px; background: var(--c-mist); }
.wave--footer path { fill: var(--c-brand-dark); }
@media (min-width: 900px) { .wave--footer { height: 64px; } }
.footer__body { background: var(--c-brand-dark); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); margin-top: -1px; }
.footer__inner { display: grid; gap: 32px; }
.footer__kind { margin-top: 4px; font-size: 13px; opacity: .85; }
.footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
.footer__head { font-size: 13px; font-weight: 700; opacity: .7; margin-bottom: 8px; }
.footer__col li + li { margin-top: 6px; }
.footer__col a { color: #fff; text-decoration: none; font-size: 14px; line-height: 1.7; }
.footer__col--wide { grid-column: 1 / -1; }
.footer__col--wide ul { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer__col--wide li + li { margin-top: 0; }
.footer__col a:hover { text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.25);
  font-size: 13px; opacity: .85;
}
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 2.4fr; gap: 48px; }
  .footer__nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__col--wide { grid-column: auto; }
  .footer__col--wide ul { display: block; }
  .footer__col--wide li + li { margin-top: 6px; }
}

/* ---------- ページトップ ---------- */
.pagetop {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--c-brand); font-size: 12px; font-weight: 700;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.pagetop.is-show { opacity: 1; visibility: visible; }
.pagetop__illust { width: 56px; height: 56px; background: #fff; }
.pagetop__label { padding: 0 8px; border-radius: var(--r-pill); background: #fff; }

/* ---------- 動きを止める ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee { overflow-x: auto; }
}

/* ---------- 準備中ページ ---------- */
.stub { padding-top: var(--header-h); }
.stub__inner { min-height: 50vh; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.stub .sec { background: var(--c-mist); --wave: var(--c-mist); }
