:root {
  --font-head: 'Shippori Mincho', 'Noto Serif TC', serif;
  --font-body: 'Zen Kaku Gothic New', 'Noto Sans TC', sans-serif;
  --font-latin: 'Cormorant Garamond', serif;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Visual directions ---------- */
html[data-direction="sumi"] {        /* 墨 — ink black */
  --bg: #0b110d;
  --bg-2: #0f1812;
  --panel: #101a13;
  --ink: #edf1e9;
  --ink-soft: rgba(237, 241, 233, 0.60);
  --ink-faint: rgba(237, 241, 233, 0.30);
  --accent: #95c184;
  --accent-deep: #6fa15e;
  --line: rgba(237, 241, 233, 0.14);
  --hair: rgba(237, 241, 233, 0.09);
  --field-bg: rgba(237, 241, 233, 0.035);
  --glow: rgba(149, 193, 132, 0.16);
}
html[data-direction="washi"] {       /* 霧 — washi paper light */
  --bg: #f3efe5;
  --bg-2: #ece6d7;
  --panel: #f7f3ea;
  --ink: #1b271d;
  --ink-soft: rgba(27, 39, 29, 0.64);
  --ink-faint: rgba(27, 39, 29, 0.34);
  --accent: #2f6b46;
  --accent-deep: #245438;
  --line: rgba(27, 39, 29, 0.16);
  --hair: rgba(27, 39, 29, 0.10);
  --field-bg: rgba(27, 39, 29, 0.035);
  --glow: rgba(176, 141, 87, 0.20);
}
html[data-direction="koke"] {        /* 苔 — deep forest */
  --bg: #11241a;
  --bg-2: #16301f;
  --panel: #173324;
  --ink: #e9f2e4;
  --ink-soft: rgba(233, 242, 228, 0.66);
  --ink-faint: rgba(233, 242, 228, 0.34);
  --accent: #aed79e;
  --accent-deep: #84b873;
  --line: rgba(233, 242, 228, 0.16);
  --hair: rgba(233, 242, 228, 0.10);
  --field-bg: rgba(233, 242, 228, 0.045);
  --glow: rgba(174, 215, 158, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 9vw; }
@media (max-width: 640px) { .wrap { padding: 0 28px; } }

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--font-latin);
  font-size: clamp(13px, 1.05vw, 16px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 16px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.jp-tag {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.5em;
  color: var(--ink-faint);
  font-weight: 400;
}

h2.section-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.25;
  letter-spacing: 0.06em;
}

.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
.mt-22 { margin-top: 22px; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.subtitle-jp {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 0.42em;
  letter-spacing: 0.4em;
  color: var(--ink-faint);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 18%, var(--glow) 0%, transparent 52%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.hero-watermark {
  position: absolute;
  top: 50%;
  right: -4vw;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 58vh;
  line-height: 0.8;
  color: var(--ink);
  opacity: 0.045;
  writing-mode: vertical-rl;
  letter-spacing: 0.02em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.hero-rings {
  position: absolute;
  right: 6vw;
  top: 50%;
  width: 46vh;
  height: 46vh;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 28%, var(--hair) 28% 28.4%, transparent 28.4%),
    radial-gradient(circle at center, transparent 0 40%, var(--hair) 40% 40.4%, transparent 40.4%),
    radial-gradient(circle at center, transparent 0 50%, var(--hair) 50% 50.4%, transparent 50.4%);
  pointer-events: none;
  opacity: 0.85;
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero-slogan {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(46px, 8.5vw, 104px);
  line-height: 1.08;
  letter-spacing: 0.04em;
  margin: 30px 0 0;
}
.hero-slogan .accent,
.hero-slogan .cms-accent,
.section-title .cms-accent,
.lead .cms-accent,
.story-cols .cms-accent,
.story-quote .cms-accent {
  color: var(--accent);
}
.hero-intro {
  margin-top: 34px;
  max-width: 30em;
  font-size: clamp(15px, 1.35vw, 18px);
  color: var(--ink-soft);
  line-height: 2.05;
  font-weight: 300;
}
.scroll-cue {
  position: absolute;
  bottom: 42px;
  left: 9vw;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-latin);
  letter-spacing: 0.34em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 2;
}
.scroll-cue .bar { position: relative; width: 1px; height: 46px; background: var(--line); overflow: hidden; }
.scroll-cue .bar::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--accent); animation: drip 2.4s var(--ease) infinite;
}
@keyframes drip { 0% { top: -50%; } 60%,100% { top: 100%; } }
@media (max-width: 640px) { .scroll-cue { left: 28px; } }

/* ---------- FEATURES ---------- */
section.block { position: relative; padding: clamp(96px, 14vh, 180px) 0; }
.section-head { max-width: 640px; margin-bottom: 76px; }
.section-head h2 { margin-top: 22px; }
.section-head .lead {
  margin-top: 24px; color: var(--ink-soft); font-size: clamp(15px, 1.3vw, 18px); line-height: 2.0; font-weight: 300;
}

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.feature {
  padding: 52px 40px 56px 0;
  border-right: 1px solid var(--hair);
}
.feature:last-child { border-right: none; padding-right: 0; }
.feature:not(:first-child) { padding-left: 44px; }
.feature .num {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.feature h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(21px, 2vw, 27px);
  letter-spacing: 0.05em;
  margin: 26px 0 8px;
  line-height: 1.4;
}
.feature .romaji {
  font-family: var(--font-latin); font-style: italic; font-size: 16px; color: var(--ink-faint); letter-spacing: 0.08em;
}
.feature p { margin-top: 20px; color: var(--ink-soft); font-size: 15.5px; line-height: 2.0; font-weight: 300; }
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .feature { border-right: none; border-bottom: 1px solid var(--hair); padding: 40px 0 !important; }
  .feature:last-child { border-bottom: none; }
}

/* ---------- BREWING ---------- */
.brew { background: var(--bg-2); transition: background 0.6s var(--ease); }
.brew-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}
.brew-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.spec { background: var(--bg-2); padding: 34px 30px; }
.spec .label {
  font-family: var(--font-latin); text-transform: uppercase; letter-spacing: 0.28em; font-size: 11.5px; color: var(--ink-faint);
}
.spec .jp { font-family: var(--font-head); font-size: 13px; color: var(--ink-soft); letter-spacing: 0.3em; margin-top: 4px; }
.spec .value {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(30px, 3.4vw, 44px); margin-top: 14px; line-height: 1; letter-spacing: 0.02em;
}
.spec .value small { font-size: 0.46em; font-weight: 400; color: var(--ink-soft); margin-left: 4px; letter-spacing: 0.04em; }
.spec.full { grid-column: 1 / -1; }
.brew-note p { color: var(--ink-soft); font-size: clamp(15px, 1.3vw, 18px); line-height: 2.05; font-weight: 300; margin-top: 24px; }
.brew-note p:first-of-type { margin-top: 32px; }
.brew-note .pull {
  font-family: var(--font-head); font-weight: 500; color: var(--ink); font-size: clamp(19px, 1.9vw, 26px); line-height: 1.7; letter-spacing: 0.04em;
}
@media (max-width: 860px) { .brew-grid { grid-template-columns: 1fr; } }

/* ---------- CTA / FORM ---------- */
.cta { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.cta-watermark {
  position: absolute; bottom: -8vh; left: -3vw;
  font-family: var(--font-head); font-weight: 800; font-size: 40vh; line-height: 0.8;
  color: var(--ink); opacity: 0.04; user-select: none; pointer-events: none;
}
.cta-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(48px, 7vw, 100px); }
.cta-copy .lead { margin-top: 26px; color: var(--ink-soft); font-size: clamp(15px, 1.3vw, 18px); line-height: 2.1; font-weight: 300; max-width: 26em; }
.cta-copy .marks { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.cta-copy .marks span { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: 15px; }
.cta-copy .marks span::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex: none; }

form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-latin); text-transform: uppercase; letter-spacing: 0.22em; font-size: 12px; color: var(--ink-soft); font-weight: 500;
}
.field label .req { color: var(--accent); margin-left: 4px; }
.field input, .field select, .field textarea {
  background: var(--field-bg);
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  padding: 13px 4px;
  letter-spacing: 0.02em;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.field select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 14px) 19px, calc(100% - 9px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field select option { background-color: var(--panel); color: var(--ink); font-size: 15px; }
.field select option:disabled { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); background: var(--field-bg); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field .error { font-family: var(--font-body); font-size: 12.5px; color: #e2766a; min-height: 1px; letter-spacing: 0.02em; opacity: 0; transition: opacity 0.2s; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-bottom-color: #e2766a; }
.field.invalid .error { opacity: 1; }

.submit-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 8px; }
button.submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.16em;
  padding: 17px 42px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
button.submit:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 14px 34px -16px var(--glow); }
.privacy { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.03em; }
.form-success {
  grid-column: 1 / -1; display: none; align-items: flex-start; gap: 18px; padding: 30px 32px;
  border: 1px solid var(--accent); background: var(--field-bg);
}
.form-success.show { display: flex; }
.form-success .mk { font-family: var(--font-head); color: var(--accent); font-size: 30px; line-height: 1; }
.form-success h4 { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: 0.04em; }
.form-success p { color: var(--ink-soft); font-size: 14.5px; margin-top: 8px; line-height: 1.9; font-weight: 300; }
@media (max-width: 720px) { form { grid-template-columns: 1fr; } .cta-grid { grid-template-columns: 1fr; } }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 48px 0; }
.foot-grid { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.foot-brand { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: 0.16em; }
.foot-brand span { font-family: var(--font-latin); font-style: italic; color: var(--ink-faint); font-size: 16px; margin-left: 12px; letter-spacing: 0.1em; }
.foot-note { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.06em; }

/* ---------- IMAGE GALLERY ---------- */
image-slot { display: block; width: 100%; background: var(--field-bg); transition: background 0.6s var(--ease); }
.tone-garden {
  --image-filter: saturate(0.92) contrast(0.98) brightness(0.96);
  --image-overlay: linear-gradient(180deg, rgba(17,36,26,0.03), rgba(17,36,26,0.08));
  --image-position: center 42%;
}
.tone-leaf {
  --image-filter: saturate(0.96) contrast(1) brightness(1);
  --image-overlay: transparent;
}
.tone-cup {
  --image-filter: saturate(0.82) contrast(0.96) brightness(0.98);
  --image-overlay: transparent;
}
.tone-story {
  --image-filter: saturate(0.9) contrast(0.98) brightness(0.96);
  --image-overlay: linear-gradient(180deg, rgba(17,36,26,0.02), rgba(17,36,26,0.06));
  --image-position: center 48%;
}
.gallery { padding-top: 0; }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 48px; }
.gallery-head h2 { margin-top: 18px; }
.gallery-head .note { color: var(--ink-soft); font-size: 14.5px; font-weight: 300; max-width: 24em; line-height: 1.95; }
.gallery-grid { display: grid; grid-template-columns: 1.25fr 0.9fr 0.9fr; gap: 20px; }
.gallery-grid figure { margin: 0; }
.gallery-grid figure:nth-child(2), .gallery-grid figure:nth-child(3) { align-self: end; }
.gallery-grid image-slot { border: 1px solid var(--line); }
.gallery-grid figcaption { margin-top: 16px; display: flex; align-items: baseline; gap: 12px; }
.gallery-grid figcaption .jp { font-family: var(--font-head); font-weight: 500; font-size: 17px; letter-spacing: 0.1em; color: var(--ink); }
.gallery-grid figcaption .romaji { font-family: var(--font-latin); font-style: italic; font-size: 14px; color: var(--ink-faint); letter-spacing: 0.06em; }
@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid figure:first-child { grid-column: 1 / -1; }
  .gallery-grid figure:nth-child(2), .gallery-grid figure:nth-child(3) { align-self: stretch; }
}
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ---------- STORY (long-form) ---------- */
.story { background: var(--bg-2); transition: background 0.6s var(--ease); }
.story-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(44px, 6vw, 92px); align-items: start; }
.story-figure { position: sticky; top: 64px; }
.story-figure image-slot { border: 1px solid var(--line); }
.story-figure figcaption { margin-top: 16px; font-family: var(--font-latin); font-style: italic; font-size: 14px; color: var(--ink-faint); letter-spacing: 0.05em; }
.story-body .lead {
  font-family: var(--font-head); font-weight: 400; font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.85; letter-spacing: 0.03em; color: var(--ink); margin-top: 30px;
}
.story-body .lead .drop {
  float: left; font-family: var(--font-head); font-weight: 600; color: var(--accent);
  font-size: 3.4em; line-height: 0.82; padding: 6px 14px 0 0;
}
.story-cols { columns: 2; column-gap: 48px; margin-top: 36px; }
.story-cols p { color: var(--ink-soft); font-size: 15.5px; line-height: 2.05; font-weight: 300; margin-bottom: 18px; break-inside: avoid; }
.story-cols p strong { color: var(--ink); font-weight: 500; }
.story-quote {
  margin: 48px 0 0; padding: 34px 0 0; border-top: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 500; font-size: clamp(21px, 2.4vw, 31px);
  line-height: 1.6; letter-spacing: 0.04em; color: var(--ink);
}
.story-quote .mark { color: var(--accent); }
.story-quote cite { display: block; margin-top: 20px; font-family: var(--font-latin); font-style: italic; font-size: 15px; color: var(--ink-faint); letter-spacing: 0.06em; }
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-figure { position: static; }
  .story-cols { columns: 1; }
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .scroll-cue .bar::after { animation: none; }
}

#tweaks-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
}

.tweaks-panel {
  width: min(280px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.tweaks-panel h3 {
  font-family: var(--font-latin);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.tweak-section {
  margin-top: 14px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.tweak-control {
  border: 0;
  margin-top: 8px;
}

.tweak-control legend {
  color: var(--ink-soft);
  font-size: 12px;
  margin-bottom: 8px;
}

.tweak-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tweak-options label {
  cursor: pointer;
}

.tweak-options input {
  position: absolute;
  opacity: 0;
}

.tweak-options span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.tweak-options input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
}
