:root {
  --bg: #f4f4f2;
  --bg-2: #ebebe8;
  --ink: #141416;
  --mute: #6b6b70;
  --line: rgba(20, 20, 22, 0.14);
  --accent: #1f3f8f;
  --accent-ink: #f4f4f2;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --bg-2: #1a1a1d;
    --ink: #ececea;
    --mute: #9a9aa0;
    --line: rgba(236, 236, 234, 0.16);
    --accent: #7d9bea;
    --accent-ink: #121214;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Public Sans", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.en { color: var(--mute); font-size: 14px; line-height: 1.8; letter-spacing: 0.01em; display: block; margin-top: .4em; }
small[lang="en"] { display: block; font-size: 12px; font-weight: 400; color: var(--mute); letter-spacing: 0.03em; line-height: 1.6; }

/* header */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 38px; height: 19px; overflow: visible; }
.brand-mark path, .wm-loop path {
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s cubic-bezier(.6, 0, .2, 1) .3s forwards;
}
.brand-mark path { stroke-width: 9; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--mute); transition: color .25s; }
.nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px;
  transition: background .25s, color .25s;
}
.nav-cta:hover { background: var(--ink); color: var(--bg) !important; }

/* hero: full-bleed canvas, wordmark bottom-left (v1 composition) */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) clamp(56px, 9vh, 96px);
  border-bottom: 1px solid var(--line);
}
#loop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; }
.wordmark { font-size: clamp(52px, 12.5vw, 176px); font-weight: 600; line-height: .98; letter-spacing: -0.02em; }
.wm-line { display: block; overflow: hidden; padding-bottom: .06em; }
.wm-line > span { display: inline-block; transform: translateY(110%); animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) forwards; }
.wm-line:nth-child(2) > span { animation-delay: .12s; }
.wm-loop { display: inline-block; height: .72em; width: 1.44em; margin: 0 .04em; vertical-align: -0.01em; overflow: visible; }
.wm-loop path { stroke-width: 9.5; stroke: var(--accent); animation-delay: .7s; animation-duration: 2s; }
.tagline {
  margin-top: 18px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(15px, 1.6vw, 20px); font-weight: 700;
  opacity: 0; animation: fade 1s ease 1.2s forwards;
}
.tagline span { margin-left: 1em; font-family: "Public Sans", sans-serif; font-weight: 500; color: var(--mute); }

/* sections */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.section h2 small { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--mute); margin-top: 10px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }

/* philosophy: editorial statement */
.philosophy { background: var(--bg-2); }
.statement {
  margin-top: 18px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(40px, 7vw, 96px) !important; font-weight: 700 !important;
  letter-spacing: -0.01em !important; line-height: 1.15 !important;
}
.statement span { display: block; font-family: "Public Sans", sans-serif; font-size: .28em; font-weight: 500; color: var(--mute); letter-spacing: 0; margin-top: .4em; }
.creed { margin-top: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.creed > div { border-top: 1px solid var(--ink); padding-top: 20px; }
.creed dt { font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 700; font-size: 14px; }
.creed dd { margin-top: 12px; font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; line-height: 1.6; }

/* marquee (one per page) */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee-track span { padding: 0 32px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; white-space: nowrap; color: var(--mute); }

/* about: offset two-column */
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); }
.about-body { padding-top: .5em; }
.lead { font-family: "Zen Kaku Gothic New", sans-serif; font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; line-height: 1.55; margin-bottom: 1em; }
.about-body p + p { margin-top: 1.2em; }
.about-body p { max-width: 62ch; }

/* business: bento 4 cells (2+2 asymmetric) */
.business { background: var(--bg-2); }
.bento { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.cell { background: var(--bg); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); min-height: 220px; display: flex; flex-direction: column; }
.cell:nth-child(1) { grid-column: span 7; }
.cell:nth-child(2) { grid-column: span 5; }
.cell:nth-child(3) { grid-column: span 5; }
.cell:nth-child(4) { grid-column: span 7; }
.cell h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.cell h3 small { display: block; font-size: 12px; font-weight: 400; color: var(--mute); }
.cell-big { margin-top: auto; padding-top: 32px; font-family: "Zen Kaku Gothic New", sans-serif; font-size: clamp(24px, 2.8vw, 36px); font-weight: 700; line-height: 1.3; }
.cell p:not(.cell-big) { margin-top: 10px; font-size: 14px; }
.cell-accent { background: var(--accent); color: var(--accent-ink); }
.cell-accent h3 small, .cell-accent .en { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.cell-status { background: var(--ink); color: var(--bg); }
.cell-status h3 small, .cell-status .en { color: color-mix(in srgb, var(--bg) 65%, transparent); }

/* profile */
.profile-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); }
.facts { border-top: 1px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: 10em 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.facts dt { font-size: 14px; font-weight: 500; }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }

/* contact: full-width accent block */
.contact { background: var(--accent); color: var(--accent-ink); }
.contact h2 small, .contact .en { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.contact-inner p { margin-top: 20px; max-width: 48ch; }
.mail {
  display: inline-flex; align-items: baseline; gap: .5em; margin-top: 32px;
  font-size: clamp(22px, 3.4vw, 48px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3;
  text-decoration: none; border-bottom: 2px solid currentColor; overflow-wrap: anywhere;
}
.mail span { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.mail:hover span { transform: translateX(8px); }

.btn {
  display: inline-flex; align-items: center; gap: .6em;
  margin-top: 28px; padding: 14px 24px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .2s, filter .2s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.98); }
.btn span { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.btn:hover span { transform: translateX(4px); }
.btn-invert { background: var(--accent-ink); color: var(--accent); }

/* contact page */
.page { padding: 120px 0 80px; }
.page h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.page h1 small { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--mute); margin-top: 10px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); margin-top: 32px; }
.form-frame { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 720px; }
.form-frame iframe { display: block; width: 100%; height: 1100px; border: 0; }
.form-pending { padding: clamp(24px, 3vw, 40px); }
.form-pending p + p { margin-top: 1em; }
.back { display: inline-block; margin-top: 24px; font-size: 14px; color: var(--mute); text-decoration: none; }
.back:hover { color: var(--ink); }
@media (prefers-color-scheme: dark) { .form-frame { background: #0c0c0e; } }
@media (max-width: 900px) { .page-grid { grid-template-columns: 1fr; } }

/* privacy: disclosure */
.privacy { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.privacy details { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.privacy summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 24px 0; cursor: pointer; }
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary h2 { font-size: clamp(24px, 3vw, 36px); }
.chev { width: 14px; height: 14px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .3s; }
.privacy details[open] .chev { transform: rotate(-135deg); }
.privacy-body { padding: 0 0 32px; max-width: 70ch; }
.privacy h3 { font-size: 15px; font-weight: 700; margin-top: 1.4em; }
.privacy-body p { font-size: 14px; line-height: 1.9; margin-top: .3em; }

/* footer */
.footer { padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--mute); }
.footer a { text-decoration: none; }

/* motion */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .tagline span { display: block; margin-left: 0; }
  .creed { grid-template-columns: 1fr; }
  .about-grid, .profile-grid { grid-template-columns: 1fr; gap: 24px; }
  .cell:nth-child(n) { grid-column: span 12; min-height: 0; }
  .cell-big { padding-top: 20px; }
  .facts > div { grid-template-columns: 7.5em 1fr; }
}
@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .tagline { opacity: 1; transform: none; }
}
