/* ============================================================
   legal.css — Minimal styles for legal pages
   (terms.html, privacy.html, kvkk.html, gdpr.html)
   ============================================================ */

:root {
  --bg: #f9f9f9;
  --text: #0a0a0a;
  --muted: #6b7280;
  --primary: #0b57d0;
  --line: #ececec;
}

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; min-height: 100vh; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  display: flex;
  flex-direction: column;
  position: relative;
}
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  background-image: url(assets/pattern-square.svg);
  background-repeat: repeat;
  background-position: top center;
  background-size: 1000px auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }


/* ===========================================================
   HERO
   =========================================================== */
.legal-hero {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 32px 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 48px;
  letter-spacing: -0.005em;
}
.back-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.back-link:hover { color: var(--primary); }
.back-link:hover svg { transform: translateX(-2px); }

.legal-title {
  font-size: 44px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--text);
}
.legal-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 20px;
  max-width: 640px;
  letter-spacing: -0.005em;
}
.legal-meta {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  letter-spacing: -0.003em;
}
.legal-meta span.dot { color: var(--muted); }


/* ===========================================================
   ARTICLE BODY
   =========================================================== */
.legal-article {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 96px;
  font-size: 15px;
  color: var(--text);
}

.legal-article h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-top: 64px;
  margin-bottom: 18px;
  color: var(--text);
  scroll-margin-top: 32px;
}
.legal-article h2:first-of-type { margin-top: 0; }

.legal-article h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--text);
}

.legal-article p {
  font-size: 15px;
  line-height: 1.75;
  margin: 12px 0;
  color: var(--text);
  letter-spacing: -0.003em;
}
.legal-article p strong { color: var(--text); font-weight: 600; }

.legal-article ul, .legal-article ol {
  margin: 14px 0 14px 22px;
  padding-left: 0;
}
.legal-article ul li {
  list-style: disc;
  font-size: 15px;
  line-height: 1.75;
  margin: 6px 0;
  color: var(--text);
  padding-left: 4px;
  letter-spacing: -0.003em;
}
.legal-article ol li {
  list-style: decimal;
  font-size: 15px;
  line-height: 1.75;
  margin: 6px 0;
  color: var(--text);
  padding-left: 4px;
  letter-spacing: -0.003em;
}
.legal-article ul li::marker,
.legal-article ol li::marker { color: var(--primary); }

.legal-article a {
  color: var(--primary);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.legal-article a:hover { border-bottom-color: var(--primary); }

.legal-article hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 56px 0;
}

.legal-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legal-article table th,
.legal-article table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-article table tr:last-child td { border-bottom: 0; }
.legal-article table th {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.003em;
}
.legal-article table td {
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.003em;
}


/* ===========================================================
   TOC
   =========================================================== */
.toc {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin-bottom: 56px;
}
.toc-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
.toc ol li {
  list-style: none;
  font-size: 15px;
  line-height: 1.7;
  margin: 6px 0;
  break-inside: avoid;
}
.toc ol li a {
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 400;
  letter-spacing: -0.003em;
  border-bottom: none;
  padding-bottom: 0;
}
.toc ol li a:hover { color: var(--primary); }
.toc ol li a .num {
  font-weight: 500;
  color: var(--primary);
  min-width: 22px;
}
@media (max-width: 640px) { .toc ol { columns: 1; } }


/* ----- Definition list ----- */
.legal-article dl { margin: 18px 0; }
.legal-article dt {
  font-weight: 600;
  color: var(--text);
  margin-top: 14px;
  font-size: 15px;
  letter-spacing: -0.003em;
}
.legal-article dd {
  margin: 4px 0 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  letter-spacing: -0.003em;
}


/* ===========================================================
   SCROLL TO TOP BUTTON
   =========================================================== */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(11, 87, 208, 0.25);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  background: #094bb3;
  box-shadow: 0 6px 20px rgba(11, 87, 208, 0.35);
}
.scroll-top svg { width: 18px; height: 18px; }


/* ===========================================================
   FOOTER
   =========================================================== */
.legal-footer {
  padding: 32px 32px 40px;
  border-top: 1px solid var(--line);
}
.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.003em;
}
.legal-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.legal-footer-links a {
  color: var(--text);
  font-weight: 400;
  font-size: 14px;
}
.legal-footer-links a:hover { color: var(--primary); }
.legal-footer-links span { display: none; }
@media (min-width: 720px) {
  .legal-footer-inner { flex-direction: row; justify-content: space-between; }
}


/* ===========================================================
   MOBILE
   =========================================================== */
@media (max-width: 640px) {
  .legal-hero { padding: 48px 24px 28px; }
  .back-link { margin-bottom: 32px; }
  .legal-title { font-size: 32px; }
  .legal-subtitle { font-size: 15px; }

  .legal-article { padding: 20px 24px 72px; }
  .legal-article h2 { margin-top: 44px; }

  .legal-article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .toc { padding: 22px 0; }
  .toc ol { columns: 1; }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
