/* ========================================================= RYUJIN — Forged in Silence Horizontal case study, dark cinematic, gold + kanji red. ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overscroll-behavior: none; }
html { background: #000; overflow-x: clip; }
body.ryujin-page { --bg: #000000; --surface: #060608; --surface-2: #0a0a0c; --border: rgba(242, 238, 232, 0.10); --border-strong: rgba(242, 238, 232, 0.20); --text: #f2eee8; --text-soft: #c8c4be; --text-muted: #9a9fa5; --text-dim: #6f7378; --gold: #b98938; --gold-soft: rgba(185, 137, 56, 0.18); --kanji: #7a1111; --kanji-soft: rgba(122, 17, 17, 0.22); --signal: #ff1f1f; --rail: 64px; --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --serif: Fraunces, Georgia, "Times New Roman", serif; color: var(--text); background: #000; font-family: var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
/* ---- top navigation: Odidact-style bar in Ryujin gold/cream ---- */
.ryujin-page .rytop { position: fixed; inset: 0 0 auto 0; z-index: 200; display: grid; grid-template-columns: 1fr auto; align-items: center; height: 72px; padding: 0 clamp(26px, 3.4vw, 50px); font-family: "Inter", sans-serif; pointer-events: none; }
.ryujin-page .rytop::before { content: ""; position: absolute; inset: 0 0 -22px 0; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, rgba(6,6,8,0.52), rgba(6,6,8,0.3) 55%, rgba(6,6,8,0)); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%); mask-image: linear-gradient(to bottom, #000 58%, transparent 100%); }
.ryujin-page .rytop > * { pointer-events: auto; }
.ryujin-page .rytop__star { justify-self: start; color: var(--gold); font-size: 30px; font-weight: 900; line-height: 1; margin-top: -6px; text-decoration: none; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s; }
.ryujin-page .rytop__star:hover { transform: rotate(90deg) scale(1.1); }
.ryujin-page .rytop__links { justify-self: end; display: inline-flex; align-items: center; gap: clamp(22px, 2.4vw, 38px); }
.ryujin-page .rytop__links a { position: relative; font-size: 14.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); text-decoration: none; transition: color 0.25s; }
.ryujin-page .rytop__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left center; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.ryujin-page .rytop__links a:hover { color: var(--gold); }
.ryujin-page .rytop__links a:hover::after { transform: scaleX(1); }
@media (max-width: 900px) {
  .ryujin-page .rytop { height: 56px; padding: 0 18px; }
  .ryujin-page .rytop__star { font-size: 26px; }
  .ryujin-page .rytop__links { gap: 18px; }
  .ryujin-page .rytop__links a { font-size: 12.5px; }
}
/* ========================================================= TRACK — PURE BLACK, no per-panel seams ========================================================= */
.showcase-main { position: relative; --ry-bg-x: 0%; background: #000; }
.showcase-main::before { content: none; }
/* ========================================================= PANELS — transparent, full viewport, no borders ========================================================= */
.section-panel { position: relative; min-height: 100vh; overflow: hidden; padding: clamp(82px, 8vh, 116px) clamp(76px, 6.4vw, 124px) clamp(58px, 6vh, 90px) calc(var(--rail) + clamp(60px, 5.5vw, 100px)); background: transparent; isolation: isolate; }
.section-panel > * { position: relative; z-index: 2; }
@media (min-width: 901px) {
  .showcase-main { display: flex; width: max-content; min-height: 100vh; }
  .section-panel { flex: 0 0 100vw; width: 100vw; max-width: 100vw; height: 100vh; min-height: 100vh; display: grid; align-items: center; contain: paint; }
}
/* ========================================================= GLOBAL TYPE ========================================================= */
h1, h2, h3 { margin: 0; color: var(--text); font-family: var(--serif); font-weight: 500; letter-spacing: .02em; }
p { margin: 0; color: var(--text-muted); font-weight: 500; line-height: 1.65; }
.section-label { display: inline-flex; align-items: center; width: max-content; gap: 16px; color: var(--gold); font-size: 11.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.section-label b { color: var(--gold); font-size: 16px; font-weight: 800; letter-spacing: 0; }
.section-label::after { content: ""; order: 1; width: 38px; height: 1px; background: currentColor; opacity: .85; }
.section-label span { order: 2; }
/* ========================================================= SECTION 01 — HERO ========================================================= */
.ryujin-hero { display: grid; grid-template-columns: minmax(500px, 0.42fr) minmax(640px, 0.58fr); align-items: center; gap: clamp(38px, 4vw, 78px); }
.hero-copy { position: relative; z-index: 4; display: grid; gap: clamp(20px, 2.4vh, 30px); max-width: 680px; }
.hero-copy h1 { font-size: clamp(96px, 11vw, 192px); line-height: 0.85; letter-spacing: .16em; font-weight: 600; text-shadow: 0 18px 70px rgba(0, 0, 0, .75); }
.hero-subtitle { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: clamp(22px, 1.9vw, 36px); line-height: 1.1; margin: 0; }
.hero-description { max-width: 480px; color: rgba(242, 238, 232, 0.72); font-family: var(--serif); font-style: italic; font-size: clamp(16px, 1.2vw, 22px); line-height: 1.5; }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 22px; border-top: 1px solid var(--border-strong); max-width: 580px; }
.hero-meta article { min-width: 0; }
.hero-meta span { display: block; margin-bottom: 8px; color: var(--text-dim); font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero-meta strong { display: block; color: var(--text); font-family: var(--serif); font-size: 15px; font-weight: 500; line-height: 1.4; }
.hero-sword { position: relative; margin: 0; width: 100%; height: 100%; min-height: min(86vh, 820px); isolation: isolate; display: grid; align-items: center; justify-items: stretch; }
.hero-sword img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; filter: contrast(1.06) saturate(1); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 92%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 92%, transparent 100%); }
/* ========================================================= SECTION 02 — CHALLENGE ========================================================= */
.ryujin-challenge { display: grid; grid-template-columns: minmax(440px, 0.4fr) minmax(640px, 0.6fr); align-items: center; gap: clamp(44px, 4.5vw, 90px); }
.challenge-copy { position: relative; z-index: 3; display: grid; gap: clamp(20px, 2.4vh, 30px); max-width: 640px; }
.challenge-copy h2, .approach-copy h2, .solution-copy h2, .process-copy h2, .system-intro h2 { font-size: clamp(58px, 5.4vw, 102px); line-height: 1.02; }
.challenge-copy p, .approach-copy p, .solution-copy p, .process-copy p, .system-intro p { max-width: 540px; color: rgba(242, 238, 232, 0.62); font-family: var(--serif); font-size: clamp(17px, 1.2vw, 21px); font-style: italic; line-height: 1.55; font-weight: 400; }
.compact-meta { display: grid; grid-template-columns: 1fr 1fr; padding-top: 22px; border-top: 1px solid var(--border); margin-top: 8px; max-width: 460px; }
.compact-meta span { display: block; margin-bottom: 6px; color: var(--text-dim); font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.compact-meta strong { display: block; color: var(--text); font-family: var(--serif); font-size: 16px; font-weight: 500; }
.challenge-visual { position: relative; margin: 0; width: 100%; height: 100%; align-self: stretch; display: grid; align-items: stretch; justify-items: stretch; }
.challenge-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; filter: contrast(1.05) saturate(0.95); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 100%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 100%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%); mask-composite: intersect; }
/* ========================================================= SECTION 03 — APPROACH ========================================================= */
.ryujin-approach { display: grid; grid-template-columns: minmax(420px, 0.38fr) minmax(680px, 0.62fr); align-items: center; gap: clamp(44px, 4.5vw, 90px); }
.approach-copy { position: relative; z-index: 3; display: grid; gap: clamp(20px, 2.4vh, 30px); max-width: 640px; }
.approach-copy ul { display: grid; gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; max-width: 500px; }
.approach-copy li { position: relative; padding-left: 22px; color: var(--text-soft); font-family: var(--serif); font-style: italic; font-size: clamp(16px, 1.1vw, 19px); font-weight: 500; }
.approach-copy li::before { content: ""; position: absolute; left: 0; top: .56em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold-soft); }
.approach-visual { position: relative; margin: 0; width: 100%; height: min(88vh, 860px); display: grid; align-items: center; justify-items: center; }
.approach-visual img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; filter: contrast(1.04) saturate(1) drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55)); }
/* ========================================================= SECTION 04 — SOLUTION ========================================================= */
.ryujin-solution { display: grid; grid-template-columns: minmax(420px, 0.38fr) minmax(700px, 0.62fr); align-items: center; gap: clamp(44px, 4.5vw, 90px); }
.solution-copy { position: relative; z-index: 3; display: grid; gap: clamp(20px, 2.4vh, 30px); max-width: 620px; }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 1.8vw, 32px); margin-top: 12px; }
.principles article { display: grid; justify-items: center; gap: 10px; color: var(--text-soft); text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.principles img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(185, 137, 56, 0.25)); }
.solution-mockup { position: relative; margin: 0; width: 100%; height: 100%; align-self: stretch; display: grid; align-items: stretch; justify-items: stretch; }
.solution-mockup img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; filter: contrast(1.05) saturate(1); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 8%, #000 92%, transparent 100%); mask-composite: intersect; }
/* ========================================================= SECTION 05 — USER JOURNEY (+ embedded 06 IMPACT) ========================================================= */
.ryujin-journey { display: grid; align-content: center; }
.journey-shell { display: grid; gap: clamp(48px, 6vh, 80px); width: min(100%, 1640px); }
.journey-track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(34px, 4vw, 64px); padding-top: 10px; }
.journey-track article { position: relative; display: grid; grid-template-rows: 30px 22px auto auto; gap: 16px; min-width: 0; }
.journey-track b { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--gold); color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 0; }
.journey-track i { position: relative; display: block; width: 14px; height: 14px; margin-left: 9px; border: 1.5px solid var(--gold); border-radius: 50%; background: var(--bg); box-shadow: 0 0 14px rgba(185, 137, 56, 0.5); }
.journey-track article:not(:last-child)::after { content: ""; position: absolute; left: 25px; right: calc(-1 * clamp(34px, 4vw, 64px) - 7px); top: 52px; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(185, 137, 56, .15)); }
.journey-track strong { color: var(--text); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.journey-track p { max-width: 260px; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
/* Impact row (06) inside the same panel */
.impact-row { display: grid; grid-template-columns: 220px minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: clamp(46px, 4vw, 80px); padding-top: clamp(46px, 5vh, 70px); border-top: 1px solid var(--border); }
.impact-row__label { padding-top: 6px; }
.impact-row__quote { margin: 0; padding: 0; color: var(--text); font-family: var(--serif); font-style: italic; font-size: clamp(30px, 2.6vw, 48px); line-height: 1.15; font-weight: 500; max-width: 640px; letter-spacing: -.005em; }
.impact-row__quote p { margin: 0; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; font-weight: inherit; }
.impact-row__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.impact-row__list li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; color: var(--text-soft); font-size: 14px; line-height: 1.55; font-weight: 500; }
.impact-row__list li strong { color: var(--text); font-weight: 700; }
.impact-row__list li em { color: var(--gold); font-style: normal; margin: 0 6px; font-weight: 700; }
.impact-check { position: relative; display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--gold); margin-top: 4px; flex-shrink: 0; }
.impact-check::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 3px; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: translate(-55%, -85%) rotate(-45deg); transform-origin: center; }
/* ========================================================= SECTION 07 — BLADE ANATOMY Layout: title + sword stacked on the left, parts list on the right The sword-stage uses the image's NATURAL 1659:948 (1.75:1) aspect ratio so anatomy dots land on the actual sword content. ========================================================= */
.ryujin-anatomy { display: grid; grid-template-columns: minmax(0, 0.58fr) minmax(0, 0.42fr); grid-template-rows: auto auto; grid-template-areas: "copy parts" "sword parts"; align-items: center; gap: clamp(24px, 2.6vh, 38px) clamp(40px, 4vw, 80px); }
.anatomy-copy { grid-area: copy; display: grid; gap: clamp(14px, 1.8vh, 22px); max-width: 640px; align-self: end; }
.anatomy-copy h2 { font-size: clamp(52px, 4.8vw, 88px); line-height: .98; font-weight: 500; letter-spacing: .005em; }
.anatomy-copy p { max-width: 520px; color: rgba(242, 238, 232, 0.62); font-family: var(--serif); font-style: italic; font-size: clamp(15px, 1.05vw, 19px); line-height: 1.55; }
.sword-stage { grid-area: sword; position: relative; width: 100%; max-width: 640px; aspect-ratio: 1659 / 948; max-height: min(42vh, 400px); justify-self: start; isolation: isolate; align-self: start; margin-top: clamp(4px, 1.4vh, 18px); }
.sword-stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; filter: drop-shadow(0 18px 50px rgba(0, 0, 0, 0.7)); }
/* Anatomy dots — small marker with short dashed line + kanji label above */
.anatomy-dot { position: absolute; z-index: 3; width: 10px; height: 10px; cursor: pointer; transition: transform .35s ease; }
.anatomy-dot i { display: block; width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 238, 232, 0.7); box-shadow: 0 0 0 1px rgba(242, 238, 232, 0.4), 0 0 10px rgba(242, 238, 232, 0.18); transition: background .35s ease, box-shadow .35s ease; }
/* Short dashed line pointing up from the dot */
.anatomy-dot::after { content: ""; position: absolute; left: 50%; bottom: 14px; width: 1px; height: 22px; border-left: 1px dashed rgba(242, 238, 232, 0.35); transform: translateX(-0.5px); transition: border-color .35s ease, opacity .35s ease; opacity: .75; }
/* Kanji label sits above the dashed line */
.anatomy-dot b { position: absolute; left: 50%; bottom: 38px; transform: translateX(-50%); color: rgba(242, 238, 232, 0.55); font-family: var(--serif); font-size: 15px; line-height: 1; white-space: nowrap; transition: color .35s ease, text-shadow .35s ease, transform .35s ease; }
/* Saya dot is on the scabbard (lower half of image) — flip its tooltip so the dashed line and kanji go BELOW the dot, not above. */
.anatomy-dot--saya::after { bottom: auto; top: 14px; }
.anatomy-dot--saya b { bottom: auto; top: 38px; }
.anatomy-dot:hover i, .anatomy-dot.is-active i { background: var(--signal); box-shadow: 0 0 0 1.5px rgba(255, 31, 31, 0.5), 0 0 18px rgba(255, 31, 31, 0.55); }
.anatomy-dot:hover::after, .anatomy-dot.is-active::after { border-color: var(--signal); opacity: 1; }
.anatomy-dot:hover b, .anatomy-dot.is-active b { color: var(--signal); text-shadow: 0 0 18px rgba(255, 31, 31, 0.4); }
.anatomy-dot.is-active { transform: scale(1.08); }
.anatomy-dot.is-active i { animation: ry-kanji-pulse 2.4s ease-in-out infinite; }
@keyframes ry-kanji-pulse {
  0%, 100% { box-shadow: 0 0 0 1.5px rgba(255, 31, 31, 0.50), 0 0 18px rgba(255, 31, 31, 0.55); }
  50% { box-shadow: 0 0 0 2px rgba(255, 31, 31, 0.72), 0 0 30px rgba(255, 31, 31, 0.88); }
}
/* Character spans inside the hero title (created by JS) */
/* Positions match the actual katana + scabbard composition (1659x948 source). Top half of the image = katana, bottom half = scabbard. Wrap/Guard at the same upper Y; Edge/Tip at the blade Y; Saya higher. */
.anatomy-dot--handle { left: 14%; top: 30%; }
.anatomy-dot--guard { left: 25%; top: 30%; }
.anatomy-dot--edge { left: 56%; top: 32%; }
.anatomy-dot--tip { left: 86%; top: 32%; }
.anatomy-dot--saya { left: 50%; top: calc(60% + 14px); }
/* Parts list — right side, vertically centered. Border-left is rendered as a pseudo-element so it only spans the actual content height (not the full grid track). */
.parts-list { grid-area: parts; position: relative; display: grid; align-content: center; gap: 0; align-self: center; padding-left: 28px; }
.parts-list::before { content: ""; position: absolute; left: 0; top: 8%; bottom: 8%; width: 1px; background: linear-gradient(180deg, transparent 0%, rgba(242,238,232,0.18) 18%, rgba(242,238,232,0.18) 82%, transparent 100%); }
.parts-list article { display: grid; grid-template-columns: 56px 1fr 18px; align-items: center; gap: 18px; padding: 14px 22px; border-bottom: 1px solid var(--border); cursor: pointer; opacity: 0.62; transition: opacity .35s ease, background .35s ease, border-color .35s ease; }
.parts-list article:last-child { border-bottom: 0; }
.parts-list article > div { min-width: 0; display: grid; gap: 4px; }
.parts-list article img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(185, 137, 56, 0.2)); }
.parts-list strong { color: var(--text); font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: 0; }
.parts-list p { font-size: 13px; line-height: 1.5; max-width: 320px; color: var(--text-muted); }
.parts-list i { width: 9px; height: 9px; border: 1px solid var(--text-muted); border-radius: 50%; transition: border-color .35s ease, background .35s ease; }
.parts-list article:hover, .parts-list article:focus-visible, .parts-list article.is-active { opacity: 1; background: linear-gradient(90deg, var(--kanji-soft) 0%, transparent 100%); border-color: rgba(122, 17, 17, 0.4); }
.parts-list article:focus-visible { outline: 1px solid rgba(122, 17, 17, .7); outline-offset: -1px; }
.parts-list .is-active strong { color: var(--signal); }
.parts-list .is-active i { border-color: var(--signal); background: var(--signal); box-shadow: 0 0 10px rgba(255, 31, 31, 0.5); }
/* ========================================================= SECTION 08 — FORGING PROCESS (with hover effects) ========================================================= */
.ryujin-process { display: grid; grid-template-columns: minmax(320px, 380px) minmax(900px, 1fr); align-items: center; gap: clamp(56px, 5vw, 92px); }
.process-copy { display: grid; gap: clamp(20px, 2.4vh, 30px); max-width: 380px; }
.process-copy h2 { font-size: clamp(58px, 4.8vw, 92px); line-height: 1.02; letter-spacing: 0; }
.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; gap: clamp(8px, 0.9vw, 16px); }
.process-grid article { position: relative; display: grid; grid-template-rows: 18px 60px auto 1fr; gap: 12px; min-height: 200px; padding: 24px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; transition: background .35s ease, transform .35s ease, border-color .35s ease; overflow: hidden; background: transparent; }
.process-grid article::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--kanji-soft) 0%, transparent 60%); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.process-grid article::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--signal), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.process-grid article:hover { background: rgba(122, 17, 17, 0.06); border-color: rgba(185, 137, 56, 0.22); }
.process-grid article:hover::before { opacity: 1; }
.process-grid article:hover::after { transform: scaleX(1); }
.process-grid article:hover b { color: var(--signal); }
.process-grid article:hover img { transform: translateY(-3px); filter: drop-shadow(0 6px 14px rgba(255, 31, 31, 0.35)); }
.process-grid article:hover strong { color: var(--signal); }
.process-grid b { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .12em; transition: color .35s ease; }
.process-grid img { width: 52px; height: 52px; object-fit: contain; align-self: center; filter: drop-shadow(0 4px 10px rgba(185, 137, 56, 0.25)); transition: transform .35s ease, filter .35s ease; }
.process-grid strong { color: var(--text); font-family: var(--serif); font-size: 22px; font-weight: 500; transition: color .35s ease; }
.process-grid p { font-size: 13px; line-height: 1.5; color: var(--text-muted); max-width: 240px; }
/* ========================================================= SECTION 09 — DESIGN SYSTEM 3 horizontal rows separated by thin dividers, matching the ref layout. No card backgrounds — content on pure black. ========================================================= */
.ryujin-system { display: grid; align-content: center; align-items: center; padding: clamp(60px, 6vh, 96px) clamp(60px, 5vw, 110px); }
.ds { display: grid; grid-template-rows: auto auto auto; width: 100%; height: auto; align-self: center; gap: 0; }
.ds__row { display: grid; padding: clamp(16px, 1.9vh, 26px) 0; border-bottom: 1px solid rgba(242, 238, 232, 0.10); align-items: start; }
.ds__row:first-child { padding-top: 0; }
.ds__row:last-child { padding-bottom: 0; border-bottom: 0; }
.ds__row--top { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 2.8vw, 56px); }
.ds__row--mid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.1fr); gap: clamp(40px, 4vw, 80px); }
.ds__row--bot { grid-template-columns: 1fr; }
.ds__stack { display: grid; gap: clamp(22px, 2.6vh, 36px); min-width: 0; align-content: start; }
.ds__cell { min-width: 0; display: grid; align-content: start; gap: clamp(10px, 1.2vh, 16px); }
.ds__label { display: block; color: var(--gold); font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
/* Intro cell */
.ds__intro .section-label { margin-bottom: clamp(12px, 1.4vh, 20px); }
.ds__title { margin: 0; font-family: var(--serif); font-size: clamp(34px, 3vw, 50px); line-height: .96; font-weight: 500; color: var(--text); letter-spacing: 0; }
.ds__divider { display: block; width: 60px; height: 1px; background: rgba(242, 238, 232, 0.22); margin: 4px 0; }
.ds__intro p { font-size: 13px; line-height: 1.55; color: var(--text-muted); max-width: 290px; font-family: var(--sans); font-style: normal; font-weight: 500; margin: 0; }
/* Typography cell */
.ds__meta { display: grid; gap: 4px; }
.ds__meta small { color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.ds__meta h3 { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2vw, 32px); font-weight: 500; line-height: 1.02; color: var(--text); }
.ds__meta p { margin: 0; font-size: 14px; color: var(--text-soft); font-family: var(--sans); font-style: normal; font-weight: 500; line-height: 1.5; }
.ds__typo-base { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.ds__typo-base > div { display: grid; gap: 4px; }
.ds__typo-base small { color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.ds__typo-base b { font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 1.4vw, 22px); color: var(--text); }
/* Type scale */
.ds__scale-grid { display: grid; gap: 3px; }
.ds__scale-head, .ds__scale-row { display: grid; grid-template-columns: 44px 60px 1fr; gap: 12px; font-size: 12.5px; align-items: baseline; padding: 3px 0; }
.ds__scale-head { margin-bottom: 6px; padding-bottom: 8px; border-bottom: 1px solid rgba(242, 238, 232, 0.08); }
.ds__scale-head span { color: var(--text-dim); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 10px; }
.ds__scale-row span:nth-child(1) { color: var(--gold); font-weight: 700; }
.ds__scale-row span:nth-child(2) { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.ds__scale-row span:nth-child(3) { color: var(--text-soft); font-family: var(--serif); font-style: italic; }
/* Samples */
.ds__samples { gap: 12px; }
.ds__sample { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline; }
.ds__sample em { font-style: normal; color: var(--text-dim); font-size: 10.5px; letter-spacing: .03em; text-align: right; white-space: nowrap; }
.ds__sample-h1, .ds__sample-h2, .ds__sample-h3 { margin: 0; font-family: var(--serif); font-weight: 500; color: var(--text); line-height: 1; }
.ds__sample-h1 { font-size: clamp(26px, 2.2vw, 34px); }
.ds__sample-h2 { font-size: clamp(20px, 1.7vw, 26px); }
.ds__sample-h3 { font-size: clamp(16px, 1.3vw, 20px); }
.ds__sample-block { display: grid; gap: 4px; padding-top: 4px; }
.ds__sample-block strong { font-family: var(--sans); color: var(--text); font-size: 13px; font-weight: 600; }
.ds__sample-block em { font-style: normal; color: var(--text-dim); font-size: 10.5px; letter-spacing: .03em; }
.ds__sample-block p { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 280px; font-family: var(--sans); font-style: normal; font-weight: 500; }
/* Colors */
.ds__colors { gap: clamp(16px, 1.8vh, 24px); }
.ds__color-group { display: grid; grid-template-columns: 76px 1fr; gap: 22px; align-items: start; }
.ds__color-group > small { color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding-top: 14px; }
.ds__sw-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ds__sw { display: grid; grid-template-rows: 40px auto auto; gap: 6px; }
.ds__sw i { display: block; width: 100%; height: 100%; background: var(--c); border: 1px solid rgba(242, 238, 232, 0.18); }
.ds__sw b { color: var(--text-soft); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: lowercase; }
.ds__sw em { color: var(--text-dim); font-size: 10.5px; font-style: normal; font-variant-numeric: tabular-nums; }
/* Spacing */
.ds__spacing { gap: clamp(20px, 2.4vh, 30px); }
.ds__spacing-rail { display: grid; grid-template-columns: repeat(8, 1fr); align-items: center; justify-items: center; position: relative; height: 26px; margin-top: 12px; }
.ds__spacing-rail::before { content: ""; position: absolute; left: 4%; right: 4%; top: 50%; height: 1px; background: rgba(242, 238, 232, 0.20); }
.ds__spacing-rail span { position: relative; display: block; width: var(--s); height: var(--s); background: var(--text-soft); z-index: 1; }
.ds__spacing-labels { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.ds__spacing-labels > div { display: grid; gap: 4px; text-align: center; }
.ds__spacing-labels b { color: var(--text-soft); font-size: 10.5px; font-weight: 600; text-transform: lowercase; }
.ds__spacing-labels em { color: var(--text-dim); font-size: 10.5px; font-style: normal; font-variant-numeric: tabular-nums; }
/* Motion */
.ds__motion-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 2.2vw, 40px); }
.ds__motion-cells > div { display: grid; gap: 6px; align-content: start; }
.ds__motion-cells small { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.ds__motion-cells strong { font-family: var(--serif); font-size: clamp(28px, 2.4vw, 38px); font-weight: 500; color: var(--text); line-height: 1; }
.ds__motion-cells p { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 200px; font-family: var(--sans); font-style: normal; font-weight: 500; }
/* Usage Rules */
/* Typography card — 3-column internal layout filling card width */
/* Colors — fills card width horizontally */
/* Spacing — horizontal rail filling card width */
/* Motion — horizontal 3-cell row */
/* Usage Rules — 2-col list inside its card */
/* Next project — quiet corner sign-off link */
.next-project { position: absolute; right: clamp(72px, 6vw, 124px); bottom: clamp(40px, 5vh, 64px); display: grid; grid-template-columns: auto auto; grid-template-areas: "label arrow" "name arrow"; align-items: center; column-gap: 18px; row-gap: 2px; z-index: 5; text-decoration: none; }
.next-project span { grid-area: label; display: block; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.next-project strong { grid-area: name; display: block; color: var(--text); font-family: var(--serif); font-size: 30px; font-weight: 500; transition: color .3s ease; }
.next-project i { grid-area: arrow; position: relative; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-style: normal; font-size: 0; line-height: 0; transition: background .3s ease, color .3s ease, transform .3s cubic-bezier(0.22, 1, 0.36, 1); }
.next-project i::before, .next-project i::after { content: ""; position: absolute; left: 50%; top: 50%; display: block; }
.next-project i::before { width: 15px; height: 1.6px; background: currentColor; transform: translate(-50%, -50%); }
.next-project i::after { width: 7px; height: 7px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: translate(calc(-50% + 5px), -50%) rotate(45deg); }
.next-project:hover i { background: var(--gold); color: #000; transform: translateX(3px); }
.next-project:hover strong { color: var(--gold); }
@media (max-width: 900px) {
  .next-project { position: static; margin-top: clamp(52px, 7vh, 64px); justify-content: flex-start; }
  .next-project strong { font-size: 30px; }
  .next-project i { width: 44px; height: 44px; }
}
/* a little more separation between the last few panels on the horizontal track */
@media (min-width: 901px) {
  .ryujin-process, .ryujin-system { margin-left: clamp(32px, 3vw, 60px); }
}
/* Short laptop guard: keep the final sign-off in flow so it never overlaps the design-system content on 13" and compact browser heights. */
@media (min-width: 901px) and (max-height: 820px) {
  .section-panel { padding-top: clamp(66px, 7vh, 82px); padding-bottom: clamp(34px, 4.5vh, 52px); }
  .ryujin-system { grid-template-rows: minmax(0, 1fr) auto; align-content: center; align-items: stretch; row-gap: clamp(12px, 2vh, 22px); padding-top: clamp(66px, 7vh, 82px); padding-bottom: clamp(28px, 4vh, 42px); }
  .ryujin-system .ds { align-self: center; min-height: 0; }
  .ryujin-system .ds__row { padding-top: clamp(10px, 1.35vh, 16px); padding-bottom: clamp(10px, 1.35vh, 16px); }
  .ryujin-system .ds__row--top { gap: clamp(18px, 2vw, 34px); }
  .ryujin-system .ds__row--mid { gap: clamp(24px, 2.6vw, 46px); }
  .ryujin-system .ds__cell, .ryujin-system .ds__stack { gap: clamp(7px, 1vh, 12px); }
  .ryujin-system .ds__title { font-size: clamp(28px, 2.35vw, 38px); }
  .ryujin-system .ds__intro p, .ryujin-system .ds__sample-block p, .ryujin-system .ds__motion-cells p { font-size: 11px; line-height: 1.42; }
  .ryujin-system .ds__scale-head, .ryujin-system .ds__scale-row { padding: 2px 0; font-size: 11px; }
  .ryujin-system .ds__sw { grid-template-rows: 30px auto auto; gap: 4px; }
  .ryujin-system .ds__spacing { gap: 12px; }
  .ryujin-system .ds__spacing-rail { height: 20px; margin-top: 4px; }
  .ryujin-system .ds__motion-cells strong { font-size: clamp(24px, 2vw, 30px); }
  .ryujin-system .next-project { position: relative; right: auto; bottom: auto; justify-self: end; align-self: end; transform: none; margin-right: clamp(0px, 2vw, 34px); }
  .ryujin-system .next-project strong { font-size: clamp(24px, 2vw, 28px); }
  .ryujin-system .next-project i { width: 38px; height: 38px; }
}
@media (min-width: 901px) and (max-width: 1280px) {
  .section-panel { padding-left: calc(var(--rail) + clamp(34px, 3.6vw, 58px)); padding-right: clamp(42px, 4.8vw, 74px); }
}
/* ========================================================= REVEAL DEFAULTS (no flicker before JS) ========================================================= */
.reveal-block, .reveal-stagger > * { will-change: transform, opacity, filter; }
body.ryujin-page.is-entering .ryujin-hero .reveal-block, body.ryujin-page.is-entering .ryujin-hero .reveal-stagger > * { opacity: 0; transform: translateY(56px); filter: blur(10px); }
/* ========================================================= MOBILE FALLBACK ========================================================= */
@media (max-width: 900px) {
  html, body { overflow-y: auto; overscroll-behavior: auto; }
  html { overflow-x: hidden; }
  body.ryujin-page { overflow-x: hidden; overflow-y: auto; overscroll-behavior: auto; }
  .showcase-main { display: block; width: 100%; }
  .section-panel { width: 100%; height: auto; min-height: auto; padding: clamp(70px, 8.5vh, 86px) 24px clamp(42px, 6vh, 58px); }
  .ryujin-hero { min-height: 100svh; }
  .ryujin-hero, .ryujin-challenge, .ryujin-approach, .ryujin-solution, .ryujin-anatomy, .ryujin-process, .ryujin-system { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .ryujin-anatomy { grid-template-rows: auto auto auto; }
  .anatomy-copy, .sword-stage, .parts-list { grid-area: auto; max-width: 100%; }
  .hero-copy h1 { font-size: clamp(58px, 17vw, 90px); }
  .anatomy-copy h2, .challenge-copy h2, .approach-copy h2, .solution-copy h2, .process-copy h2 { font-size: clamp(30px, 8vw, 52px); line-height: 1.05; }
  .hero-sword, .challenge-visual, .approach-visual, .solution-mockup { min-height: 360px; height: 360px; }
  /* Samurai (challenge) and the PC mockups (approach) images have a dark/empty lower band that read as an oversized gap before the next eyebrow. Trim their height so the next chapter sits closer (solution-mockup keeps its height). */
  .ryujin-challenge .challenge-visual, .ryujin-approach .approach-visual { min-height: 290px; height: 290px; }
  .hero-sword { overflow: hidden; min-height: clamp(330px, 58vh, 450px); height: clamp(330px, 58vh, 450px); }
  .hero-sword::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000 82%); }
  .hero-sword img { object-position: 66% center; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 10%, #000 72%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 10%, #000 72%, transparent 100%); mask-composite: intersect; }
  /* sword keeps its real aspect ratio — a forced height was pinning its width to 630px and overflowing */
  .sword-stage { width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: 1659 / 948; margin-top: 8px; }
  .journey-track, .process-grid, .system-board, .impact-row { grid-template-columns: 1fr; grid-template-areas: none; }
  .journey-track article::after, .journey-track article::before { display: none; }
  .parts-list { border-left: none; border-top: 1px solid var(--border); }
  .parts-list article { grid-template-columns: 56px 1fr; }
  .parts-list i { display: none; }
  /* design system: stack rows and cells into a clean single column */
  .ds__row--top, .ds__row--mid { grid-template-columns: 1fr; gap: clamp(22px, 5vh, 34px); }
  .ds__stack { gap: clamp(22px, 5vh, 34px); }
  .ds__color-group { grid-template-columns: 60px 1fr; gap: 14px; }
  .ds__spacing-labels { gap: 3px; }
  .ds__spacing-labels b, .ds__spacing-labels em { font-size: 8px; }
}
/* Final mobile rhythm: keep every chapter spaced like the Solution -> Journey handoff, instead of alternating between huge and cramped gaps. */
@media (max-width: 900px) {
  body.ryujin-page .section-panel { padding-top: clamp(30px, 3.8vh, 44px); padding-bottom: clamp(28px, 3.4vh, 42px); }
  body.ryujin-page .section-panel + .section-panel { margin-top: -1px; }
  body.ryujin-page .ryujin-hero { min-height: 100svh; padding-top: clamp(86px, 11vh, 112px); }
  body.ryujin-page .ryujin-solution, body.ryujin-page .ryujin-approach, body.ryujin-page .ryujin-anatomy, body.ryujin-page .ryujin-process, body.ryujin-page .ryujin-system { row-gap: clamp(22px, 4vh, 36px); }
}
