/* ---------- Base ---------- */
:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-3: #111111;
  --bg-4: #141414;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --text: #ffffff;
  --muted: #888888;
  --dim: #555555;
  --accent: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 20px 60px rgba(0,0,0,0.6);
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.4rem; }

.eyebrow,
.tracked {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  font-family: var(--sans);
}

.lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 60ch;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.2rem;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(14px);
}

.logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--text);
}

.nav-toggle {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s;
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--text); }

/* ---------- Full-screen Menu ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 5rem 3rem 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.menu-overlay nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 420px;
}
.menu-overlay a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  transition: color 0.2s, transform 0.2s;
}
.menu-overlay a:hover {
  color: var(--text);
  transform: translateX(4px);
}
.menu-overlay a.active { color: var(--text); }
.menu-overlay a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.8rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid var(--line-2);
  background: rgba(20,20,20,0.6);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.15s;
  letter-spacing: 0.02em;
  font-family: var(--sans);
}
.btn:hover {
  background: rgba(40,40,40,0.7);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.btn-primary {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}
.btn-primary:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
}

.btn-sm {
  padding: 0.65rem 1.2rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.btn-large { width: 100%; padding: 1.1rem 2rem; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #000 0%, #050505 50%, #000 100%);
  overflow: hidden;
}
.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.hero-bg::before {
  width: 55vw;
  height: 55vw;
  left: -12%;
  top: -15%;
  background: radial-gradient(circle, rgba(180, 200, 255, 0.10), transparent 70%);
  animation: orbDriftA 22s ease-in-out infinite;
}
.hero-bg::after {
  width: 55vw;
  height: 55vw;
  right: -12%;
  bottom: -15%;
  background: radial-gradient(circle, rgba(255, 180, 200, 0.08), transparent 70%);
  animation: orbDriftB 28s ease-in-out infinite;
}
@keyframes orbDriftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(18%, 12%) scale(1.12); }
  66%       { transform: translate(-8%, -10%) scale(0.92); }
}
@keyframes orbDriftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-16%, -10%) scale(1.15); }
  75%       { transform: translate(10%, 8%) scale(0.94); }
}
.hero-figure {
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 600"><defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="%23222"/><stop offset="1" stop-color="%23000"/></linearGradient></defs><ellipse cx="200" cy="220" rx="80" ry="100" fill="url(%23g)" opacity="0.35"/><ellipse cx="200" cy="400" rx="120" ry="160" fill="url(%23g)" opacity="0.3"/></svg>');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.4;
  filter: blur(1px);
  animation: figureBreath 16s ease-in-out infinite;
}
@keyframes figureBreath {
  0%, 100% { opacity: 0.36; transform: scale(1); }
  50%      { opacity: 0.48; transform: scale(1.04); }
}
.kanji {
  position: absolute;
  left: 6vw;
  top: 12vh;
  writing-mode: vertical-rl;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 500;
  color: rgba(255,255,255,0.07);
  letter-spacing: 0.3em;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  animation:
    kanjiAppear 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards,
    kanjiFloat 14s ease-in-out 2.3s infinite;
}
@keyframes kanjiAppear { to { opacity: 1; } }
@keyframes kanjiFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.hero h1 {
  margin-bottom: 1.4rem;
}
.hero-sub {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: var(--muted);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 2.8rem;
}

.framework-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.framework-row .btn { min-width: 220px; }

.quick-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Scroll cue ---------- */
.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
  opacity: 0;
  animation: cueFade 1s ease-out 1.3s forwards;
}
.scroll-cue span {
  display: block;
  width: 2px;
  height: 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: cueDot 1.8s ease-in-out infinite;
}
@keyframes cueFade { to { opacity: 1; } }
@keyframes cueDot {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Liquid glass (hero buttons only) ---------- */
.hero .btn {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.4);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  isolation: isolate;
}
.hero .btn > * { position: relative; z-index: 2; }
.hero .btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.04) 35%,
    transparent 55%,
    rgba(255, 255, 255, 0.06) 100%);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}
.hero .btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.05) 35%,
    transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}
.hero .btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 14px 48px rgba(0, 0, 0, 0.5);
}
.hero .btn:hover::after { opacity: 1; }
.hero .btn:active { transform: translateY(0) scale(0.985); }

.hero .framework-btn.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 14px 44px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(255, 255, 255, 0.07);
}

/* ---------- Hero entrance animations ---------- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes heroRiseSoft {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero h1        { animation: heroRise    1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.hero-sub       { animation: heroRiseSoft 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }
.framework-row  { animation: heroRiseSoft 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both; }
.quick-row      { animation: heroRiseSoft 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both; }
.framework-row .btn:nth-child(2) { animation-delay: 0.05s; }

/* Re-runnable swap animation for framework toggle */
.hero-text-swap { animation: heroRise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-sub-swap  { animation: heroRiseSoft 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both; }

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-sub, .framework-row, .quick-row, .kanji,
  .hero-bg::before, .hero-bg::after, .hero-figure,
  .hero-text-swap, .hero-sub-swap, .scroll-cue, .scroll-cue span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .parallax-layer { transform: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Parallax + reveal primitives ---------- */
.parallax-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.parallax-layer {
  position: absolute;
  top: -12%;
  left: 0;
  right: 0;
  height: 124%;
  will-change: transform;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.07), transparent 55%),
    radial-gradient(ellipse at 70% 75%, rgba(255,255,255,0.04), transparent 50%),
    linear-gradient(135deg, #050505 0%, #1a1a1a 50%, #0a0a0a 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.img-placeholder[data-img]:not([style*="background-image"])::after {
  content: '[ ' attr(data-img) ' ]';
  position: absolute;
  bottom: 1.4rem;
  left: 1.4rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.22);
  font-weight: 500;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.15s; }
.reveal[data-delay="2"] { transition-delay: 0.3s; }
.reveal[data-delay="3"] { transition-delay: 0.45s; }

/* ---------- Story section ---------- */
.story {
  position: relative;
  background: var(--bg);
}

.story-intro {
  position: relative;
  height: 85vh;
  min-height: 580px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.story-intro > .parallax-frame {
  position: absolute;
  inset: 0;
}
.story-intro-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.9) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, var(--bg) 100%);
  z-index: 1;
}
.story-intro-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 740px;
}
.story-intro-overlay h2 {
  font-size: clamp(3.4rem, 8vw, 6rem);
  margin: 0.6rem 0 1.4rem;
}
.story-intro-overlay .lead {
  margin: 0 auto;
  font-size: 1.1rem;
}

.story-chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8rem 2rem;
  align-items: center;
}
.story-chapter.reverse .story-chapter-text { order: 2; }
.story-chapter.reverse .story-chapter-img  { order: 1; }
.story-chapter-text { max-width: 520px; }
.story-num {
  font-family: var(--serif);
  font-size: 3.4rem;
  color: var(--dim);
  font-weight: 700;
  display: block;
  margin-bottom: 1.4rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.story-chapter-text h3 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1.4rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.story-chapter-text p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.story-chapter-text em {
  color: var(--text);
  font-style: italic;
}
.story-chapter-img {
  height: 70vh;
  min-height: 460px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.story-quote {
  position: relative;
  height: 70vh;
  min-height: 460px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.story-quote > .parallax-frame {
  position: absolute;
  inset: 0;
}
.story-quote-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(0,0,0,0.55) 25%, rgba(0,0,0,0.55) 75%, var(--bg) 100%);
  z-index: 1;
}
.story-quote blockquote {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  line-height: 1.35;
  max-width: 920px;
  text-align: center;
  color: var(--text);
  border: none;
  padding: 0;
  letter-spacing: -0.01em;
}
.story-quote blockquote::before {
  content: '“';
  display: block;
  font-size: 4em;
  line-height: 0.5;
  margin-bottom: 1.4rem;
  color: rgba(255,255,255,0.35);
}

.story-cta {
  text-align: center;
  padding: 7rem 2rem 9rem;
  max-width: 700px;
  margin: 0 auto;
}
.story-cta h3 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin: 1rem 0 2rem;
  letter-spacing: -0.02em;
}

@media (max-width: 820px) {
  .story-chapter {
    grid-template-columns: 1fr;
    padding: 5rem 1.4rem;
    gap: 2.4rem;
  }
  .story-chapter.reverse .story-chapter-text { order: 1; }
  .story-chapter.reverse .story-chapter-img  { order: 2; }
  .story-chapter-img {
    height: 56vh;
    min-height: 320px;
  }
  .story-intro { height: 70vh; min-height: 460px; }
  .story-quote { height: 56vh; min-height: 340px; }
  .story-cta { padding: 5rem 1.4rem 6rem; }
  .story-num { font-size: 2.6rem; }
}

/* ---------- Page wrapper (sub-pages) ---------- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 2rem 6rem;
}
.page-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 2rem 6rem;
}
.page-head-center {
  text-align: center;
  margin-bottom: 3rem;
}
.page-head-center h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.8rem;
}
.page-head-center p {
  color: var(--muted);
}

.page-head-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
}
.page-head-circle svg {
  width: 22px;
  height: 22px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.6;
}

/* ---------- Profile ---------- */
.avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 1rem;
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.avatar svg {
  width: 32px;
  height: 32px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.5;
}
.avatar-upload {
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
}
.avatar-upload:hover {
  border-color: rgba(255,255,255,0.4);
}
.avatar-upload:active { transform: scale(0.97); }
.avatar-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: none;
  border-radius: 50%;
}
.avatar-upload.has-photo .avatar-photo { display: block; }
.avatar-upload.has-photo .avatar-default-icon { display: none; }
.avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 30px;
  height: 30px;
  background: var(--text);
  border: 3px solid var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.avatar-badge svg {
  width: 13px;
  height: 13px;
  stroke: #000;
  fill: none;
  stroke-width: 1.7;
}
.avatar-remove {
  display: block;
  margin: -0.3rem auto 1.6rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  text-align: center;
  font-family: var(--sans);
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  transition: color 0.15s;
}
.avatar-remove:hover { color: #e57373; }
.profile-name {
  text-align: center;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.profile-email {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 3rem;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--dim);
  font-weight: 500;
  margin-bottom: 1.2rem;
}

/* ---------- Form fields ---------- */
.field {
  margin-bottom: 1.4rem;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field label,
.field-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.55rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="file"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--dim);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.3);
  background: var(--bg-4);
}
.field textarea { resize: vertical; min-height: 96px; }

.field.error input,
.field.error select,
.field.error textarea {
  border-color: rgba(229, 115, 115, 0.55);
  background: rgba(229, 115, 115, 0.04);
}
.field-error {
  color: #e57373;
  font-size: 0.76rem;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
  min-height: 1em;
}
.save-status-error { color: #e57373 !important; }

/* ---------- Timeline control ---------- */
.timeline-control {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.2rem 1.1rem;
  transition: border-color 0.15s;
}
.field.error .timeline-control {
  border-color: rgba(229, 115, 115, 0.55);
  background: rgba(229, 115, 115, 0.04);
}
.timeline-display {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
  min-height: 1.6rem;
}
.timeline-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.timeline-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  font-family: var(--sans);
  padding: 0;
  user-select: none;
}
.timeline-step:hover:not(:disabled) {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}
.timeline-step:active:not(:disabled) { transform: scale(0.92); }
.timeline-step:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.timeline-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--line-2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}
.timeline-slider::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--line-2);
  border-radius: 2px;
}
.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--text);
  border-radius: 50%;
  cursor: grab;
  margin-top: -7.5px;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.08);
}
.timeline-slider::-webkit-slider-thumb:hover { box-shadow: 0 0 0 6px rgba(255,255,255,0.08); }
.timeline-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
.timeline-slider::-moz-range-track {
  height: 3px;
  background: var(--line-2);
  border-radius: 2px;
}
.timeline-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--text);
  border: none;
  border-radius: 50%;
  cursor: grab;
}
.timeline-sub {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
}
.field select { appearance: none; cursor: pointer; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23888" stroke-width="1.5"><polyline points="6 9 12 15 18 9"/></svg>'); background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px; padding-right: 2.6rem; }

.subcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 2rem;
}

.chip-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chip-group label { cursor: pointer; }
.chip-group input { display: none; }
.chip-group span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.15s;
}
.chip-group input:checked + span {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}

.checkbox-field label {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 400;
}
.checkbox-field input { margin-top: 4px; accent-color: var(--text); }

.fine {
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 0.5rem;
}

/* ---------- Frameworks page ---------- */
.framework-tabs {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.tab {
  background: rgba(20,20,20,0.6);
  border: 1px solid var(--line-2);
  color: var(--muted);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.tab:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.tab.active {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}
.tab svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.framework-panel { display: none; }
.framework-panel.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.framework-hero {
  text-align: center;
  margin-bottom: 3rem;
}
.framework-hero h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.framework-hero p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.pillar {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.pillar-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--dim);
  margin-bottom: 0.8rem;
}
.pillar h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.pillar p {
  color: var(--muted);
  font-size: 0.9rem;
}

.price-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
}
.price-card .price {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  margin: 1rem 0;
}
.price-card .price span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
}
.price-card ul {
  list-style: none;
  margin: 1.5rem 0 2rem;
  text-align: left;
}
.price-card li {
  color: var(--muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.price-card li:last-child { border: none; }
.price-card li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--text);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- CookBook ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.filter.active {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.recipe-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.recipe-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}
.recipe-img {
  height: 170px;
  background: linear-gradient(135deg, #1a1a1a, #050505);
  position: relative;
}
.recipe-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.05), transparent 70%);
}
.recipe-body { padding: 1.4rem; }
.recipe-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
}
.recipe-body h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0.5rem 0 0.9rem;
}
.recipe-body p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.macros {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.macros li {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.macros strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 2px;
}
.recipe-link {
  color: var(--text);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---------- Progress wall ---------- */
.progress-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}
.progress-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
}
.progress-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}
.progress-photo {
  height: 240px;
  background:
    linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.progress-photo .cat-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  color: var(--text);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
}
.progress-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.progress-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.progress-meta {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.progress-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
}
.progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.like-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 500;
  transition: color 0.15s;
}
.like-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.like-btn.liked { color: var(--text); }
.like-btn.liked svg { fill: var(--text); }

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Modal ---------- */
.modal {
  border: none;
  background: var(--bg-2);
  color: var(--text);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  padding: 0;
  max-width: 600px;
  width: 92%;
  box-shadow: var(--shadow);
}
.modal::backdrop {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
}
.modal-form { padding: 2.4rem; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
}
.modal-header h2 {
  font-size: 1.6rem;
}
.close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.close:hover { color: var(--text); }

/* ---------- Coming soon ---------- */
.coming-soon {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.4rem;
}

/* ---------- Contact cards ---------- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 440px;
  margin: 0 auto;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  transition: border-color 0.25s, background 0.25s;
}
.contact-card:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--bg-3);
}
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.6;
}
.contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.contact-text .label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 500;
}
.contact-text .value {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Story / long-form ---------- */
.story-content {
  max-width: 660px;
  margin: 0 auto;
}
.story-content p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.4rem;
}
.story-content p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 4rem;
  float: left;
  line-height: 1;
  margin: 0.2rem 0.6rem 0 0;
  color: var(--text);
  font-weight: 700;
}
.story-content blockquote {
  border-left: 2px solid var(--text);
  padding: 0.5rem 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1.4;
  margin: 2rem 0;
}

/* ---------- For You ---------- */
.foryou-section {
  margin-bottom: 3rem;
}
.foryou-section h3 {
  font-family: var(--serif);
  margin-bottom: 1.2rem;
}

/* ---------- Form success ---------- */
.form-success {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.success-card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.check-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.check-icon svg { width: 26px; height: 26px; stroke: var(--text); fill: none; stroke-width: 1.6; }
.success-card h2 { margin-bottom: 0.8rem; font-size: 1.8rem; }
.success-card p {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .site-header { padding: 1.1rem 1.4rem; }
  .hero { padding: 5rem 1.4rem 3rem; }
  .page, .page-wide { padding: 6rem 1.4rem 4rem; }
  .field-row { grid-template-columns: 1fr; }
  .framework-row .btn { min-width: unset; width: 100%; }
  .menu-overlay { padding: 5rem 2rem 2rem; }
  .price-card { padding: 1.8rem; }
  .modal-form { padding: 1.6rem; }
  .kanji { font-size: 2rem; left: 4vw; }
}
