/* =========================================================
   Zenso: design language
   Washi paper, sumi ink, one vermilion seal. Generous ma (間).
   ========================================================= */
:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --sand: #e6dfcf;
  --ink: #1d1b18;
  --ink-2: #2b2824;
  --text: #2f2c27;
  --muted: #706a5f;
  --line: rgba(29, 27, 24, 0.14);
  --shu: #b8432f;            /* vermilion, as in a hanko seal */
  --moss: #5d6b4f;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --max: 1180px;
  --slow: cubic-bezier(.22, .61, .36, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 .22 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--text);
  background-color: var(--paper);
  background-image: var(--grain);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.25; margin: 0 0 .6em; letter-spacing: .005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--shu); }
.jp, [lang="ja"] { font-family: var(--serif); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 4px; }

.eyebrow {
  font-size: .78rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem; display: flex; align-items: center; gap: .8em;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow .jp { color: var(--shu); font-size: 1.1rem; letter-spacing: 0; }

/* ---------- Seal (hanko) ---------- */
.seal {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  background: var(--shu); color: #f7efe4; font-family: var(--serif); font-size: 22px; line-height: 1;
  border-radius: 6px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px rgba(247,239,228,.35);
  filter: url(#brush);
}
.seal-sm { width: 24px; height: 24px; font-size: 14px; border-radius: 4px; margin-left: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 2rem; font: 500 1rem var(--sans); letter-spacing: .06em;
  text-decoration: none; border: 1px solid var(--ink); cursor: pointer;
  transition: background .5s var(--slow), color .5s var(--slow);
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: transparent; color: var(--ink); }
.btn-link { text-decoration: none; font-weight: 500; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .4s; }
.btn-link:hover { border-color: var(--shu); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .6s var(--slow), box-shadow .6s var(--slow); }
.site-header.scrolled { background: rgba(243,239,230,.9); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-enso { width: 34px; height: 34px; }
.brand-enso path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; filter: url(#brush); }
.brand-text { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; line-height: 1; display: flex; flex-direction: column; }
.brand-sub { font-family: var(--sans); font-size: .56rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.nav-menu { display: flex; align-items: center; gap: 2.4rem; }
.nav-menu a { text-decoration: none; font-size: .92rem; letter-spacing: .08em; color: var(--text); position: relative; }
.nav-menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--shu); transition: right .6s var(--slow); }
.nav-menu a:hover::after { right: 0; }
.nav-menu .nav-cta { border: 1px solid var(--ink); padding: .5rem 1.1rem; }
.nav-menu .nav-cta::after { display: none; }
.nav-menu .nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .4s var(--slow); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Hero / garden ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; background: var(--sand); background-image: var(--grain); overflow: hidden; padding: 120px 0 90px; touch-action: pan-y; }
.garden {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 30%, #000 58%);
          mask-image: linear-gradient(to right, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 30%, #000 58%);
}
.hero-inner { position: relative; z-index: 1; pointer-events: none; }
.hero-inner a, .hero-inner .btn { pointer-events: auto; }
.hero h1, .hero .lead, .hero-cta, .hero .eyebrow { max-width: 560px; }
.lead { font-size: 1.12rem; color: var(--text); }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 2rem; margin-top: 2.4rem; }
.garden-hint { margin-top: 3.5rem; font-family: var(--serif); font-size: .9rem; color: var(--muted); letter-spacing: .05em; }
.js .hero-inner > * { opacity: 0; transform: translateY(10px); animation: rise 1.4s var(--slow) forwards; }
.js .hero-inner > *:nth-child(2) { animation-delay: .15s; }
.js .hero-inner > *:nth-child(3) { animation-delay: .35s; }
.js .hero-inner > *:nth-child(4) { animation-delay: .55s; }
.js .hero-inner > *:nth-child(5) { animation-delay: 1.2s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: 140px 0; position: relative; }
.section-head { max-width: 620px; margin-bottom: 80px; }
.section-head p:last-child { color: var(--muted); }
.section-ink { background: var(--ink); color: #cfc8ba; background-image: var(--grain); }
.section-ink h2, .section-ink h3 { color: #f1ebdf; }
.section-ink .eyebrow, .section-ink .section-head p:last-child { color: #a39b8c; }
.section-sand { background: var(--paper-2); padding: 90px 0; }

/* Intro: ma (empty space) + asymmetry */
.intro { padding: 170px 0; overflow: hidden; }
.intro-inner { position: relative; }
.intro-copy { max-width: 640px; margin-left: auto; margin-right: 6%; position: relative; }
.watermark {
  position: absolute; left: -2%; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: clamp(14rem, 30vw, 26rem); line-height: 1; color: var(--ink); opacity: .05;
  user-select: none; pointer-events: none;
}
.big { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.7; color: var(--ink); }
.motto { margin-top: 2.5rem; font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; color: var(--shu); }

/* Services: editorial list, ruled lines */
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 80px; }
.service { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; padding: 36px 0; border-top: 1px solid var(--line); position: relative; }
.service::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--shu); transition: width 1s var(--slow); }
.service:hover::before { width: 100%; }
.service .num { font-family: var(--serif); color: var(--shu); font-size: .95rem; padding-top: .35rem; }
.service h3 { margin-bottom: .4em; }
.service p { grid-column: 2; color: var(--muted); margin: 0; }

/* Principles: vertical kanji */
.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px; }
.principle { display: flex; flex-direction: column; gap: 28px; }
.principle .kanji {
  writing-mode: vertical-rl; font-size: 2.6rem; line-height: 1.1; color: #f1ebdf; letter-spacing: .15em;
  height: 6.4rem; align-self: flex-start; padding-left: 14px; border-left: 1px solid rgba(208,112,91,.5);
}
.principle h3 { font-size: 1.35rem; margin-bottom: .5em; }
.principle h3 span { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: #d0705b; margin-top: .45em; }
.principle p { font-size: .95rem; margin: 0; }

/* Process: enso cycle */
.cycle {
  display: grid; grid-template-columns: 1fr 380px 1fr; grid-template-rows: auto auto auto;
  grid-template-areas: ". a ." "d e b" ". c ."; gap: 24px 48px; align-items: center;
}
.cycle-steps { display: contents; list-style: none; }
.cycle-enso { grid-area: e; position: relative; aspect-ratio: 1; }
.cycle-enso svg { width: 100%; height: 100%; overflow: visible; }
.enso-main, .enso-body, .enso-dry { fill: none; stroke: var(--ink); stroke-linecap: round; filter: url(#brush); }
.enso-main { stroke-width: 6.5; }
.enso-body { stroke-width: 13; stroke-dasharray: .62 1; }   /* heavy where the brush lands, thinning as ink runs dry */
.enso-dry { stroke-width: 2; opacity: .4; stroke-dasharray: .05 .02 .5 .03 .2 1; }
.enso-mask { fill: none; stroke: #fff; stroke-width: 30; stroke-linecap: round; stroke-dasharray: 1.02; stroke-dashoffset: 0; }
.js .enso-mask { stroke-dashoffset: 1.02; }
.js .cycle-enso.visible .enso-mask { transition: stroke-dashoffset 2.8s cubic-bezier(.55,.05,.35,1) .2s; stroke-dashoffset: 0; }
.cycle-center { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; }
.jp-vert { writing-mode: vertical-rl; font-size: 2.2rem; color: var(--shu); letter-spacing: .2em; }
.cycle-label { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.cstep { max-width: 300px; }
.cstep .kn { font-family: var(--serif); color: var(--shu); font-size: 1.5rem; display: block; margin-bottom: .2rem; }
.cstep h3 { margin-bottom: .35em; }
.cstep p { color: var(--muted); margin: 0; font-size: .97rem; }
.cstep-1 { grid-area: a; justify-self: center; text-align: center; }
.cstep-2 { grid-area: b; }
.cstep-3 { grid-area: c; justify-self: center; text-align: center; }
.cstep-4 { grid-area: d; justify-self: end; text-align: right; }

/* Industries */
.industries { text-align: center; }
.industries .eyebrow { justify-content: center; }
.industries .eyebrow::before { display: none; }
.industry-line { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 2; color: var(--ink); max-width: 960px; margin: 0 auto; }
.industry-line i { font-style: normal; color: var(--shu); padding: 0 .35em; }

/* Breath */
.breath { padding: 150px 24px; display: grid; place-items: center; text-align: center; overflow: hidden; }
.breath-circle {
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,67,47,.14), rgba(184,67,47,.03) 65%, transparent 70%);
  border: 1px solid rgba(184,67,47,.25);
  animation: breathe 10s ease-in-out infinite;
}
.breath-text { position: relative; height: 1.6em; width: 100%; margin: 2.4rem 0 .6rem; font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.breath-text span { position: absolute; inset: 0; animation: 10s ease-in-out infinite; }
.breath-text .in { animation-name: say-in; }
.breath-text .out { animation-name: say-out; }
.breath-line { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2.1rem); color: var(--ink); margin: 0; }
@keyframes breathe { 0%, 100% { transform: scale(.55); } 45%, 55% { transform: scale(1); } }
@keyframes say-in { 0%, 40% { opacity: 1; } 48%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes say-out { 0%, 42% { opacity: 0; } 52%, 90% { opacity: 1; } 98%, 100% { opacity: 0; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: start; }
.contact-copy p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 2.8rem 0 0; display: grid; gap: 22px; }
.contact-list li { display: flex; flex-direction: column; }
.contact-list span { font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.contact-list a { text-decoration: none; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.contact-list a:hover { color: var(--shu); }
.contact-form { display: grid; gap: 30px; padding-top: 10px; }
.field { display: grid; gap: 2px; }
.field label { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.opt { text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  font: 1.05rem var(--sans); color: var(--ink); background: transparent; width: 100%;
  border: 0; border-bottom: 1px solid rgba(29,27,24,.3); border-radius: 0; padding: .6rem 0;
  transition: border-color .5s var(--slow);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--shu); }
.field.invalid input, .field.invalid textarea { border-bottom-color: var(--shu); border-bottom-width: 2px; }
.form-foot { display: flex; align-items: center; gap: 24px; }
.seal-stamp { width: 52px; height: 52px; font-size: 28px; opacity: 0; transform: rotate(-8deg) scale(1.8); }
.seal-stamp.stamped { animation: stamp .6s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes stamp { to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.form-status { margin: 0; min-height: 1.6em; font-size: .95rem; }
.form-status.ok { color: var(--moss); }
.form-status.err { color: var(--shu); }

/* Footer */
.site-footer { background: var(--ink); background-image: var(--grain); color: #a39b8c; padding: 70px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand strong { font-family: var(--serif); font-weight: 500; color: #f1ebdf; font-size: 1.15rem; }
.footer-brand p { margin: 0; font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-nav a { text-decoration: none; font-size: .9rem; letter-spacing: .06em; }
.footer-nav a:hover { color: #f1ebdf; }
.copyright { width: 100%; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid rgba(241,235,223,.1); font-size: .82rem; }

/* Reveal: like ink settling into paper */
.js .reveal { opacity: 0; filter: blur(5px); transform: translateY(14px); transition: opacity 1.3s var(--slow), filter 1.3s var(--slow), transform 1.3s var(--slow); }
.js .reveal.visible { opacity: 1; filter: none; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .hero-inner > * { opacity: 1; filter: none; transform: none; transition: none; animation: none; }
  .js .enso-mask { stroke-dashoffset: 0; transition: none; }
  .breath-circle, .breath-text span { animation: none; }
  .breath-text .out { opacity: 0; }
  .seal-stamp.stamped { animation: none; opacity: 1; transform: rotate(-6deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .principles { grid-template-columns: repeat(3, 1fr); row-gap: 64px; }
  .cycle { grid-template-columns: 1fr 300px 1fr; gap: 24px 32px; }
}
@media (max-width: 860px) {
  .section { padding: 100px 0; }
  .services { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 64px; }
  .intro-copy { margin-right: 0; }
  .principles { grid-template-columns: 1fr 1fr; }
  .cycle { grid-template-columns: 1fr; grid-template-areas: none; gap: 40px; }
  .cycle-enso { grid-area: auto; width: min(260px, 70%); justify-self: center; }
  .cycle-steps { display: grid; gap: 40px; padding: 0; margin: 0; }
  .cstep { grid-area: auto !important; justify-self: start !important; text-align: left !important; max-width: none;
           display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; }
  .cstep .kn { grid-row: span 2; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 78px; left: 0; right: 0; display: none; flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--paper); background-image: var(--grain); padding: 12px 24px 28px; box-shadow: 0 1px 0 var(--line);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 14px 0; font-size: 1.05rem; }
  .nav-menu .nav-cta { margin-top: 12px; padding: .7rem 1.3rem; }
  .site-header:has(.nav-menu.open) { background: var(--paper); }
  .hero { align-items: flex-start; padding: 130px 0 290px; }
  .garden { -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.2) 0%, rgba(0,0,0,.3) 50%, #000 72%); mask-image: linear-gradient(to bottom, rgba(0,0,0,.2) 0%, rgba(0,0,0,.3) 50%, #000 72%); }
  .garden-hint { margin-top: 2.5rem; }
  .intro { padding: 110px 0; }
  .watermark { top: 0; transform: none; left: auto; right: -10%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .principles { grid-template-columns: 1fr; row-gap: 56px; }
  .principle { flex-direction: row; gap: 24px; }
  .principle .kanji { font-size: 2.1rem; height: auto; }
  .section-head { margin-bottom: 56px; }
  .breath { padding: 110px 24px; }
}
