/* Styles for the standalone legal pages (privacy / terms).
   These are static files in public/, outside the React app, so the palette
   from index.html's tailwind.config is mirrored here as plain custom
   properties. Dark mode follows the site's `.dark` class on <html>. */

:root {
  --primary: #ff4785;
  --primary-hover: #e63570;
  --primary-soft: #ffe8f0;
  --secondary: #7f56d9;
  --bg: #fafafa;
  --surface: #ffffff;
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --divider: #e5e7eb;
  --muted-bg: #f9fafb;
}

html.dark {
  --primary: #ff6b9d;
  --primary-hover: #ff8ab4;
  --primary-soft: #3f1d2b;
  --bg: #0b0f17;
  --surface: #111827;
  --text-main: #f3f4f6;
  --text-sub: #9ca3af;
  --divider: #1f2937;
  --muted-bg: #1a2130;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-main);
  font-family: "Plus Jakarta Sans", "Noto Sans KR", -apple-system,
    BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Starts at primary-hover rather than primary: white text on #FF4785 is only
   ~3.4:1, below AA for the 14px subtitle. #E63570 → #7F56D9 both clear 4.5:1. */
.masthead {
  background: linear-gradient(135deg, #e63570 0%, #7f56d9 100%);
  color: #fff;
  padding: 44px 20px 36px;
  position: relative;
  overflow: hidden;
}

/* Soft blurred circle, echoing the CTA section on the landing page. */
.masthead::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  background: #ffc800;
  opacity: 0.18;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.masthead-inner,
.wrap {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.masthead a.home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  opacity: 0.9;
}

.masthead a.home:hover {
  opacity: 1;
}

.masthead h1 {
  margin: 18px 0 6px;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Needs its own colour: the generic `p` rule below beats the white inherited
   from .masthead, which would render this subtitle in body grey. */
.masthead .updated {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.langbar {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.langbar button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 6px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.langbar button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.langbar button[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: var(--primary-hover);
}

main {
  padding: 36px 20px 72px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 24px;
  padding: 32px 32px 38px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

@media (max-width: 560px) {
  .masthead {
    padding: 30px 16px 26px;
  }
  .masthead h1 {
    font-size: 25px;
  }
  main {
    padding: 20px 12px 56px;
  }
  .card {
    padding: 22px 18px 28px;
    border-radius: 18px;
  }
}

h2 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.45;
  margin: 34px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  letter-spacing: -0.01em;
}

/* The first section of a language block opens the card — no leading rule. */
.card [data-lang] > section:first-of-type > h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 6px;
}

p,
li {
  color: var(--text-sub);
}

p {
  margin: 10px 0;
}

ul,
ol {
  margin: 10px 0;
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

strong {
  color: var(--text-main);
  font-weight: 700;
}

a {
  color: var(--primary-hover);
}

code {
  background: var(--muted-bg);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 15px;
}

th,
td {
  border: 1px solid var(--divider);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--text-sub);
}

th {
  background: var(--muted-bg);
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
}

.contact {
  margin-top: 30px;
  padding: 20px 22px;
  background: var(--primary-soft);
  border-radius: 16px;
}

.contact p {
  margin: 4px 0;
}

footer {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 52px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  text-align: center;
}

footer a {
  color: var(--text-sub);
  margin: 0 8px;
  text-decoration: none;
}

footer a:hover {
  color: var(--primary);
}

footer p {
  font-weight: 400;
}

/* Language switching: only blocks matching <html lang> are shown. Inline
   variants keep inline flow so they can sit inside a heading or a link. */
[data-lang] {
  display: none;
}

html[lang="ko"] [data-lang="ko"],
html[lang="en"] [data-lang="en"] {
  display: block;
}

html[lang="ko"] span[data-lang="ko"],
html[lang="en"] span[data-lang="en"] {
  display: inline;
}
