/* ============================================================
   WACCA — Shared styles for static legal pages
   Tokens matched to React app Tailwind theme (index.css)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --flame-50: #fef4f1;
  --flame-100: #fde4dd;
  --flame-200: #f9c7ba;
  --flame-500: #e9674d;
  --flame-600: #c7553f;

  --berry-50: #fff0f4;
  --berry-100: #ffd9e3;
  --berry-200: #f5b3c6;
  --berry-500: #bc3362;
  --berry-600: #a22852;
  --berry-700: #8b0836;

  --text: #030712;
  --text-muted: #6b7280;
  --cloud: #f9fafb;
  --border: #e5e7eb;
}

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

html { scroll-behavior: smooth; background: #fff; }

body {
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.65;
}

::selection { background-color: #ffd9e3; color: #8b0836; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- NAVBAR ---- */
nav {
  position: sticky; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0; background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .nav-inner {
  max-width: 1152px; margin: 0 auto; padding: 0 24px;
  height: 72px; display: flex; align-items: center; justify-content: space-between;
}
nav .logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
nav .logo img { width: 36px; height: 36px; }
nav .logo span { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
nav .nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; padding: 8px 18px;
  border: 1px solid var(--border); border-radius: 12px;
  transition: all 0.2s;
}
nav .nav-back:hover { color: var(--text); border-color: #d1d5db; background: var(--cloud); }

/* ---- DOCUMENT HEADER ---- */
.doc-header {
  padding: 56px 0 32px;
  background: linear-gradient(170deg, #fff, var(--cloud));
  border-bottom: 1px solid var(--border);
}
.doc-label {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--flame-600); background: var(--flame-50);
  padding: 6px 14px; border-radius: 20px; margin-bottom: 16px;
}
.doc-header h1 {
  font-size: clamp(30px, 4vw, 44px); font-weight: 700;
  color: var(--text); line-height: 1.15; margin-bottom: 14px;
}
.doc-header p {
  font-size: 16px; color: var(--text-muted);
  max-width: 640px; margin-bottom: 22px;
}
.doc-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.doc-meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  background: #fff; border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px;
}
.doc-meta-item strong { color: var(--text); font-weight: 700; }

/* ---- LAYOUT (TOC + article) ---- */
.doc-layout {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 48px; align-items: start;
  max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px;
}

/* ---- TOC ---- */
.doc-toc { position: sticky; top: 92px; font-size: 13.5px; }
.doc-toc h4 {
  font-size: 11px; font-weight: 700; color: var(--flame-600);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.doc-toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 6px; }
.doc-toc li { counter-increment: toc; line-height: 1.4; }
.doc-toc a {
  color: var(--text-muted); text-decoration: none;
  display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px;
  transition: all 0.2s; font-weight: 600;
}
.doc-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 700; color: var(--flame-600); flex-shrink: 0; font-size: 11.5px;
}
.doc-toc a:hover { background: var(--flame-50); color: var(--text); }
.doc-toc a.active { background: var(--flame-50); color: var(--text); font-weight: 700; }

/* ---- ARTICLE ---- */
article { font-size: 15.5px; line-height: 1.75; }
article section { margin-bottom: 44px; scroll-margin-top: 92px; }
article section:last-child { margin-bottom: 0; }
article h2 {
  font-size: 24px; font-weight: 700; color: var(--text);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--flame-50);
  display: flex; gap: 12px; align-items: baseline;
}
article h2 .num {
  font-size: 14px; font-weight: 700; color: var(--flame-600);
  background: var(--flame-50); padding: 3px 10px;
  border-radius: 8px; letter-spacing: 0.5px;
}
article h3 {
  font-size: 17px; font-weight: 700; color: var(--text);
  margin-top: 24px; margin-bottom: 10px;
}
article p { color: var(--text); margin-bottom: 14px; }
article p:last-child { margin-bottom: 0; }
article a {
  color: var(--berry-500); font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(188,51,98,0.35);
  text-underline-offset: 2px;
}
article a:hover { text-decoration-color: var(--berry-500); }
article strong { font-weight: 700; }
article ul, article ol { margin: 10px 0 14px 24px; display: flex; flex-direction: column; gap: 8px; }
article li { color: var(--text); }
article li strong { color: var(--berry-600); }
article table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
article th {
  background: var(--cloud); text-align: left; padding: 12px 14px;
  font-weight: 700; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
article td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--border); }
article tr:last-child td { border-bottom: none; }
article td:first-child { font-weight: 700; color: var(--berry-600); white-space: nowrap; }
article blockquote {
  margin: 14px 0; padding: 14px 18px;
  background: var(--cloud); border-left: 3px solid var(--flame-500);
  border-radius: 0 12px 12px 0; font-size: 14px;
  color: var(--text-muted); line-height: 1.7;
}
article code {
  font-family: 'SF Mono', Menlo, monospace; font-size: 13.5px;
  background: var(--cloud); padding: 2px 7px; border-radius: 6px;
  color: var(--berry-600); font-weight: 700;
}
.contact-card {
  margin: 18px 0; padding: 20px 22px;
  background: linear-gradient(135deg, #fff, var(--cloud));
  border: 1px solid var(--border); border-radius: 14px;
}
.contact-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.contact-card p { font-size: 14px; margin-bottom: 4px; }
.contact-card p:last-child { margin-bottom: 0; }
.note { background: var(--cloud); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 16px 0; font-size: 14.5px; }
.note strong { color: var(--berry-600); }
.en-note { background: #fff; border: 1.5px dashed var(--border); border-radius: 14px; padding: 16px 20px; margin: 0 0 32px; font-size: 13.5px; color: var(--text-muted); font-style: italic; }

/* ---- FOOTER ---- */
footer {
  background: #fff; padding: 64px 0 32px;
  border-top: 1px solid var(--border);
}
footer .footer-grid {
  max-width: 1152px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  margin-bottom: 56px;
}
footer .footer-brand { grid-column: 1; }
footer .footer-brand p { color: #4b5563; font-size: 14px; line-height: 1.6; margin-top: 20px; }
footer .footer-brand .company { color: #9ca3af; font-size: 14px; margin-top: 16px; }
footer h4 { font-size: 14px; font-weight: 600; color: #9ca3af; margin-bottom: 16px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
footer ul a {
  font-size: 14px; font-weight: 500; color: #4b5563;
  text-decoration: none; transition: color 0.2s;
}
footer ul a:hover { color: var(--berry-500); }
footer .footer-bottom {
  max-width: 1152px; margin: 0 auto; padding: 32px 24px 0;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  font-size: 14px; color: #9ca3af;
}
footer .footer-bottom a { color: #6b7280; text-decoration: none; font-weight: 500; }
footer .footer-bottom a:hover { color: var(--text); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 32px; padding: 36px 24px 60px; }
  .doc-toc {
    position: static; padding: 20px;
    background: var(--cloud); border-radius: 16px; border: 1px solid var(--border);
  }
  .doc-toc h4 { margin-bottom: 12px; }
  .doc-toc ol { gap: 4px; }
  .doc-toc a { padding: 4px 8px; font-size: 13px; }
  article h2 { font-size: 20px; }
  footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  nav .nav-inner { height: 60px; }
  .doc-header { padding: 36px 0 24px; }
  footer .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
