:root {
  --bg: #0a0a0c;                            /* near-black, 따뜻한 다크 */
  --bg-soft: #16161a;                       /* 카드/패널 bg, 미세 contrast */
  --text: #f5f5f7;                          /* Apple text light */
  --muted: #8e8e93;                         /* dark mode muted */
  --line: rgba(245, 245, 247, 0.10);        /* hairline on dark */
  --line-strong: rgba(245, 245, 247, 0.20);
  --accent: #c87654;                        /* 라이트 테라코타 — dark bg 가독성 */
  --accent-soft: rgba(200, 118, 84, 0.14);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.36);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Pretendard Variable', Pretendard, 'Inter', 'Noto Sans KR', 'Helvetica Neue', 'Helvetica', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.grain { display: none; }
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(22px, 5vw, 72px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.02em; }
.mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  box-shadow: none;
}
.nav nav { display: flex; gap: 24px; align-items: center; color: var(--muted); font-size: 14px; }
.nav-cta { color: var(--text); padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; }
.section { width: min(1160px, calc(100vw - 40px)); margin: 0 auto; padding: 128px 0; }
.hero { min-height: calc(100vh - 80px); display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-top: 64px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 18px; }
h1, h2, h3, p { word-break: keep-all; }
h1 { font-size: clamp(68px, 9.5vw, 144px); line-height: .9; letter-spacing: -.052em; margin: 0; font-weight: 800; }
h1 span { color: var(--accent); }
h2 { font-size: clamp(40px, 5.5vw, 80px); line-height: 1.02; letter-spacing: -.042em; margin: 0; font-weight: 700; }
h3 { font-size: 24px; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 700; }
.lead { max-width: 620px; margin: 28px 0 0; color: var(--muted); font-size: clamp(19px, 2vw, 25px); line-height: 1.65; letter-spacing: -.015em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; border: 1px solid var(--line-strong); }
.button.primary { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); font-weight: 600; }
.hero-visual {
  position: relative; min-height: 560px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.visual-note { position: absolute; left: 44px; top: 42px; margin: 0; color: var(--muted); line-height: 1.7; font-weight: 600; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 52px; align-items: start; }
.card, .manifesto-grid article, .product {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.card.large { padding: clamp(28px, 4vw, 52px); }
.prose p { color: var(--muted); font-size: 21px; line-height: 1.8; margin: 0 0 22px; letter-spacing: -.015em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--accent); font-style: normal; font-weight: 700; }
.manifesto { text-align: center; }
.manifesto h2 { max-width: 900px; margin: 0 auto; }
.manifesto-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.manifesto-grid article { padding: 30px; }
.manifesto-grid span { color: var(--accent); font-weight: 700; }
.manifesto-grid p, .section-head p, .product p { color: var(--muted); line-height: 1.72; letter-spacing: -.015em; }
.section-head { max-width: 760px; margin-bottom: 38px; }
.section-head p { font-size: 20px; }
/* ===== Products — 포트폴리오 톤 ===== */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 8px; }
.product {
  display: flex; flex-direction: column;
  padding: 0; position: relative; overflow: hidden;
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
.product-body { padding: 32px 32px 28px; position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.product-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.product-cat {
  display: inline-flex; padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.product-status {
  display: inline-flex; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.product-status.status-mvp { background: var(--accent-soft); color: var(--accent); }
.product-status.status-beta { background: var(--accent-soft); color: var(--accent); }
.product-status.status-live { background: var(--accent-soft); color: var(--accent); }
.product-status.status-soon { background: rgba(42, 34, 27, .1); color: var(--muted); }
.product h3 { font-size: 26px; letter-spacing: -.02em; margin: 4px 0 0; }
.product-en { color: var(--muted); font-size: 14px; margin: 0 0 6px; letter-spacing: 0; font-weight: 500; }
.product-tag { color: var(--text); font-size: 15px; line-height: 1.55; margin: 0; }
.product-story { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 4px 0 0; }
.product-link {
  margin-top: auto; padding-top: 14px;
  display: inline-flex; gap: 6px;
  color: var(--accent); font-weight: 600; font-size: 14px;
  letter-spacing: -.015em;
}
.product-link[aria-disabled="true"] { color: var(--muted); pointer-events: none; }
.closing { text-align: center; padding-bottom: 130px; }
.closing h2 { margin: 0 auto 34px; }
@media (max-width: 900px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .hero, .split { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-visual { min-height: 420px; }
  .manifesto-grid, .product-grid { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 56px clamp(22px, 5vw, 72px) 36px;
}
.footer-inner {
  width: min(1160px, 100%); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: start;
}
.footer-col p { color: var(--muted); margin: 0 0 8px; font-size: 15px; line-height: 1.65; }
.footer-col p.muted { color: rgba(42, 34, 27, 0.4); font-size: 13px; margin-top: 14px; }
.footer-col .eyebrow { margin-bottom: 14px; }
.footer-col a { color: var(--text); border-bottom: 1px solid transparent; transition: border-color .2s; }
.footer-col a:hover { border-bottom-color: var(--accent); }
.footer-copy {
  width: min(1160px, 100%); margin: 48px auto 0;
  color: rgba(42, 34, 27, 0.4); font-size: 12px; text-align: center;
  letter-spacing: .04em;
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== Animations ===== */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 14px rgba(200, 118, 84, 0.45); }
  50%      { opacity: .62; box-shadow: 0 0 24px rgba(200, 118, 84, 0.70); }
}

.hero-copy > * { animation: hero-fade-up .55s ease-out both; }
.hero-copy .eyebrow { animation-delay: 0ms; }
.hero-copy h1       { animation-delay: 80ms; }
.hero-copy .lead    { animation-delay: 180ms; }
.hero-copy .hero-actions { animation-delay: 280ms; }

/* Hero dot grid — 12×7 commit-graph 스타일 (꾸준한 일상 시각화) */
.dotgrid {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  grid-template-columns: repeat(12, 22px);
  grid-template-rows: repeat(7, 22px);
  gap: 7px;
}
.dotgrid span {
  border-radius: 6px;
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
  animation: dot-fade-in .6s ease-out both;
  animation-delay: calc(var(--cell-i, 0) * 18ms);
}
.dotgrid span.d0 { background: rgba(245, 245, 247, 0.04); border: 1px solid rgba(245, 245, 247, 0.06); }
.dotgrid span.d1 { background: rgba(200, 118, 84, 0.16); border: 1px solid rgba(200, 118, 84, 0.22); }
.dotgrid span.d2 { background: rgba(200, 118, 84, 0.50); border: 1px solid rgba(200, 118, 84, 0.42); }
.dotgrid span.d3 {
  background: rgba(200, 118, 84, 0.90);
  border: 1px solid rgba(200, 118, 84, 0.72);
  animation: dot-fade-in .6s ease-out both, dot-pulse 5s ease-in-out infinite;
  animation-delay: calc(var(--cell-i, 0) * 18ms), calc(1.8s + var(--cell-i, 0) * 18ms);
}
@keyframes dot-fade-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .55s ease-out, transform .55s ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Grid stagger — 자식 인덱스 (--i) 에 맞춰 delay */
.reveal-stagger > .reveal { transition-delay: calc(var(--i, 0) * 80ms); }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
