/* ============================================================
   Epyphany Studios — own brand identity
   Display face: Kaneda Gothic ExtraBold Italic (brand font).
   Body face: Inter. Brand accent: #0F575D (teal).
   27km used only as a directional reference, not copied.
   ============================================================ */

/* Brand display face — self-hosted */
@font-face {
  font-family: "Kaneda";
  src: url("../assets/fonts/kaneda-gothic-extrabold-italic.ttf") format("truetype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0c0e0e;
  --surface: #141717;
  --surface-2: #1b1f1f;
  --text: #ffffff;
  --muted: #8c9596;
  --hairline: #232828;
  --brand: #0F575D;           /* official brand teal (RGB 15,87,93) */
  --brand-2: #0a3d42;         /* deeper teal for gradients */
  --accent: #3aa6ad;          /* lighter teal — legible on dark for links/hover */

  --radius: 18px;
  --unit: 4px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-head: "Kaneda", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --pad-x: clamp(20px, 5vw, 80px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1vw + 12px, 18px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }

/* Display face: Kaneda Gothic ExtraBold Italic — the brand's own voice. */
.section__title, .contact__big, .work__title, .talent__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.94;
}

/* ===================== 1 · LOADER ===================== */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .7s var(--ease), visibility .7s var(--ease);
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { text-align: center; width: min(360px, 64vw); }
.loader__logo {
  width: 100%; height: auto; display: block;
  opacity: 0; transform: translateY(10px);
  animation: loaderIn .9s var(--ease) forwards;
}
@keyframes loaderIn { to { opacity: 1; transform: none; } }
.loader__bar {
  margin-top: 26px; height: 2px; width: 100%;
  background: var(--hairline); border-radius: 2px; overflow: hidden;
}
.loader__bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .25s linear;
}

/* ===================== 2 · HEADER ===================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  transition: background .4s var(--ease), padding .4s var(--ease);
}
.header.is-scrolled {
  background: rgba(14,14,14,.78);
  backdrop-filter: blur(12px);
  padding-top: 14px; padding-bottom: 14px;
}
.header__logo img { height: 30px; width: auto; display: block; }
.header__actions { display: flex; align-items: center; gap: 18px; }
.header__icon { color: var(--text); display: grid; place-items: center; opacity: .85; transition: opacity .25s; }
.header__icon:hover { opacity: 1; }

.header__menu-btn {
  width: 42px; height: 42px; border: 1px solid var(--hairline);
  border-radius: 50%; background: transparent; cursor: pointer;
  display: grid; place-content: center; gap: 5px; padding: 0;
  transition: border-color .25s, background .25s;
}
.header__menu-btn span {
  display: block; width: 16px; height: 1.5px; background: var(--text);
  transition: transform .35s var(--ease), opacity .25s;
}
.header__menu-btn:hover { border-color: var(--accent); }
body.menu-open .header__menu-btn span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
body.menu-open .header__menu-btn span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ===================== 3 · OVERLAY MENU ===================== */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad-x) 40px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .7s var(--ease), visibility .7s var(--ease);
}
.overlay.is-open { clip-path: inset(0 0 0 0); visibility: visible; }

.overlay__list { list-style: none; max-width: 1100px; }
.overlay__item a {
  display: flex; align-items: baseline; gap: 22px;
  padding: clamp(6px, 1.2vh, 14px) 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-head); font-weight: 800; font-stretch: 125%;
  text-transform: uppercase; line-height: 1;
  font-size: clamp(34px, 7vw, 88px);
  color: var(--text);
  opacity: 0; transform: translateY(40px);
  transition: color .3s, opacity .6s var(--ease), transform .6s var(--ease);
}
.overlay.is-open .overlay__item a { opacity: 1; transform: none; }
.overlay.is-open .overlay__item:nth-child(1) a { transition-delay: .08s; }
.overlay.is-open .overlay__item:nth-child(2) a { transition-delay: .14s; }
.overlay.is-open .overlay__item:nth-child(3) a { transition-delay: .20s; }
.overlay.is-open .overlay__item:nth-child(4) a { transition-delay: .26s; }
.overlay.is-open .overlay__item:nth-child(5) a { transition-delay: .32s; }
.overlay.is-open .overlay__item:nth-child(6) a { transition-delay: .38s; }
.overlay.is-open .overlay__item:nth-child(7) a { transition-delay: .44s; }
.overlay__item a:hover { color: var(--accent); }
.overlay__idx { font-size: .35em; color: var(--muted); font-weight: 600; }

.overlay__thumb {
  position: fixed; top: 50%; right: var(--pad-x); width: 280px; height: 200px;
  transform: translateY(-50%) scale(.96); border-radius: var(--radius);
  background-size: cover; background-position: center;
  opacity: 0; pointer-events: none; transition: opacity .4s, transform .4s var(--ease);
  z-index: -1;
}
.overlay__thumb.is-visible { opacity: .55; transform: translateY(-50%) scale(1); }

.overlay__foot {
  display: flex; flex-wrap: wrap; gap: 48px; margin-top: auto; padding-top: 32px;
}
.overlay__foot p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.overlay__foot a:hover { color: var(--accent); }
.overlay__foot-label {
  display: block; font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--text); margin-bottom: 8px;
}

/* ===================== 4 · HERO ===================== */
.hero {
  position: relative; height: 100svh; min-height: 560px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.7) 100%);
}
.hero__inner {
  position: relative; z-index: 2; width: 100%; padding: 0 var(--pad-x);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__logo {
  width: clamp(240px, 40vw, 520px); height: auto; display: block;
  filter: drop-shadow(0 6px 30px rgba(0,0,0,.55));
}
.hero__tag {
  margin-top: clamp(18px, 3vh, 30px);
  font-size: clamp(.72rem, 1.4vw, .92rem);
  letter-spacing: .32em; text-transform: uppercase; color: rgba(255,255,255,.82);
}

.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--text);
}
.hero__scroll svg { animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ===================== SHARED SECTION ===================== */
.section { padding: clamp(72px, 12vh, 160px) var(--pad-x); position: relative; }
.section__head { margin-bottom: clamp(36px, 6vh, 72px); }
.section__kicker {
  display: block; font-size: .72rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.section__title { font-size: clamp(40px, 8vw, 120px); }

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

/* line-button */
.btn-line {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text);
}
.btn-line span { position: relative; padding-bottom: 4px; }
.btn-line span::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.btn-line:hover span::after { transform: scaleX(1); }

/* ===================== 5 · ABOUT ===================== */
.about__body { max-width: 1000px; display: grid; gap: 1.4em; }
.about__body p { font-size: clamp(20px, 2.4vw, 34px); line-height: 1.4; color: #eaeaea; }
.about__body p:first-child { color: var(--text); }

/* ===================== FOUNDER ===================== */
.founder__grid {
  display: grid; grid-template-columns: minmax(260px, 0.85fr) 1.15fr;
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.founder__media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.founder__media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; aspect-ratio: 33/50; }
.founder__role { display: block; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.founder__body p { font-size: clamp(16px, 1.4vw, 20px); color: #d7dcdc; margin-bottom: 1em; }
.founder__body p:first-of-type { color: var(--text); }

/* ===================== SERVICES ===================== */
.services__lead { max-width: 760px; font-size: clamp(18px, 2vw, 26px); color: #d7dcdc; margin-bottom: clamp(28px, 5vh, 56px); line-height: 1.45; }
.services__grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--bg); padding: clamp(28px, 4vw, 48px); transition: background .35s var(--ease); }
.service:hover { background: var(--surface); }
.service h3 { font-family: var(--font-head); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: clamp(1.2rem, 1.8vw, 1.6rem); margin: 0; }

/* ===================== TALENTS ===================== */
.talents__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.talent { background: var(--bg); padding: clamp(28px, 3.5vw, 44px); transition: background .35s var(--ease); }
.talent:hover { background: var(--surface); }
.talent__media { margin-bottom: 22px; }
.talent__role { display: block; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.talent__name { font-size: 1.9rem; margin: 8px 0 16px; }
.talent p { color: var(--muted); font-size: .95rem; }
.talent p + p { margin-top: .85em; }
.talent__credit {
  display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hairline);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}

/* ===================== WORKS ===================== */
.works__cat {
  font-family: var(--font-head); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem); color: var(--accent);
  margin: clamp(36px, 6vh, 64px) 0 22px; letter-spacing: .02em;
}
.works__cat:first-of-type { margin-top: 0; }
.works__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(20px, 3vw, 44px); }
.work { display: block; }
.work__media {
  aspect-ratio: 16/9; border-radius: var(--radius); margin-bottom: 18px;
  background: linear-gradient(135deg, var(--brand-2), #101414);
  position: relative; overflow: hidden; display: grid; place-items: center;
  transition: transform .5s var(--ease);
}
.work__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; }
.work:hover .work__media img { transform: scale(1.05); }
.work:hover .work__media { transform: translateY(-6px); }
.work__media--text { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.work__wordmark { font-family: var(--font-head); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 6vw, 3.4rem); color: #fff; opacity: .92; }
.work__play {
  position: relative; z-index: 2; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; color: #fff;
  background: rgba(15,87,93,.6); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.35);
  transition: background .3s, transform .3s var(--ease);
}
.work:hover .work__play { background: var(--brand); transform: scale(1.08); }
.work__cat { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.work__title { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 10px 0 8px; }
.work__client { color: var(--muted); font-size: .92rem; }
.work__cta { display: inline-block; margin-top: 14px; font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; position: relative; }
.work__cta::after { content: "→"; margin-left: 8px; transition: margin-left .3s var(--ease); }
.work:hover .work__cta::after { margin-left: 14px; }

/* ===================== 9 · NEWS ===================== */
.news__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.news-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px 16px 28px; }
.news-card__img { aspect-ratio: 4/3; border-radius: 12px; margin-bottom: 22px; background: linear-gradient(135deg, #242424, #131313); }
.news-card__cat { display: inline-block; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px 4px; }
.news-card p { color: #cfcfcf; padding: 0 4px; }
.news-card .btn-line { margin-left: 4px; }

/* ===================== 10 · CONTACT ===================== */
.contact { text-align: center; }
.contact__cta { display: inline-block; padding: clamp(20px, 6vh, 60px) 0; }
.contact__small { display: block; font-size: clamp(1rem, 3vw, 1.8rem); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact__small--r { margin-top: .4em; }
.contact__big { display: block; font-size: clamp(48px, 11vw, 150px); margin: .1em 0; transition: color .35s; }
.contact__cta:hover .contact__big { color: var(--accent); }
.contact__details { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; max-width: 1000px; margin: clamp(40px, 7vh, 80px) auto 0; text-align: left; }
.contact__label { display: block; font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.contact__details p { line-height: 1.7; }
.contact__details a:hover { color: var(--accent); }

/* ===================== 11 · FOOTER ===================== */
.footer {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding: clamp(48px, 8vh, 96px) var(--pad-x) 32px;
  border-top: 1px solid var(--hairline);
}
.footer__brand img { height: 30px; width: auto; align-self: flex-start; display: block; margin-bottom: 16px; }
.footer__brand p { color: var(--muted); max-width: 240px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col > a { color: var(--muted); transition: color .25s; }
.footer__col > a:hover { color: var(--text); }
.footer__label { font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }
.footer__bottom { grid-column: 1 / -1; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer__imprint { color: var(--muted); transition: color .25s; }
.footer__imprint:hover { color: var(--text); }

/* ===================== INLINE VIDEO PLAYER ===================== */
.vplayer {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, var(--brand-2), #101414);
  transition: transform .5s var(--ease);
}
.work .vplayer { margin-bottom: 18px; }
.work .vplayer:hover { transform: translateY(-6px); }
.vplayer__poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.vplayer:hover .vplayer__poster { transform: scale(1.05); }
.vplayer__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer; padding: 0 0 0 4px;
  display: grid; place-items: center; font-size: 1.2rem; color: #fff;
  background: rgba(15,87,93,.6); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.35);
  transition: background .3s, transform .3s var(--ease);
}
.vplayer:hover .vplayer__play { background: var(--brand); transform: translate(-50%, -50%) scale(1.08); }
.vplayer video, .vplayer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.vplayer.is-playing { cursor: default; transform: none; }
.vplayer.is-playing .vplayer__poster, .vplayer.is-playing .vplayer__play { display: none; }

/* ===================== PHOTOGRAPHY GALLERY ===================== */
/* Tidy, row-ordered grid — uniform cells, all aligned. Images are top-anchored
   so portraits keep their heads; the full frame opens in the lightbox. */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px; margin-top: 8px;
}
.gallery__item {
  position: relative; display: block; padding: 0; border: 0; background: var(--surface-2);
  cursor: pointer; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5;
  z-index: 1; will-change: transform;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  display: block; filter: saturate(.9) brightness(.92);
  transition: transform .6s var(--ease), filter .4s var(--ease), opacity .3s;
}
/* Photos lift and "pop" slightly before being clicked — fuller colour on hover. */
.gallery__item:hover, .gallery__item:focus-visible {
  transform: translateY(-8px) scale(1.04); z-index: 3;
  box-shadow: 0 20px 44px rgba(0,0,0,.55);
}
.gallery__item:hover img, .gallery__item:focus-visible img {
  transform: scale(1.06); filter: saturate(1.06) brightness(1.03); opacity: 1;
}
.gallery__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ===================== LIGHTBOX ===================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 6vh 5vw;
  background: rgba(8,9,9,.94); backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox__close {
  position: fixed; top: 20px; right: 28px; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--hairline); background: transparent; color: #fff; font-size: 1.7rem;
  line-height: 1; cursor: pointer; transition: border-color .25s, color .25s;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .footer { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .overlay__thumb { display: none; }
  .founder__grid { grid-template-columns: 1fr; gap: 28px; }
  .founder__media { max-width: 420px; }
  .founder__media img { aspect-ratio: 33/50; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer { grid-template-columns: 1fr; }
  .overlay { padding-top: 100px; }
  .hero__logo { width: min(78vw, 360px); }
  .section__title { font-size: clamp(34px, 12vw, 64px); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: 1fr; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll svg { animation: none; }
  .hero__video { display: none; }      /* fall back to poster, no motion */
  .loader__logo { animation: none; opacity: 1; transform: none; }
  * { transition-duration: .001ms !important; }
}
