/* ============================================================
   STUDIO KROM — style.css
   ============================================================ */

/* ----- RESET & VARIABLES ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:           #141414;
  --text:         #f5f2ed;
  --muted:        #a09a92;
  --accent:       #d4c5a9;
  --border:       rgba(245, 242, 237, 0.14);
  --serif:        'Cormorant Garamond', serif;
  --sans:         'Inter', sans-serif;
  --ease:         cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s;
  will-change: transform;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(240, 235, 228, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease);
  will-change: transform;
}

body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
  width: 14px;
  height: 14px;
}
body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower {
  width: 56px;
  height: 56px;
}


/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 52px;
  transition: background 0.5s, padding 0.4s;
}

.nav::before {
  display: none;
}

.nav.scrolled {
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 20px 52px;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 44px;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 242, 237, 0.72);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(245, 242, 237, 0.72);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
  transition: color 0.3s;
}

.nav-social svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
}

.nav-social a:hover {
  color: var(--text);
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

/* Slides */
.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img,
.hero-slide picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.03);
  transition: transform 8s ease-out;
}

.hero-slide picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.03);
  transition: transform 8s ease-out;
}

.hero-slide.active.animate img {
  transform: scale(1);
}

/* Overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20,20,20,0.7) 0%, rgba(20,20,20,0.15) 40%, transparent 60%),
    linear-gradient(160deg, rgba(20,20,20,0.25) 0%, transparent 50%);
  z-index: 1;
}

/* Content */
.hero-content {
  position: absolute;
  bottom: 88px;
  left: 52px;
  z-index: 2;
}

.hero-meta {
  margin-bottom: 18px;
}

.hero-counter {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-type {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Next button */
.hero-next {
  position: absolute;
  bottom: 88px;
  right: 52px;
  z-index: 2;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: gap 0.35s var(--ease), color 0.3s;
}

.hero-next:hover {
  gap: 22px;
  color: var(--accent);
}

.hero-next .arrow {
  font-size: 16px;
  transition: transform 0.3s var(--ease);
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-scroll span {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  transform-origin: top;
  animation: scrollAnim 2.2s ease-in-out infinite;
}

@keyframes scrollAnim {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}


/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
  padding: 130px 52px 100px;
  position: relative;
}

.projects-header {
  margin-bottom: 72px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.projects-header h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 3.5vw, 52px);
  font-style: italic;
  color: var(--muted);
}

/* Floating image */
.float-img-wrap {
  position: fixed;
  width: 380px;
  height: 480px;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  border-radius: 2px;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.float-img-wrap.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.float-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* List */
.projects-list {
  list-style: none;
}

.project-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.project-link {
  display: grid;
  grid-template-columns: 56px 1fr 120px 56px 32px;
  align-items: center;
  padding: 30px 0;
  position: relative;
  transition: padding-left 0.35s var(--ease);
}

.project-item:hover .project-link {
  padding-left: 12px;
}

.proj-num {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.proj-name {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 44px);
  font-weight: 300;
  transition: color 0.35s;
}

.project-item:hover .proj-name {
  color: var(--accent);
}

.proj-cat {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.proj-year {
  font-size: 11px;
  color: var(--muted);
}

.proj-arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.35s var(--ease), color 0.3s;
}

.project-item:hover .proj-arrow {
  transform: translateX(10px);
  color: var(--text);
}


/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 160px 52px;
  border-top: 1px solid var(--border);
}

.about-statement {
  margin-bottom: 110px;
}

.statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 9vw, 130px);
  line-height: 1.08;
}

.statement em {
  color: var(--accent);
  font-style: italic;
}

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}

.about-text p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(245, 242, 237, 0.82);
  margin-bottom: 22px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.detail-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-val {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
}


/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 160px 52px;
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 1000px;
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(48px, 7.5vw, 110px);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 56px;
}

.contact-title em {
  color: var(--accent);
  font-style: italic;
}

.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 44px);
  font-weight: 300;
  color: var(--accent);
  margin-bottom: 88px;
  position: relative;
}

.contact-email::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.45s var(--ease);
}

.contact-email:hover::after {
  width: 100%;
}

.contact-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-ig {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.contact-ig:hover {
  color: var(--text);
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 28px 52px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}


/* ============================================================
   PROJECT DETAIL HERO
   ============================================================ */
.proj-hero {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
}

.proj-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-hero-content {
  position: absolute;
  bottom: 72px;
  left: 52px;
  z-index: 2;
}

.proj-hero-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
}

.proj-hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.proj-hero-meta {
  display: flex;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ============================================================
   GALLERY GRID
   ============================================================ */
.gallery {
  padding: 80px 52px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  aspect-ratio: 3/2;
  transition: transform 0.7s var(--ease), filter 0.6s ease, opacity 0.6s ease;
}

.gallery-item img.lazy {
  filter: blur(20px);
  opacity: 0.4;
}

.gallery-item img.loaded {
  filter: blur(0);
  opacity: 1;
}

.gallery-item.wide img {
  aspect-ratio: 16/8;
}

.gallery-item:hover img {
  transform: scale(1.04);
}


/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  cursor: none;
}

.lightbox.active,
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: none;
  z-index: 5001;
  padding: 16px;
  transition: color 0.3s, transform 0.3s;
}

.lb-close {
  top: 28px;
  right: 36px;
  font-size: 36px;
}

.lb-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.lb-prev {
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:hover {
  transform: translateY(-50%) translateX(-6px);
  color: var(--accent);
}

.lb-next {
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next:hover {
  transform: translateY(-50%) translateX(6px);
  color: var(--accent);
}


/* ============================================================
   PROJECT BACK LINK
   ============================================================ */
.proj-back {
  padding: 60px 52px;
  border-top: 1px solid var(--border);
}

.proj-back a {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: color 0.3s, gap 0.3s;
}

.proj-back a:hover {
  color: var(--text);
}


/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav { padding: 22px 28px; }
  .nav.scrolled { padding: 16px 28px; }
  .nav-links { gap: 28px; }
  .nav::before { inset: 8px 14px auto; height: 56px; }

  .hero-content { left: 28px; bottom: 72px; }
  .hero-next { right: 28px; bottom: 72px; }

  .projects { padding: 100px 28px 80px; }

  .project-link {
    grid-template-columns: 44px 1fr auto 28px;
  }
  .proj-cat { display: none; }

  .float-img-wrap { display: none; }

  .about { padding: 100px 28px; }
  .about-body { grid-template-columns: 1fr; gap: 56px; }

  .contact { padding: 100px 28px; }
  .footer { padding: 22px 28px; }

  .gallery { padding: 40px 28px; }
  .gallery-grid { gap: 10px; }
  .proj-hero-content { left: 28px; bottom: 52px; }
  .proj-back { padding: 40px 28px; }
}

@media (max-width: 560px) {
  .nav-links { display: none; }
  .nav::before {
    inset: 8px 12px auto;
    height: 52px;
  }

  .hero-content { left: 24px; bottom: 100px; right: 24px; }
  .hero-title { font-size: clamp(28px, 8vw, 44px); }
  .hero-next { right: 24px; bottom: 48px; font-size: 11px; }
  .hero-scroll { left: 24px; bottom: 48px; }

  .hero-slide img,
  .hero-slide picture img {
    object-position: center top;
  }

  .project-link {
    grid-template-columns: 36px 1fr 28px;
  }
  .proj-year { display: none; }

  .statement { font-size: clamp(40px, 12vw, 72px); }
  .contact-title { font-size: clamp(40px, 11vw, 72px); }
  .contact-bottom { flex-direction: column; gap: 24px; align-items: flex-start; }

  .footer { flex-direction: column; gap: 6px; }
}

/* Hide custom cursor on touch devices */
@media (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-follower { display: none !important; }
  .hero-scroll { display: none; }
}
