/* ============ GIANTCAT — watercolor scroll site ============ */

:root {
  --paper: #ececea;
  --paper-deep: #e3e4e1;
  --ink: #26241f;
  --ink-soft: #55524a;
  --font-kr: "Gowun Batang", serif;
  --font-en: "Cormorant Garamond", "Gowun Batang", serif;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-kr);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body { font-family: var(--font-en); }

/* ---------- scroll length ---------- */
.scroll-space { height: 650vh; }

/* ---------- stage ---------- */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120vw 90vh at 62% 42%, #f6f6f4 0%, var(--paper) 55%, var(--paper-deep) 100%);
  z-index: 1;
}

.layer {
  position: absolute;
  left: 50%;
  top: 50%;
  mix-blend-mode: multiply;
  will-change: transform, opacity, filter;
  pointer-events: none;
}

.layer img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- essay ---------- */
.essay {
  position: fixed;
  top: 0;
  left: clamp(24px, 9vw, 180px);
  width: min(38vw, 560px);
  height: 100vh;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.essay-col { position: absolute; left: 0; width: 100%; will-change: transform; }

.essay .line {
  font-size: clamp(19px, 1.5vw + 1.3vh, 33px);
  line-height: 1.62;
  letter-spacing: 0.005em;
  color: var(--ink);
  will-change: filter, opacity;
  white-space: nowrap;
}

html[lang="en"] .essay .line { font-weight: 500; }

.essay .line.gap    { margin-top: 1.35em; }
.essay .line.biggap { margin-top: 3.4em; }

/* ---------- top chrome ---------- */
.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(24px, 3.4vw, 56px);
  z-index: 6;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.chrome.hidden { opacity: 0; transform: translateY(-14px); pointer-events: none; }

.chrome-left { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.chrome-right { display: flex; align-items: center; }

.chrome-right .lang-wrap { padding-right: clamp(12px, 1.4vw, 22px); border-right: 1px solid rgba(38, 36, 31, 0.22); }
.chrome-right .signin { margin: 0 clamp(12px, 1.4vw, 22px); }
.chrome-right .avatar { margin-left: clamp(4px, 0.6vw, 10px); }

.wordmark {
  font-family: var(--font-en);
  font-size: 21px;
  letter-spacing: 0.1em;
  color: var(--ink);
  white-space: nowrap;
}

/* nav items separated by thin vertical rules, like the reference header */
.topnav { display: flex; align-items: stretch; }

.nav-link {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.03em;
  padding: 4px clamp(14px, 1.6vw, 24px);
  border-left: 1px solid rgba(38, 36, 31, 0.22);
  transition: color 0.25s ease;
  white-space: nowrap;
  line-height: 1.35;
}

.nav-link:last-child { border-right: 1px solid rgba(38, 36, 31, 0.22); }
.nav-link:hover { color: var(--ink); }

.lang-wrap { position: relative; }

.lang-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.25s ease;
}

.lang-label:hover { color: var(--ink); }
.lang-label svg { transition: transform 0.25s ease; }
.lang-wrap.open .lang-label svg { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 130px;
  background: #fbfbfa;
  border: 1px solid rgba(38, 36, 31, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(38, 36, 31, 0.12);
  padding: 6px;
  z-index: 7;
}

.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.lang-menu button:hover { background: rgba(38, 36, 31, 0.06); }

.signin {
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.25s ease;
  white-space: nowrap;
}

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

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(38, 36, 31, 0.1);
  color: rgba(38, 36, 31, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 34px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  padding: 10px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 9;
}

.toast.show { opacity: 0.96; transform: translate(-50%, 0); }

/* ---------- scroll hint ---------- */
.hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.75;
  transition: opacity 0.8s ease;
  animation: hint-drift 2.6s ease-in-out infinite;
  pointer-events: none;
}

.hint.hidden { opacity: 0; animation-play-state: paused; }

@keyframes hint-drift {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}

/* ---------- sound toggle ---------- */
.sound {
  position: fixed;
  right: clamp(20px, 3vw, 48px);
  bottom: 26px;
  z-index: 5;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  opacity: 0.65;
  cursor: pointer;
  padding: 8px;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.sound:hover { opacity: 1; }
.sound.on { color: var(--ink); opacity: 0.95; }

.sound .wave { transition: all 0.3s ease; }

.sound.on .wave { animation: wave-pulse 2.4s ease-in-out infinite; }

@keyframes wave-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* ---------- bottom section: business / contact / footer ---------- */
.biz {
  position: relative;
  z-index: 4;
  background: var(--paper);
}

.biz::before {
  content: "";
  position: absolute;
  top: -140px;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(236, 236, 234, 0), var(--paper));
  pointer-events: none;
}

.biz-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 11vh clamp(24px, 5vw, 64px) 0;
}

.biz-title {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 46px;
  color: var(--ink);
}

.apps {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 60px);
  align-items: flex-start;
  margin-bottom: 12vh;
}

.app-card {
  flex: 1 1 240px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.app-icon {
  width: 92px;
  height: 92px;
  border-radius: 22%;
  box-shadow: 0 8px 22px rgba(38, 36, 31, 0.14);
}

.app-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.app-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: -6px;
}

.badges { display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #14130f;
  color: #f4f3ef;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  padding: 7px 15px 7px 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.badge:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(38, 36, 31, 0.18); }

.badge-logo { width: 21px; height: 21px; flex: none; }

.badge-text { display: flex; flex-direction: column; line-height: 1.15; }
.badge-text small { font-size: 9px; letter-spacing: 0.04em; opacity: 0.85; }
.badge-text strong { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }

.badge-light {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(38, 36, 31, 0.35);
  padding: 11px 22px;
}

.badge-light:hover { background: var(--ink); color: var(--paper); }

.studio-mark {
  width: 92px;
  height: 92px;
  border-radius: 22%;
  border: 1px solid rgba(38, 36, 31, 0.18);
  background: #f6f6f4;
  color: var(--ink-soft);
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(38, 36, 31, 0.08);
}

.contact-block { margin-bottom: 12vh; }

.contact-mail {
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--ink);
  text-underline-offset: 5px;
}

.bottom-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 26px 0;
  border-top: 1px solid rgba(38, 36, 31, 0.1);
}

.mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 22%;
  box-shadow: 0 4px 10px rgba(38, 36, 31, 0.12);
}

.bottom-badges .badge { padding: 5px 12px 5px 10px; }
.bottom-badges .badge-logo { width: 17px; height: 17px; }
.bottom-badges .badge-text small { font-size: 8px; }
.bottom-badges .badge-text strong { font-size: 12.5px; }

/* ---------- footer ---------- */
.site-footer {
  padding: 26px 0 34px;
  text-align: center;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft);
}

.site-footer a { color: var(--ink-soft); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ink); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .essay {
    left: 24px;
    width: calc(100vw - 48px);
  }
  .essay .line { font-size: clamp(17px, 4.6vw, 24px); white-space: normal; }
  .wordmark { font-size: 16px; }
  .topnav { display: none; }
  .signin { display: none; }
  .site-footer { font-size: 11px; }
  .apps { gap: 34px; }
}

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