/* SaraOS 소개 사이트. 색·반경·그림자는 ui-kit/src/tokens.rs(어두운 테마)와 같은 값.
   깊이는 면 색 차이와 그림자로 내고, 바탕 투명도는 쓰지 않는다. */

:root {
  --background: #12141c;
  --surface: #16171c;
  --surface-subtle: #1b1d23;
  --surface-raised: #20222a;
  --surface-hover: #2a2d37;
  --border: #23252d;
  --input: #292b34;
  --text: #ecedf2;
  --text-muted: #9a9dab;
  --accent: #7c8cff;
  --accent-hover: #919eff;
  --on-accent: #0e101a;
  --success: #5fd38d;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.45);
  --shadow-window: 0 24px 64px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.3);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Noto Sans KR", sans-serif;
  --mono: "Sarasa Mono K", "Sarasa Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container-wide { width: min(1280px, 100% - 32px); margin-inline: auto; }

/* 상단 바 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  width: min(1280px, 100% - 32px);
  margin-inline: auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-muted { color: var(--text-muted); }
.logo { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.logo .dot { fill: var(--accent); stroke: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.btn) {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  transition: background-color .15s, color .15s;
}
.nav > a:not(.btn):hover { background: var(--surface-hover); color: var(--text); }
.nav .btn { margin-left: 8px; }

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: var(--surface-subtle); color: var(--text); border: 1px solid var(--input); }
.btn-outline:hover { background: var(--surface-hover); }
.btn:disabled { cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.btn-primary:disabled { background: var(--surface-raised); color: var(--text-muted); border: 1px solid var(--input); box-shadow: none; }
.btn .soon {
  margin-left: 10px; padding: 2px 8px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}

/* 히어로 */
.hero { padding: 88px 0 40px; text-align: center; }
.hero-text { display: flex; flex-direction: column; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 {
  margin: 24px 0 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hero-sub {
  margin: 10px 0 0;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--accent);
}
.lead { max-width: 640px; margin: 24px 0 0; color: var(--text-muted); font-size: clamp(16px, 2vw, 19px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .actions { justify-content: center; }

.screen {
  margin: 64px 0 0;
  padding: 10px;
  border-radius: 22px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-window);
}
.screen img { border-radius: 14px; width: 100%; }

/* 섹션 */
.section { padding: 112px 0 24px; }
.section-head { max-width: 680px; margin-bottom: 64px; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
h2 { margin: 10px 0 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.25; letter-spacing: -0.03em; font-weight: 800; }
.section-head p { margin: 18px 0 0; color: var(--text-muted); font-size: 18px; }
h3 { margin: 0; font-size: 22px; line-height: 1.35; letter-spacing: -0.02em; font-weight: 700; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 56px;
  margin-bottom: 96px;
}
.feature.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.reverse .feature-text { order: 2; }
.feature-text p { margin: 14px 0 0; color: var(--text-muted); }

/* AI가 설정을 바꾸는 과정 (1 요청·허락 → 2 답 → 3 반영) */
.flow { margin-bottom: 96px; }
.flow-text { max-width: 720px; margin-bottom: 40px; }
.flow-text p { margin: 14px 0 0; color: var(--text-muted); }
.flow-steps { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 28px; align-items: start; }
.flow-side { display: grid; gap: 28px; }
.flow-step { margin: 0; }
.flow-step figcaption { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.step-num {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700;
}
.dock-compare { flex-direction: column; align-items: center; gap: 6px; }
.dock-compare img:first-child { width: 88%; }
.dock-arrow { width: 22px; height: 22px; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8cff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--input);
  box-shadow: 0 1px 0 var(--input);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82em;
  line-height: 1.5;
  text-align: center;
}

/* 스크린샷 틀: 바탕보다 한 단계 밝은 면 + 그림자 */
.shot {
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: center;
}
.shot img { border-radius: var(--radius-md); }
.shot-tall img { max-height: 520px; width: auto; }
.shot-stack { position: relative; flex-direction: column; align-items: center; gap: 0; padding-bottom: 72px; }
.shot-stack > img:first-child { max-height: 480px; width: auto; }
.shot-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 40px));
}
.shot-pair { gap: 16px; }
.shot-pair img { width: calc(50% - 8px); }

/* 카드 */
.cards { display: grid; gap: 20px; margin-bottom: 96px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.card p { margin: 10px 0 0; color: var(--text-muted); font-size: 15px; }
.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

/* 음성 입력 표시 (OS의 상단 알약과 같은 모양) */
.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 8px 20px 8px 8px;
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 15px;
}
.voice-mic { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.voice-mic svg { width: 18px; height: 18px; fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linecap: round; }
.voice-bars { display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.voice-bars i { width: 3px; border-radius: 2px; background: var(--accent); animation: bar 1.1s ease-in-out infinite; }
.voice-bars i:nth-child(1) { height: 8px; animation-delay: -0.2s; }
.voice-bars i:nth-child(2) { height: 16px; animation-delay: -0.5s; }
.voice-bars i:nth-child(3) { height: 11px; animation-delay: -0.1s; }
.voice-bars i:nth-child(4) { height: 18px; animation-delay: -0.7s; }
.voice-bars i:nth-child(5) { height: 9px; animation-delay: -0.35s; }
@keyframes bar { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }

/* 이미지 크게 보기 */
main img { cursor: zoom-in; }
.lightbox {
  width: fit-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 60px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: lightbox-in .22s cubic-bezier(.2, .9, .3, 1.1); }
.lightbox::backdrop { background: rgb(8 9 14 / 0.82); }
.lightbox img { max-width: calc(100vw - 66px); max-height: calc(100vh - 180px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-md); cursor: zoom-out; }
.lightbox-caption { margin: 0 48px; color: var(--text-muted); font-size: 14px; text-align: center; }
.lightbox-close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--input); border-radius: 999px;
  background: var(--surface-raised); color: var(--text); cursor: pointer;
}
.lightbox-close:hover { background: var(--surface-hover); }
.lightbox-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* 아래 */
.footer { margin-top: 112px; padding: 40px 0 56px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; color: var(--text-muted); font-size: 14px; }
.footer p a:hover { color: var(--text); }

@media (max-width: 900px) {
  .flow-steps { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature.reverse { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature.reverse .feature-text { order: 0; }
  .cards-2, .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .section { padding-top: 80px; }
  .section-head { margin-bottom: 44px; }
  .feature { margin-bottom: 72px; }
}

@media (max-width: 640px) {
  .nav > a:not(.btn) { display: none; }
  .hero { padding-top: 56px; }
  .screen { margin-top: 40px; padding: 6px; border-radius: 14px; }
  .screen img { border-radius: 9px; }
  .shot { padding: 12px; }
  .shot-stack { padding-bottom: 56px; }
  .shot-overlay { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .voice-bars i { animation: none; }
  .btn { transition: none; }
  .lightbox[open] { animation: none; }
}

/* 일본어·중국어는 Pretendard에 없는 글자를 시스템 글꼴로 */
:lang(ja) { --font: "Pretendard Variable", Pretendard, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif; }
:lang(zh) { --font: "Pretendard Variable", Pretendard, "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; }
:lang(ja), :lang(zh) { word-break: normal; line-break: strict; }

/* 언어 메뉴 */
.lang { position: relative; margin-left: 8px; }
.lang summary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px 0 12px;
  border: 1px solid var(--input); border-radius: var(--radius-sm);
  background: var(--surface-subtle); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; list-style: none;
  transition: background-color .15s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--surface-hover); }
.lang summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang summary .chev { width: 14px; height: 14px; color: var(--text-muted); transition: transform .15s; }
.lang[open] summary .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 160px; padding: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-raised); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.lang-menu a { padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--text-muted); }
.lang-menu a:hover { background: var(--surface-hover); color: var(--text); }
.lang-menu a[aria-current="page"] { color: var(--text); font-weight: 600; }
.lang-menu a[aria-current="page"]::after { content: "✓"; float: right; color: var(--accent); }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound h1 { font-size: 64px; margin: 24px 0 8px; }
.notfound p { color: var(--text-muted); margin: 0 0 32px; }
.notfound .logo { width: 48px; height: 48px; }
.notfound .notfound-langs { margin: 32px 0 0; font-size: 14px; }
.notfound-langs a:hover { color: var(--text); }
