/* Tidia — tidia.app
   색은 모두 토큰으로. 테마: html[data-theme] 가 없으면 기기 설정을 따른다. */
:root {
  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --text: #15171a;
  --text-2: #4d5560;
  --muted: #8a919b;
  --line: #e9eaec;
  --tile: #f2f3f4;
  --accent: #2f6bff;
  --accent-soft: #e8efff;
  --phone: #0d0e10;
  --shadow: 0 1px 2px rgba(16, 20, 28, 0.04), 0 12px 40px rgba(16, 20, 28, 0.08);
  --shadow-phone: 0 30px 60px -20px rgba(16, 20, 28, 0.35), 0 10px 24px -12px rgba(16, 20, 28, 0.2);
  --glow: radial-gradient(50% 45% at 62% 55%, rgba(47, 107, 255, 0.12), transparent 70%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d0f;
    --bg-elev: #15171a;
    --text: #eceef1;
    --text-2: #b4bac3;
    --muted: #7d848e;
    --line: #23262b;
    --tile: #1b1d21;
    --accent: #5b8cff;
    --accent-soft: #17223d;
    --phone: #2a2d33;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.35);
    --shadow-phone: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 10px 24px -12px rgba(0, 0, 0, 0.5);
    --glow: radial-gradient(50% 45% at 62% 55%, rgba(91, 140, 255, 0.16), transparent 70%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0d0f;
  --bg-elev: #15171a;
  --text: #eceef1;
  --text-2: #b4bac3;
  --muted: #7d848e;
  --line: #23262b;
  --tile: #1b1d21;
  --accent: #5b8cff;
  --accent-soft: #17223d;
  --phone: #2a2d33;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-phone: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 10px 24px -12px rgba(0, 0, 0, 0.5);
  --glow: radial-gradient(50% 45% at 62% 55%, rgba(91, 140, 255, 0.16), transparent 70%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── 상단 바 ── */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
header.site.scrolled { border-bottom-color: var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
/* 글자 로고(tidia): 글자는 currentColor, i의 점은 강조색 */
.logo { display: block; height: 100%; width: auto; overflow: visible; }
.logo-dot { fill: var(--accent); }
.brand {
  display: inline-flex; align-items: center; height: 27px; color: var(--text);
  margin-right: auto;
}
.brand:hover { text-decoration: none; opacity: .85; }
.nav-link { color: var(--text-2); font-size: 15px; font-weight: 500; margin-right: 6px; }
.nav-link:hover { color: var(--text); text-decoration: none; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--tile); border: 1px solid var(--line); border-radius: 999px;
}
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  height: 30px; min-width: 34px; padding: 0 10px; border-radius: 999px;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.seg svg { width: 16px; height: 16px; }
.seg.icons button { padding: 0; width: 32px; min-width: 0; }

/* ── 첫 화면 ── */
.hero { position: relative; padding: 80px 0 48px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: 0; right: -10%; width: 80%; height: 100%;
  background: var(--glow); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(42px, 6.2vw, 70px); line-height: 1.08; letter-spacing: -0.045em;
  font-weight: 800; margin: 0 0 22px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); margin: 0 0 32px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 14px;
  font-weight: 600; font-size: 15px;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.ghost { color: var(--text); border: 1px solid var(--line); background: var(--bg-elev); }
.btn.ghost:hover { border-color: var(--muted); }

/* 첫 화면 앱 타일: 앱이 늘면 타일만 추가한다 */
.hero-tiles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  width: 100%; max-width: 440px; justify-self: center; padding: 10px 0 50px;
}
.hero-tiles .tile:nth-child(even) { transform: translateY(44px); }
.tile {
  aspect-ratio: 1; border-radius: 32px; padding: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--text); text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
a.tile:hover { text-decoration: none; box-shadow: var(--shadow), 0 0 0 1px var(--accent); }
.tile img, .tile .app-mark { width: 76px; height: 76px; border-radius: 20px; margin-bottom: 10px; }
.tile img { box-shadow: 0 6px 18px rgba(47,107,255,.28); }
.tile .app-mark { font-size: 32px; }
.tile strong { font-size: 17px; letter-spacing: -0.02em; line-height: 1.3; }
.tile span { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile.next { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); }
.tile.next .plus {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--tile); color: var(--muted); font-size: 28px; font-weight: 300; line-height: 1;
}
.brand-tile { background: var(--text); border-color: transparent; color: var(--bg); }
.brand-tile .logo { width: 74%; height: auto; }

/* 휴대폰 틀 */
.phone {
  aspect-ratio: 9 / 20;
  padding: 9px; border-radius: 42px;
  background: var(--phone);
  box-shadow: var(--shadow-phone), inset 0 0 0 1.5px rgba(255,255,255,.08);
}
.phone img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: 34px; background: var(--tile);
}

/* ── 앱 ── */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.04em; margin: 0; line-height: 1.15; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.apps { padding: 72px 0 0; }
.app {
  border-radius: 32px; background: var(--bg-elev); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
}
.app + .app { margin-top: 20px; }
.app-main { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; padding: 44px 44px 0; }
.app-info { padding-bottom: 44px; }
.app-title { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-title img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 4px 14px rgba(47,107,255,.25); }
.app-title h3 { margin: 0; font-size: 26px; letter-spacing: -0.035em; line-height: 1.2; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--tile); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 999px;
}
.badge.soon { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.app-tagline { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 18px; line-height: 1.4; }
.features { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; color: var(--text-2); font-size: 15px; }
.features li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background-color: var(--accent-soft);
  -webkit-mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%235b8cff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center; background-size: 20px; background-repeat: no-repeat;
}
.app-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 600; }
.app-shots {
  display: flex; gap: 14px; align-items: flex-end; justify-content: center;
  padding-top: 8px; margin-bottom: -64px;
}
.app-shots .phone { width: 31%; max-width: 200px; border-radius: 30px; padding: 6px; }
.app-shots .phone img { border-radius: 25px; }
.app-shots .phone:nth-child(2) { transform: translateY(-28px); }

/* 준비 중인 앱 */
.app.upcoming .app-main { padding-bottom: 44px; align-items: center; }
.app.upcoming .app-info { padding-bottom: 0; }
.app-mark {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: var(--tile); border: 1px solid var(--line);
  font-weight: 800; font-size: 28px; color: var(--muted); letter-spacing: -0.04em;
}
.placeholder {
  min-height: 200px; border-radius: 22px;
  border: 1.5px dashed var(--line);
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--tile) 14px 15px);
}

/* ── 하단 ── */
footer.site { margin-top: 80px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 28px; padding-bottom: 48px; }
footer.site .brand { height: 20px; margin: 0; }
footer.site .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.site a:not(.brand) { color: var(--text-2); }

/* ── 나타나기 ── */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── 문서(개인정보처리방침) ── */
.doc { max-width: 760px; padding: 48px 24px 0; }
.doc h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.3; letter-spacing: -0.035em; margin: 0 0 12px; }
.doc h2 { font-size: 24px; letter-spacing: -0.03em; margin: 56px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 18px; margin: 32px 0 6px; letter-spacing: -0.02em; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc code { background: var(--tile); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--tile); color: var(--text); font-weight: 600; }
td { color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ── 반응형 ── */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-tiles { max-width: 380px; padding-bottom: 60px; }
  .app-main { grid-template-columns: 1fr; padding: 32px 28px 0; }
  .app-info { padding-bottom: 8px; }
  .app.upcoming .app-main { padding-bottom: 28px; }
  .placeholder { min-height: 150px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  header.site .wrap { gap: 8px; }
  .brand { height: 24px; }
  .nav-link { display: none; }
  .seg button { height: 28px; min-width: 30px; padding: 0 8px; }
  .seg.icons button { width: 28px; }
  .hero-tiles { gap: 12px; max-width: 320px; }
  .hero-tiles .tile:nth-child(even) { transform: translateY(28px); }
  .tile { border-radius: 24px; padding: 14px; }
  .tile img, .tile .app-mark { width: 56px; height: 56px; border-radius: 15px; margin-bottom: 6px; }
  .tile .app-mark { font-size: 24px; }
  .tile strong { font-size: 15px; }
  .tile span { font-size: 12px; }
  .app { border-radius: 26px; }
  .app-main { padding: 26px 20px 0; }
  .app-shots { gap: 8px; margin-bottom: -40px; }
  .app-shots .phone { border-radius: 20px; padding: 4px; }
  .app-shots .phone img { border-radius: 16px; }
  .app-shots .phone:nth-child(2) { transform: translateY(-16px); }
  .section-head { flex-direction: column; align-items: start; }
  .doc { padding: 32px 16px 0; }
}
