:root {
  --bg: #22549a;
  --bg-deep: #1a4380;
  --bg-darker: #0f3568;
  --fg: #ffffff;
  --dim: rgba(255,255,255,0.65);
  --faint: rgba(255,255,255,0.35);
  --sky: #6fb3ff;
  --sky-bright: #a8d4ff;
  --line: rgba(255,255,255,0.22);
  --jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", sans-serif;
  --jp-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); font-family: var(--jp); scroll-behavior: smooth; }
html { scroll-padding-top: 76px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============ OPENING INTRO ============ */
.intro {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.intro.done { display: none; }
.intro-logo {
  position: relative; z-index: 3;
  opacity: 0; transform: translateY(8px) scale(0.94);
  animation: introLogoIn 1.0s cubic-bezier(.2,.7,.2,1) 0.25s forwards,
             introLogoOut 0.7s cubic-bezier(.7,0,.85,.3) 2.0s forwards;
}
.intro-logo img { height: 56px; width: auto; filter: drop-shadow(0 6px 20px rgba(0,0,0,0.45)); }
.intro-tag {
  position: absolute; z-index: 3;
  bottom: calc(50% - 70px); left: 50%; transform: translateX(-50%);
  font-family: 'Noto Serif JP', serif; font-style: italic; font-size: 12px;
  letter-spacing: 0.32em; color: rgba(255,255,255,0.7);
  opacity: 0; animation: introTagIn 1.0s ease 0.6s forwards, introLogoOut 0.6s ease 2.0s forwards;
}
.intro-curtain {
  position: absolute; left: 0; right: 0; height: 50%; z-index: 2;
  background: linear-gradient(180deg, #0a1f3a 0%, #22549a 100%);
  animation: introCurtain 1.1s cubic-bezier(.76,0,.24,1) 2.3s forwards;
}
.intro-curtain.top { top: 0; transform-origin: top center; }
.intro-curtain.bot { bottom: 0; transform-origin: bottom center; background: linear-gradient(0deg, #0a1f3a 0%, #22549a 100%); }
.intro-curtain.top { animation-name: introCurtainTop; }
.intro-curtain.bot { animation-name: introCurtainBot; }

@keyframes introLogoIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introTagIn { to { opacity: 1; } }
@keyframes introLogoOut { to { opacity: 0; transform: translateY(-12px) scale(0.95); } }
@keyframes introCurtainTop { to { transform: translateY(-100%); } }
@keyframes introCurtainBot { to { transform: translateY(100%); } }

/* Hero lines hidden until intro finishes, then revealed in sequence */
.lp-hero [data-intro-line] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.intro-played .lp-hero [data-intro-line] { opacity: 1; transform: none; }
.intro-played .lp-hero [data-intro-line="0"] { transition-delay: 0.10s; }
.intro-played .lp-hero [data-intro-line="1"] { transition-delay: 0.25s; }
.intro-played .lp-hero [data-intro-line="2"] { transition-delay: 0.55s; }
.intro-played .lp-hero [data-intro-line="3"] { transition-delay: 0.70s; }
.intro-played .lp-hero [data-intro-line="4"] { transition-delay: 1.00s; }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; color: var(--fg);
  font-family: var(--en); font-size: 11px; letter-spacing: 0.22em; font-weight: 500;
  background: linear-gradient(to bottom, rgba(20,55,110,0.85), rgba(20,55,110,0));
  transition: background .3s ease;
}
.nav.solid { background: rgba(20,55,110,0.92); backdrop-filter: blur(10px); }
.nav-left { display: flex; align-items: center; gap: 14px; }
.nav-brand img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--fg); padding-bottom: 4px; border-bottom: 1px solid transparent; transition: color .25s ease, border-color .25s ease; }
.nav-links a:hover { color: var(--sky-bright); border-color: var(--sky-bright); }
.menu-btn { display: none; background: none; border: none; color: var(--fg); font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; cursor: pointer; padding: 4px 6px; }

.sns-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; transition: opacity .2s ease; }
.sns-icon img { width: 20px; height: 20px; object-fit: contain; display: block; }
.sns-icon:hover { opacity: 0.7; }
.nav-sns { display: flex; gap: 8px; margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--line); }

[data-fade] { opacity: 0; transform: translateY(14px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
[data-fade].in { opacity: 1; transform: none; }
[data-fade-delay="1"].in { transition-delay: .08s; }
[data-fade-delay="2"].in { transition-delay: .16s; }
[data-fade-delay="3"].in { transition-delay: .24s; }
[data-fade-delay="4"].in { transition-delay: .32s; }

/* ============ HERO ============ */
.lp-hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate;
}
.lp-hero-image {
  position: absolute; inset: -10% 0 -10% 0; z-index: -2;
  will-change: transform;
}
.lp-hero-image img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  transform: scale(1.08);
  transition: transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.intro-played .lp-hero-image img { transform: scale(1); }
.lp-hero-tint {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 75%, rgba(10,31,58,0.45) 0%, rgba(10,31,58,0) 60%),
    linear-gradient(180deg, rgba(34,84,154,0.08) 0%, rgba(34,84,154,0.15) 50%, rgba(15,53,104,0.72) 100%);
  z-index: 1;
}

.lp-hero-type {
  position: relative; z-index: 2;
  text-align: center;
  pointer-events: none;
  width: min(30vw, 370px);
}
.lp-hero-logo {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 6px 32px rgba(10,31,58,0.5));
}
.lp-hero-line { display: block; }

.lp-hero-sub {
  position: absolute; bottom: 90px; left: 0; right: 0; text-align: center; z-index: 3;
}
.lp-hero-sub-jp {
  font-family: var(--jp); font-weight: 400; font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.12em; color: var(--fg);
  text-shadow: 0 2px 10px rgba(10,31,58,0.5);
}
.lp-hero-sub-en {
  font-family: var(--en); font-style: italic; font-size: 11px;
  letter-spacing: 0.32em; color: var(--sky-bright); margin-top: 14px;
}

.lp-hero-scroll {
  position: absolute; bottom: 28px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em; color: var(--dim);
  z-index: 3;
  text-align: center;
}
.lp-hero-scroll .line { width: 1px; height: 28px; background: var(--dim); position: relative; overflow: hidden; }
.lp-hero-scroll .line::after { content: ''; position: absolute; top: -28px; left: 0; right: 0; height: 14px; background: var(--fg); animation: scrollLine 1.8s ease-in-out infinite; }
@keyframes scrollLine { 0%{top:-14px}50%{top:14px}100%{top:28px} }

/* ============ SECTION SHELL ============ */
.lp-section { padding: 110px 32px 80px; max-width: 1400px; margin: 0 auto; position: relative; }
.lp-section-head {
  display: flex; align-items: baseline; gap: 28px; margin-bottom: 48px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
}

/* Scroll reveal — used by IO via .reveal class */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.0s cubic-bezier(.2,.7,.2,1), transform 1.0s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.56s; }
.reveal-stagger.in > *:nth-child(9) { transition-delay: 0.64s; }

/* Heading slide-up with overflow clip */
.reveal-text { display: inline-block; overflow: hidden; vertical-align: top; }
.reveal-text > * { display: inline-block; transform: translateY(110%); transition: transform 1.1s cubic-bezier(.76,0,.24,1); }
.reveal-text.in > * { transform: translateY(0); }
.lp-section-num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.32em; color: var(--sky-bright); }
.lp-section-title { font-family: var(--en); font-weight: 600; font-size: clamp(40px, 6vw, 68px); margin: 0; letter-spacing: 0.06em; }
.lp-section-tag { font-family: var(--jp-serif); font-style: italic; font-size: 18px; color: var(--dim); letter-spacing: 0.06em; margin-left: auto; }

/* ============ VISION ============ */
.lp-vision-body { max-width: 880px; margin: 0 auto; text-align: center; }
.lp-vision-quote {
  font-family: var(--jp-serif); font-weight: 400; font-size: clamp(24px, 3vw, 34px);
  line-height: 1.6; letter-spacing: 0.06em; margin: 0;
}
.lp-vision-intro {
  font-family: var(--jp); font-weight: 300; font-size: clamp(14px, 1.25vw, 16px);
  margin: 20px 0 16px; letter-spacing: 0.06em; line-height: 1.9;
}
.lp-vision-tale { display: grid; gap: 16px; }
.lp-vision-tale p {
  font-family: var(--jp); font-weight: 300; font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.9; letter-spacing: 0.06em; margin: 0;
}
.lp-vision-emp {
  font-family: var(--jp); font-weight: 300; font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.9; letter-spacing: 0.06em; margin: 0;
}
.lp-vision-en {
  font-family: var(--jp-serif); font-style: italic; font-size: 14px; line-height: 1.85;
  color: var(--dim); margin: 40px 0 0; letter-spacing: 0.02em; text-align: left;
}

/* ============ PARALLAX BAND ============ */
.lp-parallax {
  position: relative; width: 100%; height: 18vh; min-height: 150px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate;
}
.lp-parallax-bg {
  position: absolute; inset: -20% 0;
  background: url('assets/feather.jpg') center center / cover no-repeat;
  z-index: -2; will-change: transform;
  transition: transform 0s linear;
}
.lp-parallax-veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(34,84,154,0.15) 0%, rgba(34,84,154,0.6) 100%),
    linear-gradient(180deg, rgba(34,84,154,0.45) 0%, rgba(34,84,154,0.25) 50%, rgba(34,84,154,0.55) 100%);
}
.lp-parallax-veil-horizon {
  background:
    linear-gradient(180deg, rgba(34,84,154,0.65) 0%, rgba(34,84,154,0.15) 35%, rgba(34,84,154,0.15) 65%, rgba(34,84,154,0.7) 100%);
}
.lp-parallax-horizon .lp-parallax-q-jp { color: #0a1f3a; text-shadow: 0 2px 18px rgba(255,255,255,0.4); }
.lp-parallax-horizon .lp-parallax-q-en { color: rgba(10,31,58,0.75); }
.lp-parallax-horizon .lp-parallax-bg {
  background: url('assets/horizon.jpg') center center / cover no-repeat;
}
.lp-parallax-slim { height: 18vh; min-height: 140px; }
.lp-parallax-quote {
  text-align: center; padding: 0 32px;
  text-shadow: 0 4px 24px rgba(10,31,58,0.6);
}
.lp-parallax-q-jp {
  display: block; font-family: var(--jp-serif); font-weight: 300;
  font-size: clamp(24px, 4vw, 44px); line-height: 1.6; letter-spacing: 0.12em;
  color: var(--fg);
}
.lp-parallax-q-en {
  display: block; margin-top: 24px;
  font-family: var(--en); font-style: italic; font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.32em; color: rgba(255,255,255,0.85);
}

/* ============ WHAT WE DO ============ */
.lp-wwd-diagram { max-width: 1000px; margin: -60px auto -40px; position: relative; }
.lp-wwd-diagram .diagram { width: 100%; height: auto; display: block; transform-origin: center; will-change: transform, filter; }
@media (prefers-reduced-motion: reduce) {
  .lp-wwd-diagram .diagram { transform: none !important; filter: none !important; }
}

.lp-wwd-detail {
  max-width: 1200px; margin: 80px auto 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.lp-wwd-cell {
  padding: 32px 22px 36px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; min-height: 240px;
}
.lp-wwd-cell:last-child { border-right: none; }
.lp-wwd-num { font-family: var(--jp-serif); font-style: italic; font-size: 14px; color: var(--sky-bright); letter-spacing: 0.26em; }
.lp-wwd-ttl { font-family: var(--en); font-weight: 600; font-size: 20px; letter-spacing: 0.04em; margin-top: 6px; }
.lp-wwd-jp { font-family: var(--jp-serif); font-style: italic; font-size: 13px; color: var(--dim); }
.lp-wwd-desc { font-family: var(--jp); font-size: 13px; line-height: 1.95; color: var(--dim); font-weight: 300; letter-spacing: 0.04em; margin: auto 0 0; }

@media (max-width: 760px) {
  .lp-wwd-detail { grid-template-columns: 1fr; margin-top: 48px; }
  .lp-wwd-cell { border-right: none; border-bottom: 1px solid var(--line); min-height: 0; padding: 22px 0 24px; }
  .lp-wwd-cell:last-child { border-bottom: none; }
}

/* ============ WORKS ============ */
.lp-works-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.lp-work-card {
  display: grid; gap: 14px;
  background: transparent; border: none; padding: 0; cursor: pointer;
  text-align: left; color: inherit; font: inherit;
  transition: transform .35s ease;
}
.lp-work-card:hover { transform: translateY(-6px); }
.lp-work-thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: #0a1f3a; border: 1px solid var(--line);
}
.lp-work-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}
.lp-work-card:hover .lp-work-thumb img { transform: scale(1.18) !important; filter: brightness(0.85); }
.lp-work-thumb-pattern {
  background: repeating-linear-gradient(120deg, rgba(255,255,255,0.08) 0 16px, rgba(255,255,255,0.16) 16px 32px);
  display: flex; align-items: center; justify-content: center;
}
.lp-link-icon { font-family: var(--mono); font-size: 32px; color: var(--sky-bright); }
.lp-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, transform .25s ease;
}
.lp-play::after { content: ''; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #0a1f3a; margin-left: 4px; }
.lp-work-card:hover .lp-play { background: var(--sky-bright); transform: translate(-50%, -50%) scale(1.1); }

.lp-work-meta { display: grid; gap: 6px; }
.lp-work-cat { font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; color: var(--sky-bright); }
.lp-work-title { font-family: var(--jp); font-weight: 500; font-size: 17px; letter-spacing: 0.04em; line-height: 1.5; }
.lp-work-en { font-family: var(--jp-serif); font-style: italic; font-size: 13px; color: var(--dim); }

/* ============ ABOUT ============ */
.lp-about-table { max-width: 1100px; margin: 0 auto; }
.lp-about-row {
  display: grid; grid-template-columns: 200px 1fr 1fr; gap: 32px;
  padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.lp-about-row:first-child { border-top: 1px solid var(--line); }
.lp-about-row .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em; color: var(--sky-bright); }
.lp-about-row .jp { font-family: var(--jp); font-size: 15px; letter-spacing: 0.04em; line-height: 1.8; font-weight: 400; }
.lp-about-row .en { font-family: var(--en); font-style: italic; font-size: 12px; letter-spacing: 0.04em; line-height: 1.8; color: var(--dim); }

/* ============ CONTACT ============ */
.lp-contact-body { max-width: 720px; margin: 0 auto; }
.lp-contact-note {
  text-align: center; font-family: var(--jp); font-weight: 300;
  font-size: 14px; line-height: 1.9; letter-spacing: 0.05em;
  color: var(--dim); margin: 0 auto 32px; max-width: 560px;
}
.lp-contact-mail {
  display: block; text-align: center;
  font-family: var(--jp); font-weight: 500; font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: 0.04em; padding-bottom: 8px;
  margin: 0 auto 56px; border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s; width: fit-content;
}
.lp-contact-mail:hover { color: var(--sky-bright); border-color: var(--sky-bright); }

.contact-form { display: grid; gap: 24px; }
.contact-form label { display: grid; gap: 8px; }
.contact-form .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; color: var(--dim); }
.contact-form .lbl .req { color: #ff8a8a; margin-left: 6px; }
.contact-form input, .contact-form textarea {
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  color: var(--fg); font-family: var(--jp); font-size: 16px; font-weight: 300;
  padding: 0 0 12px; letter-spacing: 0.04em; outline: none;
  transition: border-color .25s ease;
}
.contact-form textarea { min-height: 140px; padding: 14px 0 12px; line-height: 1.85; resize: vertical; font-size: 15px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--sky-bright); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--faint); }
.contact-form button {
  justify-self: start; margin-top: 12px; padding: 14px 36px;
  background: var(--fg); color: var(--bg); border: none;
  font-family: var(--en); font-size: 11px; letter-spacing: 0.32em; font-weight: 600;
  cursor: pointer; transition: opacity .25s ease;
}
.contact-form button:hover { opacity: 0.85; }

.contact-form .file-field { gap: 12px; }
.contact-form .lbl .opt { color: var(--faint); font-size: 9px; margin-left: 8px; letter-spacing: 0.22em; }
.file-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 0 6px; border-bottom: 1px solid var(--line);
}
.file-row input[type="file"] { display: none; }
.file-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em;
  color: var(--fg); border: 1px solid var(--line);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.file-btn:hover { color: var(--sky-bright); border-color: var(--sky-bright); background: rgba(168,212,255,0.08); }
.file-name { font-family: var(--jp); font-size: 13px; color: var(--dim); letter-spacing: 0.04em; }
.file-name.has-file { color: var(--sky-bright); }

.contact-status {
  margin-top: 20px; padding: 14px 18px;
  font-family: var(--jp); font-size: 13px; letter-spacing: 0.04em; line-height: 1.7;
  border: 1px solid var(--line);
}
.contact-status.sending { color: var(--dim); }
.contact-status.success { color: var(--sky-bright); border-color: var(--sky-bright); background: rgba(168,212,255,0.08); }
.contact-status.error { color: #ff8a8a; border-color: rgba(255,138,138,0.5); background: rgba(255,138,138,0.06); }
.contact-form button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ FOOTER ============ */
.lp-footer {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: 80px 32px 40px; border-top: 1px solid var(--line);
  background: var(--bg-darker);
}
.lp-footer-brand img { height: 38px; width: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.lp-footer-brand.in img { animation: footerLogoIn 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes footerLogoIn {
  0%   { transform: translateY(40px) scale(.7) rotate(-8deg); opacity: 0; }
  55%  { transform: translateY(-6px) scale(1.05) rotate(2deg); opacity: 1; }
  78%  { transform: translateY(0) scale(1) rotate(-1deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}
.lp-footer-brand.in img { animation: footerLogoIn 1.4s cubic-bezier(.2,.7,.2,1) both, footerLogoFloat 4.5s ease-in-out 1.6s infinite; }
@keyframes footerLogoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(-1.5deg); }
}
.lp-footer-brand:hover img { transform: translateY(-4px) rotate(2deg) scale(1.04); animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .lp-footer-brand.in img { animation: none !important; transform: none !important; }
}
.lp-footer-sns { display: flex; gap: 24px; align-items: center; }
.lp-footer-sns-icon { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; }
.lp-footer-sns-icon img { width: 22px; height: 22px; object-fit: contain; display: block; }
.lp-footer-copy { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--dim); margin-top: 12px; }

/* ============ TO-TOP BUTTON ============ */
.to-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 80;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sky); border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .4s ease, transform .4s cubic-bezier(.2,.7,.2,1), background .25s ease;
  box-shadow: 0 8px 24px rgba(10,31,58,0.35);
}
.to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.to-top:hover { background: var(--sky-bright); transform: translateY(-4px) scale(1.05); }
.to-top-arrow {
  width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 8px solid var(--bg-deep);
}
.to-top-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.22em; color: var(--bg-deep); font-weight: 500; }
@media (max-width: 760px) {
  .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 12, 28, 0.94); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 32px; opacity: 0; transition: opacity .3s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox-frame { width: 100%; max-width: 1280px; aspect-ratio: 16 / 9; position: relative; background: #000; }
.lightbox-frame.short { aspect-ratio: 9 / 16; max-width: 420px; }
.lightbox-frame > #lightboxPlayer { position: absolute; inset: 0; }
.lightbox-frame iframe { width: 100%; height: 100%; border: none; display: block; }
.lightbox-close {
  position: absolute; top: -44px; right: 0;
  background: none; border: none; color: var(--fg);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em; cursor: pointer;
  padding: 8px 12px; transition: color .2s ease;
}
.lightbox-close:hover { color: var(--sky-bright); }
.lightbox-meta { position: absolute; top: -44px; left: 0; font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; color: var(--dim); padding: 8px 0; max-width: 70%; }
.lightbox-fallback { position: absolute; bottom: -44px; right: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--sky-bright); padding: 8px 12px; border: 1px solid var(--sky-bright); transition: background .2s ease; }
.lightbox-fallback:hover { background: rgba(168,212,255,0.12); }

/* ============ SCROLL EFFECTS ============ */
/* Progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: rgba(255,255,255,0.08); pointer-events: none;
}
.scroll-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--sky), var(--sky-bright));
  transform-origin: left;
  transition: width .08s linear;
}

/* Split character reveal — driven by JS via --reveal (0..1) */
.lp-section-title .splch {
  display: inline-block; overflow: hidden; line-height: 1.05; vertical-align: top;
}
.lp-section-title .splch > span {
  display: inline-block;
  transform: translateY(calc((1 - var(--char-p, 0)) * 200%)) rotate(calc((1 - var(--char-p, 0)) * 24deg)) scale(calc(0.6 + 0.4 * var(--char-p, 0)));
  opacity: var(--char-p, 0);
}
.lp-section-title small.ssm { display: inline-block; margin-left: 18px; }
.lp-section-title small.ssm .splch > span { transition-duration: 0.9s; }

/* Generic scroll-reveal variants — bigger movement and longer durations */
.sr { opacity: 0; transition: opacity 1.1s cubic-bezier(.2,.7,.2,1), transform 1.1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--stagger, 0s); will-change: transform, opacity; }
.sr.in { opacity: 1; transform: none !important; }
.sr-up    { transform: translateY(70px); }
.sr-scale { transform: scale(.88); }
.sr-slide-left { transform: translateX(-60px); }
.sr-stagger { transform: translateY(50px); opacity: 0; }
/* Scroll-driven blur fade — CSS reads --p (0..1) set by JS per frame */
.sr-blur {
  --p: 0;
  opacity: var(--p);
  transform: translateY(calc((1 - var(--p)) * 60px));
  filter: blur(calc((1 - var(--p)) * 24px));
  transition: none;
}
.lp-about-row.sr-blur {
  transform: translateY(calc((1 - var(--p)) * 100px));
  filter: blur(calc((1 - var(--p)) * 36px));
}

/* Work card — color block wipe reveal */
.sr-mask { opacity: 0; transform: translateY(60px) scale(0.95); transition: opacity 1.1s cubic-bezier(.2,.7,.2,1) var(--stagger, 0s), transform 1.1s cubic-bezier(.2,.7,.2,1) var(--stagger, 0s); }
.sr-mask.in { opacity: 1; transform: none; }
.lp-work-card.sr .lp-work-thumb { position: relative; overflow: hidden; }
.lp-work-card.sr .lp-work-thumb::after { content: none; }
.lp-work-wipe {
  position: absolute; inset: 0; z-index: 4;
  background: var(--sky);
  transform: translate3d(101%, 0, 0);
  pointer-events: none;
  will-change: transform;
}
.lp-work-card.sr .lp-work-thumb img { transform: scale(1.18); transition: transform 1.4s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--stagger, 0s) + .25s); }
.lp-work-card.sr.in .lp-work-thumb img { transform: scale(1); }
.lp-work-card.sr .lp-work-meta {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
  transition-delay: calc(var(--stagger, 0s) + .6s);
}
.lp-work-card.sr.in .lp-work-meta { opacity: 1; transform: none; }

/* Thumb image will be transformed by JS — make transitions snappy on hover only */
.lp-work-thumb img { transition: transform .8s cubic-bezier(.6,.05,.36,1), filter .5s ease; will-change: transform; }
.lp-work-card:hover .lp-work-thumb img { filter: brightness(0.8); }

/* Hero — make sure transforms are fluid */
.lp-hero-bg { will-change: transform; }
.lp-hero-type, .lp-hero-sub, .lp-hero-scroll { will-change: transform, opacity; transition: transform .8s cubic-bezier(.2,.7,.2,1); }

@media (prefers-reduced-motion: reduce) {
  /* Disable one-shot CSS reveals when user prefers reduced motion.
     Scroll-driven (JS-set) effects on .lp-section-title .splch and .lp-work-card.sr .lp-work-thumb
     are intentionally kept — they respond to user scroll input, not auto-play. */
  .sr, .sr-up, .sr-scale, .sr-slide-left, .sr-stagger,
  .lp-work-card.sr .lp-work-meta {
    transition: none !important; transform: none !important; opacity: 1 !important;
    clip-path: none !important;
  }
}
@media (max-width: 1000px) {
  .lp-works-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav { padding: 14px 18px; }
  .nav-links { display: none; }
  .lp-hero-type { width: min(60vw, 480px); }
  .lp-hero-scroll { left: 0; right: 0; transform: none; bottom: 32px; }
  .menu-btn { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(20,55,110,0.96); padding: 24px 18px 32px;
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-sns { margin-left: 0; padding-left: 0; border-left: none; margin-top: 12px; }

  .lp-hero-goose { width: 92vw; }
  .lp-hero-sub { bottom: 70px; padding: 0 18px; }

  .lp-section { padding: 64px 18px 64px; }
  html { scroll-padding-top: 56px; }
  .lp-section-head { flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
  .lp-section-tag { margin-left: 0; flex-basis: 100%; }

  .lp-works-grid { grid-template-columns: 1fr; gap: 28px; }

  .lp-about-row { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
  .lp-about-row .k { font-size: 10px; }
  .lp-about-row .jp { font-size: 13.5px; line-height: 1.7; }
  .lp-about-row .en { font-size: 11px; line-height: 1.6; }

  /* VISION — smaller text + centered + balanced wrap to avoid 1-char orphan lines */
  .lp-vision-body { text-align: center; }
  .lp-vision-quote { font-size: 27px; line-height: 1.5; text-align: center; text-wrap: balance; }
  .lp-vision-intro { font-size: 13px; line-height: 1.8; margin: 16px 0 14px; text-align: center; text-wrap: balance; }
  .lp-vision-tale { gap: 14px; }
  .lp-vision-tale p { font-size: 13px; line-height: 1.8; text-align: center; text-wrap: balance; }
  .lp-vision-emp { font-size: 13px !important; }
  .lp-vision-en { font-size: 12.5px; line-height: 1.8; margin-top: 32px; text-align: center; text-wrap: pretty; }

  .lightbox { padding: 16px; }
  .lightbox-close, .lightbox-meta { top: -36px; }
}
