/* ==========================================================================
   helium.wine
   数値は現行サイト (Studio) の CSS 実測値を基準にしている。SPEC.md 参照。
   ========================================================================== */

:root {
  --c-text: #333;
  --c-muted: #6b6b6b;
  --c-bg: #fff;
  --c-line: #e6e6e6;
  --c-placeholder: #f2f2f2;

  --f-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --f-body: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, serif;

  --fs-body: 14px;
  --fs-lead: 15px;
  --fs-title: 36px;

  --gutter: 24px;
  --container: 1080px;
  --section-pad: 96px;
  --header-h: 60px;
  --card-w: 320px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

@media (max-width: 480px) {
  :root {
    --fs-body: 12px;
    --fs-lead: 12px;
    --fs-title: 32px;
    --section-pad: 64px;
    --card-w: 78vw;
  }
}

/* ---- reset ---- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: 500 var(--fs-body) / 2 var(--f-body);
  letter-spacing: .15em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--c-text); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: #fff;
}
.skip-link:focus { top: 8px; }

/* PC だけ改行し、スマホは自然折り返しに任せる */
@media (max-width: 480px) { .br-pc { display: none; } }

/* ---- header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
}
/* ぼかしは擬似要素に持たせる。header 自体に backdrop-filter を置くと
   position: fixed の子（スマホの全画面メニュー）の包含ブロックになってしまう */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header__logo {
  position: relative;
  z-index: 31;
  font: 400 16px / 1 var(--f-display);
  letter-spacing: .1em;
  padding: 12px 0;
}

.site-nav ul { display: flex; align-items: center; gap: 28px; }

.site-nav a {
  display: inline-block;
  padding: 8px 0;
  font: 400 14px / 1 var(--f-display);
  letter-spacing: .1em;
  transition: opacity .2s var(--ease);
}
.site-nav a:hover { opacity: .6; }

.site-nav__sns a { display: inline-flex; padding: 6px; }
.site-nav__sns svg { width: 18px; height: 18px; }

.menu-toggle {
  display: none;
  position: relative;
  z-index: 31;
  width: 44px; height: 44px;
  margin-right: -10px;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  left: 12px;
  width: 20px; height: 1px;
  background: var(--c-text);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.menu-toggle span { top: 50%; }
.menu-toggle span::before { left: 0; top: -6px; }
.menu-toggle span::after { left: 0; top: 6px; }
html.nav-open .menu-toggle span { background: transparent; }
html.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
html.nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .97);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
  }
  html.nav-open .site-nav { opacity: 1; visibility: visible; }
  html.nav-open { overflow: hidden; }

  .site-nav ul { flex-direction: column; gap: 32px; text-align: center; }
  .site-nav a { font-size: 20px; }
  .site-nav__sns svg { width: 24px; height: 24px; }
}

/* ---- hero ---- */

.hero {
  padding: 40px var(--gutter) 24px;
  text-align: center;
}

.hero__img {
  width: min(300px, 75vw);
  margin: 0 auto;
  /* 現行サイトのキービジュアルと同じフェードイン（1200ms、ease-in 系のカーブ） */
  animation: hero-in 1.2s cubic-bezier(.95, .05, .795, .035) both;
}
@keyframes hero-in { from { opacity: 0; } }

.hero__lead {
  max-width: 640px;
  margin: 32px auto 0;
  font-size: var(--fs-lead);
  line-height: 2;
}
.hero__lead [lang="en"] { display: block; margin-bottom: 1.6em; }

/* ---- sections ---- */

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter) 0;
  text-align: center;
}

.section__title {
  font: 400 var(--fs-title) / 1.3 var(--f-display);
  letter-spacing: .1em;
  margin-bottom: 48px;
}

.section__text {
  max-width: 640px;
  margin: 48px auto 0;
  line-height: 2;
}
.section__text p + p { margin-top: 2em; }
.section__text--error { font-size: 12px; color: var(--c-muted); }

/* ---- about ---- */

.about__img {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: 0 auto;
  background: var(--c-placeholder);
}

/* ---- schedule ---- */

.schedule { max-width: none; padding-left: 0; padding-right: 0; }

.band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  overflow: hidden;
  background: #3a3a4a;
}
.band__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .18);
}
.band .section__title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .4);
}
@media (max-width: 480px) { .band { height: 160px; } }

.schedule__list {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
}
.schedule__list > .section__text { margin-top: 0; }

.schedule__note {
  margin-top: 1.5em;
  font-size: 12px;
  color: var(--c-muted);
}
.schedule__note a { border-bottom: 1px solid currentColor; }

.sched { padding: 28px 0; border-top: 1px solid var(--c-line); }
.sched:last-child { border-bottom: 1px solid var(--c-line); }

.sched__btn { display: block; width: 100%; transition: opacity .2s var(--ease); }
.sched__btn:hover { opacity: .65; }

.sched__date {
  display: block;
  font: 400 14px / 1.6 var(--f-display);
  letter-spacing: .1em;
}
.sched__time { margin-left: .6em; }
.sched__title { display: block; margin-top: 8px; font-size: 15px; }
.sched__place, .sched__lead { display: block; font-size: 12px; color: var(--c-muted); }

.sched__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  border-bottom: 1px solid currentColor;
}

/* ---- cards (Wine / Laboratory 共通) ---- */

.cards--grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 36px;
}
@media (max-width: 900px) { .cards--grid { grid-template-columns: repeat(3, 1fr); gap: 28px 20px; } }
@media (max-width: 600px) { .cards--grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; } }

.card {
  display: block;
  width: 100%;
  text-align: center;
  transition: opacity .25s var(--ease);
}
.card:hover { opacity: .75; }

.card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--c-placeholder);
}
.card__img--blank { display: block; }

.card__label {
  display: block;
  margin-top: 14px;
  font: 400 12px / 1.6 var(--f-display);
  letter-spacing: .15em;
  color: var(--c-muted);
}
.card__name { display: block; margin-top: 6px; font-size: 13px; line-height: 1.8; }
.card__lead { display: block; margin-top: 4px; font-size: 11px; line-height: 1.8; color: var(--c-muted); }

.card__badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  font: 400 10px / 1 var(--f-display);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-muted);
  border: 1px solid var(--c-line);
}

/* ---- carousel ---- */

.carousel-wrap {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
}

.cards--carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter);
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cards--carousel::-webkit-scrollbar { display: none; }
.cards--carousel .card { flex: 0 0 var(--card-w); scroll-snap-align: start; }
.cards--carousel > .section__text { flex: 1 0 100%; margin: 0; }

.carousel__arrow {
  position: absolute;
  top: calc(var(--card-w) / 2 + 4px);
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
  transition: opacity .2s var(--ease);
}
.carousel__arrow svg { width: 18px; height: 18px; }
.carousel__arrow--prev { left: 2px; }
.carousel__arrow--next { right: 2px; }
.carousel__arrow:disabled { opacity: 0; pointer-events: none; }

/* 矢印はマウス操作の端末で、かつ横にはみ出す量があるときだけ出す */
@media (hover: hover) and (pointer: fine) {
  .carousel-wrap--scrollable .carousel__arrow { display: flex; }
}

/* ---- modal ---- */

.modal {
  border: 0;
  padding: 0;
  margin: auto;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  background: #fff;
  color: var(--c-text);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.modal::backdrop { background: rgba(20, 20, 20, .6); }
.modal[open] { animation: modal-in .25s var(--ease); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
}
.modal__close svg { width: 18px; height: 18px; }

.modal__body {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px 24px 40px;
  text-align: center;
}

.modal__img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 auto 24px;
  background: var(--c-placeholder);
}

.modal__gallery { display: grid; gap: 8px; margin-bottom: 24px; }
.modal__gallery--1 { max-width: 480px; margin-left: auto; margin-right: auto; }
.modal__gallery--2 { grid-template-columns: 1fr 1fr; }
.modal__gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--c-placeholder);
}

.modal__meta {
  font: 400 12px / 1.8 var(--f-display);
  letter-spacing: .1em;
  color: var(--c-muted);
}
.modal__title { margin-top: 6px; font-size: 16px; line-height: 1.8; }
.modal__lead { margin-top: 12px; }
.modal__text {
  max-width: 560px;
  margin: 20px auto 0;
  text-align: left;
  line-height: 2;
}
.modal__link {
  display: inline-block;
  margin-top: 24px;
  font-size: 12px;
  border-bottom: 1px solid currentColor;
}

/* モーダル表示中の背景スクロール固定。iOS Safari は overflow: hidden だけでは止まらないため body を fixed にする */
html.is-locked { overflow: hidden; }
html.is-locked body {
  position: fixed;
  left: 0; right: 0;
  overflow: hidden;
}

/* ---- follow / footer ---- */

.follow .section__title { font-size: 24px; }

.sns { display: flex; justify-content: center; gap: 56px; }
.sns a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: opacity .2s var(--ease);
}
.sns a:hover { opacity: .6; }
.sns svg { width: 30px; height: 30px; }
.sns span { font: 400 13px / 1 var(--f-display); letter-spacing: .1em; }
.sns small { font-size: 11px; line-height: 1; letter-spacing: .1em; color: var(--c-muted); }

.site-footer {
  padding: 96px var(--gutter) 40px;
  text-align: center;
  font: 400 10px / 1 var(--f-display);
  letter-spacing: .1em;
  color: var(--c-muted);
}
