/*
 * ExpoTimes 회사 사이트 공통 스타일
 * 색 토큰은 앱 HWA UI Kit(packages/hwa_ui/lib/designsystem/hwa/hwa_colors.dart) dark 값을 그대로 옮김.
 */
:root {
  --bg: #1B1A1F;            /* HwaColors.dark.background (greyBg2) */
  --surface: #2B2A2F;       /* HwaColors.dark.surface (greyBg3) */
  --surface-2: #35343A;     /* HwaColors.dark.surfaceElevated */
  --brand: #6B7EFF;         /* HwaColors.brand (107,126,255) */
  --brand-strong: #5860FF;  /* HwaColors.brandStrong (88,94,255) */
  --grad: linear-gradient(135deg, #5960FF 0%, #6F75FF 60%, #9F8CFF 100%); /* brandGradient */
  --text-title: #FFFFFF;
  --text-body: #E6E6EB;
  --text-muted: #A3A3A8;    /* textMuted(#999) 계열, surface 위 4.5:1 이상 확보용으로 한 단계 밝힘 */
  --outline: rgba(255, 255, 255, 0.24);
  --divider: rgba(255, 255, 255, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(27, 26, 31, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-title); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text-body); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text-title); text-decoration: none; }
.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 34px; padding: 0 12px;
  border: 1px solid var(--outline); border-radius: 999px;
  color: var(--text-title); font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.lang:hover { border-color: var(--brand); text-decoration: none; }
.header-right { display: flex; align-items: center; gap: 24px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 104px; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -160px; background: rgba(107, 126, 255, 0.38); }
.hero::after { width: 380px; height: 380px; left: -160px; bottom: -200px; background: rgba(159, 140, 255, 0.22); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 48px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(107, 126, 255, 0.14); border: 1px solid rgba(107, 126, 255, 0.45);
  color: #C9CFFF; font-size: 13px; font-weight: 600;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero h1 {
  margin: 20px 0 18px; color: var(--text-title);
  font-size: 52px; line-height: 1.22; font-weight: 800; letter-spacing: -0.025em;
}
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 0 0 32px; font-size: 18px; color: var(--text-body); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 12px;
  font-size: 16px; font-weight: 600;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-strong); color: #FFFFFF; }
.btn-primary:hover { background: #4A52F0; }
.btn-ghost { border: 1px solid var(--outline); color: var(--text-title); }
.btn-ghost:hover { border-color: var(--brand); }
.hero-mark {
  justify-self: center; position: relative;
  width: 300px; aspect-ratio: 1; border-radius: 72px;
  background: linear-gradient(160deg, #2F2E36 0%, #222127 100%);
  border: 1px solid var(--divider);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
}
.hero-mark img { width: 52%; }

/* ---------- Sections ---------- */
section.block { padding: 88px 0; border-top: 1px solid var(--divider); }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.section-title { margin: 0 0 14px; color: var(--text-title); font-size: 34px; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; }
.section-desc { margin: 0 0 40px; color: var(--text-body); max-width: 640px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 28px 26px 30px;
}
.card .icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(107, 126, 255, 0.16); color: #AEB8FF;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 10px; color: var(--text-title); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-body); font-size: 15px; }

.info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.info-table {
  margin: 0; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 8px 26px;
}
.info-table div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--divider); }
.info-table div:last-child { border-bottom: 0; }
.info-table dt { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.info-table dd { margin: 0; color: var(--text-title); font-size: 15px; }

.contact-card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.contact-card h3 { margin: 0 0 6px; color: var(--text-title); font-size: 22px; }
.contact-card p { margin: 0; color: var(--text-body); }
.contact-card .mail { font-size: 20px; font-weight: 700; color: #AEB8FF; }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 820px; }
.legal h1 { margin: 0 0 8px; color: var(--text-title); font-size: 36px; line-height: 1.3; letter-spacing: -0.02em; }
.legal .meta { margin: 0 0 36px; color: var(--text-muted); font-size: 14px; }
.legal .intro { margin: 0 0 32px; padding: 20px 22px; background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--divider); }
.legal h2 { margin: 44px 0 12px; color: var(--text-title); font-size: 21px; line-height: 1.4; letter-spacing: -0.01em; }
.legal h3 { margin: 24px 0 8px; color: var(--text-title); font-size: 17px; }
.legal p, .legal li { color: var(--text-body); font-size: 15.5px; }
.legal ul, .legal ol { padding-left: 22px; margin: 8px 0 12px; }
.legal li { margin: 4px 0; }
.toc { margin: 0 0 8px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-sm); }
.toc p { margin: 0 0 8px; color: var(--text-title); font-weight: 700; font-size: 15px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { font-size: 14.5px; break-inside: avoid; }
.toc a { color: var(--text-body); }
.toc a:hover { color: var(--text-title); }
.table-wrap { width: 100%; overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--divider); border-radius: var(--radius-sm); }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.legal th, .legal td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--divider); color: var(--text-body); }
.legal th { background: var(--surface); color: var(--text-title); font-weight: 600; white-space: nowrap; }
.legal tr:last-child td { border-bottom: 0; }
.legal td:first-child { white-space: nowrap; }

/* ---------- App link page (/u/, /en/u/ — 앱 프로필 공유·QR 링크) ----------
 * 새 규칙만 추가한다. 이 파일은 7일 캐시되므로 /u/ 페이지는 site.css?v=날짜 로 불러온다(이 블록을 고치면 날짜도 올릴 것). */
body.applink-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.applink-page > main { flex: 1 0 auto; }
.applink { position: relative; overflow: hidden; display: flex; align-items: center; padding: 88px 0 104px; text-align: center; }
.applink::before, .applink::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.applink::before { width: 520px; height: 520px; right: -120px; top: -160px; background: rgba(107, 126, 255, 0.38); }
.applink::after { width: 380px; height: 380px; left: -160px; bottom: -200px; background: rgba(159, 140, 255, 0.22); }
.applink .container { position: relative; z-index: 1; max-width: 560px; }
.applink-mark {
  width: 128px; aspect-ratio: 1; margin: 0 auto 32px; border-radius: 32px;
  background: linear-gradient(160deg, #2F2E36 0%, #222127 100%);
  border: 1px solid var(--divider);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
}
.applink-mark img { width: 52%; }
.applink h1 { margin: 0 0 32px; color: var(--text-title); font-size: 26px; line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.applink-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.applink-actions .btn { flex: 1 1 200px; max-width: 260px; height: auto; min-height: 50px; padding: 12px 22px; line-height: 1.35; text-align: center; }
@media (max-width: 720px) {
  .applink { padding: 56px 0 72px; }
  .applink-mark { width: 112px; border-radius: 28px; margin-bottom: 28px; }
  .applink h1 { font-size: 22px; margin-bottom: 28px; }
  .applink-actions { flex-direction: column; }
  .applink-actions .btn { flex: 0 0 auto; max-width: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--divider); padding: 44px 0 calc(48px + env(safe-area-inset-bottom)); background: #18171C; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-title); font-size: 14px; font-weight: 600; }
.biz { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.85; }
.biz span { display: inline-block; margin-right: 14px; }
.copy { margin: 14px 0 0; color: var(--text-muted); font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .cards { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav { display: none; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 36px; }
  .hero p.lead { font-size: 16.5px; }
  .actions .btn { flex: 1 1 auto; }
  section.block { padding: 64px 0; }
  .section-title { font-size: 27px; }
  .info-table { padding: 4px 20px; }
  .info-table div { grid-template-columns: 1fr; gap: 2px; padding: 14px 0; }
  .contact-card { padding: 26px 22px; }
  .contact-card .mail { font-size: 18px; }
  .legal { padding: 44px 0 72px; }
  .legal h1 { font-size: 28px; }
  .toc ol { columns: 1; }
  /* 정책 표: 모바일에서는 행을 카드처럼 세로로 쌓아 가로 스크롤을 없앤다(라벨은 td data-label) */
  .table-wrap { overflow-x: visible; }
  .legal table { min-width: 0; }
  .legal thead { display: none; }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal tr { padding: 14px 16px; border-bottom: 1px solid var(--divider); }
  .legal tr:last-child { border-bottom: 0; }
  .legal td { padding: 4px 0; border-bottom: 0; }
  .legal td::before { content: attr(data-label); display: block; color: var(--text-muted); font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
  .legal td:first-child { color: var(--text-title); font-weight: 600; white-space: normal; }
}

/* ---------- App link 확장 (/l/ /s/ + 앱 열기 버튼, 2026-10-25) — 이 블록을 고치면 페이지의 site.css?v= 날짜도 올릴 것 ---------- */
.applink [hidden] { display: none !important; }
.applink-open { display: flex; width: 100%; max-width: 360px; margin: 0 auto 16px; height: auto; min-height: 58px; padding: 14px 24px; font-size: 18px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.has-open .applink-actions .btn-primary { background: transparent; border: 1px solid var(--outline); color: var(--text-title); }
.has-open .applink-actions .btn-primary:hover { border-color: var(--brand); }
.applink-note { margin: 20px auto 0; max-width: 360px; color: var(--text-body); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.applink-invalid-title { margin: 0 0 12px; }
@media (max-width: 720px) {
  .applink-open { max-width: none; }
}
