/* ============ Tokens ============ */
:root {
  /* Warm palette — taken from the amber studio light in the photos */
  --bg: #f8f3eb;           /* warm cream */
  --bg-rgb: 248, 243, 235;
  --surface: #efe6d9;      /* hover / placeholder fill */
  --ink: #221b15;          /* primary text — 15.4:1 on bg */
  --ink-2: #5e5247;        /* body secondary — 6.9:1 */
  --mute: #968572;         /* large display text only — 3.2:1 */
  --line: #e4d9c9;
  --accent: #a9581f;       /* amber — 4.6:1 on bg, white text 5.1:1 */
  --accent-hover: #8d4816;
  --focus: #a9581f;

  --font-display: "Inter Tight", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans JP", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[lang="ja"] body { line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Japanese lines shown under the English */
.ja { font-family: "Noto Sans JP", var(--font-body); line-height: 1.85; letter-spacing: .02em; }
.lede.ja, .body.ja { font-size: 15px; margin-top: 12px; }
.ja-block { display: grid; gap: 20px; margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.ja-block .body.ja { margin-top: 0; }
.stats dt .ja { display: block; font-size: 12px; line-height: 1.5; margin-top: 2px; }

.ink { color: var(--ink); }
.mute { color: var(--mute); }
.dot { color: var(--accent); }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--bg-rgb), .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
.brand-name { font: 500 17px/1.2 var(--font-display); letter-spacing: -.01em; }
.brand-meta { font-size: 13px; color: var(--ink-2); }
.nav { display: flex; gap: 4px; }
.nav a {
  font-size: 14px; text-decoration: none; color: var(--ink-2);
  padding: 10px 12px; border-radius: 999px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.is-active { color: var(--accent); }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-nav { padding: 8px var(--gutter) 24px; display: grid; gap: 4px; border-bottom: 1px solid var(--line); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { font: 500 28px/1.3 var(--font-display); text-decoration: none; padding: 8px 0; letter-spacing: -.02em; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-hover); }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); text-decoration: none; min-height: 44px; }
.text-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ============ Hero ============ */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px);
  align-items: end;
  min-height: calc(100dvh - var(--header-h));
  padding-block: clamp(24px, 4vw, 48px);
}
.headline {
  font: 500 clamp(40px, 5.6vw, 84px)/1.04 var(--font-display);
  letter-spacing: -.035em;
  color: var(--mute);
  text-wrap: balance;
  max-width: 13ch;
}
html[lang="ja"] .headline { font-size: clamp(32px, 4.2vw, 62px); line-height: 1.25; letter-spacing: -.01em; max-width: 14em; font-weight: 600; }
.lede { margin-top: 28px; max-width: 46ch; color: var(--ink-2); font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-photo {
  margin: 0; border-radius: var(--radius); overflow: hidden; background: #111;
  aspect-ratio: 4 / 5; max-height: calc(100dvh - var(--header-h) - 48px); width: 100%;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: contrast(1.05) brightness(1.08); }

/* ============ Sections ============ */
.section { padding-block: clamp(80px, 12vw, 160px); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 5vw, 64px); }
.label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.section-title { font: 500 clamp(36px, 5vw, 72px)/1.05 var(--font-display); letter-spacing: -.035em; }
html[lang="ja"] .section-title { letter-spacing: -.01em; line-height: 1.25; }

/* Works */
.works-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 24px clamp(24px, 4vw, 64px); }
.works-head > div:first-child { display: grid; gap: 16px; }
.works-intro .lede { margin: 0; }
.covers {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 24px);
}
.cover a { display: grid; gap: 4px; text-decoration: none; border-radius: 10px; }
.cover-img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface); margin-bottom: 10px; }
.cover-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cover a:hover .cover-img img, .cover a:focus-visible .cover-img img { transform: scale(1.04); }
.cover-title { font: 500 15px/1.35 var(--font-display); letter-spacing: -.01em; }
.cover-artist { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.cover a:hover .cover-title { text-decoration: underline; text-underline-offset: 3px; }

/* About */
.about { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.about-photo { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }
.about-text { display: grid; gap: 20px; }
.about-text .section-title { margin-bottom: 8px; }
.body { color: var(--ink-2); font-size: 17px; max-width: 58ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.stats dt { font-size: 13px; color: var(--ink-2); order: 2; }
.stats dd { margin: 0; font: 500 clamp(28px, 3vw, 40px)/1.1 var(--font-display); letter-spacing: -.03em; }
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
@supports (grid-template-rows: subgrid) {
  .stats div { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 6px; }
  .stats dt { order: 0; align-self: end; }
  .stats dd { align-self: start; }
}

/* Music & Videos */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.video { margin: 0; display: grid; gap: 12px; align-content: start; }
.video:first-child { grid-column: 1 / -1; }
/* With a Short: wide videos stack on the left, the Short sits tall on the right */
.videos:has(.is-vertical) { grid-template-columns: 1.6fr 1fr; }
.videos:has(.is-vertical) .video:first-child { grid-column: auto; }
.video.is-vertical { grid-column: 2; grid-row: 1 / span 2; }
.video.is-vertical .video-frame { aspect-ratio: 9 / 16; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 0; padding: 0; width: 100%; cursor: pointer; display: block;
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.video-frame:hover img { transform: scale(1.02); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 72px; height: 72px; border-radius: 50%; background: rgba(var(--bg-rgb), .94);
  display: grid; place-items: center; color: var(--ink);
  transition: transform .25s var(--ease);
}
.video-frame:hover .play { transform: scale(1.08); }
.video-empty { display: grid; place-items: center; color: var(--ink-2); font-size: 14px; cursor: default; border: 1px dashed var(--line); background: var(--surface); }
.video figcaption { font-size: 15px; color: var(--ink-2); }
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 32px; }
.tracks iframe { width: 100%; height: 152px; border: 0; border-radius: 12px; }
.tracks:empty { display: none; }

/* Contact */
.contact { display: grid; justify-items: start; gap: 24px; }
.contact-title {
  font: 500 clamp(44px, 7.5vw, 120px)/1 var(--font-display);
  letter-spacing: -.045em; max-width: 14ch; text-wrap: balance;
}
html[lang="ja"] .contact-title { font-size: clamp(34px, 5.4vw, 80px); line-height: 1.2; letter-spacing: -.01em; max-width: 12em; }
.contact .lede { margin-top: 0; }
.contact .lede.ja { margin-top: 12px; }
.mail-text { font-size: 14px; color: var(--ink-2); }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-block: 32px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.social a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; border-radius: 999px; }
.social a:hover { color: var(--ink); background: var(--surface); }

/* ============ Depth: shadows & light ============ */
:root {
  --shadow-sm: 0 1px 2px rgba(70, 40, 15, .08), 0 4px 10px -4px rgba(70, 40, 15, .18);
  --shadow-md: 0 2px 4px rgba(70, 40, 15, .06), 0 14px 28px -10px rgba(70, 40, 15, .28);
  --shadow-lg: 0 4px 8px rgba(70, 40, 15, .06), 0 30px 60px -18px rgba(70, 40, 15, .42), 0 60px 120px -40px rgba(120, 60, 15, .35);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}
body {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(214, 150, 80, .16), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(214, 150, 80, .09), transparent 60%),
    var(--bg);
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(70, 40, 15, .35); }

/* Scroll progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: linear-gradient(90deg, var(--accent), #d98a3d);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* Floating amber glow behind the hero photo */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(60vw, 760px); aspect-ratio: 1; right: -8%; top: 4%;
  background: radial-gradient(circle, rgba(217, 138, 61, .38), rgba(217, 138, 61, 0) 65%);
  filter: blur(30px);
  animation: glow-float 14s ease-in-out infinite alternate;
}
@keyframes glow-float {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-6%, 8%, 0) scale(1.08); }
  100% { transform: translate3d(4%, -4%, 0) scale(.96); }
}

/* Photos, covers, videos: lifted cards */
.hero-photo { box-shadow: var(--shadow-lg); }
.about-photo { box-shadow: var(--shadow-lg); }
.cover-img, .video-frame { box-shadow: var(--shadow-md); }
.hero-photo img, .about-photo img {
  transform: scale(1.1) translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

/* 3D tilt (driven by main.js — mouse/trackpad only) */
[data-tilt] {
  position: relative;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .6s var(--spring), box-shadow .4s var(--ease);
}
[data-tilt].is-tilting { transition: transform .12s linear, box-shadow .4s var(--ease); }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 236, 205, .28), transparent 45%);
  opacity: 0; transition: opacity .4s var(--ease); mix-blend-mode: soft-light;
}
[data-tilt].is-tilting::after { opacity: 1; }
.cover-img[data-tilt].is-tilting, .video-frame[data-tilt].is-tilting { box-shadow: var(--shadow-lg); }

/* Buttons: raised, lift on hover */
.btn { transition: background-color .2s var(--ease), color .2s var(--ease), transform .35s var(--spring), box-shadow .35s var(--ease); }
.btn-solid { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 18px -8px rgba(169, 88, 31, .7); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 26px -10px rgba(169, 88, 31, .8); }
.btn-ghost { background: rgba(255, 255, 255, .5); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(.97); }

/* Play button pulse */
.play { box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45); }
.play::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(var(--bg-rgb), .8);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* Stats: raised numbers */
.stats dd { text-shadow: 0 1px 0 rgba(255,255,255,.6), 0 10px 24px rgba(120, 60, 15, .18); font-variant-numeric: tabular-nums; }

/* ============ Motion ============ */
/* Entrances use the individual translate/rotate properties so they never fight the tilt transform */
.reveal {
  opacity: 0; translate: 0 36px; rotate: x 14deg; transform-origin: 50% 100%;
  transition: opacity .9s var(--ease), translate .9s var(--ease), rotate .9s var(--ease);
}
.reveal.is-in { opacity: 1; translate: 0 0; rotate: x 0deg; }

/* Headline words flip up in 3D */
.split .w { display: inline-block; perspective: 600px; }
.split .w > span {
  display: inline-block; transform-origin: 50% 100%;
  transform: translateY(.5em) rotateX(-80deg); opacity: 0;
  transition: transform .9s var(--spring), opacity .6s var(--ease);
  transition-delay: calc(var(--i) * 60ms + 150ms);
}
.split.is-in .w > span { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; rotate: none; transition: none; }
  .split .w > span { transform: none; opacity: 1; transition: none; }
  .hero::before, .play::before { animation: none; }
  .hero-photo img, .about-photo img { transform: none; }
  [data-tilt], .video-frame img, .play, .btn { transition: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .header-inner { gap: 8px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; align-items: start; padding-top: 32px; }
  .hero-text { order: 1; }
  .hero-photo { order: 2; aspect-ratio: 3 / 2; max-height: none; }
  .hero-photo img { object-position: 50% 55%; }
  .about, .works-head { grid-template-columns: 1fr; }
  .covers { grid-template-columns: repeat(3, 1fr); }
  .about-photo { aspect-ratio: 3 / 2; }
  .videos, .videos:has(.is-vertical) { grid-template-columns: 1fr; }
  .video.is-vertical { grid-column: auto; grid-row: auto; justify-self: center; width: min(100%, 360px); }
}
@media (max-width: 520px) {
  .brand-meta { display: none; }
  .covers { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .play { width: 60px; height: 60px; }
}

/* Studio photo banner (Works) */
.studio-photo {
  margin: 0 0 clamp(40px, 6vw, 80px); border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 2 / 1; box-shadow: var(--shadow-lg); background: var(--surface);
}
.studio-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%;
  filter: sepia(.28) saturate(1.2) hue-rotate(-8deg) brightness(1.03) contrast(1.04); /* warmer tone */
  transform: scale(1.1) translate3d(0, var(--py, 0px), 0); will-change: transform;
}
@media (max-width: 900px) { .studio-photo { aspect-ratio: 3 / 2; } }
@media (prefers-reduced-motion: reduce) { .studio-photo img { transform: none; } }

/* Stats: keep "Tokyo / Osaka, JP" on one line */
.stats { grid-template-columns: max-content max-content 1fr; column-gap: clamp(16px, 2.4vw, 32px); }
.stats dd.nowrap { white-space: nowrap; }
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .stats div:first-child { grid-column: 1 / -1; }
}
