/* tatemasu — brand site styles. Colours: kinari (natural), sumi (ink), shu (vermilion), tetsukon (iron navy). */

@font-face {
  font-family: "TM Sans";
  src: url("/assets/fonts/jost.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "TM Serif SC";
  src: url("/assets/fonts/serif-sc.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "TM Serif JP";
  src: url("/assets/fonts/serif-jp.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --bg: #F3EEE4;
  --paper: #FAF7F1;
  --ink: #1E1D1B;
  --ink-2: #57524B;
  --ink-3: #7A746A;
  --line: #DCD4C6;
  --pattern: #E3DBCD;
  --shu: #B23A25;
  --kon: #1C2633;
  --kon-2: #263241;
  --on-kon: #EFE9DE;
  --on-kon-2: #B8B2A6;
  --pattern-dark: #2A3646;

  --f-sans: "TM Sans", "Jost", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-text-en: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-text-zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --f-text-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
  --f-serif-zh: "TM Serif SC", "Noto Serif CJK SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --f-serif-ja: "TM Serif JP", "Noto Serif CJK JP", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { font-family: var(--f-text-en); line-height: 1.65; }
html[lang="zh-Hans"] body { font-family: var(--f-text-zh); line-height: 1.85; }
html[lang="ja"] body { font-family: var(--f-text-ja); line-height: 1.9; font-feature-settings: "palt" 0; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--kon); color: var(--on-kon); padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }

/* ---------- type ---------- */
.kanji { font-family: var(--f-serif-ja); font-weight: 600; }
html[lang="zh-Hans"] .kanji { font-family: var(--f-serif-zh); }
html[lang] .kanji[lang="ja"] { font-family: var(--f-serif-ja); }

.display, .h2, .h3, .tile-label, .level-name, .step-title, .pattern-title, .faq summary {
  font-family: var(--f-sans);
}
html[lang="zh-Hans"] :is(.display, .h2, .h3, .tile-label, .level-name, .step-title, .faq summary) { font-family: var(--f-serif-zh); }
html[lang="ja"] :is(.display, .h2, .h3, .tile-label, .level-name, .step-title, .faq summary) { font-family: var(--f-serif-ja); }

.h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.25; letter-spacing: -0.01em; font-weight: 500; text-wrap: balance; }
html[lang="zh-Hans"] .h2, html[lang="ja"] .h2 { font-weight: 600; letter-spacing: 0.02em; line-height: 1.4; }
html[lang="ja"] .h2 { font-size: clamp(24px, 3.1vw, 38px); }
.h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 8px; }
html[lang="en"] .h3 { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; }
.lead { color: var(--ink-2); font-size: 17px; max-width: 34em; }
.h2 + .lead { margin-top: 16px; }
html[lang="ja"] .tile-scenes, html[lang="ja"] .level-for, html[lang="ja"] .faq summary { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="ja"] :is(.display, .lead, .prose p, .hero-sub, .step p, .pattern-note, .faq details p, .point-text, .note) { word-break: auto-phrase; }
html[lang="ja"] .h2 { word-break: keep-all; overflow-wrap: anywhere; }

.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-sans); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--ink-2);
  margin-bottom: 18px;
}
.kicker-no { color: var(--shu); letter-spacing: 0.08em; }
.kicker-no::after { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 12px; opacity: 0.7; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 238, 228, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(220, 212, 198, 0.7);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand .emblem { width: 30px; height: 30px; color: var(--shu); }
.brand .wordmark { height: 13px; width: auto; color: var(--ink); }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.lang { display: flex; align-items: center; gap: 2px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex: none; }
.nav + .lang { margin-left: 4px; }
.lang a { text-decoration: none; color: var(--ink-2); padding: 3px 10px; border-radius: 999px; line-height: 1.5; }
.lang a[aria-current="true"] { background: var(--kon); color: var(--on-kon); }
.lang a:not([aria-current="true"]):hover { color: var(--ink); background: rgba(0,0,0,0.04); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; line-height: 1.3;
  border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
html[lang="en"] .btn { font-family: var(--f-sans); letter-spacing: 0.02em; }
.btn-primary { background: var(--kon); color: var(--on-kon); }
.btn-primary:hover { background: #121A24; }
.btn-ghost { border-color: rgba(30, 29, 27, 0.35); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--on-kon); color: var(--kon); flex-wrap: wrap; }
.btn-light:hover { background: #FFFFFF; }
.btn-mail { font-family: var(--f-sans); font-weight: 400; opacity: 0.75; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: stretch; min-height: min(720px, calc(100vh - 64px)); }
.hero-copy { padding: clamp(56px, 9vw, 120px) 32px clamp(56px, 8vw, 104px) 0; display: flex; flex-direction: column; justify-content: center; container-type: inline-size; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--f-sans); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 28px; }
html[lang="zh-Hans"] .eyebrow, html[lang="ja"] .eyebrow { text-transform: none; letter-spacing: 0.12em; }
.eyebrow-name { font-weight: 500; color: var(--ink); text-transform: lowercase; letter-spacing: 0.2em; }
.eyebrow-sep { width: 24px; height: 1px; background: var(--ink-3); }
.display { font-size: clamp(40px, 6.2vw, 78px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 500; }
.display .line { display: block; text-wrap: balance; }
html[lang="zh-Hans"] .display { font-size: clamp(34px, 5vw, 66px); line-height: 1.3; letter-spacing: 0.02em; font-weight: 600; }
html[lang="ja"] .display { font-size: clamp(24px, 2.7vw, 38px); line-height: 1.45; letter-spacing: 0.03em; font-weight: 600; }
@supports (font-size: 1cqi) {
  html[lang="en"] .display { font-size: min(76px, 10cqi); }
  html[lang="zh-Hans"] .display { font-size: min(72px, 11.4cqi); }
  html[lang="ja"] .display { font-size: min(46px, 6.4cqi); }
}
.hero-sub { margin-top: 28px; font-size: 18px; color: var(--ink-2); max-width: 30em; }
html[lang="en"] .hero-sub { max-width: 34em; }
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 14px; color: var(--ink); align-self: flex-start; padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(250, 247, 241, 0.7); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 4px rgba(178, 58, 37, 0.14); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-art { position: relative; border-left: 1px solid var(--line); }
.hero-art .pattern { position: absolute; top: 0; left: 0; height: 100%; width: calc(100% + (100vw - min(100vw, var(--wrap))) / 2 + var(--gutter)); color: var(--pattern); }
.hero-vertical { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 22px; }
.hero-vertical .vertical {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: clamp(56px, 7vw, 104px); line-height: 1; letter-spacing: 0.12em; font-weight: 700;
  color: var(--ink); background: var(--bg); padding: 28px 18px;
}
.hero-vertical .seal { width: clamp(46px, 5vw, 64px); height: auto; align-self: flex-end; margin-bottom: clamp(80px, 16vh, 150px); color: var(--shu); }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--kon); color: var(--on-kon); }
.section-dark .kicker { color: var(--on-kon-2); }
.section-dark .kicker-no { color: #E06A50; }
.section-dark .lead, .section-dark .note { color: var(--on-kon-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: 48px; }

/* name */
.name-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.prose { margin-top: 28px; display: grid; gap: 18px; font-size: 17px; color: var(--ink); max-width: 36em; }
.pattern-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 22px; margin-top: 8px; }
.pattern-swatch { position: relative; height: 180px; overflow: hidden; border-radius: 2px; background: var(--bg); }
.pattern-swatch .pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: #C9BFAE; }
.pattern-title { display: flex; align-items: baseline; gap: 12px; margin-top: 18px; }
.pattern-title .kanji { font-size: 22px; }
.pattern-reading { font-family: var(--f-sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.pattern-note { margin-top: 8px; font-size: 14px; color: var(--ink-2); }

/* range tiles */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { position: relative; padding: 28px 22px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; min-height: 300px; }
.tile-kanji { font-size: clamp(52px, 5.6vw, 80px); line-height: 1; color: var(--ink); padding-bottom: 36px; white-space: nowrap; }
.tile-label { font-size: 20px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
html[lang="en"] .tile-label { font-weight: 500; }
.tile-reading { font-family: var(--f-sans); font-size: 12px; font-weight: 400; letter-spacing: 0.16em; color: var(--ink-3); text-transform: lowercase; }
.tile-scenes { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.tile-status { margin-top: auto; padding-top: 18px; font-size: 12px; color: var(--shu); letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; }
.tile-status::before { content: ""; width: 14px; height: 1px; background: currentColor; }
html[lang="en"] .tile-status { font-family: var(--f-sans); text-transform: uppercase; letter-spacing: 0.16em; }

/* levels */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.level { background: var(--kon-2); border: 1px solid rgba(239, 233, 222, 0.08); border-radius: var(--radius); padding: 28px 26px 30px; display: flex; flex-direction: column; }
.level-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.level-tag { font-family: var(--f-sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-kon-2); }
.meter { display: flex; gap: 5px; }
.meter i { display: block; width: 26px; height: 6px; border-radius: 3px; background: rgba(239, 233, 222, 0.16); }
.meter i.on { background: #E06A50; }
.level-name { font-size: 26px; font-weight: 600; color: var(--on-kon); }
html[lang="en"] .level-name { font-weight: 500; }
.level-build { margin-top: 12px; margin-bottom: 22px; color: var(--on-kon); opacity: 0.9; }
.level-for { margin-top: auto; padding-top: 20px; font-size: 14px; color: var(--on-kon-2); border-top: 1px solid rgba(239, 233, 222, 0.12); }
.level-for span { display: block; font-size: 12px; letter-spacing: 0.12em; color: #E9967F; margin-bottom: 4px; }
html[lang="en"] .level-for span { font-family: var(--f-sans); text-transform: uppercase; letter-spacing: 0.18em; }
.note { margin-top: 28px; font-size: 14px; max-width: 46em; padding-left: 16px; border-left: 2px solid #E06A50; }

/* approach */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--ink); }
.step { padding: 26px 26px 8px 0; }
.step + .step { padding-left: 26px; border-left: 1px solid var(--line); }
.step-no { display: block; font-family: var(--f-sans); font-size: 13px; letter-spacing: 0.16em; color: var(--shu); margin-bottom: 14px; }
.step-title { font-size: 20px; margin-bottom: 10px; font-weight: 600; }
html[lang="en"] .step-title { font-weight: 500; }
.step p { color: var(--ink-2); font-size: 15px; }

/* measure */
.measure-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.figure { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 12px; position: sticky; top: 96px; }
.figure svg { width: 100%; max-width: 280px; height: auto; margin: 0 auto; }
.points { margin-top: 32px; border-top: 1px solid var(--line); }
.point { display: grid; grid-template-columns: 28px 64px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.point-no { width: 24px; height: 24px; border-radius: 50%; background: var(--shu); color: #FFF; font-family: var(--f-sans); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; transform: translateY(-2px); }
.point-k { font-size: 24px; line-height: 1.2; }
.point-text strong { font-family: var(--f-sans); font-weight: 600; }
.tips { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 32px; }
.tips ul { display: grid; gap: 10px; }
.tips li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.tips li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 8px; height: 1px; background: var(--ink-3); }
.fit { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.fit p { color: var(--ink-2); font-size: 15px; }

/* faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq { border-top: 1px solid var(--ink); }
.faq-more { margin-top: 20px; color: var(--ink-2); font-size: 15px; }
.faq-more a { color: var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-size: 18px; font-weight: 600; min-height: 48px; }
html[lang="en"] .faq summary { font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center/14px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center/1.5px 14px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 22px 0; color: var(--ink-2); }

/* updates */
.updates { position: relative; overflow: hidden; }
.updates .pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--pattern-dark); }
.updates-inner { position: relative; text-align: left; }
.updates .lead { margin: 18px 0 32px; }

/* footer */
.site-footer { background: #151412; color: #CFC8BB; padding: 56px 0 48px; font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; }
.footer-brand p { margin-top: 12px; }
.footer-brand a:not(.brand) { color: #EFE9DE; }
.brand-footer { color: #EFE9DE; }
.brand-footer .wordmark { color: #EFE9DE; }
.footer-meta { display: grid; gap: 10px; align-content: start; justify-items: end; text-align: right; }
.footer-lang a { margin-left: 10px; color: #CFC8BB; }
.footer-lang a[aria-current="true"] { color: #FFF; text-decoration: none; }
.disclaimer { color: #A8A196; }
.copy { color: #8E887D; font-family: var(--f-sans); letter-spacing: 0.06em; }

/* pattern svg defaults */
.pattern { max-width: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tile { padding: 24px 16px 22px; }
  .tile-status { white-space: nowrap; }
  .tile-status::before { display: none; }
  html[lang="en"] .tile-status { letter-spacing: 0.1em; }
  .nav { display: none; }
  .lang, .nav + .lang { margin-left: auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { order: -1; height: 260px; border-left: 0; border-bottom: 1px solid var(--line); margin: 0 calc(-1 * var(--gutter)); }
  .hero-vertical .vertical { writing-mode: horizontal-tb; font-size: 52px; letter-spacing: 0.08em; padding: 14px 22px; }
  .hero-vertical .seal { align-self: center; margin-bottom: 0; width: 46px; }
  .hero-copy { padding: 40px 0 64px; }
  .section-head { grid-template-columns: 1fr; margin-bottom: 36px; }
  .name-grid, .measure-grid, .faq-grid { grid-template-columns: 1fr; }
  .figure { position: static; max-width: 360px; }
  .levels { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:last-child { grid-column: 1 / -1; }
  .tile { min-height: 240px; }
  .tips { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { justify-items: start; text-align: left; }
  .footer-lang a:first-of-type { margin-left: 6px; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .header-inner { height: 58px; gap: 12px; }
  .brand .wordmark { height: 11px; }
  .brand .emblem { width: 26px; height: 26px; }
  .lang { font-size: 12px; }
  .lang a { padding: 3px 8px; }
  .tile { min-height: 210px; padding: 22px 16px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0 6px; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .point { grid-template-columns: 26px 52px minmax(0, 1fr); gap: 10px; }
  .point-k { font-size: 20px; }
  .faq summary { font-size: 16px; }
  .faq details p { padding-right: 0; }
  .btn { width: 100%; }
  .btn-light { width: auto; }
  .hero-art { height: 220px; }
  .hero-vertical .vertical { font-size: 42px; }
}

/* measure figure */
.figure .fb { fill: none; stroke: #3A3733; stroke-linecap: round; stroke-linejoin: round; }
.figure .ff { fill: #3A3733; stroke: #3A3733; stroke-width: 12; stroke-linejoin: round; }
.figure .tape { stroke: var(--shu); stroke-width: 3; stroke-linecap: round; }
.figure .mk { fill: var(--shu); stroke: var(--bg); stroke-width: 2; }
.figure .lbl { font-family: var(--f-sans); font-size: 11px; font-weight: 600; fill: #FFFFFF; text-anchor: middle; dominant-baseline: central; }
