/* ============================================
   WHYKI — Legal Pages (Terms & Privacy)
   ============================================ */

:root {
  --black: #000000;
  --white: #ffffff;
  --bg: #edeced;
  --gray: #666666;
  --light-gray: #c0c0c0;
  --card-bg: #ffffff;
  --accent: #000000;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--black);
  color: var(--bg);
}

a {
  color: var(--black);
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.6;
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px;
}

.logo {
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.logo:hover {
  opacity: 1;
}

.header-links {
  display: flex;
  gap: 24px;
}

.header-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gray);
  position: relative;
}

.header-links a.active {
  color: var(--black);
}

.header-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--black);
  transition: width 0.3s;
}

.header-links a.active::after,
.header-links a:hover::after {
  width: 100%;
}

.header-links a:hover {
  opacity: 1;
  color: var(--black);
}

/* --- Hero --- */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px 48px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}

.meta {
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 400;
}

/* --- Content --- */
.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

/* --- Table of Contents --- */
.toc {
  border: 1.5px solid var(--black);
  border-radius: 12px;
  padding: 32px 36px;
  margin-bottom: 64px;
}

.toc h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 10px;
}

.toc li a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gray);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.toc li a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--light-gray);
  min-width: 20px;
}

.toc li a:hover {
  color: var(--black);
  opacity: 1;
}

/* --- Sections --- */
.section {
  margin-bottom: 56px;
  scroll-margin-top: 32px;
}

.section h2 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--light-gray);
}

.section p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray);
  margin-bottom: 14px;
}

.section p:last-child {
  margin-bottom: 0;
}

.section h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 28px;
  margin-bottom: 12px;
}

/* --- Table --- */
.section table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.section table th,
.section table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--light-gray);
  font-weight: 300;
  color: var(--gray);
  line-height: 1.6;
}

.section table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--black);
}

.section table td:first-child {
  width: 180px;
  white-space: nowrap;
}

.section ul {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.section ul li {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--light-gray);
}

.section a {
  font-weight: 400;
  border-bottom: 1px solid var(--light-gray);
  transition: border-color 0.3s, opacity 0.3s;
}

.section a:hover {
  border-color: var(--black);
  opacity: 1;
}

.section strong {
  font-weight: 500;
  color: var(--black);
}

/* --- Footer --- */
.footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px;
  border-top: 1px solid var(--light-gray);
}

.footer p {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 300;
  text-align: center;
}

.footer a {
  font-weight: 400;
  color: var(--gray);
}

.footer a:hover {
  color: var(--black);
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .header {
    padding: 24px 20px;
  }

  .hero {
    padding: 60px 20px 36px;
  }

  .content {
    padding: 0 20px 80px;
  }

  .toc {
    padding: 24px;
  }

  .toc ol {
    columns: 1;
  }

  .section h2 {
    font-size: 1.15rem;
  }

  .footer {
    padding: 24px 20px;
  }
}
