/* Recipe Scout Legal Documents - Unified Styles */
/* Matching the design system from www/index.html */

@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

:root {
  --txtrgb: 0, 0, 0;
  --bgrgb: 255, 255, 255;

  --bg1: #FFFFFF;
  --bg2: #F8F8F8;

  --purple1: #EEE7FF;
  --purple2: #F8EDFA;
  --purple3: #E5DAFF;
  --purple4: #D0BCFF;
  --purple5: #9373DF;
  --purple6: #4F378A;
  --purple7: #7258b2;

  --txt1: #000000;
  --txt2: #444559;
}

* {
  -webkit-tap-highlight-color: transparent;
  font-family: "Figtree", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overscroll-behavior: none;
}

body {
  background: var(--purple1);
  color: var(--txt1);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  margin: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overscroll-behavior: none;
}

/* Header */
header {
  background: var(--bg1);
  border-bottom: 1px solid rgba(var(--txtrgb), 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--txt1);
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--txt1);
  margin: 0;
  letter-spacing: -0.5px;
}

.logo-text p {
  font-size: 13px;
  font-weight: 500;
  color: var(--txt2);
  margin: 0;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  color: var(--txt2);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 40px;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid rgba(var(--txtrgb), 0.15);
}

nav a:hover {
  background: var(--purple2);
  transform: scale(0.98);
}

nav a.active {
  background: var(--purple4);
  color: var(--txt1);
  border-color: var(--purple4);
}

/* Main Content */
main {
  background: var(--bg1);
  border-radius: 40px;
  padding: 40px;
  margin: 20px auto;
  max-width: 900px;
}

/* Typography */
h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--txt1);
  margin-bottom: 10px;
  line-height: 1.1;
  letter-spacing: -1px;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--txt1);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--txtrgb), 0.1);
  letter-spacing: -0.5px;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--txt1);
  margin-top: 30px;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--txt2);
  margin-top: 20px;
  margin-bottom: 10px;
}

p {
  margin-bottom: 16px;
  color: var(--txt2);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.7;
}

/* Metadata */
.metadata {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 18px 20px;
  background: var(--purple2);
  border-radius: 26px;
  border: 1px solid rgba(var(--txtrgb), 0.1);
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metadata-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--txt2);
  letter-spacing: 0.5px;
}

.metadata-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--purple5);
}

/* Lists */
ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--txt2);
}

li {
  margin-bottom: 10px;
  padding-left: 8px;
  font-size: 16px;
  font-weight: 450;
  line-height: 1.6;
}

li::marker {
  color: var(--purple5);
}

/* Links */
a {
  color: var(--purple5);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 600;
}

a:hover {
  color: var(--purple6);
  text-decoration: underline;
}

/* Emphasis */
strong {
  color: var(--txt1);
  font-weight: 700;
}

em {
  color: var(--purple5);
  font-style: italic;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid rgba(var(--txtrgb), 0.1);
  margin: 30px 0;
}

/* Table of Contents */
.toc {
  background: var(--purple1);
  border-radius: 26px;
  padding: 24px;
  margin-bottom: 40px;
  border: 1px solid rgba(var(--txtrgb), 0.1);
}

.toc h2 {
  margin-top: 0;
  font-size: 20px;
  border-bottom: none;
  margin-bottom: 16px;
  color: var(--txt1);
}

.toc ul {
  list-style: none;
  margin-left: 0;
}

.toc li {
  padding-left: 0;
  margin-bottom: 8px;
}

.toc a {
  display: block;
  padding: 10px 16px;
  border-radius: 20px;
  transition: all 0.2s ease;
  color: var(--txt2);
  font-weight: 600;
  font-size: 15px;
}

.toc a:hover {
  background: var(--purple3);
  color: var(--txt1);
  text-decoration: none;
  transform: translateX(4px);
}

/* Callout Boxes */
.callout {
  padding: 20px 24px;
  border-radius: 26px;
  margin: 24px 0;
  border: 1px solid rgba(var(--txtrgb), 0.1);
  background: var(--purple2);
}

.callout p {
  margin-bottom: 0;
}

.callout.warning {
  background: #FFF4E6;
  border-color: #FFB74D;
}

.callout.info {
  background: var(--purple1);
  border-color: var(--purple4);
}

.callout.important {
  background: #FFEBEE;
  border-color: #EF5350;
}

/* Section Styling */
section {
  margin-bottom: 40px;
}

section:last-of-type {
  margin-bottom: 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--txt2);
  font-size: 14px;
  font-weight: 500;
  max-width: 900px;
  margin: 0 auto;
}

footer p {
  margin-bottom: 8px;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--purple4);
  color: var(--txt1);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
  font-size: 24px;
  font-weight: 600;
  border: 1px solid rgba(var(--txtrgb), 0.1);
}
.back-to-top > svg {
  height: 22px;
  width: 22px;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--purple5);
  transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 24px 20px;
    margin: 15px;
    border-radius: 30px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 20px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
  }

  nav a {
    flex: 1;
    text-align: center;
    min-width: 120px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }

  .metadata {
    gap: 16px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }

  header {
    position: static;
    box-shadow: none;
    border-bottom: 1px solid #ddd;
  }

  main {
    box-shadow: none;
    padding: 0;
    margin: 20px 0;
  }

  .back-to-top,
  nav {
    display: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .callout {
    border: 1px solid #ddd;
    background: #f5f5f5;
  }
}

/* Smooth Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: fadeIn 0.4s ease;
}
