/* 
   Peak Passport - Legal Pages Style Sheet
   Aesthetic: Premium, Adventurous, Clean White Theme with Deep Green and Yellow Accents.
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  /* Color Palette */
  --bg-primary: #FAF9F6;       /* Warm soft off-white background */
  --bg-secondary: #FFFFFF;     /* Pure white for cards and headers */
  --bg-accent-soft: #F0F4F0;   /* Light sage tint for subtle highlights */
  
  --text-main: #1C2E1E;        /* Very dark forest green/charcoal for premium text contrast */
  --text-muted: #556B58;       /* Sage/greenish gray for subtext and descriptions */
  
  --color-forest: #1E4620;     /* Primary brand color - deep green from logo */
  --color-forest-hover: #122B14;
  --color-yellow: #F9D342;     /* Accent color - vibrant sunlit yellow */
  --color-yellow-hover: #E4C036;
  
  --border-color: #E2E8F0;     /* Clean border line color */
  --border-accent: #1E4620;
  
  /* Layout and Spacing */
  --max-width-content: 840px;  /* Optimal reading width for documents */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadow & Transitions */
  --shadow-sm: 0 2px 4px rgba(30, 70, 32, 0.04);
  --shadow-md: 0 10px 30px rgba(30, 70, 32, 0.06);
  --shadow-lg: 0 20px 40px rgba(30, 70, 32, 0.1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base & Reset Rules --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 76px; /* Height of the fixed header */
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-forest);
}

/* For modern scrollbar-width (Firefox) */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: #CBD5E1 var(--bg-primary);
    scrollbar-width: thin;
  }
}

/* --- Container & Layouts --- */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header & Navigation --- */
.main-header {
  background-color: #FFFFFF !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  padding: 16px 0 !important;
  transition: var(--transition-smooth);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.brand-wrapper:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.app-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-yellow);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
  color: var(--color-forest);
  background-color: var(--bg-accent-soft);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.nav-home-btn:hover {
  background-color: var(--color-forest);
  color: var(--bg-secondary);
}

/* --- Hero Section (Homepage) --- */
.hero {
  padding: 80px 0 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(249, 211, 66, 0.15) 0%, rgba(250, 249, 246, 0) 70%);
}

.hero-logo-wrapper {
  display: inline-block;
  position: relative;
  margin-bottom: 24px;
}

.hero-logo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--color-yellow);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  animation: float 6s ease-in-out infinite;
}

.hero-logo-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px dashed var(--color-forest);
  border-radius: 50%;
  opacity: 0.4;
  animation: rotate 30s linear infinite;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--color-forest);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

/* --- Dashboard / Card Links (Homepage) --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.legal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 32px;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.legal-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-smooth);
}

.legal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-forest);
}

.legal-card:hover::after {
  transform: scaleX(1);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-accent-soft);
  color: var(--color-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
  transition: var(--transition-smooth);
}

.legal-card:hover .card-icon {
  background-color: var(--color-forest);
  color: var(--bg-secondary);
}

.legal-card h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.legal-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 24px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-forest);
}

.card-link svg {
  transition: var(--transition-smooth);
}

.legal-card:hover .card-link svg {
  transform: translateX(4px);
}

/* --- Document Section (Policy & Terms) --- */
.document-container {
  padding: 40px 0 80px;
}

.document-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
}

.doc-header {
  border-bottom: 2px solid var(--bg-accent-soft);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.doc-header h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-forest);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.doc-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-meta::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-yellow);
  border-radius: 50%;
}

.doc-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
}

.doc-content p {
  margin-bottom: 20px;
}

.doc-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-forest);
  margin-top: 40px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  border-left: 4px solid var(--color-yellow);
  padding-left: 12px;
}

.doc-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 24px;
  margin-bottom: 8px;
}

.doc-content ul, .doc-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.doc-content li {
  margin-bottom: 10px;
}

.doc-content li strong {
  color: var(--color-forest);
}

.doc-content hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 32px 0;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Internal redirect button on document footers */
.doc-redirect-container {
  width: 100%;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 32px;
  margin-bottom: 20px;
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--color-forest);
  border: 2px solid var(--color-forest);
  padding: 12px 28px;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.btn-secondary-action:hover {
  background-color: var(--color-forest);
  color: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-yellow);
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.powered-by {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.powered-by a {
  color: var(--color-forest);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--color-yellow);
  padding-bottom: 1px;
  transition: var(--transition-smooth);
}

.powered-by a:hover {
  color: var(--color-forest-hover);
  border-bottom-color: var(--color-forest);
}

/* --- Animations --- */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 30px;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .document-card {
    padding: 24px;
    border-radius: var(--border-radius-md);
  }
  
  .doc-header h1 {
    font-size: 1.75rem;
  }
  
  .legal-card {
    padding: 24px;
  }
}
