/* ==========================================================
   たべごよみ — 紹介ページ
   更紙（ざら紙）の地に、暦の格子と伝票。差し色は卵黄の山吹、判は朱
   ========================================================== */

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

:root {
  --paper:     #F4F2EE;
  --paper-2:   #EAE6DE;
  --card:      #FFFDF9;
  --ink:       #1D1B18;
  --muted:     #6B6660;
  --dim:       #8B857C;
  --line:      #DCD7CE;
  --line-soft: rgba(29, 27, 24, 0.08);
  --yolk:      #F0B400;
  --yolk-soft: #FBE9B4;
  --yolk-deep: #8A6A00;
  --seal:      #C2452D;

  --font-head: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;

  --radius: 14px;
  --header-h: 62px;
  --frame: #26231F;
}

html { scroll-behavior: smooth; background: var(--paper); }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, var(--line-soft) 31px 32px),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="en"] body { line-height: 1.75; }
html[lang="en"] .hero-title, html[lang="en"] .section-title, html[lang="en"] .cta-title { letter-spacing: 0; }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--yolk-deep); }
.nb { white-space: nowrap; display: inline-block; }

.container { width: min(1080px, 100% - 40px); margin: 0 auto; }
.container-narrow { width: min(760px, 100% - 40px); }
.section { padding: 92px 0; position: relative; }

.section-label {
  font-size: 13px; font-weight: 700; letter-spacing: .18em; color: var(--yolk-deep);
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.section-label::before { content: ""; width: 26px; height: 2px; background: var(--yolk); }

.section-title {
  font-family: var(--font-head); font-weight: 800; letter-spacing: .04em;
  font-size: clamp(26px, 4.4vw, 40px); line-height: 1.5; margin-bottom: 44px;
  text-wrap: balance;
}

/* ========== ヘッダー ========== */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(244, 242, 238, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: 0 2px 16px rgba(29, 27, 24, .07); }
.header-inner {
  width: min(1080px, 100% - 32px); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 19px; letter-spacing: .08em; }

.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--muted); padding: 7px 13px; line-height: 1;
}
.lang-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ========== ヒーロー ========== */
.hero { position: relative; padding: 68px 0 84px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(560px 420px at 76% 22%, rgba(240, 180, 0, .20), transparent 70%),
    radial-gradient(420px 380px at 8% 90%, rgba(240, 180, 0, .10), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(29, 27, 24, .05) 63px 64px),
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(29, 27, 24, .05) 63px 64px);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  width: min(1080px, 100% - 40px); margin: 0 auto;
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--yolk-deep);
  border: 1px solid var(--yolk); background: var(--yolk-soft);
  padding: 5px 12px; margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-head); font-weight: 800; letter-spacing: .04em;
  font-size: clamp(30px, 5.6vw, 52px); line-height: 1.42; margin-bottom: 20px;
}
.hero-sub { color: var(--muted); font-size: 15.5px; margin-bottom: 26px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--dim); line-height: 1.8; }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badges-center { justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--ink); color: var(--paper); border-radius: 10px; padding: 10px 18px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29, 27, 24, .18); }
.badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.badge-text small { font-size: 10px; opacity: .78; letter-spacing: .04em; }
.badge-text strong { font-size: 17px; font-weight: 700; letter-spacing: .02em; }

/* 端末の枠 */
/* 画像そのものに端末の枠が写っているので、ここでは枠を描かず影だけ添える */
.phone-frame { width: 100%; max-width: 300px; margin: 0 auto; }
.phone-frame img { width: 100%; border-radius: 30px; box-shadow: 0 18px 40px rgba(29, 27, 24, .20); }
.phone-sm { max-width: 250px; }
.phone-xs { max-width: 172px; }

/* ========== 課題 → 解決 ========== */
.problem { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.problem-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px 24px; position: relative;
}
/* 上辺のミシン目（伝票の切り離し） */
.problem-card::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 9px; height: 1px;
  background-image: linear-gradient(90deg, var(--line) 50%, transparent 0);
  background-size: 7px 1px; background-repeat: repeat-x;
}
.problem-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--yolk-soft); color: var(--yolk-deep); font-size: 15px; margin-bottom: 12px;
}
.problem-card h3 { font-family: var(--font-head); font-size: 17.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: .03em; }
.problem-card p { font-size: 14.5px; color: var(--muted); line-height: 1.85; }

.solution {
  margin-top: 40px; background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid var(--yolk); border-radius: var(--radius); padding: 34px 32px;
}
.solution-title { font-family: var(--font-head); font-size: clamp(21px, 3.2vw, 28px); font-weight: 800; letter-spacing: .04em; margin-bottom: 14px; }
.solution-body { color: var(--muted); font-size: 15.5px; }

/* ========== 機能 ========== */
.feature-row {
  display: grid; grid-template-columns: 290px 1fr; gap: 42px; align-items: center;
  padding: 34px 0; border-bottom: 1px dashed var(--line);
}
.feature-row:nth-child(odd) .feature-media { order: 2; }
.feature-row:nth-child(odd) .feature-copy { order: 1; }
.feature-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em;
  padding: 4px 11px; margin-bottom: 12px; border: 1px solid currentColor;
}
.tag-yolk { color: var(--yolk-deep); background: var(--yolk-soft); }
.tag-ink { color: var(--ink); background: rgba(29, 27, 24, .05); }
.tag-seal { color: var(--seal); background: rgba(194, 69, 45, .07); }
.feature-copy h3 { font-family: var(--font-head); font-size: clamp(19px, 2.7vw, 24px); font-weight: 800; letter-spacing: .03em; margin-bottom: 10px; line-height: 1.55; }
.feature-copy p { color: var(--muted); font-size: 15px; }

.feature-extra { margin-top: 40px; }
.feature-extra h3 { font-family: var(--font-head); font-size: 17px; letter-spacing: .1em; margin-bottom: 14px; color: var(--muted); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
}

/* ========== はじめかた ========== */
.how { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.step {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 18px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
}
.step-num {
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--seal); color: var(--seal);
  font-family: var(--font-head); font-weight: 800; font-size: 19px; line-height: 1;
}
.step-body h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: .03em; margin-bottom: 6px; }
.step-body p { color: var(--muted); font-size: 14.5px; }
.step .phone-frame img { box-shadow: 0 10px 24px rgba(29, 27, 24, .16); }

.import-note {
  margin-top: 28px; background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 24px 26px;
}
.import-note h3 { font-family: var(--font-head); font-size: 17.5px; font-weight: 700; letter-spacing: .03em; margin-bottom: 8px; }
.import-note p { color: var(--muted); font-size: 14.5px; }

/* ========== FAQ ========== */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 15.5px; font-weight: 700; color: var(--ink);
  padding: 18px 20px; line-height: 1.7;
}
.faq-arrow { flex: none; width: 10px; height: 10px; border-right: 2px solid var(--yolk-deep); border-bottom: 2px solid var(--yolk-deep); transform: rotate(45deg); transition: transform .2s ease; margin-top: -4px; }
.faq-q[aria-expanded="true"] .faq-arrow { transform: rotate(-135deg); margin-top: 4px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--muted); font-size: 14.5px; }

.contact { margin-top: 30px; background: var(--yolk-soft); border: 1px solid var(--yolk); border-radius: var(--radius); padding: 24px 26px; }
.contact h3 { font-family: var(--font-head); font-size: 17.5px; font-weight: 700; letter-spacing: .03em; margin-bottom: 8px; }
.contact p { font-size: 14.5px; color: #5A4A14; }
.contact a { color: var(--yolk-deep); font-weight: 700; }

/* ========== 最終CTA ========== */
.cta { text-align: center; position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.cta-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 320px at 50% 0%, rgba(240, 180, 0, .28), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(244, 242, 238, .05) 39px 40px);
}
.cta .container { position: relative; z-index: 1; }
.cta-title { font-family: var(--font-head); font-size: clamp(24px, 4.2vw, 38px); font-weight: 800; letter-spacing: .05em; line-height: 1.5; margin-bottom: 12px; }
.cta-sub { color: rgba(244, 242, 238, .74); font-size: 15px; margin-bottom: 28px; }
.cta .store-badge { background: var(--yolk); color: #241B00; }
.cta .store-badge:hover { box-shadow: 0 8px 22px rgba(240, 180, 0, .34); }

/* ========== フッター ========== */
.site-footer { padding: 40px 0 54px; border-top: 1px solid var(--line); background: var(--paper); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 14px; }
.footer-links a { font-size: 14px; color: var(--yolk-deep); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-disclaimer { font-size: 12.5px; color: var(--dim); line-height: 1.85; margin-bottom: 10px; }
.footer-copy { font-size: 12.5px; color: var(--dim); }

/* ========== 出現アニメ ========== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ========== 画面幅ごとの調整 ========== */
@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  /* 狭い画面では、まず見出しとボタンを見せて、画面写真はその下に置く */
  .phone-frame { max-width: 244px; }
  .problem-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 22px; padding: 28px 0; }
  .feature-row:nth-child(odd) .feature-media, .feature-row:nth-child(odd) .feature-copy { order: initial; }
  .feature-media { max-width: 220px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .section { padding: 56px 0; }
  .container, .container-narrow { width: min(100% - 32px, 560px); }
  .section-title { margin-bottom: 30px; }
  .solution { padding: 26px 22px; }
  .step { grid-template-columns: 38px 1fr; gap: 14px; padding: 18px 18px; }
  .step-num { width: 36px; height: 36px; font-size: 17px; }
  .step .phone-frame { grid-column: 1 / -1; max-width: 148px; margin: 4px auto 0; }
  .faq-q { font-size: 15px; padding: 16px 16px; }
  .cta-sub { margin-bottom: 22px; }
}

@media (max-width: 400px) {
  .container, .container-narrow { width: calc(100% - 24px); }
  .brand-name { font-size: 17px; }
  .hero { padding: 48px 0 64px; }
  .phone-frame { max-width: 214px; }
}

/* ========== 夜の配色 ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171614; --paper-2: #1E1C19; --card: #201E1B;
    --ink: #EDE9E1; --muted: #9C968D; --dim: #857F76;
    --line: #38342E; --line-soft: rgba(237, 233, 225, .06);
    --yolk: #E8B84B; --yolk-soft: rgba(232, 184, 75, .14); --yolk-deep: #E8B84B;
    --seal: #D9634B; --frame: #0E0D0C;
  }
  .site-header { background: rgba(23, 22, 20, .92); }
  .lang-btn[aria-pressed="true"] { background: var(--yolk); color: #241B00; }
  .hero-bg {
    background:
      radial-gradient(560px 420px at 76% 22%, rgba(232, 184, 75, .14), transparent 70%),
      repeating-linear-gradient(90deg, transparent 0 63px, rgba(237, 233, 225, .04) 63px 64px),
      repeating-linear-gradient(0deg, transparent 0 63px, rgba(237, 233, 225, .04) 63px 64px);
  }
  .hero-eyebrow { color: var(--yolk); }
  .store-badge { background: var(--yolk); color: #241B00; }
  .cta { background: #0F0E0D; }
  .contact p { color: #D8D2C6; }
  .problem-icon { color: var(--yolk); }
}
