/* ============================================================
   KAINO70 - page styles
   Hallmark · genre: modern-minimal · macrostructure: Marquee Hero
   theme: studied-DNA (monochrome minimal) + custom · enrichment: E1 clipped-edge video hero
   nav: N5 Floating pill · footer: Ft2 Inline rule single line
   ============================================================ */

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

/* ---------- Focus (instant ring, never animated) ---------- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =================== BRAND MARK - detached top-left, outside the menu =================== */
.brand-mark {
  position: fixed;
  top: var(--space-md);
  left: var(--page-gutter);
  z-index: var(--z-sticky);
  display: inline-flex;
  align-items: center;
}
.brand-mark__img { height: 38px; width: auto; transition: opacity var(--dur-short) var(--ease-out); }
.brand-mark__img--white { display: none; }

/* over the dark hero: white logo; on the light page: black logo */
body.is-over-hero .brand-mark__img--black { display: none; }
body.is-over-hero .brand-mark__img--white { display: block; }

/* =================== NAV - N5 Floating pill (anchored right) =================== */
.nav-pill {
  position: fixed;
  top: var(--space-md);
  right: var(--page-gutter);
  left: auto;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-lg);
  padding: 0.55rem 0.85rem 0.55rem 1.1rem;
  background: color-mix(in oklch, var(--color-paper) 76%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px -16px oklch(16% 0 0 / 0.30);
  z-index: var(--z-sticky);
  max-width: calc(100vw - 2 * var(--space-md));
}
.nav-pill__links {
  display: flex; align-items: center; gap: var(--space-lg);
  list-style: none; margin: 0; padding: 0;
}
.nav-pill__links a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink-2);
  padding: 0.3rem 0;
  position: relative;
  transition: color var(--dur-micro) var(--ease-out);
}
.nav-pill__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--color-ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-short) var(--ease-out);
}
.nav-pill__links a:hover { color: var(--color-ink); }
.nav-pill__links a:hover::after { transform: scaleX(1); }
.nav-pill__cta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-on-dark);
  background: var(--color-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.nav-pill__cta:hover { transform: translateY(-1px); }
.nav-pill__cta:active { transform: translateY(0); }

/* =================== HERO - Marquee + clipped-edge video =================== */
.hero {
  position: relative;
  min-height: 92dvh;
  display: grid;
  align-content: end;
  padding: 0 var(--page-gutter) clamp(2.5rem, 8vh, 6rem);
  color: var(--color-on-dark);
  isolation: isolate;
}
/* real hero showreel video fills the fold behind the scrim + text */
.hero__media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero__media {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 78% 18%, color-mix(in oklch, var(--color-dark-2) 88%, transparent), transparent 60%),
    linear-gradient(180deg, var(--color-dark-2), var(--color-dark));
  overflow: hidden;
}
/* fine film-grain texture, no external image */
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, color-mix(in oklch, var(--color-on-dark) 2.5%, transparent) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay; opacity: 0.5; pointer-events: none;
}
/* soft cinematic light streak */
.hero__media::before {
  content: ""; position: absolute; left: 52%; top: -10%;
  width: 40%; height: 70%;
  background: radial-gradient(closest-side, color-mix(in oklch, var(--color-on-dark) 16%, transparent), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, oklch(12% 0.006 250 / 0.78) 0%, oklch(12% 0.006 250 / 0.10) 55%, transparent 100%);
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-on-dark-2);
  margin: 0 0 var(--space-md);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-display);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 18ch;
}
.hero__lede {
  margin: var(--space-lg) 0 0;
  max-width: 52ch;
  color: var(--color-on-dark-2);
  font-size: var(--text-md);
  line-height: 1.5;
}
.hero__scroll {
  position: absolute; right: var(--page-gutter); bottom: clamp(2.5rem, 8vh, 6rem);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-on-dark-2);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: var(--space-sm);
}
.hero__scroll::after { content: ""; width: 1px; height: 38px; background: var(--color-on-dark-2); }

/* =================== SECTION SCAFFOLD =================== */
.section { padding-block: clamp(4rem, 12vh, 8rem); }
.section--tight { padding-block: clamp(3rem, 8vh, 5rem); }
.section__head { display: grid; gap: var(--space-sm); margin-bottom: var(--space-2xl); }
.section__kicker {
  font-family: var(--font-mono); font-size: var(--text-sm);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted);
  margin: 0;
}
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.05;
  letter-spacing: -0.02em; margin: 0; max-width: 22ch;
}
.section__intro { color: var(--color-ink-2); max-width: 60ch; margin: 0; }

/* =================== WORK GRID (cinematic panels) =================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-lg);
}
.work-card {
  display: grid; gap: var(--space-sm);
  text-align: left; color: inherit;
}
.work-card__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 22% 12%, oklch(34% 0.02 250 / 0.9), transparent 60%),
    linear-gradient(180deg, var(--color-dark-2), var(--color-dark));
}
/* per-card distinct tone via custom prop, still monochrome-cool */
.work-card__frame::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, color-mix(in oklch, var(--color-on-dark) 2%, transparent) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay; opacity: 0.45; pointer-events: none;
}
.work-card__frame::before {
  content: ""; position: absolute; left: 16%; top: -8%;
  width: 46%; height: 70%;
  background: radial-gradient(closest-side, var(--card-glow, color-mix(in oklch, var(--color-on-dark) 14%, transparent)), transparent 70%);
  filter: blur(18px); pointer-events: none;
}
/* embedded media fills the frame (mp4 + YouTube iframe) */
.work-card__media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0; z-index: 0;
}
/* caption text under each video - aligned to left edge, full container width */
.work-card__meta {
  display: grid; gap: var(--space-3xs); padding-top: var(--space-3xs);
  text-align: left;
}
.work-card__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-md); letter-spacing: -0.01em; margin: 0;
}
.work-card__cat {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted);
  margin: 0;
}
/* online logline - same left edge + same width as title/genre above */
.work-card__logline {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-muted);
}
/* launch date line - muted mono, sits above the View project link */
.work-card__launch {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.work-card__launch b {
  font-weight: 700;
  color: var(--color-ink);
}
.work-card__link {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--color-ink);
  border-bottom: 1px solid var(--color-rule-2); padding-bottom: 0.25rem;
  transition: gap var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
.work-card__link:hover { gap: var(--space-sm); border-color: var(--color-ink); }
.work-card__link span { transition: transform var(--dur-short) var(--ease-out); }
.work-card__link:hover span { transform: translateX(3px); }
.work-card--video .work-card__no { z-index: 1; }
.work-card__no {
  position: absolute; left: var(--space-sm); top: var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; color: var(--color-on-dark-2);
}

/* =================== CTA STRIP =================== */
.cta-strip {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: var(--space-xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-top: var(--space-2xl);
}
.cta-strip__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.05;
  letter-spacing: -0.02em; margin: 0; max-width: 18ch;
}
.cta-strip__action {
  font-family: var(--font-mono); font-size: var(--text-base);
  letter-spacing: 0.04em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: var(--space-sm);
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 0.3rem;
  transition: gap var(--dur-short) var(--ease-out);
}
.cta-strip__action:hover { gap: var(--space-md); }
.cta-strip__action span { transition: transform var(--dur-short) var(--ease-out); }
.cta-strip__action:hover span { transform: translateX(3px); }

/* =================== FOOTER - Ft2 Inline rule =================== */
.foot-line {
  border-top: var(--rule-hair) solid var(--color-rule);
  margin-top: var(--space-4xl);
  padding-block: var(--space-xl);
}
.foot-line__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg);
  font-family: var(--font-mono); font-size: var(--text-sm);
  letter-spacing: 0.03em; color: var(--color-muted);
}
.foot-line__brand {
  display: flex; align-items: center; gap: var(--space-sm);
  color: var(--color-ink); font-weight: 500;
}
.foot-line__brand img { height: 30px; width: auto; }
.foot-line__links { display: flex; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.foot-line__links a { transition: color var(--dur-micro) var(--ease-out); }
.foot-line__links a:hover { color: var(--color-ink); }
.foot-line__meta { margin-left: auto; }

/* =================== REVEAL (one orchestrated entrance) =================== */
.reveal {
  opacity: 0; transform: translateY(10px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* =================== RESPONSIVE =================== */
@media (max-width: 60rem) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .brand-mark__img { height: 30px; }
  .nav-pill { gap: var(--space-sm); padding: 0.5rem 0.6rem 0.5rem 0.9rem; }
  .nav-pill__links { gap: var(--space-md); }
  .nav-pill__cta { padding: 0.45rem 0.8rem; }
  .work-grid { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .cta-strip { flex-direction: column; align-items: start; }
  .foot-line__meta { margin-left: 0; width: 100%; }
  .foot-line__brand img { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .reveal { animation: reveal-reduced 150ms linear forwards; }
  @keyframes reveal-reduced { to { opacity: 1; transform: none; } }
}
