/* KunstTec — Minimalist artsy design */

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

:root {
  --black: #000000;
  --white: #ffffff;
  --g1: #080808;
  --g2: #141414;
  --g3: #222222;
  --g4: #555555;
  --g5: #888888;
  --g6: #bbbbbb;
  --font: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

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

/* ——————————————————————————————————
   Custom Cursor (desktop only)
   —————————————————————————————————— */

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
    border-color 0.3s var(--ease), opacity 0.3s var(--ease);
  mix-blend-mode: difference;
  opacity: 0;
}

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

.cursor-ring.hovering {
  width: 56px;
  height: 56px;
  border-color: rgba(255, 255, 255, 0.8);
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a,
  button,
  .project-row,
  .showcase-cta {
    cursor: none;
  }
}

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

/* ——————————————————————————————————
   Background Canvas
   —————————————————————————————————— */

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ——————————————————————————————————
   Header
   —————————————————————————————————— */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 28px 40px;
  mix-blend-mode: difference;
}

.header-brand {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

/* ——————————————————————————————————
   Hero
   —————————————————————————————————— */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 40px;
  overflow: hidden;
}

.hero-text {
  flex: 0.6 1 0;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--g4);
  margin-bottom: 28px;
}

/* ——————————————————————————————————
   KT Particle Canvas
   —————————————————————————————————— */

.hero-particles {
  position: relative;
  flex: 1.4 1 0;
  min-width: 0;
  height: clamp(450px, 75vh, 800px);
}

.kt-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ——————————————————————————————————
   Hero Text
   —————————————————————————————————— */

.hero-title {
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin: 0;
  user-select: none;
  white-space: nowrap;
}

.hero-title .letter {
  display: inline-block;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}

.hero-sub {
  font-size: clamp(0.8125rem, 1.4vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.9;
  color: var(--g5);
  margin-top: 40px;
  max-width: 380px;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--g4);
  animation: cue-pulse 2.5s ease-in-out infinite;
}

.scroll-cue svg {
  color: var(--g4);
}

@keyframes cue-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* ——————————————————————————————————
   Projects — editorial list
   —————————————————————————————————— */

.projects {
  position: relative;
  z-index: 1;
  padding: 140px 40px 100px;
}

.section-label {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--g4);
  margin-bottom: 60px;
}

.project-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 40px 0;
  border-top: 1px solid var(--g2);
  transition: all 0.5s var(--ease);
  color: inherit;
  text-decoration: none;
}

.project-row:last-child {
  border-bottom: 1px solid var(--g2);
}

.project-row:hover {
  padding-left: 24px;
  border-color: var(--g3);
}

.project-row:hover + .project-row {
  border-top-color: var(--g3);
}

.project-row:hover .project-name {
  letter-spacing: 0.03em;
}

.project-idx {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--g4);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 28px;
}

.project-name {
  font-size: clamp(1.75rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
  transition: letter-spacing 0.5s var(--ease);
}

.project-spacer {
  flex: 1;
  min-width: 20px;
}

.project-brief {
  font-size: 0.6875rem;
  color: var(--g5);
  white-space: nowrap;
  margin: 0;
  display: none;
}

.project-status {
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g4);
  border: 1px solid var(--g3);
  padding: 5px 12px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .project-brief {
    display: block;
  }
}

/* ——————————————————————————————————
   Showcase Sections (Vasyan / Warp / TallYan)
   —————————————————————————————————— */

.showcase {
  position: relative;
  z-index: 1;
  padding: 160px 40px 120px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  border-top: 1px solid var(--g2);
}

.showcase-label {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--g4);
}

.showcase-heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-name {
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  margin: 0;
}

.showcase-subtitle {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--g4);
  margin: 0;
  hyphens: manual;
}

.showcase-body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 520px;
}

.showcase-desc {
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
  line-height: 2;
  color: var(--g5);
  font-weight: 300;
  margin: 0;
}

.showcase-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.showcase-features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--g6);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.showcase-features li:hover {
  transform: translateX(8px);
  color: var(--white);
}

.showcase-marker {
  color: var(--g4);
  font-weight: 300;
  flex-shrink: 0;
}

.showcase-cta {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--g5);
  letter-spacing: 0.05em;
  padding: 8px 0;
  border-bottom: 1px solid var(--g3);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  width: fit-content;
}

.showcase-cta:hover {
  color: var(--white);
  border-color: var(--white);
}

@media (min-width: 768px) {
  .showcase {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding: 200px 40px 160px;
  }

  .showcase-label {
    grid-column: 1 / -1;
  }

  .showcase-body {
    padding-top: 16px;
  }

  /* Reverse: swap visual order of heading and body */
  .showcase--reverse .showcase-heading {
    order: 2;
    text-align: right;
  }

  .showcase--reverse .showcase-body {
    order: 1;
  }
}

/* ——————————————————————————————————
   Footer
   —————————————————————————————————— */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 40px;
  font-size: 0.625rem;
  color: var(--g4);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--g2);
}

.footer-sep {
  opacity: 0.3;
}

/* ——————————————————————————————————
   Scroll Reveal
   —————————————————————————————————— */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.reveal:nth-child(4) {
  transition-delay: 0.24s;
}

/* ——————————————————————————————————
   App Pages (Vasyan / TallYan / Warp)
   —————————————————————————————————— */

.app-page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 160px 40px 120px;
}

.app-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--g4);
  letter-spacing: 0.05em;
  margin-bottom: 64px;
  padding: 6px 0;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.app-page .back-link:hover {
  color: var(--white);
  transform: translateX(-4px);
}

.app-page-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 48px;
}

.app-page-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  margin: 0 0 6px;
}

.app-page-tagline {
  font-size: 0.8125rem;
  color: var(--g5);
  margin: 0;
  font-weight: 300;
}

.app-page-description {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--g5);
  margin: 0 0 48px;
  font-weight: 300;
}

.app-page-description p {
  margin: 0 0 1.2em;
}

.app-page-description p:last-child {
  margin-bottom: 0;
}

/* Feature list on app pages */
.app-page-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 48px;
}

.app-page-features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--g6);
  line-height: 1.6;
}

.app-page-features .feat-marker {
  color: var(--g4);
  font-weight: 300;
  flex-shrink: 0;
}

/* Screenshots */
.app-screenshots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0 0 48px;
}

@media (min-width: 640px) {
  .app-screenshots {
    grid-template-columns: repeat(3, 1fr);
  }
}

.app-screenshot {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--g2);
}

/* CTA buttons */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--black);
  background: var(--white);
  border: none;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.cta-btn:hover {
  background: var(--g6);
  transform: translateY(-2px);
}

.cta-btn-muted {
  background: transparent;
  color: var(--g4);
  border: 1px solid var(--g3);
  cursor: default;
  pointer-events: none;
}

.cta-btn-muted:hover {
  background: transparent;
  transform: none;
}

/* ——————————————————————————————————
   App Page Header + Footer (shared)
   —————————————————————————————————— */

.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 28px 40px;
  mix-blend-mode: difference;
}

.page-header a {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.page-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 40px;
  font-size: 0.625rem;
  color: var(--g4);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--g2);
}

/* ——————————————————————————————————
   Mobile
   —————————————————————————————————— */

@media (max-width: 640px) {
  .header {
    padding: 20px 24px;
  }
  .hero {
    flex-direction: column;
    justify-content: center;
    padding: 100px 24px 60px;
    gap: 32px;
    text-align: center;
  }
  .hero-text {
    flex: none;
    width: 100%;
  }
  .hero-particles {
    flex: none;
    width: 100%;
    height: clamp(160px, 28vh, 260px);
  }
  .hero-title {
    white-space: normal;
  }
  .hero-sub {
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
  }
  .scroll-cue {
    left: 24px;
    bottom: 28px;
  }
  .projects {
    padding: 100px 24px 60px;
  }
  .project-row {
    padding: 28px 0;
    gap: 14px;
  }
  .project-row:hover {
    padding-left: 12px;
  }
  .showcase {
    padding: 100px 24px 80px;
  }
  .footer {
    padding: 40px 24px;
  }
  .app-page {
    padding: 120px 24px 80px;
  }
  .page-header {
    padding: 20px 24px;
  }
}

@media (max-width: 480px) {
  .project-status {
    display: none;
  }
}
