@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --bg: #fff;
  --ink: #111;
  --muted: #747474;
  --soft: #f7f7f5;
  --line: #e7e7e2;
  --line-strong: #cfcfc8;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --page-x: clamp(14px, 1.5vw, 28px);
}

* { box-sizing: border-box; }

html,
body {
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  background: var(--bg);
}

body.menu-open { overflow: hidden; }

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

.material-symbols-outlined {
  font-size: 21px;
  line-height: 1;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 74px;
  padding: 0 var(--page-x);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  margin-right: auto;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  top: 82px;
  right: 16px;
  z-index: 19;
  display: none;
  flex-direction: column;
  gap: 6px;
  width: min(260px, calc(100vw - 32px));
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  border-radius: 14px;
  font-weight: 850;
}

main {
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  padding: 74px var(--page-x) 64px;
}

.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8vw, 14px);
  align-items: stretch;
  width: 100%;
  height: calc(100dvh - 138px);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(22px, 2.6vw, 38px) 0 clamp(18px, 2.4vw, 34px);
}

.intro-panel {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.hero-logo-link {
  position: relative;
  display: block;
  width: clamp(82px, 6.2vw, 122px);
  height: clamp(82px, 6.2vw, 122px);
  margin-bottom: 0;
  border-radius: 28px;
  cursor: pointer;
  animation: introUp 560ms var(--ease) both, logoTapHint 2.8s ease-in-out 900ms infinite;
}

.hero-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
}

h1,
h2,
p { word-break: keep-all; }

h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(44px, 4vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-title-link {
  position: relative;
  display: inline-block;
  cursor: pointer;
  animation: titleIn 620ms var(--ease) both, titlePulse 3.4s ease-in-out 900ms infinite;
}

.hero-title-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0.16);
  transform-origin: left;
  opacity: 0.18;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.intro-text {
  max-width: 500px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 1.35vw, 25px);
  line-height: 1.75;
}

.apps-board {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: clamp(360px, 39dvh, 440px);
  align-items: stretch;
  gap: clamp(12px, 1vw, 20px);
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(10px, 1vw, 18px) 0 clamp(72px, 7dvh, 92px);
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.apps-board::-webkit-scrollbar { display: none; }

.apps-track {
  display: contents;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  padding: clamp(16px, 1.35vw, 26px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: clamp(18px, 1.6vw, 26px);
  opacity: 0;
  transform: translateY(18px);
  animation: cardIn 520ms var(--ease) forwards;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease);
}

.app-card:nth-child(1) { animation-delay: 40ms; }
.app-card:nth-child(2) { animation-delay: 80ms; }
.app-card:nth-child(3) { animation-delay: 120ms; }
.app-card:nth-child(4) { animation-delay: 160ms; }
.app-card:nth-child(5) { animation-delay: 200ms; }
.app-card:nth-child(6) { animation-delay: 240ms; }
.app-card:nth-child(7) { animation-delay: 280ms; }
.app-card:nth-child(8) { animation-delay: 320ms; }
.app-card:nth-child(9) { animation-delay: 360ms; }
.app-card:nth-child(10) { animation-delay: 400ms; }

.app-icon-link {
  position: static;
  display: block;
  width: clamp(58px, 4.5vw, 92px);
  height: clamp(58px, 4.5vw, 92px);
  margin-bottom: clamp(14px, 1vw, 20px);
  border-radius: clamp(14px, 1.2vw, 20px);
  transition: transform 220ms var(--ease);
  cursor: pointer;
}

.app-icon-link img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  pointer-events: none;
}

.app-card h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 1.45vw, 32px);
  line-height: 1.12;
  letter-spacing: 0;
}

.app-tagline {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(13px, 0.82vw, 15px);
  font-weight: 850;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.app-card p {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 0.84vw, 15px);
  line-height: 1.5;
}

.app-card p:not(.app-tagline) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  min-height: 46px;
  margin-top: auto;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.app-card .store-button img {
  position: static;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  border-radius: 0;
  object-fit: contain;
  pointer-events: none;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2.4dvh, 28px);
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transform: translateX(-50%);
  animation: floatDown 1.6s ease-in-out infinite;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.scroll-hint .material-symbols-outlined {
  font-size: 28px;
}

.apps-board.can-scroll + .scroll-hint {
  display: flex;
}

.apps-board.at-bottom + .scroll-hint {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.projects-page {
  width: min(1400px, 100%);
  height: calc(100dvh - 138px);
  overflow: hidden;
  margin: 0 auto;
  padding: clamp(70px, 8vw, 130px) 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.projects-page p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

@keyframes introUp {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logoTapHint {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}

@keyframes titleIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes titlePulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes floatDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

@media (hover: hover) {
  .desktop-nav a:hover,
  .mobile-menu a:hover { color: var(--ink); }

  .mobile-menu a:hover { background: var(--soft); }

  .app-card:hover {
    transform: translateY(-8px);
    border-color: var(--line-strong);
  }

  .app-card:hover .app-icon-link {
    transform: translateY(-4px) scale(1.04);
  }

  .store-button:hover { background: #2a2a2a; }

  .hero-title-link:hover::after {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (min-width: 1900px) {
  .apps-board { gap: clamp(16px, 0.9vw, 24px); }
}

@media (min-width: 3000px) {
  main,
  .site-header { padding-inline: var(--page-x); }

  .hero-section { width: 100%; }
}

@media (max-width: 980px) {
  .desktop-nav { display: none; }

  .menu-button,
  .mobile-menu { display: flex; }

  main { padding-inline: 16px; }

  .hero-section {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 74px);
    min-height: 0;
    overflow: hidden;
    align-items: start;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 0;
  }

  .intro-panel {
    display: block;
    flex: 0 0 auto;
  }

  .apps-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(380px, 1fr);
    flex: 1 1 auto;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin-inline: 0;
    padding: 10px 2px 74px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .apps-board::-webkit-scrollbar { display: none; }
}

@media (max-width: 620px) {
  .site-header { height: 66px; }

  main {
    height: 100dvh;
    padding-top: 66px;
    padding-bottom: 14px;
  }

  .hero-section {
    height: calc(100dvh - 80px);
    gap: 4px;
    padding-top: 10px;
  }

  h1 {
    font-size: 36px;
    line-height: 0.96;
    padding: 12px 0 14px;
  }

  .intro-text {
    margin-top: 16px;
    font-size: 16px;
  }

  .apps-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(430px, 1fr);
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 78px;
  }

  .app-card {
    padding: 14px;
    border-radius: 22px;
  }

  .app-icon-link {
    width: min(30vw, 126px);
    height: min(30vw, 126px);
    align-self: center;
    margin-bottom: 14px;
    border-radius: 28px;
  }

  .app-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.12;
  }

  .app-card p {
    min-height: 0;
    font-size: 15px;
    line-height: 1.45;
  }

  .app-card p:not(.app-tagline) {
    -webkit-line-clamp: 5;
  }

  .store-button {
    min-height: 34px;
    margin-top: auto;
    padding: 0 11px;
    font-size: 12px;
  }

  .app-card .store-button img {
    width: 17px;
    height: 17px;
    min-width: 17px;
    min-height: 17px;
    max-width: 17px;
    max-height: 17px;
  }
}

@media (max-width: 620px) and (max-height: 720px) {
  h1 {
    font-size: 32px;
  }

  .app-icon-link {
    width: min(26vw, 108px);
    height: min(26vw, 108px);
    margin-bottom: 10px;
    border-radius: 24px;
  }

  .app-card h2 {
    font-size: 18px;
  }

  .app-tagline {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .store-button {
    min-height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
