/* Studio SaaNMaaN — static site
   Sizes follow the original Cargo site:
   desktop 1rem = 1.44% of window height (capped by width), mobile 1rem = 3.584% of width. */
:root {
  --font: "Host Grotesk", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --pad: 2rem;
}
html { font-size: min(1.44vh, 1.561vw); -webkit-text-size-adjust: 100%; }
@media (max-width: 767px) {
  html { font-size: 3.584vw; }
  :root { --pad: 1.116rem; }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 767px) { body { font-size: 1rem; } }
a { color: inherit; text-decoration: none; }
a:active, .thumb:active { opacity: .7; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.icon-btn svg { width: 1em; height: 1em; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* Cargo text styles */
.t-h1 { font-size: 24rem; font-weight: 323; letter-spacing: -0.074em; line-height: 1; }
.t-h2, .home-links, .scroll-hint, .site-header, .about-top { font-size: 3.8rem; font-weight: 440; line-height: 1.1; }
.caption { display: block; font-size: 1rem; font-weight: 500; line-height: 1.35; }
@media (max-width: 767px) {
  .t-h2, .home-links, .scroll-hint, .site-header, .about-top { font-size: 3rem; }
}

.mobile-only { display: none !important; }
@media (max-width: 767px) {
  .mobile-only { display: block !important; }
  .desktop-only { display: none !important; }
}

/* ---------- full-screen panels: image stays put while the next one slides over ---------- */
.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  clip-path: inset(0);
  display: flex;
  align-items: flex-end;
}
.panel-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.panel::after {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  opacity: var(--dim, 0);
  z-index: -1;
  pointer-events: none;
}

/* ---------- marquee ---------- */
.marquee { display: block; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: marquee 40s linear infinite; will-change: transform; }
.marquee-track span { flex: none; }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .marquee-track, .scroll-hint { animation: none !important; } }

/* ---------- home ---------- */
.home-marquee {
  position: fixed; top: var(--pad); left: 0; right: 0;
  font-size: 24rem; font-weight: 323; letter-spacing: -0.074em; line-height: .75;
  z-index: 2;
}
.scroll-hint {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center;
  animation: blink 1.6s steps(1) infinite;
  z-index: 2; pointer-events: none;
}
@keyframes blink { 50% { opacity: 0; } }
.home-bottom {
  position: fixed; left: var(--pad); right: var(--pad); bottom: var(--pad);
  display: flex; justify-content: space-between; align-items: flex-end;
  z-index: 2;
}
.pill {
  display: inline-block;
  border: .1rem solid #fff; border-radius: 999rem;
  padding: .2rem 1.1rem .3rem;
  background: rgba(0, 0, 0, .2);
  font-size: 1.2rem; font-weight: 600; line-height: 1.2;
}
.home-links { text-align: right; }

@media (max-width: 767px) {
  .home-marquee { font-size: 14rem; }
  .scroll-hint { line-height: .9; }
  .home-bottom { display: block; }
  .home-links { margin-top: 1.4rem; line-height: 1.25; }
  .m-projects { text-align: left; }
  .m-contact { text-align: right; }
}

/* ---------- projects ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 3fr 5fr 4fr; gap: 1rem;
  padding: var(--pad);
  z-index: 3;
}
.page-title { font: inherit; margin: 0; }
.menu-btn { justify-self: end; align-self: start; font-size: 1em; margin-top: .1em; }
.project-content { width: 100%; padding: var(--pad); }
.gallery { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.15em; }
.thumb { height: calc(var(--row) * (100vw - 2 * var(--pad)) / 100); aspect-ratio: var(--r); flex: none; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-meta { display: grid; grid-template-columns: 9fr 3fr; gap: 2rem; }

@media (max-width: 767px) {
  .site-header { grid-template-columns: 1fr auto; gap: 0; }
  .brand { padding-bottom: 1.15em; }
  .page-title { grid-row: 2; }
  .menu-btn { grid-row: 1; grid-column: 2; }
  .thumb { height: calc(10 * (100vw - 2 * var(--pad)) / 100); }
  .project-meta { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- about overlay ---------- */
.about {
  position: fixed; inset: 0; z-index: 10;
  background: #fff; color: #000;
  overflow-y: auto;
}
.about[hidden] { display: none; }
.about-inner { min-height: 100%; display: flex; flex-direction: column; padding: var(--pad); }
.about-top { display: flex; justify-content: space-between; align-items: flex-start; line-height: .85; }
.about-title { font: inherit; margin: 0; padding-top: 7.65em; }
.about-close { font-size: 1em; }
.about-body { margin-top: .85em; font-size: 1.558rem; font-weight: 440; line-height: 1.1; }
.about-body a { border-bottom: 1px solid currentColor; }
.about-marquee { margin-top: auto; padding-top: 2rem; font-size: 27.36rem; font-weight: 323; letter-spacing: -0.074em; line-height: 1; }
.about-marquee .marquee-track { animation-duration: 55s; }
@media (max-width: 767px) {
  .about-title { padding-top: 2.55em; }
  .about-body { margin-top: 2rem; font-size: 1.23rem; }
  .about-marquee { font-size: 15.96rem; line-height: .65; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0, 0, 0, .57);
  -webkit-backdrop-filter: blur(.42rem); backdrop-filter: blur(.42rem);
  display: flex; align-items: center; justify-content: center;
  padding: var(--pad);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-prev, .lb-next {
  position: absolute; top: 0; bottom: 0; width: 30%;
  font-size: 4rem; font-weight: 300; opacity: 0; transition: opacity .15s;
}
.lb-prev { left: 0; text-align: left; padding-left: var(--pad); }
.lb-next { right: 0; text-align: right; padding-right: var(--pad); }
.lb-prev:hover, .lb-next:hover, .lb-prev:focus-visible, .lb-next:focus-visible { opacity: 1; }
.lb-close { position: absolute; top: var(--pad); right: var(--pad); font-size: 2.6rem; }
@media (hover: none) { .lb-prev, .lb-next { opacity: .8; } }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* fine alignment against the original */
.home-marquee { top: calc(var(--pad) * 2); }
.scroll-hint { top: calc(50% + 2.6rem); }
.home-links .arrow { display: inline-block; margin-left: .25em; }
.m-projects .arrow { margin: 0 .2em 0 0; }
@media (max-width: 767px) { .scroll-hint { top: 50%; } .home-bottom { bottom: calc(var(--pad) - .5rem); } }
@media (max-width: 767px) { .brand { padding-bottom: 1.15rem; } }
@media (max-width: 767px) { .about-body { margin-top: .3rem; } .about-marquee { margin-top: 3rem; } }
