/* クロツグミ焙煎所（自主制作・架空のサービス）
   ③＝①（明るい・写真・明朝）とも②（明るい・高彩度・図形・丸ゴシック）とも違う方向：
   暗い地・写真主導・極太見出し（Dela Gothic One）＋細長い欧文（Oswald）・非対称の雑誌型。配色は自作。 */

:root {
  --bg: #14110F;        /* ほぼ黒 */
  --surface: #1F1A16;   /* 焦げ茶の黒 */
  --surface-2: #2A231D;
  --cream: #EFE6D8;     /* 生成りの文字（地に対し約15:1） */
  --muted: #A89A89;     /* 弱い文字（約6.7:1） */
  --copper: #E07A3F;    /* 差し色（地に対し約6.2:1） */
  --copper-dark: #C4632C;
  --line: rgba(239, 230, 216, 0.14);
  --display: "Dela Gothic One", "Hiragino Kaku Gothic StdN", sans-serif;
  --latin: "Oswald", "Helvetica Neue", sans-serif;
  --sans: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans); font-size: 15px; line-height: 1.9; letter-spacing: .04em; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--copper); }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.3; }
p { margin: 0; }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.latin { font-family: var(--latin); letter-spacing: .08em; }

/* 0. 架空サービスの表示帯（線6） */
.fiction-bar { background: var(--surface); color: var(--copper); border-bottom: 1px solid var(--line); font-size: 12px; text-align: center; padding: 6px 16px; line-height: 1.6; }

/* ヘッダー（ヒーローの上に重ねる） */
.site-header { position: absolute; left: 0; right: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-name { display: grid; line-height: 1.15; }
.brand-name strong { font-family: var(--display); font-size: 17px; font-weight: 400; white-space: nowrap; }
.brand-name small { font-family: var(--latin); font-size: 10px; letter-spacing: .3em; color: var(--muted); }
.header-nav { display: none; gap: 26px; font-family: var(--latin); font-size: 13px; letter-spacing: .16em; }
.header-nav a { color: var(--cream); text-decoration: none; opacity: .85; }
.header-nav a:hover { color: var(--copper); opacity: 1; }
.site-header--solid { position: static; background: var(--bg); border-bottom: 1px solid var(--line); }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--copper); color: var(--bg); font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-decoration: none; border: 0; padding: 16px 30px; cursor: pointer; white-space: nowrap; transition: background .2s; }
.btn::after { content: "→"; font-family: var(--latin); }
.btn:hover { background: var(--copper-dark); }
.btn--line { background: transparent; color: var(--cream); border: 1px solid var(--cream); }
.btn--line:hover { background: rgba(239,230,216,.08); }
.btn--small { padding: 9px 16px; font-size: 13px; }
.btn--small::after { content: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* 1. ヒーロー（画面いっぱいの写真） */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; padding: 140px 0 56px; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,17,15,.55) 0%, rgba(20,17,15,.15) 40%, rgba(20,17,15,.92) 100%); }
.hero .container { position: relative; }
.hero-kicker { font-family: var(--latin); font-size: 13px; letter-spacing: .4em; color: var(--copper); margin-bottom: 14px; }
.hero h1 { font-family: var(--display); font-size: clamp(46px, 13vw, 128px); line-height: 1.08; letter-spacing: .02em; }
.hero-lead { margin: 22px 0 28px; max-width: 30em; color: var(--cream); }

/* 2. 流れる文字の帯 */
.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee span { font-family: var(--latin); font-size: clamp(22px, 5vw, 40px); letter-spacing: .1em; padding: 14px 28px; white-space: nowrap; color: var(--cream); }
.marquee span.ja { font-family: var(--display); font-size: clamp(16px, 3.4vw, 24px); color: var(--copper); align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* セクション共通：大きな番号＋英字 */
section { padding: 88px 0; position: relative; }
.chapter { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 6px 18px; margin-bottom: 40px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.chapter .no { font-family: var(--latin); font-size: clamp(56px, 14vw, 120px); line-height: .85; color: var(--copper); grid-row: span 2; }
.chapter .en { font-family: var(--latin); font-size: 13px; letter-spacing: .35em; color: var(--muted); }
.chapter h2 { font-family: var(--display); font-size: clamp(24px, 6vw, 40px); }
.bg-surface { background: var(--surface); }

/* 写真が幕を引くように現れる */
.wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.7,0,.2,1); }
.wipe.is-visible { clip-path: inset(0 0 0 0); }

/* 3. 焙煎所のこと（写真と文字をずらして重ねる） */
.story { display: grid; gap: 24px; }
.story-photo { aspect-ratio: 1 / 1; overflow: hidden; }
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-text { background: var(--surface-2); padding: 28px 24px; position: relative; }
.story-text h3 { font-family: var(--display); font-size: clamp(22px, 5.4vw, 34px); margin-bottom: 16px; }
.story-text p + p { margin-top: 12px; }
.story-text .sign { margin-top: 18px; font-family: var(--latin); letter-spacing: .3em; font-size: 12px; color: var(--muted); }

/* 4. 今月の豆（横スクロールのレール） */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -16px 0 18px; }
.rail-head p { color: var(--muted); font-size: 13px; }
.fiction-tag { display: inline-block; border: 1px solid var(--copper); color: var(--copper); font-size: 12px; padding: 2px 10px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { height: 6px; } .rail::-webkit-scrollbar-thumb { background: var(--copper); }
.bean { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); padding: 24px 22px; display: grid; gap: 14px; align-content: start; transition: border-color .3s, transform .3s; }
.bean.is-pick { border-color: var(--copper); transform: translateY(-4px); }
.bean .roast-name { font-family: var(--latin); font-size: 12px; letter-spacing: .3em; color: var(--muted); }
.bean h3 { font-family: var(--display); font-size: 26px; }
.bean .origin { font-size: 13px; color: var(--muted); }
.notes { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.notes li { border: 1px solid var(--line); font-size: 12px; padding: 2px 10px; }
.gauge { display: grid; gap: 6px; }
.gauge-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.gauge-bar i { height: 6px; background: var(--surface-2); }
.gauge-bar i.on { background: var(--copper); }
.gauge-label { display: flex; justify-content: space-between; font-family: var(--latin); font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.bean-price { display: grid; gap: 0; font-family: var(--latin); font-size: 26px; letter-spacing: .04em; }
.bean-price small { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-right: 4px; }
.bean .btn { justify-self: start; }
.shipping { margin-top: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 2px; }

/* 5. 豆診断 */
.quiz { display: grid; gap: 22px; }
.quiz fieldset { border: 1px solid var(--line); padding: 20px; margin: 0; }
.quiz legend { font-family: var(--display); font-size: 20px; padding: 0 8px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; text-align: center; border: 1px solid var(--line); padding: 14px 10px; cursor: pointer; font-weight: 700; transition: background .2s, border-color .2s; }
.choice input:checked + span { background: var(--copper); color: var(--bg); border-color: var(--copper); }
.choice input:focus-visible + span { outline: 2px solid var(--copper); outline-offset: 3px; }
.quiz-result { display: none; border-left: 4px solid var(--copper); background: var(--surface-2); padding: 20px 22px; }
.quiz-result.is-shown { display: block; }
.quiz-result strong { display: block; font-family: var(--display); font-size: 28px; color: var(--copper); margin: 4px 0 8px; }
.quiz-note { font-size: 12px; color: var(--muted); }

/* 6. 定期便 */
.plans { display: grid; gap: 16px; }
.plan { border: 1px solid var(--line); padding: 26px 24px; display: grid; gap: 10px; }
.plan .en { font-family: var(--latin); font-size: 12px; letter-spacing: .3em; color: var(--copper); }
.plan h3 { font-family: var(--display); font-size: 24px; }
.plan .price { font-family: var(--latin); font-size: 44px; line-height: 1.1; }
.plan .price small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 6px; }
.plan ul { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.plan-notes { margin-top: 16px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.plan-notes .fiction { color: var(--copper); font-weight: 700; }

/* 7. スタンド */
.stand { display: grid; gap: 24px; align-items: stretch; }
.stand-photo { min-height: 280px; overflow: hidden; }
.stand-photo img { width: 100%; height: 100%; object-fit: cover; }
.hours { display: grid; gap: 0; border-top: 1px solid var(--line); }
.hours div { display: grid; grid-template-columns: 5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.hours dt { font-family: var(--latin); letter-spacing: .2em; color: var(--muted); font-size: 13px; }
.hours dd { margin: 0; font-family: var(--latin); font-size: clamp(26px, 7vw, 40px); letter-spacing: .04em; line-height: 1.2; }
.hours dd small { font-family: var(--sans); font-size: 13px; color: var(--muted); display: block; letter-spacing: .04em; }
.stand-info { margin-top: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }

/* 8. FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--latin); font-size: 28px; color: var(--copper); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* 9. 最後のCTA（写真を背景に） */
.final-cta { position: relative; padding: 120px 0; overflow: hidden; text-align: center; }
.final-cta .bg { position: absolute; inset: 0; }
.final-cta .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.final-cta .container { position: relative; }
.final-cta h2 { font-family: var(--display); font-size: clamp(32px, 9vw, 72px); line-height: 1.15; margin-bottom: 18px; }
.final-cta p { color: var(--cream); margin-bottom: 28px; }
.final-cta .btn-row { justify-content: center; }

/* 10. フッター */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 90px; font-size: 13px; color: var(--muted); }
.footer-links { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--cream); }
.footer-note { border-top: 1px solid var(--line); padding-top: 18px; line-height: 1.8; }

/* スマホ：画面の下に固定の購入ボタン */
.buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 16px; background: rgba(20,17,15,.94); border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .3s; }
.buy-bar.is-shown { transform: none; }
.buy-bar p { font-size: 12px; color: var(--muted); line-height: 1.4; }
.buy-bar p strong { display: block; color: var(--cream); font-size: 13px; }

/* 下層（ダミーページ） */
.sub-page { padding: 48px 0 80px; }
.sub-page .container { max-width: 760px; }
.sub-page h1 { font-family: var(--display); font-size: clamp(26px, 7vw, 40px); margin-bottom: 24px; }
.sub-page h2 { font-family: var(--display); font-size: 20px; margin: 30px 0 8px; }
.sub-page p, .sub-page li { color: var(--muted); }
.dummy-notice { border: 1px solid var(--copper); color: var(--copper) !important; padding: 14px 18px; margin-bottom: 28px; font-size: 14px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table th, .info-table td { border-bottom: 1px solid var(--line); padding: 14px 10px; text-align: left; vertical-align: top; }
.info-table th { width: 34%; color: var(--cream); font-weight: 700; }
.info-table td { color: var(--muted); }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.cart-item strong { font-family: var(--display); font-weight: 400; font-size: 18px; }
.cart-item .p { font-family: var(--latin); font-size: 22px; }
.cart-total { display: flex; justify-content: space-between; padding: 18px 0; font-family: var(--latin); font-size: 26px; }
.form { display: grid; gap: 18px; border: 1px solid var(--line); padding: 24px 20px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.form input, .form select, .form textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); color: var(--cream); }
.form .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.form-result { display: none; border-left: 4px solid var(--copper); background: var(--surface-2); padding: 14px 18px; font-weight: 700; margin-top: 16px; }
.form-result.is-shown { display: block; }
.back-link { display: inline-block; margin-top: 30px; }

/* ふわっと表示 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wipe { clip-path: none; transition: none; }
  .marquee-track { animation: none; }
  .bean { transition: none; }
}

@media (max-width: 400px) {
  .brand-name strong { font-size: 15px; }
  .brand img { width: 30px; height: 30px; }
}

/* PC */
@media (min-width: 768px) {
  section { padding: 128px 0; }
  .header-nav { display: flex; }
  .hero { padding-bottom: 80px; }
  .story { grid-template-columns: repeat(12, 1fr); gap: 0; align-items: center; }
  .story-photo { grid-column: 1 / 8; grid-row: 1; }
  .story-text { grid-column: 7 / 13; grid-row: 1; padding: 48px 44px; margin-top: 120px; }
  .rail { grid-auto-columns: calc((100% - 48px) / 4); }
  .quiz { grid-template-columns: 1fr 1fr; }
  .quiz-result { grid-column: 1 / -1; }
  .plans { grid-template-columns: 1fr 1fr; }
  .stand { grid-template-columns: 7fr 5fr; gap: 48px; }
  .buy-bar { display: none; }
  .site-footer { padding-bottom: 44px; }
}
