/* =========================================================
   0) Reset / Base
========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

:root {
  --sa-top: env(safe-area-inset-top);
  --sa-bottom: env(safe-area-inset-bottom);

  --text: #322b28;
  --text-soft: #5e534e;
  --text-soft-2: #766a65;
  --muted: #9a8d86;

  --bg: #f3ece7;
  --canvas: #fffdfc;
  --canvas-soft: #f7f1ee;
  --canvas-soft-2: #f3ece8;
  --line: rgba(72, 54, 46, 0.08);
  --line-strong: rgba(72, 54, 46, 0.14);

  --button: #6d5c57;
  --button-shadow: 0 10px 22px rgba(109, 92, 87, 0.18);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding-top: 76px;
  background: var(--canvas);
  overflow: hidden;
}

/* =========================================================
   1) Header
========================================================= */
.global-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: #fef9f9;
  padding: calc(8px + var(--sa-top)) 16px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 12px;
}

.header-logo,
.header-logo a {
  display: flex;
  align-items: center;
}

.header-logo img {
  width: auto;
  height: 48px;
}

.hamburger {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  line-height: 1;
  cursor: pointer;
}

.hamburger img {
  width: 40px;
  height: 40px;
  display: block;
}

/* =========================================================
   2) Drawer Navigation
========================================================= */
.global-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(82vw, 420px);
  background: #fff9f7;
  color: #3b3330;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1100;
  padding: calc(18px + var(--sa-top)) 20px 20px;
}

.global-nav.open {
  transform: translateX(0);
}

.nav-close {
  position: absolute;
  top: calc(10px + var(--sa-top));
  right: 12px;
  background: none;
  border: none;
  color: #3b3330;
  font-size: 28px;
  cursor: pointer;
}

.global-nav ul {
  list-style: none;
  margin-top: 44px;
  display: grid;
  gap: 18px;
}

.global-nav a {
  color: #3b3330;
  text-decoration: none;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .global-nav {
    width: 100%;
    max-width: none;
  }

  .global-nav ul {
    text-align: center;
  }
}

/* =========================================================
   3) To Top
========================================================= */
.to-top {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--sa-bottom));
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fcf7fb;
  color: #605653;
  text-decoration: none;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
}

.to-top.is-show {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-2px);
}

/* =========================================================
   4) Hero
========================================================= */
.hero {
  background: var(--canvas);
}

.hero-copy {
  padding: 34px 22px 28px;
  background: linear-gradient(180deg, #fffaf7 0%, #fbf4f1 100%);
  border-bottom: 1px solid var(--line);
}

.hero-eyebrow {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  margin-bottom: 18px;
  font-size: clamp(28px, 7.2vw, 46px);
  line-height: 1.34;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.hero-lead {
  margin-bottom: 16px;
  font-size: clamp(15px, 4.2vw, 19px);
  line-height: 1.9;
  color: #4d433f;
}

.hero-text {
  margin-bottom: 14px;
  max-width: 34em;
  font-size: 14px;
  line-height: 2;
  color: var(--text-soft);
}

.hero-text:last-of-type {
  margin-bottom: 0;
}

.hero-cta {
  margin-top: 24px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.hero-btn-primary {
  color: #fff;
  background: var(--button);
  box-shadow: var(--button-shadow);
}

.hero-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-soft-2);
}

.hero-stack {
  background: var(--canvas);
}

.hero-stack img {
  width: 100%;
}

/* =========================================================
   5) Main image/text flow
========================================================= */
.demo {
  background: var(--canvas);
}

.demo a {
  display: block;
  text-decoration: none;
}

.demo-copy,
.demo-faq,
.demo-close {
  padding: 52px 24px 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--canvas-soft-2) 0%, var(--canvas-soft) 100%);
}

.demo-copy-soft {
  background: linear-gradient(180deg, #f1e9e5 0%, #f7f1ee 100%);
}

.demo-kicker {
  margin-bottom: 14px;
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.demo-heading,
.faq-question {
  margin: 0 auto 18px;
  max-width: 12em;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  font-size: clamp(24px, 6.6vw, 42px);
  line-height: 1.72;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #84756d;
}

.demo-text,
.faq-answer {
  margin: 0 auto 14px;
  max-width: 31em;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  font-size: 15px;
  line-height: 2.12;
  letter-spacing: 0.04em;
  color: #6f635d;
}

.demo-text:last-child,
.faq-answer:last-child {
  margin-bottom: 0;
}

/* 画像と文字の一体感 */
.demo img + .demo-copy,
.demo a + .demo-copy,
.demo img + .demo-faq,
.demo-copy + img,
.demo-faq + img,
.demo-copy + a,
.demo a + img {
  margin-top: 0;
}

.demo img,
.demo a img {
  background: var(--canvas);
}

/* =========================================================
   6) FAQ
========================================================= */
.demo-faq {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-faq .demo-heading {
  margin-bottom: 26px;
  max-width: none;
}

.faq-item {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 0 24px;
  border-top: 1px solid var(--line-strong);
}

.faq-item:first-of-type {
  padding-top: 10px;
  border-top: none;
}

.faq-question {
  max-width: 13em;
  margin-bottom: 16px;
  font-size: clamp(20px, 5.5vw, 31px);
  color: #7c6e67;
}

.faq-answer {
  max-width: 34em;
}

/* =========================================================
   7) Closing block
========================================================= */
.demo-close {
  background: linear-gradient(180deg, #f3ece8 0%, #fbf7f4 100%);
}

.demo-close .demo-heading {
  max-width: none;
}

.demo-close .hero-cta {
  display: flex;
  justify-content: center;
}

/* =========================================================
   8) Desktop canvas
========================================================= */
@media (min-width: 768px) {
  .hero-copy {
    padding: 46px 38px 38px;
  }

  .hero-title {
    margin-bottom: 22px;
    max-width: 10.5em;
  }

  .hero-lead,
  .hero-text,
  .hero-note {
    max-width: 36em;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero-note {
    font-size: 13px;
  }

  .demo-copy,
  .demo-faq,
  .demo-close {
    padding: 68px 44px 72px;
  }

  .demo-kicker {
    margin-bottom: 16px;
    font-size: 12px;
  }

  .demo-heading {
    margin-bottom: 22px;
    max-width: 12.5em;
  }

  .demo-text,
  .faq-answer {
    max-width: 35em;
    font-size: 16px;
  }

  .faq-question {
    max-width: 14em;
  }
}

@media (min-width: 1024px) {
  body {
    background: var(--bg);
  }

  .page {
    max-width: 720px;
    margin: 42px auto;
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .global-header {
    max-width: 720px;
    margin: 0 auto;
    left: 0;
    right: 0;
    border-radius: 18px 18px 0 0;
  }

  .hero-copy {
    padding: 54px 46px 42px;
  }

  .demo-copy,
  .demo-faq,
  .demo-close {
    padding: 78px 56px 82px;
  }
}

@media (max-width: 480px) {
  .page {
    padding-top: 72px;
  }

  .hero-copy {
    padding: 30px 18px 26px;
  }

  .hero-title {
    font-size: clamp(27px, 7.4vw, 34px);
  }

  .hero-btn {
    width: 100%;
    max-width: 320px;
  }

  .demo-copy,
  .demo-faq,
  .demo-close {
    padding: 44px 20px 48px;
  }

  .demo-heading {
    max-width: 11em;
    font-size: clamp(23px, 7vw, 34px);
    line-height: 1.68;
  }

  .faq-question {
    max-width: 12em;
    font-size: clamp(19px, 6vw, 28px);
  }

  .demo-text,
  .faq-answer {
    font-size: 14px;
    line-height: 2.02;
    max-width: 26em;
  }
}
