/* 주식회사 트리기 홈페이지. 값의 원본: docs/design-system.md · Figma Design System */

/* ---------- fonts ---------- */
@font-face { font-family: "Paperlogy"; src: url("../assets/fonts/paperlogy/Paperlogy-3Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../assets/fonts/paperlogy/Paperlogy-4Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../assets/fonts/paperlogy/Paperlogy-5Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../assets/fonts/paperlogy/Paperlogy-6SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("../assets/fonts/paperlogy/Paperlogy-7Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../assets/fonts/outfit/Outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ---------- tokens (light 기본, 기기 다크 모드에서 다크) ---------- */
:root {
  color-scheme: light dark;
  --bg-canvas: #FFFFFF;
  --bg-surface: #F2F2F2;
  --line: #D1D1D1;
  --line-strong: #121212;
  --text-strong: #121212;
  --text-body: #404040;
  --text-muted: #585858;
  --digit: #121212;
  --digit-underline: #FFB800;
  --btn-bg: #121212;
  --btn-text: #FFFFFF;
  --wordmark-letter: #E4E4E4;
  --red: #D62728;
  --amber: #FFB800;
  --mock-edge: rgba(0, 0, 0, 0.10);
  --mock-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), 0 32px 64px -8px rgba(0, 0, 0, 0.16);

  --font: "Outfit", "Paperlogy", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --pad: 24px;
  --section-y: 64px;
  --header-h: 65px;
  --max: 1440px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-canvas: #121212;
    --bg-surface: #1E1E1E;
    --line: #404040;
    --line-strong: #FFFFFF;
    --text-strong: #FFFFFF;
    --text-body: #D1D1D1;
    --text-muted: #A4A4A4;
    --digit: #FFB800;
    --digit-underline: transparent;
    --btn-bg: #FFFFFF;
    --btn-text: #121212;
    --wordmark-letter: #2B2B2B;
    --mock-edge: rgba(255, 255, 255, 0.14);
    --mock-shadow: 0 8px 16px rgba(0, 0, 0, 0.35), 0 32px 64px -8px rgba(0, 0, 0, 0.6);
  }
}
@media (min-width: 900px) {
  :root { --pad: 80px; --section-y: 120px; --header-h: 89px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-body);
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 28px;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--amber); color: #121212; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 12px 16px; background: var(--btn-bg); color: var(--btn-text); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- header (상단 고정) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: calc(var(--header-h) - 1px); display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 32px; width: auto; }
.logo .logo-symbol { display: none; }
.logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo .logo-light { display: none; }
  .logo .logo-dark { display: block; }
}
.nav { display: flex; margin-right: -6px; }
.nav a {
  padding: 12px 6px;
  font-weight: 500; font-size: 14px; line-height: 20px;
  color: var(--text-strong); text-decoration: none;
}
.nav a:hover { color: var(--text-muted); }
@media (min-width: 900px) {
  .logo img { height: 41px; }
  .nav { margin-right: -20px; }
  .nav a { padding: 12px 20px; font-size: 15px; }
}
@media (max-width: 374px) {
  .logo .logo-light, .logo .logo-dark { display: none !important; }
  .logo .logo-symbol { display: block; height: 32px; }
}

/* ---------- buttons · badges · chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px;
  font-weight: 600; font-size: 16px; line-height: 20px;
  text-decoration: none; border: 1px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-text);
  transition: opacity .2s ease;
}
.btn:hover { opacity: .82; }
@media (max-width: 899px) { .btn { padding: 0 16px; white-space: nowrap; } .section-intro br { display: none; } }
.btn--secondary { background: transparent; color: var(--text-strong); border-color: var(--line-strong); }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn-row { display: flex; gap: 12px; }
.btn-row .btn { flex: 1 1 0; }
@media (min-width: 900px) { .btn-row .btn { flex: 0 0 auto; min-width: 140px; } }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { padding: 5px 12px; border-radius: 999px; font-weight: 500; font-size: 13px; line-height: 18px; }
.badge--live { background: var(--red); color: #FFFFFF; }
.badge--soon { background: var(--amber); color: #121212; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 12px; border-radius: 999px; background: var(--bg-surface); color: var(--text-muted); font-weight: 400; font-size: 13px; line-height: 18px; }

/* ---------- section heads ---------- */
.section-title { color: var(--text-strong); font-weight: 600; font-size: 32px; line-height: 40px; letter-spacing: -0.02em; }
.section-intro { margin-top: 12px; max-width: 720px; }
@media (min-width: 900px) {
  .section-title { font-size: 48px; line-height: 58px; }
  .section-intro { margin-top: 24px; font-size: 20px; line-height: 32px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__symbol {
  position: absolute; z-index: 0;
  width: 280px; height: 280px; top: 16px; right: -30px;
}
.hero .wrap { position: relative; z-index: 1; }
.hero__head { padding-top: 304px; }
.hero h1 { color: var(--text-strong); font-weight: 600; font-size: 44px; line-height: 48px; letter-spacing: -0.03em; }
.hero__rule { height: 1px; margin-top: 32px; background: var(--line); transform-origin: left; }
.hero__foot { padding: 24px 0 48px; display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) {
  .hero__symbol { width: 600px; height: 600px; top: 0; right: calc(50% - 720px - 40px); }
  .hero__head { min-height: 600px; padding-top: 0; display: flex; align-items: center; }
  .hero h1 { font-size: clamp(64px, 7.8vw, 112px); line-height: 1.07; max-width: 820px; }
  .hero__rule { margin-top: 0; }
  .hero__foot { flex-direction: row; justify-content: space-between; align-items: flex-start; padding: 32px 0 56px; }
  .hero__foot p { font-size: 20px; line-height: 32px; max-width: 560px; }
}
@media (min-width: 900px) and (max-width: 1440px) {
  .hero__symbol { right: -40px; width: clamp(420px, 41.7vw, 600px); height: auto; aspect-ratio: 1; }
}

/* ---------- what we do ---------- */
.what { padding: var(--section-y) 0; }
.cards { margin-top: 32px; display: grid; gap: 32px; }
.card { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.card img { width: 100%; aspect-ratio: 342 / 170; object-fit: cover; }
.card h3 { color: var(--text-strong); font-weight: 600; font-size: 24px; line-height: 32px; }
.card p { font-size: 15px; line-height: 24px; }
@media (min-width: 900px) {
  .cards { margin-top: 64px; grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .card { padding-top: 32px; gap: 20px; }
  .card img { aspect-ratio: 400 / 260; }
  .card p { font-size: 17px; line-height: 28px; }
}

/* ---------- services ---------- */
.services-head { padding: var(--section-y) 0 40px; }
@media (min-width: 900px) { .services-head { padding-bottom: 64px; } }
.service { padding: 48px 0 56px; }
.service--band { background: var(--bg-surface); }
.service .wrap { display: flex; flex-direction: column; gap: 40px; }
.service .media { order: -1; }
@media (min-width: 900px) {
  .service { padding: 120px 0; }
  .service .wrap { display: grid; grid-template-columns: 440px 1fr; align-items: center; gap: 80px; }
  .service .media { order: 0; }
  .service--reverse .wrap { grid-template-columns: 1fr 440px; }
  .service--reverse .media { order: -1; }
}
.info { display: flex; flex-direction: column; gap: 32px; }
.info__intro, .info__action { display: flex; flex-direction: column; gap: 20px; }
.app-icon { width: 80px; height: 80px; border-radius: 20px; }
.service-name { margin-top: 16px; color: var(--text-strong); font-weight: 600; font-size: 24px; line-height: 30px; }
.service-category { margin-top: 4px; color: var(--text-muted); font-weight: 400; font-size: 15px; line-height: 24px; }
@media (min-width: 900px) {
  .info { gap: 48px; }
  .info__intro, .info__action { gap: 24px; }
  .service-name { font-size: 32px; line-height: 38px; }
  .info__intro p.desc { font-size: 20px; line-height: 32px; }
}

/* 숫자(앰버 스코어보드) */
.fact { display: flex; align-items: flex-end; gap: 10px; }
.digit { position: relative; color: var(--digit); font-weight: 600; font-size: 48px; line-height: 1; letter-spacing: -0.02em; padding-bottom: 16px; }
.digit::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 4px; background: var(--digit-underline); }
.fact__caption { display: flex; align-items: baseline; gap: 12px; padding-bottom: 18px; }
.fact__unit { color: var(--text-strong); font-weight: 600; font-size: 24px; line-height: 30px; }
.fact__label { color: var(--text-body); font-weight: 400; font-size: 15px; line-height: 24px; }
@media (min-width: 900px) {
  .fact { gap: 16px; }
  .digit { font-size: 120px; padding-bottom: 18px; }
  .digit::after { width: 64px; height: 6px; }
  .fact__caption { padding-bottom: 30px; }
  .fact__unit { font-size: 32px; line-height: 38px; }
  .fact__label { font-size: 17px; line-height: 28px; }
}

/* 기기 목업 */
.media { position: relative; }
.media--ts { aspect-ratio: 342 / 332; }
.media--tc { aspect-ratio: 342 / 270; }
.browser, .phone { position: absolute; overflow: hidden; box-shadow: 0 0 0 1px var(--mock-edge), var(--mock-shadow); }
.browser { border-radius: 8px; background: #2B2B2B; }
.browser__bar { display: flex; gap: 4px; align-items: center; height: 16px; padding: 0 7px; background: #1E1E1E; }
.browser__bar i { width: 4px; height: 4px; border-radius: 50%; background: #585858; }
.browser img { width: 100%; aspect-ratio: 678 / 432; object-fit: cover; object-position: top; }
.phone { border: 3px solid #0A0A0A; border-radius: 16px; background: #0A0A0A; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.media--ts .browser { left: 0; top: 14.46%; width: 76%; }
.media--ts .phone { right: 0; top: 0; width: 46.8%; aspect-ratio: 240 / 500; }
.media--tc .phone { aspect-ratio: 240 / 500; }
.media--tc .phone:nth-child(1) { left: 5.85%; top: 14.8%; width: 31%; }
.media--tc .phone:nth-child(2) { left: 31%; top: 0; width: 38%; z-index: 2; }
.media--tc .phone:nth-child(3) { left: 63.16%; top: 14.8%; width: 31%; }
@media (min-width: 900px) {
  .media--ts { aspect-ratio: 760 / 600; }
  .media--tc { aspect-ratio: 760 / 580; }
  .browser { border-radius: 12px; }
  .browser__bar { height: 36px; gap: 8px; padding: 0 16px; }
  .browser__bar i { width: 10px; height: 10px; }
  .phone { border-width: 6px; border-radius: 28px; }
  .media--ts .browser { top: 3.33%; width: 89.47%; }
  .media--ts .phone { left: auto; right: 0; top: 16.67%; width: 31.58%; }
  .media--tc .phone:nth-child(1) { left: 0; top: 13.8%; width: 31.58%; }
  .media--tc .phone:nth-child(2) { left: 34.21%; top: 0; width: 31.58%; }
  .media--tc .phone:nth-child(3) { left: 68.42%; top: 13.8%; width: 31.58%; }
}

/* ---------- contact ---------- */
.contact { padding: var(--section-y) 0; }
.contact .section-title { font-size: 32px; }
.contact p { margin-top: 16px; }
.email {
  display: inline-block; margin-top: 16px;
  color: var(--text-strong); font-weight: 600; font-size: clamp(28px, 6.67vw, 96px); line-height: 1.1; letter-spacing: -0.03em;
  text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .14em;
}
.email:hover { color: var(--text-muted); }
@media (min-width: 900px) {
  .contact .section-title { font-size: 48px; }
  .contact p { margin-top: 24px; font-size: 20px; line-height: 32px; }
  .email { margin-top: 24px; }
}

/* ---------- wordmark ---------- */
.wordmark { padding: 24px 0; }
.wordmark svg { width: 100%; height: auto; color: var(--wordmark-letter); }
@media (min-width: 900px) { .wordmark { padding: 40px 0; } }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-surface); padding: 40px 0; color: var(--text-muted); font-weight: 400; font-size: 13px; line-height: 20px; }
.site-footer .legal-links { display: flex; gap: 12px; margin: -12px 0 12px -6px; }
.site-footer .legal-links a { padding: 12px 6px; color: var(--text-strong); font-weight: 500; text-decoration: none; }
.site-footer .legal-links a:hover { text-decoration: underline; }
.site-footer p + p { margin-top: 12px; }
.site-footer .sep::before { content: "·"; padding: 0 8px; }
@media (max-width: 899px) { .site-footer .sep { display: block; } .site-footer .sep::before { content: none; } }
@media (min-width: 900px) { .site-footer { padding: 48px 0; } }

/* ---------- legal pages ---------- */
.legal { padding: 48px 0 64px; }
.legal__head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.legal__head h1 { color: var(--text-strong); font-weight: 700; font-size: 32px; line-height: 40px; }
.legal__head p { margin-top: 12px; color: var(--text-muted); font-weight: 400; font-size: 15px; line-height: 24px; }
.legal__body { max-width: 760px; padding-top: 8px; }
.legal__body > p, .legal__body > ul, .legal__body > ol { margin-top: 12px; }
.legal__body h2 { margin-top: 36px; color: var(--text-strong); font-weight: 600; font-size: 24px; line-height: 32px; }
.legal__body ul li, .legal__body ol li { margin-top: 4px; }
.legal__body ul li::before { content: "· "; }
.legal__body ol { padding-left: 1.4em; }
.legal__body a { text-underline-offset: 3px; }
@media (min-width: 900px) {
  .legal { padding: 120px 0; }
  .legal__head { padding-bottom: 40px; }
  .legal__head h1 { font-size: 48px; line-height: 58px; }
  .legal__body { padding-top: 16px; }
  .legal__body h2 { margin-top: 48px; }
}

/* ---------- motion (CSS 만, 동작 줄이기 설정 시 끔) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes symbol-in { from { opacity: 0; transform: rotate(-30deg) scale(.85); } }
  @keyframes rise { from { opacity: 0; transform: translateY(40px); } }
  @keyframes draw { from { transform: scaleX(0); } }
  .hero__symbol { animation: symbol-in 1.4s cubic-bezier(.16, 1, .3, 1) both; }
  .hero h1 { animation: rise .8s .3s cubic-bezier(.16, 1, .3, 1) both; }
  .hero__rule { animation: draw .7s .7s cubic-bezier(.65, 0, .35, 1) both; }
  .hero__foot > p { animation: rise .6s 1.1s cubic-bezier(.16, 1, .3, 1) both; }
  .hero__foot > .btn-row { animation: rise .6s 1.25s cubic-bezier(.16, 1, .3, 1) both; }
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
