/* =========================================================
   I&M Studio — Multilingual Realtime Translation
   클린 비즈니스 테마. 라이트(기본) / 다크(토글).
   기본 :root = 라이트. [data-theme="dark"] = 다크 오버라이드.
   ========================================================= */

:root {
  color-scheme: light;

  /* 배경 / 표면 */
  --bg: #f6f8fc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --nav-bg-solid: #ffffff;

  /* 보더 */
  --line: #e4e9f1;
  --line-strong: #d3dae6;

  /* 텍스트 */
  --text: #151d31;
  --text-soft: #45506b;
  --muted: #6b7790;

  /* 액센트 — 코퍼릿 블루 */
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #e9f0ff;
  --on-primary: #ffffff;

  /* 그림자 */
  --shadow-sm: 0 1px 2px rgba(18, 32, 64, 0.06), 0 1px 3px rgba(18, 32, 64, 0.05);
  --shadow: 0 12px 28px -14px rgba(18, 32, 64, 0.16);
  --shadow-lg: 0 30px 64px -28px rgba(18, 32, 64, 0.28);
  --shadow-primary: 0 12px 26px -10px rgba(37, 99, 235, 0.45);

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1140px;
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "Inter", var(--font-sans);
}

/* ====== 다크 테마 ====== */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0e1422;
  --bg-2: #0a0f1b;
  --surface: #161e30;
  --surface-2: #1d2740;
  --nav-bg: rgba(14, 20, 34, 0.72);
  --nav-bg-solid: #0e1422;

  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.17);

  --text: #e8edf7;
  --text-soft: #b3bed4;
  --muted: #8593ac;

  --primary: #6f9bff;
  --primary-strong: #8db0ff;
  --primary-soft: rgba(111, 155, 255, 0.14);
  --on-primary: #08152e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 64px -26px rgba(0, 0, 0, 0.7);
  --shadow-primary: 0 12px 26px -10px rgba(111, 155, 255, 0.35);
}

/* ====== Reset / Base ====== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.accent { color: var(--primary); }

/* ====== 네비게이션 ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__right { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark { border-radius: 7px; }
.brand__name { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; font-size: 1.06rem; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a { color: var(--text-soft); font-size: 0.93rem; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 18px; border-radius: 999px; color: var(--on-primary) !important;
  background: var(--primary); font-weight: 600; box-shadow: var(--shadow-primary);
}
.nav__cta:hover { background: var(--primary-strong); }

/* 테마 토글 */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-soft);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle__sun, .theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; gap: 5px; flex-direction: column; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====== 버튼 ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  font-family: var(--font-sans); border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-primary); }
.btn--primary:hover { background: var(--primary-strong); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--lg { padding: 15px 32px; font-size: 1.04rem; }

/* ====== 섹션 공통 ====== */
.section { padding: clamp(60px, 9vw, 112px) 0; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 60px); text-align: center; }
.kicker {
  display: inline-block; font-family: var(--font-display); font-size: 0.74rem;
  letter-spacing: 0.18em; color: var(--primary); font-weight: 700; text-transform: uppercase;
}
.section__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 14px 0 0; }
.section__lead { color: var(--text-soft); font-size: clamp(1rem, 2vw, 1.1rem); margin: 16px 0 0; }

/* ====== HERO ====== */
.hero {
  position: relative;
  padding: clamp(64px, 11vw, 132px) 0 clamp(52px, 8vw, 96px);
  text-align: center;
  background:
    radial-gradient(80% 60% at 50% -10%, var(--primary-soft), transparent 70%);
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 0.84rem; font-weight: 600; color: var(--text-soft); margin-bottom: 26px;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.hero__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5.6vw, 3.7rem); letter-spacing: -0.03em; }
.hero__title .accent { color: var(--primary); }
.hero__sub { color: var(--text-soft); font-size: clamp(1rem, 2vw, 1.18rem); margin: 24px 0 0; max-width: 660px; }
.hero__actions { display: flex; gap: 13px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.hero__note { margin-top: 22px; color: var(--muted); font-size: 0.88rem; }

/* ====== 카드 그리드 ====== */
.cards { display: grid; gap: 20px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  padding: 28px 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.card__icon {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.4rem;
  border-radius: 13px; background: var(--primary-soft); margin-bottom: 16px;
}
.card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 0.95rem; margin: 0; }

/* ====== Flow / 아키텍처 ====== */
.flow {
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center;
  gap: 14px; margin: 0 auto; max-width: 940px;
}
.flow__node {
  flex: 1 1 220px; max-width: 300px; text-align: center;
  padding: 26px 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.flow__node .ic { font-size: 1.9rem; line-height: 1; }
.flow__node h4 { font-family: var(--font-display); font-size: 1.04rem; margin: 12px 0 6px; }
.flow__node p { color: var(--muted); font-size: 0.86rem; margin: 0; }
.flow__step { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; color: var(--primary); }
.flow__arrow { display: flex; align-items: center; color: var(--primary); font-size: 1.5rem; }

.flow-note {
  display: flex; align-items: flex-start; gap: 14px; max-width: 820px; margin: 36px auto 0;
  padding: 20px 24px; border-radius: var(--radius); background: var(--primary-soft);
  border: 1px solid var(--line);
}
.flow-note .ic { font-size: 1.5rem; line-height: 1.4; }
.flow-note p { margin: 0; color: var(--text-soft); font-size: 0.97rem; }
.flow-note strong { color: var(--text); }

/* ====== Feature 블록 ====== */
.feature {
  display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(32px, 6vw, 72px);
  align-items: center; margin-top: clamp(48px, 7vw, 84px);
}
.feature:first-of-type { margin-top: 0; }
.feature--reverse .feature__media { order: 2; }
.feature__body h3 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin-bottom: 12px; }
.feature__body > p { color: var(--text-soft); margin: 0 0 16px; }
.feature__tag {
  display: inline-block; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.14em;
  color: var(--primary); font-weight: 700; margin-bottom: 12px; text-transform: uppercase;
}
.feature__fineprint { font-size: 0.86rem; color: var(--muted); margin-top: 14px; }
.feature__fineprint strong { color: var(--text-soft); }

/* 앱 화면 프레임 (스크린샷 통일감) */
.shot {
  width: min(100%, 320px); margin-inline: auto; padding: 10px;
  border-radius: 26px; background: var(--surface-2);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.shot img, .shot svg { width: 100%; border-radius: 18px; display: block; }
.shot--wide { width: min(100%, 380px); }

/* ====== Ticks ====== */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text-soft); }
.ticks li::before {
  content: "\2713"; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  color: var(--on-primary); background: var(--primary); border-radius: 6px;
}
.ticks strong { color: var(--text); font-weight: 600; }

/* ====== 언어 칩 ====== */
.lang-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.lang-chips span {
  padding: 7px 15px; border-radius: 999px; font-size: 0.88rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); box-shadow: var(--shadow-sm);
}
.lang-chips .more { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; box-shadow: none; }

.lang-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; max-width: 900px; margin: 0 auto; }
.lang-col { flex: 1 1 300px; }
.lang-col h3 { font-family: var(--font-display); font-size: 1.06rem; margin: 0 0 14px; text-align: center; }
.lang-col h3 .ic { color: var(--primary); margin-right: 6px; }
.lang-flow__arrow { color: var(--primary); font-size: 1.8rem; }
.lang-note { max-width: 760px; margin: 34px auto 0; text-align: center; color: var(--muted); font-size: 0.92rem; }
.lang-note strong { color: var(--text-soft); }

/* ====== Steps ====== */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 30px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; }
.step__num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; color: var(--primary); }
.step h3 { font-size: 1.18rem; margin: 6px 0 8px; }
.step p { color: var(--text-soft); margin: 0; font-size: 0.95rem; }

/* ====== 사용 시나리오 ====== */
.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.usecase {
  padding: 30px 26px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.usecase:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.usecase .ic { font-size: 2rem; line-height: 1; }
.usecase h3 { font-size: 1.16rem; margin: 14px 0 8px; }
.usecase p { color: var(--text-soft); font-size: 0.94rem; margin: 0; }

/* ====== 플랫폼 표기 ====== */
.platforms {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 22px; color: var(--muted); font-family: var(--font-display);
  font-size: 0.84rem; letter-spacing: 0.06em;
}
.platforms .label { font-weight: 700; color: var(--text-soft); letter-spacing: 0.12em; }

/* ====== Contact ====== */
.contact {
  border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 68px); text-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact__head { max-width: 620px; margin: 0 auto; }
.contact__actions { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact__mail { color: var(--text-soft); font-family: var(--font-display); letter-spacing: 0.02em; border-bottom: 1px solid transparent; }
.contact__mail:hover { color: var(--primary); border-color: var(--primary); }

/* ====== Footer ====== */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { border-radius: 7px; }
.footer__brandtext { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; line-height: 1.4; }
.footer__brandtext strong { font-family: var(--font-display); }
.footer__dot { color: var(--line-strong); }
.footer__tagline { color: var(--muted); font-size: 0.84rem; }
.footer__copy { color: var(--muted); font-size: 0.86rem; margin: 0; line-height: 1.4; }

/* ====== 스크롤 리빌 ====== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ====== 반응형 ====== */
@media (max-width: 960px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .usecases { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature--reverse .feature__media { order: 0; }
  .flow { flex-direction: column; align-items: center; }
  .flow__node { flex: none; width: min(100%, 420px); max-width: 420px; }
  .flow__arrow { transform: rotate(90deg); }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--nav-bg-solid);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: 0.22s;
    box-shadow: var(--shadow);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: 12px; text-align: center; border-bottom: 0 !important; }
  .nav__toggle { display: flex; }
}

@media (max-width: 520px) {
  .cards--4 { grid-template-columns: 1fr; }
}

/* ====== 모션 최소화 ====== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover, .card:hover, .usecase:hover { transform: none; }
  body { transition: none; }
}
