/* ==========================================================================
   Shoji — wabi-sabi interior template · archesign.studio
   1. Tokens  2. Base  3. Header  4. Components  5. Pages  6. Footer  7. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --rice: #f3efe6;
  --washi: #e9e2d3;
  --sumi: #1c1b19;
  --charcoal: #3a3833;
  --moss: #6b7a4f;
  --kaki: #c8553d;
  --muted: #8a8478;

  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(18px, 3.6vw, 56px);
  --max: 1240px;
  --space: clamp(110px, 14vw, 220px);
  --ease: cubic-bezier(.33, 0, .2, 1);
  --lattice: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(28, 27, 25, .55) calc(25% - 1px) 25%),
             repeating-linear-gradient(0deg, transparent 0 calc(16.66% - 1px), rgba(28, 27, 25, .55) calc(16.66% - 1px) 16.66%);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--rice); color: var(--sumi); font: 300 16px/2 var(--font-sans); letter-spacing: .04em; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.4em; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; margin: 0; line-height: 1.3; letter-spacing: .06em; }
h4 { font-size: 13px; letter-spacing: .24em; color: var(--muted); margin-bottom: 10px; font-family: var(--font-sans); font-weight: 400; }
:focus-visible { outline: 1px solid var(--kaki); outline-offset: 4px; }
::selection { background: var(--kaki); color: var(--rice); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sumi); color: var(--rice); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space) 0; }
.muted { color: var(--muted); }
.vlabel { writing-mode: vertical-rl; font-family: var(--font-serif); font-size: 15px; letter-spacing: .5em; color: var(--muted); display: flex; align-items: center; gap: 18px; }
.vlabel::after { content: ""; width: 1px; height: 60px; background: var(--kaki); }
.dot-red { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--kaki); margin-right: 12px; vertical-align: middle; }

/* 3. Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--rice); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 96px; border-bottom: 1px solid rgba(28, 27, 25, .12); }
.logo { display: inline-flex; align-items: center; gap: 14px; font-family: var(--font-serif); font-size: 22px; letter-spacing: .14em; }
.logo small { display: block; font-family: var(--font-sans); font-size: 10px; letter-spacing: .3em; color: var(--muted); }
.hanko { width: 38px; height: 38px; border-radius: 6px; background: var(--kaki); color: var(--rice); display: grid; place-items: center; font-size: 20px; letter-spacing: 0; }
.site-nav { display: flex; gap: 46px; }
.site-nav a { font-size: 13px; letter-spacing: .26em; position: relative; padding: 6px 0; }
.site-nav a::before { content: ""; position: absolute; left: 50%; top: -10px; width: 5px; height: 5px; border-radius: 50%; background: var(--kaki); transform: translateX(-50%) scale(0); transition: transform .4s var(--ease); }
.site-nav a:hover::before, .site-nav a[aria-current="page"]::before { transform: translateX(-50%) scale(1); }
.menu-btn { display: none; }

/* 4. Components ------------------------------------------------------------ */
.btn { display: inline-flex; white-space: nowrap; align-items: center; gap: 16px; padding: 16px 34px; border: 1px solid var(--sumi); font: 400 13px var(--font-sans); letter-spacing: .26em; background: transparent; color: var(--sumi); cursor: pointer; transition: background .5s var(--ease), color .5s var(--ease); }
.btn:hover { background: var(--sumi); color: var(--rice); }
.btn::after { content: ""; width: 24px; height: 1px; background: currentColor; transition: width .5s var(--ease); }
.btn:hover::after { width: 40px; }
.lattice { position: relative; background: var(--washi); overflow: hidden; }
.lattice img { width: 100%; aspect-ratio: var(--ratio, 3 / 4); object-fit: cover; }
.lattice::after { content: ""; position: absolute; inset: 0; background: var(--lattice); opacity: .35; mix-blend-mode: multiply; transition: transform 1.2s var(--ease), opacity 1.2s; }
a:hover .lattice::after, .lattice:hover::after { transform: translateX(50%); opacity: .15; }
.plain img { width: 100%; aspect-ratio: var(--ratio, 4 / 3); object-fit: cover; }
.js .reveal { opacity: 0; transition: opacity 2s var(--ease); }
.js .reveal.is-in { opacity: 1; }

/* 5. Pages ----------------------------------------------------------------- */
/* hero */
.hero { display: grid; grid-template-columns: auto 1fr 6fr; gap: clamp(28px, 5vw, 80px); align-items: start; padding-top: clamp(40px, 6vw, 96px); }
.hero-title { writing-mode: vertical-rl; font-family: var(--font-serif); font-size: clamp(34px, 4.4vw, 64px); letter-spacing: .3em; line-height: 1.6; margin: 0; height: clamp(420px, 52vw, 680px); }
.hero-title span { color: var(--kaki); }
.hero-text { align-self: end; padding-bottom: 40px; max-width: 34ch; }
.hero-text p { color: var(--charcoal); }
.hero .lattice { --ratio: 6 / 7; }

/* ma statement */
.ma { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 140px); align-items: center; }
.ma .kanji { font-family: var(--font-serif); font-size: clamp(160px, 22vw, 320px); line-height: 1; color: var(--washi); -webkit-text-stroke: 1px var(--muted); text-align: center; }
.ma h2 { font-size: clamp(28px, 3vw, 42px); margin-bottom: 26px; }

/* scrolls */
.scrolls { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.scroll h3 { font-size: 20px; margin-top: 22px; }
.scroll p { font-size: 13px; color: var(--muted); margin: 4px 0 0; letter-spacing: .14em; }
.scroll .lattice { --ratio: 1 / 2; }
.scroll:nth-child(even) { margin-top: 90px; }
.scrolls--grid { grid-template-columns: repeat(3, 1fr); row-gap: 72px; }
.scrolls--grid .scroll:nth-child(even) { margin-top: 0; }
.scrolls--grid .scroll:nth-child(3n+2) { margin-top: 90px; }
.scrolls:has(> .scroll[hidden]) .scroll { margin-top: 0; }

/* seasons */
.seasons { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(28, 27, 25, .2); }
.seasons div { padding: 40px 28px 0 0; }
.seasons div + div { padding-left: 28px; border-left: 1px solid rgba(28, 27, 25, .12); }
.seasons b { font-family: var(--font-serif); font-weight: 500; font-size: 52px; display: block; line-height: 1; margin-bottom: 18px; }
.seasons h3 { font-size: 18px; margin-bottom: 8px; }
.seasons p { font-size: 14px; color: var(--muted); }

/* page head */
.page-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 80px); padding: clamp(56px, 8vw, 120px) 0 clamp(48px, 6vw, 96px); align-items: end; }
.page-head h1 { font-size: clamp(44px, 6vw, 92px); letter-spacing: .1em; line-height: 1.2; }
.page-head p { max-width: 52ch; color: var(--charcoal); margin-top: 24px; }
.filters { display: flex; gap: 36px; flex-wrap: wrap; margin-bottom: 72px; padding-bottom: 20px; border-bottom: 1px solid rgba(28, 27, 25, .12); }
.filters button { background: none; border: 0; font: 400 13px var(--font-sans); letter-spacing: .26em; color: var(--muted); padding: 4px 0; cursor: pointer; }
.filters button[aria-pressed="true"] { color: var(--sumi); }
.filters button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--kaki); margin-right: 10px; vertical-align: middle; }

/* scroll page */
.scroll-page { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); box-sizing: content-box; }
.scroll-page .text { font-size: 17px; }
.scroll-page h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 26px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--sumi); border-bottom: 1px solid rgba(28, 27, 25, .2); margin: 0; }
.facts div { padding: 20px 14px; }
.facts dt { font-size: 11px; letter-spacing: .26em; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-family: var(--font-serif); font-size: 18px; }
.mats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mat img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.mat h3 { font-size: 17px; margin-top: 14px; text-align: center; }
.mat p { text-align: center; font-size: 12px; color: var(--muted); margin: 0; }
.haiku { font-family: var(--font-serif); font-size: clamp(22px, 2.6vw, 32px); line-height: 2; text-align: center; color: var(--charcoal); }

/* team */
.team-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--sumi); }
.team-list li { display: grid; grid-template-columns: 2fr 2fr 3fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid rgba(28, 27, 25, .15); align-items: baseline; }
.team-list b { font-family: var(--font-serif); font-weight: 500; font-size: 22px; }
.team-list span { color: var(--muted); font-size: 14px; }

/* services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(28, 27, 25, .15); border: 1px solid rgba(28, 27, 25, .15); }
.service { background: var(--rice); padding: 48px 34px; }
.service .n { font-family: var(--font-serif); font-size: 15px; color: var(--kaki); letter-spacing: .3em; }
.service h3 { font-size: 26px; margin: 18px 0 16px; }
.service p { color: var(--charcoal); font-size: 15px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 32px 0; border-bottom: 1px solid rgba(28, 27, 25, .12); }
.steps li span { font-family: var(--font-serif); font-size: 40px; color: var(--muted); line-height: 1; }
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { color: var(--charcoal); margin: 0; }
.faq details { border-bottom: 1px solid rgba(28, 27, 25, .15); padding: 24px 0; }
.faq details:first-child { border-top: 1px solid var(--sumi); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-serif); font-size: 20px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 8px; height: 8px; margin-top: 12px; border-radius: 50%; border: 1px solid var(--sumi); transition: background .4s; }
.faq details[open] summary::after { background: var(--kaki); border-color: var(--kaki); }
.faq details p { margin: 14px 0 0; color: var(--charcoal); }

/* contact */
.contact { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(48px, 7vw, 120px); }
.form { display: grid; gap: 34px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; letter-spacing: .26em; color: var(--muted); }
.field input, .field select, .field textarea { font: 300 18px var(--font-sans); color: var(--sumi); background: transparent; border: 0; border-bottom: 1px solid rgba(28, 27, 25, .3); padding: 10px 0; border-radius: 0; appearance: none; letter-spacing: .04em; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--kaki); }
.form-note { border-left: 2px solid var(--kaki); padding: 12px 18px; margin: 0; background: var(--washi); }
.info dl { margin: 0; }
.info div { padding: 18px 0; border-bottom: 1px solid rgba(28, 27, 25, .12); }
.info dt { font-size: 12px; letter-spacing: .26em; color: var(--muted); }
.info dd { margin: 4px 0 0; font-family: var(--font-serif); font-size: 18px; }

/* 6. Footer ---------------------------------------------------------------- */
.site-footer { margin-top: var(--space); background: var(--sumi); color: var(--washi); }
.footer-inner { padding-top: clamp(80px, 10vw, 140px); padding-bottom: 36px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.enso { width: 120px; color: var(--kaki); margin-bottom: 28px; }
.f-title { font-family: var(--font-serif); font-size: clamp(28px, 3.4vw, 46px); letter-spacing: .12em; margin-bottom: 34px; }
.site-footer .btn { border-color: var(--washi); color: var(--washi); }
.site-footer .btn:hover { background: var(--washi); color: var(--sumi); }
.f-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); width: 100%; margin-top: 90px; padding-top: 40px; border-top: 1px solid rgba(233, 226, 211, .15); text-align: left; font-size: 14px; }
.f-cols a:hover { color: var(--kaki); }
.f-base { font-size: 12px; letter-spacing: .2em; color: var(--muted); margin: 40px 0 0; }

/* 7. Responsive ------------------------------------------------------------ */
@media (max-width: 1000px) {
  .scrolls { grid-template-columns: repeat(2, 1fr); }
  .scrolls--grid .scroll:nth-child(n) { margin-top: 0; }
  .scrolls--grid .scroll:nth-child(even) { margin-top: 70px; }
  .services { grid-template-columns: 1fr; }
  .seasons { grid-template-columns: 1fr 1fr; }
  .seasons div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 820px) {
  body { font-size: 15px; }
  .header-row { height: 76px; }
  .menu-btn { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--sumi); background: none; cursor: pointer; position: relative; z-index: 60; }
  .menu-btn span:not(.sr) { width: 10px; height: 10px; border-radius: 50%; background: var(--kaki); transition: transform .4s var(--ease); }
  .menu-open .menu-btn span:not(.sr) { transform: scale(1.8); }
  .site-nav { position: fixed; inset: 0; z-index: 55; background: var(--rice); flex-direction: row-reverse; justify-content: center; align-items: center; gap: 36px; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
  .site-nav a { writing-mode: vertical-rl; font-family: var(--font-serif); font-size: 30px; letter-spacing: .4em; }
  .site-nav a::before { display: none; }
  .site-nav a[aria-current="page"] { color: var(--kaki); }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .hero { grid-template-columns: auto 1fr; }
  .hero-title { height: 360px; font-size: 30px; }
  .hero .lattice { grid-column: 1 / -1; order: 3; }
  .hero-text { padding-bottom: 0; }
  .ma, .contact { grid-template-columns: 1fr; }
  .ma .kanji { font-size: 140px; }
  .page-head { grid-template-columns: 1fr; }
  .page-head .vlabel { writing-mode: horizontal-tb; }
  .page-head .vlabel::after { width: 40px; height: 1px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .mats { grid-template-columns: 1fr 1fr; }
  .team-list li { grid-template-columns: 1fr; gap: 2px; }
  .f-cols { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 480px) {
  .scrolls, .scrolls--grid { grid-template-columns: 1fr; }
  .scroll:nth-child(n) { margin-top: 0 !important; }
  .scroll .lattice { --ratio: 4 / 5; }
  .seasons { grid-template-columns: 1fr; }
  .seasons div:nth-child(n) { padding-left: 0; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
