/* ------------------------------------------------------------------ */
/*  NASUY Studio — kinetic typography site                             */
/*  Design language: black canvas, oversized grotesk type, pill UI,    */
/*  film grain, custom cursor.                                         */
/* ------------------------------------------------------------------ */

:root {
  --bg: #0c0c0c;
  --ink: #f4f2ee;
  --muted: #8a8a86;
  --accent: #b8f25a;
  --pill-bg: #f4f2ee;
  --pill-ink: #0c0c0c;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

body.is-locked {
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

sup {
  font-size: 0.55em;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- */
/*  Fixed layers                                                     */
/* ---------------------------------------------------------------- */

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: screen;
}

/* ---------------------------------------------------------------- */
/*  Custom cursor                                                    */
/* ---------------------------------------------------------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

body.cursor-visible .cursor {
  opacity: 1;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--ink);
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(244, 242, 238, 0.5);
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
}

.cursor.is-active .cursor-ring {
  transform: scale(1.8);
  opacity: 0.9;
}

@media (hover: none) {
  .cursor {
    display: none;
  }
}

/* ---------------------------------------------------------------- */
/*  Preloader / enter gate                                           */
/* ---------------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preloader-line {
  width: 180px;
  height: 1px;
  background: rgba(244, 242, 238, 0.18);
  overflow: hidden;
}

.preloader-line-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.preloader-count {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.enter {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  opacity: 0;
  visibility: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.enter-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.enter-ring circle {
  fill: none;
  stroke-width: 1;
}

.enter-ring-track {
  stroke: rgba(244, 242, 238, 0.18);
}

.enter-ring-fill {
  stroke: var(--ink);
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
}

.enter-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink);
}

/* ---------------------------------------------------------------- */
/*  Header                                                           */
/* ---------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.8s var(--ease-out) 0.2s, transform 0.8s var(--ease-out) 0.2s;
}

body.is-entered .header {
  opacity: 1;
  transform: none;
}

.logo {
  display: block;
  width: 44px;
  height: 44px;
}

.logo-face {
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease-out);
}

.logo:hover .logo-face {
  transform: rotate(12deg);
}

.logo-bg {
  fill: var(--accent);
}

.logo-eye {
  fill: var(--bg);
}

.logo-mouth {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.header-right {
  display: flex;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease-out);
}

.pill:hover {
  transform: scale(1.06);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pill-ink);
  transition: background 0.3s;
}

.pill-dot.is-off {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--pill-ink);
}

/* ---------------------------------------------------------------- */
/*  Fullscreen menu                                                  */
/* ---------------------------------------------------------------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8vw;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}

.menu-list {
  list-style: none;
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 1.2vw 0;
  font-size: clamp(40px, 7vw, 110px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  overflow: hidden;
}

.menu-link span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s var(--ease-out), color 0.3s;
}

.menu-link sup {
  font-size: 14px;
  transform: translateY(110%);
  transition: transform 0.8s var(--ease-out) 0.05s;
}

.menu.is-open .menu-link span,
.menu.is-open .menu-link sup {
  transform: none;
}

.menu-link:hover span {
  color: var(--accent);
}

.menu-footer {
  position: absolute;
  bottom: 32px;
  left: 8vw;
  right: 8vw;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------------------------------------------------------------- */
/*  Scroll container                                                 */
/* ---------------------------------------------------------------- */

.scroll-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  will-change: transform;
}

main {
  position: relative;
}

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

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 7vh;
}

.hero-tagline {
  text-align: center;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 560px;
}

.hero-tagline .line {
  display: block;
  overflow: hidden;
}

.hero-tagline .line > span {
  display: inline-block;
}

.hero-hint {
  margin-top: 5vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hint-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--muted));
  animation: hint-drop 2.2s var(--ease-out) infinite;
}

@keyframes hint-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------------------------------------------------------------- */
/*  Reveal primitives                                                */
/* ---------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- */
/*  Projects                                                         */
/* ---------------------------------------------------------------- */

.projects {
  position: relative;
  padding: 18vh 6vw 12vh;
  background: var(--bg);
}

.projects-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 8vh;
}

.projects-head h2 {
  font-size: clamp(48px, 8vw, 128px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.filters {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(244, 242, 238, 0.25);
  font-size: 13px;
  color: var(--ink);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.filter:hover {
  border-color: var(--ink);
}

.filter.is-active {
  background: var(--pill-bg);
  color: var(--pill-ink);
  border-color: var(--pill-bg);
}

.project-list {
  list-style: none;
  border-top: 1px solid rgba(244, 242, 238, 0.14);
}

.project {
  border-bottom: 1px solid rgba(244, 242, 238, 0.14);
  overflow: hidden;
}

.project.is-hidden {
  display: none;
}

.project a {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 4vh 8px;
  transition: padding-left 0.5s var(--ease-out);
}

.project a:hover {
  padding-left: 28px;
}

.project-index {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.project-title {
  font-size: clamp(32px, 5vw, 80px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  transition: color 0.3s;
}

.project a:hover .project-title {
  color: var(--accent);
}

.project-meta {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Floating hover preview */
.preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 320px;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  pointer-events: none;
  transform: scale(0);
  transform-origin: center;
}

.preview-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f2a65a, #d44d8e);
}

.preview-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(12, 12, 12, 0.7);
}

/* ---------------------------------------------------------------- */
/*  CTA                                                              */
/* ---------------------------------------------------------------- */

.cta {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4vh;
  text-align: center;
  background: var(--bg);
}

.cta-kicker {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  font-size: clamp(56px, 11vw, 200px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: color 0.35s;
}

.cta-link:hover {
  color: var(--accent);
}

.cta-dot {
  width: 0.13em;
  height: 0.13em;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.45s var(--ease-out);
}

.cta-link:hover .cta-dot {
  transform: scale(1.5);
}

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

.footer {
  background: var(--bg);
  padding: 10vh 6vw 5vh;
  border-top: 1px solid rgba(244, 242, 238, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 12vh;
}

.footer-col h3 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.footer-col p {
  font-size: 15px;
  line-height: 1.8;
}

.footer-col a {
  position: relative;
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.footer-col a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------------------------------------------------------------- */
/*  Responsive                                                       */
/* ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project a {
    grid-template-columns: 40px 1fr;
  }

  .project-meta {
    grid-column: 2;
  }

  .preview {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint-line {
    animation: none;
  }

  [data-reveal] {
    transition: none;
  }
}
