:root {
  --red: #D82028;        /* brand red */
  --ink: #0A0A0B;        /* page background */
  --ink-2: #131316;      /* card / raised surface */
  --bone: #F2EDE4;       /* primary text */
  --ash: #8A8A94;        /* secondary text */
  --line: rgba(242,237,228,0.10);

  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --jp: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

/* ---------- Shared ---------- */

.mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--bone);
  font-family: var(--jp);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  letter-spacing: 0;
  flex: none;
}
.mark-sm { width: 1.75rem; height: 1.75rem; font-size: 0.625rem; }

.label, .eyebrow, .card-cat, .wordmark, .nav-links a {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary { background: var(--red); color: var(--bone); }
.btn-primary:hover { background: #B81A21; }
.btn-outline { border-color: var(--bone); color: var(--bone); }
.btn-outline:hover { background: var(--bone); color: var(--ink); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) var(--gutter) 1rem;
  transition: background-color .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10,10,11,0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.wordmark { font-size: 0.8125rem; letter-spacing: 0.28em; }
.nav-links { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.nav-links a { color: var(--bone); opacity: .85; transition: opacity .2s; padding: 0.5rem 0; }
.nav-links a:hover { opacity: 1; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 7rem var(--gutter) clamp(6rem, 12vh, 8.5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--ink-2); }
.hero-media video, .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video { z-index: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(10,10,11,0.85) 0%, rgba(10,10,11,0.45) 30%, rgba(10,10,11,0) 55%),
    radial-gradient(ellipse at center, rgba(10,10,11,0) 55%, rgba(10,10,11,0.45) 100%);
}
@media (min-width: 768px) {
  .hero-shade {
    background:
      linear-gradient(to right, rgba(10,10,11,0.6) 0%, rgba(10,10,11,0.25) 38%, rgba(10,10,11,0) 60%),
      linear-gradient(to top, rgba(10,10,11,0.85) 0%, rgba(10,10,11,0.45) 30%, rgba(10,10,11,0) 55%),
      radial-gradient(ellipse at center, rgba(10,10,11,0) 55%, rgba(10,10,11,0.45) 100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
/* Portrait: keep Kage (right of centre in the landscape poster) in frame */
@media (orientation: portrait) {
  .hero-poster, .hero-video { object-position: 64% 50%; }
}

.hero-copy { max-width: 62rem; }
.eyebrow { color: var(--bone); opacity: .8; margin-bottom: 1.25rem; }
.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.125rem;
  color: var(--ash);
  max-width: 44ch;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  width: 1.5rem;
  height: 3.5rem;
  display: flex;
  justify-content: center;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(242,237,228,0), var(--bone));
  transform-origin: top;
  animation: cue 2.8s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: .8; }
  80%  { opacity: 0; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Load stagger: eyebrow, headline, subline, buttons. Total under 1.2s. */
.js .reveal-load { opacity: 0; transform: translateY(14px); }
.js.is-loaded .reveal-load {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js.is-loaded .reveal-load:nth-child(2) { transition-delay: .12s; }
.js.is-loaded .reveal-load:nth-child(3) { transition-delay: .24s; }
.js.is-loaded .reveal-load:nth-child(4) { transition-delay: .36s; }

@media (max-width: 767px) {
  .hero-shade {
    background:
      linear-gradient(to top, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.78) 32%, rgba(10,10,11,0.4) 58%, rgba(10,10,11,0) 78%),
      radial-gradient(ellipse at center, rgba(10,10,11,0) 55%, rgba(10,10,11,0.45) 100%);
  }
  .hero { align-items: flex-end; text-align: center; }
  .hero-copy { margin-inline: auto; }
  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Work ---------- */

.work { padding: clamp(5rem, 12vw, 9rem) var(--gutter) clamp(4rem, 9vw, 7rem); }
.work-intro { max-width: 40rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.label { color: var(--red); margin-bottom: 1rem; }
.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.02;
  margin-bottom: 1rem;
}
.work-lede { color: var(--ash); font-size: 1.0625rem; max-width: 52ch; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 899px) { .cards { grid-template-columns: 1fr; max-width: 32rem; } }

.card { background: var(--ink-2); border: 1px solid var(--line); }
.card-link { display: flex; flex-direction: column; height: 100%; }
.card-link:focus-visible { outline-offset: 4px; }
.card-art { aspect-ratio: 3 / 4; overflow: hidden; background: #1c1c21; }
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card-body { padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.card-cat { color: var(--red); margin-bottom: 0.75rem; transition: color .3s var(--ease), filter .3s var(--ease); }
.card-title {
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.1;
  margin-bottom: 0.625rem;
  padding-bottom: 0.375rem;
}
.card-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.card-desc { color: var(--ash); margin-bottom: 1.25rem; }
.chip {
  margin-top: auto;
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(242,237,228,0.28);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--bone);
}

@media (hover: hover) and (pointer: fine) {
  .card-link:hover .card-art img { transform: scale(1.04); }
  .card-link:hover .card-title::after { transform: scaleX(1); }
  .card-link:hover .card-cat { color: #FF3A43; }
}

.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.universe-link-wrap { text-align: center; margin-top: clamp(3rem, 7vw, 5rem); }
.universe-link {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s var(--ease);
}
.universe-link span { display: inline-block; transition: transform .3s var(--ease); }
.universe-link:hover { border-color: var(--red); }
.universe-link:hover span { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-load { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; transform: none; opacity: .6; }
  .card-art img, .card-title::after { transition: none; }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: 2rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  font-size: 0.875rem;
  color: var(--ash);
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--bone); }
.footer-copy { color: var(--ash); }
.footer-contact a { color: var(--bone); border-bottom: 1px solid var(--line); }
.footer-contact a:hover { border-color: var(--red); }
.footer-social { display: flex; gap: 1.5rem; }
.footer-social a { color: var(--bone); opacity: .8; transition: opacity .2s; }
.footer-social a:hover { opacity: 1; }

@media (max-width: 767px) {
  .footer { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand, .footer-social { justify-content: center; }
}
