/* ===== Theme: change these to restyle the whole site ===== */
:root {
  --bg: #0b0b0c;
  --bg-raised: #141416;
  --text: #f2efe9;
  --muted: #9a968f;
  --line: #26262a;
  --accent: #e8a43a;        /* warm amber */
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Japanese text falls back to these (Bebas Neue and Inter have no Japanese characters) */
  --font-ja: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
/* Japanese: keep Bebas/Inter for Latin letters, Japanese system fonts for the rest */
html[lang="ja"] body { font-family: "Inter", var(--font-ja); font-weight: 400; line-height: 1.8; line-break: strict; word-break: auto-phrase; }
html[lang="ja"] { --font-display: "Bebas Neue", var(--font-ja); }
html[lang="ja"] .section__title,
html[lang="ja"] .contact__title,
html[lang="ja"] .row__title { font-weight: 700; letter-spacing: 0.02em; line-height: 1.15; }
html[lang="ja"] .section__title { font-size: clamp(2.2rem, 5.5vw, 4.2rem); }
html[lang="ja"] .contact__title { font-size: clamp(2.6rem, 8vw, 6.5rem); }
html[lang="ja"] .eyebrow { letter-spacing: 0.15em; }
html[lang="ja"] .nav__links a { letter-spacing: 0.1em; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #000; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--text);
  transition: background .25s, color .25s, border-color .25s;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Nav ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  transition: background .3s, padding .3s;
}
.nav.is-scrolled {
  background: rgba(11, 11, 12, 0.85);
  backdrop-filter: blur(10px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
/* Orange scroll-progress line along the bottom of the nav (shows once you scroll) */
.nav::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  opacity: 0;
  transition: opacity .3s;
}
.nav.is-scrolled::after { opacity: 1; }
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.nav__links { display: flex; gap: 36px; }
.nav__links a {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s;
}
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; }
/* EN / 日本語 switch */
.lang {
  order: 3;
  margin-left: 32px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 500 0.75rem/1 var(--font-body);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.lang:lang(ja) { font-family: var(--font-ja); }
.lang:hover, .lang:focus-visible { color: var(--accent); border-color: var(--accent); }
.nav__logo { margin-right: auto; }
.nav__links { order: 2; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(232, 164, 58, 0.18), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(80, 90, 140, 0.18), transparent 50%),
    var(--bg);
}
/* Letterbox bars for a cinematic feel */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 6vh;
  background: #000;
  z-index: 1;
}
.hero::before { top: 0; }
.hero::after { bottom: 0; }
/* Cycling video banner. Each clip is cropped to fill the hero, then zoomed into (x, y). */
/* The poster shows instantly, stays while the video loads, and is all that shows if motion is reduced */
.hero__media { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: url("../hero/poster.jpg") center / cover no-repeat; }
.hero__clip {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(var(--zoom, 1));
  transform-origin: var(--x, 50%) var(--y, 50%);
}
/* Hard cuts between shots, each with a slight push-in */
.hero__clip.is-on { opacity: 1; z-index: 1; animation: heroDrift 2.5s linear both; }
@keyframes heroDrift {
  from { transform: scale(var(--zoom, 1)); }
  to { transform: scale(calc(var(--zoom, 1) * 1.04)); }
}
.hero__clip video { width: 100%; height: 100%; object-fit: cover; }
.hero__clip--reel, .hero__clip--reel.is-on { animation: none; transform: none; } /* the edited reel plays as cut */
.hero__clip iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: max(100%, 177.78vh);
  height: max(100%, 56.25vw);
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}
/* Darkens the footage so the text stays readable */
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(11, 11, 12, .92) 0%, rgba(11, 11, 12, .25) 50%, rgba(11, 11, 12, .45) 100%),
    linear-gradient(to right, rgba(11, 11, 12, .8) 0%, rgba(11, 11, 12, .45) 45%, transparent 75%);
}
.hero__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}
.hero__content { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; }
.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4rem, 13vw, 11rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
}
.hero__sub {
  max-width: 460px;
  margin: 28px 0 36px;
  font-size: 1.05rem;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: calc(6vh + 24px);
  z-index: 2;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  writing-mode: vertical-rl;
}

/* ===== Sections ===== */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}
.section__head { margin-bottom: 40px; }
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.95;
}

/* ===== Category rows ===== */
/* Each category is a horizontal row. 3 cards fit on desktop; more scroll sideways. */
.rows { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 96px); }
.row { --per-view: 3; --gap: clamp(16px, 2vw, 28px); }
.row__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.row__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: 0.02em;
  line-height: 1;
}
/* Orange accent: a short line on each row's divider */
.row__head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 56px; height: 2px;
  background: var(--accent);
}
.row__desc { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.row__controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.row__count {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
/* Track + arrows. The arrows sit over the left/right edges of the thumbnails. */
.row__body { position: relative; }
/* Soft fade on the right edge while there are more videos to scroll to */
.row__body::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: calc(var(--arrow-top, 0px) * 2);
  background: linear-gradient(to right, transparent, rgba(11, 11, 12, .75));
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.row.is-scrollable:not(.at-end) .row__body::after { opacity: 1; }
.row__arrow {
  display: none;
  position: absolute;
  z-index: 2;
  top: var(--arrow-top, 50%);
  width: 52px; height: 52px;
  margin-top: -26px;
  background: rgba(11, 11, 12, .85);
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.15rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .2s, color .2s, opacity .25s, transform .25s;
}
.row__arrow--prev { left: -26px; }
.row__arrow--next { right: -26px; }
.row.is-scrollable .row__arrow { display: grid; place-items: center; }
.row__arrow:hover:not(:disabled) { background: var(--accent); color: #000; transform: scale(1.06); }
.row__arrow:disabled { opacity: 0; pointer-events: none; }
.row__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.row__track::-webkit-scrollbar { display: none; }
.row__track > .card {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  align-self: flex-start; /* keep thumbnails level when a title wraps to two lines */
  scroll-snap-align: start;
}

.card {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  animation: fadeUp .5s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-raised);
}
.card__media img,
.card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s;
  filter: grayscale(35%) brightness(.85);
}
.card__placeholder {
  background:
    radial-gradient(circle at 30% 30%, hsla(var(--hue), 55%, 45%, .55), transparent 60%),
    radial-gradient(circle at 80% 80%, hsla(calc(var(--hue) + 60), 45%, 30%, .6), transparent 55%),
    #17171a;
}
.card:hover .card__media img,
.card:hover .card__placeholder,
.card:focus-visible .card__media img,
.card:focus-visible .card__placeholder { transform: scale(1.05); filter: none; }
.card__play {
  position: absolute;
  top: 50%; left: 50%;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.8);
  transition: opacity .3s, transform .3s;
}
.card__play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.card:hover .card__play, .card:focus-visible .card__play { opacity: 1; transform: scale(1); border-color: var(--accent); }
/* Orange line that draws across the bottom of a thumbnail on hover */
.card__media::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card__media::after, .card:focus-visible .card__media::after { transform: scaleX(1); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.card__info { padding-top: 16px; }
.card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color .2s;
}
.card:hover .card__title { color: var(--accent); }
.card__meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ===== About ===== */
/* Heading on the left, bio on the right. With a photo, the photo sits above the heading. */
.about {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 24px clamp(32px, 6vw, 96px);
  align-items: start;
  /* divider line with a short orange segment at the left */
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 56px 2px no-repeat,
    linear-gradient(var(--line), var(--line)) left top / 100% 1px no-repeat;
}
.about__photo { grid-column: 1; aspect-ratio: 4 / 5; background: var(--bg-raised); overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__head { grid-column: 1; position: sticky; top: 120px; }
.about__text { grid-column: 2; grid-row: 1 / span 2; }
.about__text > p { margin-top: 0; color: #cfcbc4; font-size: 1.05rem; max-width: 680px; }
/* First paragraph: larger, with an orange line down the left */
.about__text > .about__lead {
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.55;
}
.about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.about__cols h3 {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.about__cols ul { margin: 0; padding: 0; list-style: none; }
.about__cols li { padding: 4px 0; }
/* Experience: role on one line, area and city underneath */
.about__exp li { padding: 6px 0 10px; font-weight: 500; }
.about__exp li span {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
}

/* ===== Contact ===== */
.contact {
  text-align: center;
  background:
    linear-gradient(var(--accent), var(--accent)) center top / 56px 2px no-repeat,
    linear-gradient(var(--line), var(--line)) left top / 100% 1px no-repeat;
}
.contact__title {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.5rem, 11vw, 9rem);
  line-height: 0.9;
}
.contact__email {
  display: inline-block;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  word-break: break-all;
  transition: color .2s;
}
.contact__email:hover { color: var(--accent); }
.contact__note { margin: 24px auto 40px; max-width: 520px; color: var(--muted); }
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.socials a {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s;
}
.socials a:hover { color: var(--accent); }

/* Contact form */
.form {
  max-width: 640px;
  margin: 64px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.form__title {
  margin: 0 0 24px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form__field { display: block; margin-bottom: 20px; }
.form__field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.form__field input,
.form__field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s;
}
.form__field textarea { resize: vertical; min-height: 140px; }
.form__field input:focus,
.form__field textarea:focus { outline: none; border-color: var(--accent); }
.form__send { cursor: pointer; font-family: var(--font-body); }
.form__send:disabled { opacity: .6; cursor: default; }
.form__status { min-height: 1.6em; margin: 16px 0 0; font-size: 0.9rem; color: var(--muted); }
.form__status.is-ok { color: var(--accent); }
.form__status.is-error { color: #ff8a7a; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Footer ===== */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .94);
  animation: fadeIn .25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__inner { width: min(1200px, 100%); }
.lightbox__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
}
.lightbox__empty code { color: var(--accent); }
.lightbox__meta h3 { margin: 18px 0 2px; font-weight: 500; }
.lightbox__meta p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.lightbox__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1024px) {
  .row { --per-view: 2.15; }
}

/* ===== Mobile ===== */
@media (max-width: 760px) {
  .nav__toggle {
    display: block;
    position: relative;
    z-index: 2;
    width: 36px; height: 36px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav__toggle span {
    position: absolute;
    left: 6px; right: 6px;
    height: 1.5px;
    background: var(--text);
    transition: transform .3s, top .3s;
  }
  .nav__toggle span:first-child { top: 13px; }
  .nav__toggle span:last-child { top: 22px; }
  .nav.is-open .nav__toggle span:first-child { top: 17px; transform: rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { top: 17px; transform: rotate(-45deg); }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; }
  .nav__links a { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: 0.06em; color: var(--text); }

  .hero__scroll { display: none; }
  /* Text spans the full width on phones, so darken the footage evenly */
  .hero__shade {
    background: linear-gradient(to top, rgba(11, 11, 12, .95) 0%, rgba(11, 11, 12, .55) 45%, rgba(11, 11, 12, .5) 100%);
  }
  .row { --per-view: 1.15; }
  .row__head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .row.is-scrollable .row__arrow { display: none; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 420px; }
  .about__head { position: static; }
  .about__text { grid-column: 1; grid-row: auto; }
  .about__cols { grid-template-columns: 1fr; gap: 24px; }
  .form__row { grid-template-columns: 1fr; }
  .lang { margin-left: 0; margin-right: 12px; position: relative; z-index: 2; }
  .nav__toggle { order: 4; }
  .footer { flex-direction: column; align-items: center; text-align: center; }
}
