/* 白斑とともに — responsive site styles (mobile-first, desktop ≥ 880px) */
:root {
  --cream: #F4F0E5;
  --cream-deep: #EAE7D6;
  --surface: #FCFAF2;
  --ink: #2E3328;
  --ink-soft: #6E7363;
  --clay: #4F7A56;        /* primary sage green */
  --clay-deep: #3A5C41;
  --gold: #C68A3E;        /* warm accent */
  --moss: #4F7A56;
  --green: #4F7A56;        /* alias used by media.css */
  --green-deep: #3A5C41;   /* alias used by media.css */
  --line: rgba(46,51,40,0.13);
  --serif: "Shippori Mincho", serif;
  --sans: "Zen Kaku Gothic New", sans-serif;
  --wrap: 1140px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--cream); color: var(--ink); line-height: 1.55; overflow-x: hidden; line-break: strict; }
.nobr { white-space: nowrap; }
img { display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: clamp(24px, 6vw, 40px); padding-right: clamp(24px, 6vw, 40px); }

/* ===== top bar ===== */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .45s ease, box-shadow .45s ease; }
.navbar { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: .06em; color: #fff; transition: color .45s ease; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; background: var(--gold); transform: rotate(-12deg); }
.nav-links { display: none; }
.nav-cta { display: none; }
.menu { display: flex; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.menu span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: background .45s ease; }
.topbar.scrolled { background: rgba(252,250,242,0.9); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.topbar.scrolled .brand { color: var(--ink); }
.topbar.scrolled .menu span { background: var(--ink); }
.topbar.scrolled .nav-links a { color: var(--ink); }

/* ===== hero ===== */
.hero { position: relative; min-height: 86vh; overflow: hidden; display: flex; align-items: flex-end; }
.hero__img { position: absolute; inset: -8% 0 0 0; width: 100%; height: 116%; object-fit: cover; object-position: 50% 22%; will-change: transform; transform: scale(1.02); animation: kenburns 26s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02) translateY(0);} to { transform: scale(1.06) translateY(-8px);} }
@media (prefers-reduced-motion: reduce) { .hero__img { animation: none; } }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(34,40,28,0.34) 0%, rgba(34,40,28,0.04) 32%, rgba(34,40,28,0.08) 55%, rgba(34,40,28,0.74) 100%); }
.hero__content { position: relative; z-index: 2; width: 100%; padding-bottom: 84px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 13px; font-size: 12px; letter-spacing: .26em; color: rgba(255,255,255,.95); margin-bottom: 22px; font-weight: 500; text-shadow: 0 1px 14px rgba(40,24,10,.6); }
.hero__eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--gold); flex-shrink: 0; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(33px, 10.5vw, 90px); line-height: 1.14; color: #fff; letter-spacing: .02em; text-shadow: 0 2px 26px rgba(40,24,10,.4); white-space: nowrap; }
.hero h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(17px, 4.6vw, 26px); color: rgba(255,255,255,.95); margin-top: 16px; line-height: 1.6; text-wrap: balance; }

.scrollcue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 7px; color: rgba(255,255,255,.85); }
.scrollcue .line { width: 1px; height: 30px; background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,0)); animation: cuedrop 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cuedrop { 0%,100%{ transform: scaleY(.4); opacity:.5;} 50%{ transform: scaleY(1); opacity:1; } }
.scrollcue span { font-size: 9px; letter-spacing: .28em; }

/* ===== intro ===== */
.intro { position: relative; z-index: 5; margin-top: -58px; }
.intro__card { background: var(--surface); border-radius: 5px; padding: 36px 28px 32px; box-shadow: 0 24px 50px -24px rgba(40,46,24,.3); max-width: 760px; }
.rule { width: 34px; height: 2px; background: var(--clay); margin-bottom: 20px; }
.intro__lead { font-family: var(--serif); font-size: clamp(15px, 2.4vw, 19px); line-height: 2.05; color: var(--ink); }
.intro__lead .drop { float: left; font-family: var(--serif); font-size: 52px; line-height: .82; padding: 6px 11px 0 0; color: var(--clay); font-weight: 700; }
.btns { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 620px) { .btns .btn { flex: 1 1 100%; } }
.btn { text-align: center; padding: 15px 26px; font-weight: 700; font-size: 15px; border-radius: 3px; cursor: pointer; transition: transform .12s ease, background .2s ease; user-select: none; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--clay); color: #fff; box-shadow: 0 8px 20px -8px rgba(58,92,65,.7); flex: 1; min-width: 150px; }
.btn--primary:active { background: var(--clay-deep); }
.btn--ghost { border: 1.5px solid var(--clay); color: var(--clay-deep); flex: 1; min-width: 150px; }
.source { margin-top: 20px; display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--ink-soft); }
.source .star { color: var(--gold); font-style: normal; }

/* ===== section heads ===== */
.sec { padding: 64px 0 56px; }
.kicker { font-size: 10px; letter-spacing: .34em; color: var(--clay); font-weight: 700; margin-bottom: 12px; }
.sec h3 { font-family: var(--serif); font-weight: 700; font-size: clamp(25px, 4vw, 38px); line-height: 1.4; color: var(--ink); text-wrap: balance; }
.sec h3 .sub { display: block; font-size: clamp(13px, 1.8vw, 16px); font-weight: 500; color: var(--ink-soft); margin-top: 10px; letter-spacing: .02em; }

/* ===== gallery ===== */
.gallery-wrap { background: var(--cream-deep); padding: 56px 0 52px; overflow: hidden; }
.gal-hint { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-soft); letter-spacing: .14em; margin-top: 14px; }
.gal-hint .sw { animation: swipehint 1.6s ease-in-out infinite; }
@keyframes swipehint { 0%,100%{ transform: translateX(0);} 50%{ transform: translateX(6px);} }
.gallery { display: flex; gap: 14px; padding: 24px 22px 8px; overflow-x: auto; scroll-snap-type: x mandatory; cursor: grab; scrollbar-width: none; max-width: var(--wrap); margin: 0 auto; }
.gallery::-webkit-scrollbar { height: 0; }
.gallery.drag { cursor: grabbing; }
.gal-item { position: relative; flex: 0 0 78%; scroll-snap-align: center; border-radius: 4px; overflow: hidden; aspect-ratio: 3/4; box-shadow: 0 16px 36px -18px rgba(40,46,24,.5); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gal-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 18px 16px; background: linear-gradient(transparent, rgba(28,34,18,.82)); color: #fff; }
.gal-item .gc-jp { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.gal-item .gc-en { font-size: 9px; letter-spacing: .26em; opacity: .8; margin-top: 5px; }

/* ===== figures ===== */
.figures { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 52px 0 50px; }
.fig-grid { display: block; }
.fig-row { display: flex; align-items: baseline; gap: 16px; padding: 17px 0; border-top: 1px solid var(--line); }
.fig-row:first-child { border-top: none; }
.fig-n { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 6vw, 48px); color: var(--ink); line-height: 1; min-width: 150px; }
.fig-l { font-size: 13px; color: var(--ink-soft); line-height: 1.55; white-space: pre-line; }
.fig-src { margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 11px; color: var(--ink-soft); }

/* ===== for you / accordion ===== */
.qa-list { margin-top: 26px; }
.qa { border-bottom: 1px solid var(--line); }
.qa__head { display: flex; align-items: center; gap: 14px; padding: 22px 4px; cursor: pointer; user-select: none; }
.qa__q { font-family: var(--serif); font-weight: 700; font-size: clamp(18px, 2.6vw, 23px); color: var(--ink); flex: 1; }
.qa__n { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--clay); flex-shrink: 0; }
.qa__chev { width: 22px; height: 22px; flex-shrink: 0; position: relative; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.qa__chev::before, .qa__chev::after { content: ""; position: absolute; top: 50%; width: 11px; height: 1.8px; background: var(--clay); border-radius: 2px; }
.qa__chev::before { left: 0; transform: rotate(45deg); }
.qa__chev::after { right: 0; transform: rotate(-45deg); }
.qa.open .qa__chev { transform: rotate(180deg); }
.qa__body { max-height: 0; overflow: hidden; transition: max-height .45s cubic-bezier(.3,.8,.3,1); }
.qa__inner { padding: 0 38px 24px 38px; }
.qa__a { font-size: 14px; color: var(--ink-soft); line-height: 1.9; max-width: 640px; }
.qa__cta { display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--clay); border-bottom: 1.5px solid var(--clay); padding-bottom: 2px; cursor: pointer; }

/* ===== message ===== */
.message { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.message__quote { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.message__qmark { width: 34px; flex-shrink: 0; font-family: var(--serif); font-size: 40px; line-height: .8; color: var(--clay); font-weight: 700; }
.message__sub { font-family: var(--serif); font-size: 14px; line-height: 1.75; color: var(--ink-soft); padding-top: 10px; }
.message__body { font-family: var(--serif); font-size: clamp(15px, 2.2vw, 19px); line-height: 2.05; color: var(--ink); margin: 0; text-wrap: pretty; max-width: 720px; }
.message__sign { margin-top: 18px; font-family: var(--serif); font-size: 13.5px; color: var(--clay-deep); font-weight: 600; }

/* ===== steps ===== */
.step-list { margin-top: 8px; }
.step { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step__n { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 16px; color: var(--clay); width: 26px; flex-shrink: 0; }
.step__t { font-family: var(--serif); font-weight: 700; font-size: clamp(16px, 2.4vw, 20px); color: var(--ink); display: flex; align-items: center; gap: 10px; }
.badge { font-size: 9px; letter-spacing: .1em; color: var(--ink-soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 2px; font-family: var(--sans); font-weight: 500; }
.step__d { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-top: 5px; }
.step__go { margin-left: auto; align-self: center; color: var(--clay); font-size: 20px; flex-shrink: 0; }

/* ===== closing ===== */
.closing { position: relative; min-height: 360px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.closing img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.closing__scrim { position: absolute; inset: 0; background: linear-gradient(rgba(34,40,28,.4), rgba(34,40,28,.64)); }
.closing__txt { position: relative; z-index: 2; color: #fff; padding: 0 30px; }
.closing__txt p { font-family: var(--serif); font-size: clamp(22px, 4.6vw, 40px); line-height: 1.7; font-weight: 500; text-shadow: 0 2px 20px rgba(30,18,6,.5); }

/* ===== footer ===== */
.footer { background: var(--ink); color: #E7E4D4; padding: 52px 0 40px; }
.footer__en { font-size: 9.5px; letter-spacing: .34em; color: rgba(231,228,212,.5); margin-bottom: 14px; }
.footer__brand { font-family: var(--serif); font-weight: 700; font-size: 28px; margin-bottom: 16px; }
.footer p { font-family: var(--serif); font-size: 13.5px; color: rgba(231,228,212,.72); line-height: 1.95; max-width: 320px; }
.footer__mail { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; font-weight: 500; color: #E7E4D4; text-decoration: none; border-bottom: 1px solid rgba(231,228,212,.4); padding-bottom: 3px; transition: color .2s ease, border-color .2s ease; }
.footer__mail:hover { color: #fff; border-color: #fff; }
.footer__mail span.lbl { font-size: 10px; letter-spacing: .18em; color: rgba(231,228,212,.55); margin-right: 2px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; }
.footer__nav a { color: rgba(231,228,212,.78); font-size: 13px; text-decoration: none; }
.footer__nav a:hover { color: #fff; }
.footer__copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(231,228,212,.18); font-size: 10px; letter-spacing: .08em; color: rgba(231,228,212,.45); }

/* ===== reveal ===== */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { animation: omRevealUp .8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes omRevealUp { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.in { opacity: 1; transform: none; animation: none; } }

/* Japanese-aware wrapping for headings — break at natural phrase boundaries, never mid-word */
.hero h2, .sec h3, .sec-head h2, .page-hero h1, .sec-title, .article h1,
.feature__title, .story__quote, .pattern__name, .kard h3, .figband__l,
.fs-chapter__t, .fs-close h2, .qa__q, .commu__card h3, .cls__card h3,
.aitem__t, .topic__t, .bcat__t, .epempty {
  word-break: auto-phrase;
  line-break: strict;
}

/* ===== toast ===== */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); background: rgba(46,51,40,.95); color: #fff; font-size: 13px; padding: 12px 22px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease; z-index: 80; font-weight: 500; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   DESKTOP  (≥ 880px)
   ========================================================= */
@media (min-width: 880px) {
  .navbar { height: 76px; }
  .menu { display: none; }
  .nav-links { display: flex; gap: 18px; align-items: center; flex-wrap: nowrap; }
  .nav-links a { color: rgba(255,255,255,.94); text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; transition: color .45s ease, opacity .2s ease; }
  .nav-links a:hover { opacity: .7; }
  .nav-cta { display: inline-block; background: var(--clay); color: #fff; padding: 11px 22px; border-radius: 3px; font-weight: 700; font-size: 14px; text-decoration: none; }
  .topbar.scrolled .nav-cta { background: var(--clay); color: #fff; }

  .hero { min-height: 100vh; }
  .hero__content { padding-bottom: 120px; }
  .hero__content .wrap { display: block; }
  .hero h2 { max-width: 30ch; }

  .intro { margin-top: -80px; }
  .intro__card { padding: 48px 56px 44px; }
  .intro__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
  .intro__lead { margin: 0; }
  .intro__aside { border-left: 1px solid var(--line); padding-left: 40px; }
  .btns { margin-top: 0; flex-direction: column; }
  .btn { flex: none; }

  /* figures: 4 across */
  .fig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .fig-row { display: block; border-top: none; border-top: 3px solid var(--ink); padding: 16px 0 0; }
  .fig-row .fig-n { min-width: 0; }
  .fig-l { margin-top: 10px; }

  /* gallery: 4-up grid */
  .gallery { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; cursor: default; padding: 28px 22px 8px; }
  .gal-item { flex: none; }
  .gal-hint { display: none; }

  /* for you: 2 columns */
  .qa-list { columns: 2; column-gap: 56px; }
  .qa { break-inside: avoid; }

  /* steps: 2 columns */
  .step-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }

  .closing { min-height: 460px; }
  .footer__top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
}

@media (min-width: 880px) {
  .sec { padding: 96px 0 84px; }
  .gallery-wrap { padding: 84px 0 76px; }
  .figures { padding: 80px 0 76px; }
}
