:root {
  --bg: #0b0910;
  --bg-2: #15111d;
  --ink: #f6f2fa;
  --ink-dim: #a49cb0;
  --lavender: #a98bd0;
  --purple: #6e4e8e;
  --pink: #ff9acd;
  --magenta: #e05bb8;
  --charcoal: #4a474f;
  --line: rgba(246, 242, 250, 0.12);
  --font: "Outfit", system-ui, sans-serif;
  --font-jp: "M PLUS Rounded 1c", "Outfit", sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

@media (pointer: fine) {
  body, a, button { cursor: none; }
}

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

/* ---------- loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-bar {
  width: min(220px, 50vw);
  height: 2px;
  background: var(--line);
  overflow: hidden;
  border-radius: 2px;
}
.loader-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--lavender), var(--pink));
  animation: load 1s ease-in-out infinite;
}
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
  opacity: 0;
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, padding .4s, backdrop-filter .4s;
}
.nav.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(11, 9, 16, .72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
section[id] { scroll-margin-top: 70px; }
.nav-logo { display: block; width: 84px; }
.nav-links { display: flex; gap: clamp(16px, 2.6vw, 40px); }
.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color .3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lavender), var(--pink));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s cubic-bezier(.7, 0, .2, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- logo crops (logo.webp is 2000x2000, artwork box 450..1545 x 700..1125) ---------- */
.logo-crop, .logo {
  container-type: inline-size;
  position: relative;
  display: block;
  aspect-ratio: 1095 / 425;
}
.logo-crop { overflow: hidden; }
.logo-crop img {
  position: absolute;
  width: calc(2000 / 1095 * 100cqw);
  left: calc(-450 / 1095 * 100cqw);
  top: calc(-700 / 1095 * 100cqw);
  max-width: none;
}

.logo {
  width: min(560px, 100%);
  margin: 18px 0 6px -1.2%;
}
.logo canvas {
  /* headroom around the artwork so the wave never clips; must match PAD in logo.js */
  position: absolute;
  left: -4%;
  top: -50%;
  width: 108%;
  height: 170%;
  pointer-events: none;
}

/* tagline badge: 2000x1000, artwork box 75..1925 x 335..650 */
.badge {
  container-type: inline-size;
  position: relative;
  width: min(300px, 58%);
  aspect-ratio: 1850 / 315;
  overflow: hidden;
  margin-left: 26%;
  transform-origin: left center;
}
.badge img {
  position: absolute;
  width: calc(2000 / 1850 * 100cqw);
  left: calc(-75 / 1850 * 100cqw);
  top: calc(-335 / 1850 * 100cqw);
  max-width: none;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px var(--gutter) 120px;
  pointer-events: none;
}
.hero a, .hero button, .hero .logo { pointer-events: auto; }

.hero-copy {
  width: min(560px, 48vw);
  display: flex;
  flex-direction: column;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 17, 29, .55);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255, 154, 205, .7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(255, 154, 205, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 154, 205, 0); }
}

.intro {
  margin-top: 30px;
  max-width: 34ch;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--ink-dim);
}
.intro strong { color: var(--ink); font-weight: 600; }

.ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  color: #2a1530;
  background: linear-gradient(135deg, var(--pink), var(--magenta));
  box-shadow: 0 10px 40px -10px rgba(224, 91, 184, .7), inset 0 1px 0 rgba(255, 255, 255, .5);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow .4s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #fff, var(--pink));
  transform: translateY(101%);
  transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { box-shadow: 0 14px 50px -8px rgba(255, 154, 205, .85), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn span { display: inline-block; pointer-events: none; }

.btn-ghost {
  color: var(--ink);
  background: rgba(21, 17, 29, .5);
  border: 1px solid rgba(169, 139, 208, .45);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.btn-ghost::before { background: linear-gradient(135deg, var(--lavender), var(--purple)); }
.btn-ghost:hover { box-shadow: 0 14px 50px -10px rgba(169, 139, 208, .6); }

.btn-small { height: 42px; padding: 0 20px; font-size: 14px; }

.services {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 40px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.services li { display: flex; align-items: center; gap: 10px; }
.services li::before {
  content: "";
  width: 5px; height: 5px;
  transform: rotate(45deg);
  background: var(--lavender);
}

.scroll-hint {
  position: absolute;
  left: var(--gutter);
  bottom: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.scroll-hint span {
  position: relative;
  width: 1px; height: 36px;
  background: var(--line);
  overflow: hidden;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  left: 0; top: -50%;
  width: 1px; height: 50%;
  background: var(--pink);
  animation: drip 1.8s cubic-bezier(.7, 0, .3, 1) infinite;
}
@keyframes drip { to { top: 100%; } }

/* ---------- marquee ---------- */
.marquee {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  overflow: hidden;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 9, 16, 0), rgba(11, 9, 16, .75) 60%);
  backdrop-filter: blur(6px);
  opacity: 0;
}
.marquee .track {
  display: flex;
  width: max-content;
  gap: 34px;
  align-items: center;
  animation: marquee 38s linear infinite;
}
.marquee span {
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .08em;
  white-space: nowrap;
  color: var(--ink);
}
.marquee em {
  font-family: var(--font);
  font-style: normal;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink-dim);
  margin-left: 8px;
}
.marquee i { font-style: normal; color: var(--pink); font-size: 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 100; }
  .cursor-dot, .cursor-ring {
    position: absolute;
    left: 0; top: 0;
    border-radius: 50%;
    will-change: transform;
  }
  .cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--pink); }
  .cursor-ring {
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 1.5px solid rgba(255, 154, 205, .6);
    transition: width .3s, height .3s, margin .3s, background-color .3s, border-color .3s;
  }
  .cursor.hover .cursor-ring {
    width: 64px; height: 64px;
    margin: -32px 0 0 -32px;
    background: rgba(255, 154, 205, .12);
    border-color: var(--pink);
  }
}

/* dev: ?bare hides the UI so the WebGL stage can be inspected */
.bare .nav, .bare main { display: none; }

/* ---------- pre-intro states (JS reveals) ---------- */
.js .badge, .js .reveal { opacity: 0; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav { padding: 14px 16px; }
  .nav-logo { width: 72px; }

  .hero {
    align-items: stretch;
    padding: 70px 16px 66px;
  }
  .hero-copy {
    width: 100%;
    min-height: calc(100svh - 158px);
    align-items: center;
    text-align: center;
  }
  .eyebrow { align-self: center; }
  .logo { width: min(340px, 74vw); margin: 12px 0 2px; }
  .badge { margin-left: 0; width: min(200px, 48vw); transform-origin: center; }
  .intro {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 14px;
    border-radius: 14px;
    background: rgba(11, 9, 16, .45);
    backdrop-filter: blur(6px);
  }
  .ctas { margin-top: auto; justify-content: center; width: 100%; }
  .ctas { gap: 10px; flex-wrap: nowrap; }
  .ctas .btn { flex: 1 1 0; padding: 0 12px; font-size: 14px; white-space: nowrap; }
  .services { display: none; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee .track, .scroll-hint span::after, .pulse { animation: none; }
}

/* ---------- contact ---------- */
.contact {
  position: relative;
  z-index: 2;
  padding: clamp(96px, 14vh, 160px) var(--gutter) 40px;
  background: rgba(11, 9, 16, .82);
}
.contact-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.kicker span {
  font-family: var(--font-jp);
  font-weight: 800;
  letter-spacing: 0;
  color: var(--pink);
}
.kicker::after { content: ""; width: 48px; height: 1px; background: var(--line); }

.contact-title {
  margin-top: 18px;
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.02em;
}
.grad {
  background: linear-gradient(100deg, var(--pink), var(--lavender) 60%, var(--ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-lead {
  margin-top: 22px;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--ink-dim);
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
  padding: 6px 6px 6px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 17, 29, .6);
  backdrop-filter: blur(8px);
  max-width: 100%;
}
.mail a {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--pink), var(--pink)) left bottom / 0 1px no-repeat;
  transition: background-size .4s;
}
.mail a:hover { background-size: 100% 1px; }
.copy {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: 600 13px var(--font);
  color: var(--ink);
  background: rgba(169, 139, 208, .2);
  transition: background .3s, color .3s;
}
.copy:hover { background: rgba(169, 139, 208, .38); }
.copy.done { background: var(--pink); color: #2a1530; }

.socials {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 34px;
  max-width: 440px;
}
.socials a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(21, 17, 29, .5);
  backdrop-filter: blur(8px);
  transition: border-color .35s, background .35s, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.socials a:hover {
  border-color: rgba(255, 154, 205, .5);
  background: rgba(40, 26, 50, .7);
  transform: translateX(6px);
}
.ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 154, 205, .22), rgba(169, 139, 208, .22));
}
.ico svg { width: 20px; height: 20px; fill: var(--ink); }
.ico-text { font-family: var(--font-jp); font-weight: 800; font-size: 20px; }
.label { display: flex; flex-direction: column; gap: 2px; }
.label b { font-weight: 600; font-size: 15px; }
.label small { font-size: 13px; color: var(--ink-dim); }
.arrow {
  margin-left: auto;
  color: var(--ink-dim);
  transition: color .3s, transform .35s;
}
.socials a:hover .arrow { color: var(--pink); transform: translate(2px, -2px); }

.contact-form {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(36, 26, 46, .78), rgba(16, 13, 22, .82));
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 120px -40px rgba(224, 91, 184, .35);
}
.contact-form::before {
  /* thin gradient border glow */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 154, 205, .55), rgba(169, 139, 208, .15) 40%, rgba(255, 255, 255, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.contact-form h3 { font-size: 22px; font-weight: 600; margin-bottom: 22px; }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--ink-dim); }
.opt { font-weight: 300; opacity: .75; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(246, 242, 250, .1);
  border-radius: 14px;
  background: rgba(11, 9, 16, .55);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  outline: none;
  resize: vertical;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(164, 156, 176, .55); }
.field input:focus, .field textarea:focus {
  border-color: rgba(255, 154, 205, .6);
  background: rgba(11, 9, 16, .75);
  box-shadow: 0 0 0 4px rgba(255, 154, 205, .12);
}
.field.invalid input, .field.invalid textarea { border-color: #ff6b8b; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-submit { width: 100%; margin-top: 6px; border: 0; font-family: var(--font); }
.btn-submit[disabled] { opacity: .6; }
.form-status { min-height: 22px; margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-dim); text-align: center; }
.form-status.ok { color: var(--pink); }
.form-status.err { color: #ff8fa8; }
.form-status a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.footer {
  max-width: 1180px;
  margin: clamp(80px, 12vh, 140px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-dim);
}

/* scroll reveal */
.js .in-view { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .in-view.shown { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .contact-inner { grid-template-columns: 1fr; }
  .contact { padding-top: 88px; }
  .contact-lead { font-size: 15px; }
  .mail { display: flex; }
  .footer { flex-direction: column; gap: 6px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .js .in-view { transition: none; opacity: 1; transform: none; }
}

/* ---------- sound toggle ---------- */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 17, 29, .5);
  backdrop-filter: blur(8px);
  color: var(--ink-dim);
  font: 500 12px var(--font);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .3s, border-color .3s;
}
.sound-toggle:hover { color: var(--ink); border-color: rgba(255, 154, 205, .4); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 2px; height: 3px; border-radius: 1px; background: currentColor; transition: height .3s; }
.sound-toggle.on { color: var(--pink); }
.sound-toggle.on .bars i { animation: eq 1s ease-in-out infinite; }
.sound-toggle.on .bars i:nth-child(2) { animation-delay: -.3s; }
.sound-toggle.on .bars i:nth-child(3) { animation-delay: -.6s; }
.sound-toggle.on .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
@media (max-width: 860px) {
  .sound-label { display: none; }
  .sound-toggle { padding: 0 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .sound-toggle.on .bars i { animation: none; height: 10px; }
}

/* ---------- language toggle ---------- */
.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 17, 29, .5);
  backdrop-filter: blur(8px);
}
.lang-toggle button {
  height: 34px;
  min-width: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-dim);
  font: 600 12px var(--font);
  letter-spacing: .08em;
  transition: background .3s, color .3s;
}
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button[aria-pressed="true"] { background: linear-gradient(135deg, var(--pink), var(--magenta)); color: #2a1530; }
@media (max-width: 860px) {
  .nav-actions { gap: 8px; }
  .lang-toggle button { height: 32px; min-width: 34px; padding: 0 8px; }
}

/* Japanese: rounded gothic face, no tight tracking, wider lines */
html[lang="ja"] body { font-family: var(--font-jp); }
html[lang="ja"] .section-title, html[lang="ja"] .contact-title { letter-spacing: 0; line-height: 1.25; max-width: 22ch; }
html[lang="ja"] .intro, html[lang="ja"] .about-text, html[lang="ja"] .section-lead, html[lang="ja"] .contact-lead { line-height: 1.85; font-weight: 400; }
html[lang="ja"] .nav-links a, html[lang="ja"] .kicker, html[lang="ja"] .card-label, html[lang="ja"] .services { letter-spacing: .06em; }
.btn-small { white-space: nowrap; }
@media (max-width: 430px) {
  .nav-actions .btn-small { display: none; }
}
