/* ============================================================
   GONG TAE-SEOK PHOTOGRAPHY
============================================================ */

/* Font loaded async via JS to avoid render-blocking */
:root {
  --bg:      #0c0c0c;
  --bg2:     #141414;
  --bg3:     #1c1c1c;
  --line:    #2a2a2a;
  --line2:   #383838;
  --text:    #f0f0f0;
  --text2:   #c8c8c8;
  --text3:   #909090;
  --white:   #f0f0f0;
  --accent:  #e8e8e8;
  --f:       'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --fd:      'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --nav-h:   64px;
  --max:     1360px;
  --t:       0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--text); background: none; border: none; outline: none; width: 100%; }
::selection { background: var(--text); color: var(--bg); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line2); }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: rgba(12,12,12,0);
  transition: background 0.4s ease, border-bottom 0.4s ease;
}
#nav.scrolled {
  background: rgba(12,12,12,0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--max); margin: 0 auto;
}
.nav-logo {
  display: flex; flex-direction: column; gap: 3px;
  text-decoration: none;
}
.nav-logo-kr {
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.14em; line-height: 1;
  color: var(--white); text-transform: uppercase;
}
.nav-logo-en {
  font-size: 0.52rem; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--text3); line-height: 1;
}
.nav-links {
  display: flex; align-items: center; gap: clamp(2rem, 3vw, 3.5rem);
}
.nav-links a {
  font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); transition: color var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-res {
  font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid var(--line2); padding: 7px 18px;
  color: var(--text2) !important;
  transition: border-color var(--t), color var(--t) !important;
}
.nav-res:hover { border-color: var(--text2); color: var(--white) !important; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 1px; background: var(--text2); transition: var(--t); }
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--white); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--white); }

.mobile-menu {
  display: none; position: fixed; inset: 0; background: var(--bg);
  z-index: 99; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 0 clamp(1.5rem, 4vw, 3rem); gap: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-menu.open { display: flex; opacity: 1; pointer-events: all; }
.mobile-menu a {
  font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 300;
  letter-spacing: 0.05em; color: var(--text2); text-transform: uppercase;
  transition: color var(--t);
}
.mobile-menu a:hover { color: var(--white); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  padding: 4rem clamp(1.5rem, 4vw, 3rem) 2.5rem;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-logo-kr { font-size: 1.1rem; font-weight: 400; color: var(--white); margin-bottom: 2px; }
.footer-logo-en { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text3); margin-bottom: 1.2rem; }
.footer-desc { font-size: 0.8rem; color: var(--text3); line-height: 1.8; max-width: 260px; }
.footer-col h4 { font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text3); margin-bottom: 1.2rem; font-weight: 400; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { font-size: 0.8rem; color: var(--text3); transition: color var(--t); }
.footer-col ul li a:hover { color: var(--text); }
.footer-col p { font-size: 0.8rem; color: var(--text3); line-height: 1.9; }
.footer-bottom {
  max-width: var(--max); margin: 2.5rem auto 0;
  padding-top: 2rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: 0.7rem; color: var(--text3); }
.footer-socials { display: flex; gap: 2rem; }
.footer-socials a { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); transition: color var(--t); }
.footer-socials a:hover { color: var(--text); }

/* ── Utilities ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }
.section { padding: clamp(5rem, 9vw, 9rem) 0; }
.label {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text2); margin-bottom: 1.2rem; display: block;
}
.h1 { font-family: var(--fd); font-size: clamp(3rem, 7.5vw, 8rem); font-weight: 700; line-height: 1.0; letter-spacing: -0.02em; color: var(--white); }
.h2 { font-family: var(--fd); font-size: clamp(2.2rem, 4.5vw, 4.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--white); }
.h3 { font-size: 1.25rem; font-weight: 400; color: var(--white); }
.body-sm { font-size: 1rem; color: var(--text); line-height: 1.9; }
.divider { height: 1px; background: var(--line); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 30px; border: 1px solid; transition: var(--t);
}
.btn-dark { border-color: var(--line2); color: var(--text); }
.btn-dark:hover { border-color: var(--text); color: var(--white); }
.btn-fill { border-color: var(--white); background: var(--white); color: var(--bg); font-weight: 500; }
.btn-fill:hover { background: transparent; color: var(--white); }
.btn svg { width: 12px; height: 12px; stroke: currentColor; flex-shrink: 0; }

/* ── Camera Shutter Transition ── */
.shutter {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}
.shutter-blade {
  flex: 1;
  background: #060606;
  will-change: transform;
}
.shutter-blade:nth-child(odd)  { transform-origin: left center;  transform: scaleX(0); }
.shutter-blade:nth-child(even) { transform-origin: right center; transform: scaleX(0); }

/* Close: blades sweep shut */
.shutter.closing .shutter-blade {
  animation: bladeClose 0.16s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
.shutter.closing .shutter-blade:nth-child(1) { animation-delay:   0ms; }
.shutter.closing .shutter-blade:nth-child(2) { animation-delay:  18ms; }
.shutter.closing .shutter-blade:nth-child(3) { animation-delay:  36ms; }
.shutter.closing .shutter-blade:nth-child(4) { animation-delay:  54ms; }
.shutter.closing .shutter-blade:nth-child(5) { animation-delay:  72ms; }
.shutter.closing .shutter-blade:nth-child(6) { animation-delay:  90ms; }
@keyframes bladeClose {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Open: blades sweep open (on new page load) */
.shutter.opening .shutter-blade {
  transform: scaleX(1);
  animation: bladeOpen 0.2s cubic-bezier(0, 0, 0.2, 1) forwards;
}
.shutter.opening .shutter-blade:nth-child(1) { animation-delay:  30ms; }
.shutter.opening .shutter-blade:nth-child(2) { animation-delay:  50ms; }
.shutter.opening .shutter-blade:nth-child(3) { animation-delay:  70ms; }
.shutter.opening .shutter-blade:nth-child(4) { animation-delay:  90ms; }
.shutter.opening .shutter-blade:nth-child(5) { animation-delay: 110ms; }
.shutter.opening .shutter-blade:nth-child(6) { animation-delay: 130ms; }
@keyframes bladeOpen {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Flash: white pop like camera strobe */
.shutter-flash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.shutter-flash.pop {
  animation: flashPop 0.28s ease forwards;
}
@keyframes flashPop {
  0%   { opacity: 0; }
  15%  { opacity: 0.65; }
  100% { opacity: 0; }
}

/* ── Custom cursor ── */
.cursor-dot {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999;
  width: 6px; height: 6px; border-radius: 50%; background: var(--white);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.3s ease;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99998;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(240,240,240,0.4);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  mix-blend-mode: difference;
}
.cursor-ring.hovered { width: 56px; height: 56px; border-color: rgba(240,240,240,0.8); }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.32s; }
.d4 { transition-delay: 0.44s; }
.d5 { transition-delay: 0.56s; }

/* ── Hero cinematic entrance ── */

/* Image reveal — wipe from edge */
.hero-half { clip-path: inset(0 100% 0 0); }
.hero-half:nth-child(1) { animation: heroRevealL 1.2s cubic-bezier(0.77,0,0.175,1) 0.1s forwards; }
.hero-half:nth-child(2) { animation: heroRevealR 1.2s cubic-bezier(0.77,0,0.175,1) 0.3s forwards; }
@keyframes heroRevealL {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0%   0 0); }
}
@keyframes heroRevealR {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0%);   }
}

/* Divider line grows from center */
.hero-divider {
  transform-origin: center;
  animation: dividerGrow 0.8s cubic-bezier(0.16,1,0.3,1) 1.1s both;
}
@keyframes dividerGrow {
  from { transform: translateX(-50%) scaleY(0); }
  to   { transform: translateX(-50%) scaleY(1); }
}

/* Title: overflow-clip reveal per word */
.hero-title-wrap { overflow: visible; padding-bottom: 0.15em; }
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(80px) rotate(2deg);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-word.in { opacity: 1; transform: translateY(0) rotate(0deg); }

/* Subtitle — letter-spacing expand */
.hero-sub {
  opacity: 0;
  letter-spacing: 0.5em;
  transition: opacity 0.9s ease 1s, letter-spacing 0.9s ease 1s, transform 0.9s ease 1s;
  transform: translateY(10px);
}
.hero-sub.in { opacity: 1; letter-spacing: 0.18em; transform: translateY(0); }

/* CTA button slide up */
.hero-cta { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease 1.3s, transform 0.7s ease 1.3s; }
.hero-cta.in { opacity: 1; transform: translateY(0); }

/* Half labels */
.hero-half:nth-child(1) .hero-half-label,
.hero-half:nth-child(2) .hero-half-label {
  opacity: 0;
  animation: labelFadeIn 0.6s ease 1.4s forwards;
}
@keyframes labelFadeIn {
  to { opacity: 1; }
}

/* Parallax */
.parallax-img { will-change: transform; }

/* ── Infinite Scroll ── */
.masonry-item.hidden { display: none; }

.gallery-sentinel {
  height: 1px;
  margin-top: 3rem;
}

.gallery-loader {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 0;
  gap: 1rem;
}
.gallery-loader.visible { display: flex; }
.gallery-loader-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: loaderBounce 1.2s ease-in-out infinite;
}
.gallery-loader-dot:nth-child(2) { animation-delay: 0.2s; }
.gallery-loader-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes loaderBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1; }
}

.gallery-end {
  text-align: center;
  padding: 2rem 0 4rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text3);
  display: none;
}
.gallery-end.visible { display: block; }

/* ── Lightbox ── */
#lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox img { max-width: 90vw; max-height: 88vh; width: auto; height: auto; object-fit: contain; }
.lb-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text3); transition: color var(--t); display: flex; align-items: center; gap: 0.5rem;
}
.lb-close:hover { color: var(--white); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; transition: color var(--t); padding: 1rem;
}
.lb-nav:hover { color: var(--white); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-caption { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); font-size: 0.7rem; color: var(--text3); white-space: nowrap; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-socials { justify-content: center; }
  .section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
}
@media (max-width: 600px) {
  .nav-logo-kr { font-size: 0.95rem; }
  .btn { font-size: 0.68rem; padding: 11px 22px; }
  .h2 { font-size: clamp(1.7rem, 7vw, 2.5rem); }
  .label { font-size: 0.62rem; }
}
