/* ============================================
   Hortus Logbook - Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-primary: #2d6a4f;
  --color-primary-dark: #1b4332;
  --color-primary-light: #52b788;
  --color-primary-bg: #f0f7f2;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-border: #e5e7eb;
  --color-white: #ffffff;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Layout */
  --max-width: 1120px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

ul { list-style: none; }

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--space-xl) 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* Multilingual content: hide by default, show active */
.lang-content { display: none; }
.lang-content.active { display: block; }

/* Skip to content (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
  color: var(--color-white);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-text);
}

.header-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.header-brand span {
  font-weight: 600;
  font-size: 1.125rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Language Selector --- */
.lang-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
}

.lang-btn {
  padding: 0.3rem 0.6rem;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-white:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* --- Hero Section --- */
.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-primary-bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-tagline {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.hero-tagline span {
  color: var(--color-primary);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-screenshot {
  max-width: 420px;
  width: 100%;
}

.screenshot-placeholder {
  width: 280px;
  height: 500px;
  background: linear-gradient(145deg, var(--color-primary-bg), #d8f3dc);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem;
}

/* --- Features Section --- */
.features {
  background: var(--color-bg);
}

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Trust / Privacy Section --- */
.trust {
  background: var(--color-primary-bg);
}

.trust-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.trust-icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.trust-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-white);
}

.trust-points {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: var(--space-md);
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.trust-point {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.trust-check {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-check svg {
  width: 16px;
  height: 16px;
  color: var(--color-white);
}

/* --- CTA Section --- */
.cta {
  background: var(--color-primary);
  text-align: center;
}

.cta h2 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.google-play-badge {
  height: 60px;
  transition: transform 0.2s;
}

.google-play-badge:hover {
  transform: scale(1.05);
}

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-lg) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: var(--space-lg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand span {
  color: var(--color-white);
  font-weight: 600;
  font-size: 1.05rem;
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-heading {
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: var(--color-white);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  z-index: 200;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.cookie-text a {
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.cookie-accept {
  background: var(--color-primary);
  color: var(--color-white);
}

.cookie-accept:hover {
  background: var(--color-primary-dark);
}

.cookie-reject {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.cookie-reject:hover {
  background: var(--color-border);
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Legal / Privacy Pages --- */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-page main {
  flex: 1;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem;
}

.legal-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.legal-header h1 {
  color: var(--color-white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal-header p {
  opacity: 0.85;
  font-size: 0.9rem;
}

.legal-body {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
}

.legal-body h2 {
  color: var(--color-primary);
  font-size: 1.3rem;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  margin: 1rem 0;
  color: var(--color-text);
  line-height: 1.7;
}

.legal-body ul {
  padding-left: 1.25rem;
  list-style: disc;
  margin: 1rem 0;
}

.legal-body li {
  margin-bottom: 0.5rem;
  color: var(--color-text);
  line-height: 1.6;
}

.legal-body a {
  text-decoration: underline;
}

.summary-box {
  background: var(--color-primary-bg);
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.summary-box strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.permission-item {
  margin-bottom: 1rem;
}

.permission-item strong {
  color: var(--color-primary);
}

.legal-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }

  .hero-tagline {
    font-size: 2.6rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .section {
    padding: var(--space-lg) 0;
  }

  .header-inner {
    height: 56px;
  }

  .header-brand span {
    display: none;
  }

  .hero {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }

  .hero-tagline {
    font-size: 2.2rem;
  }

  .hero-cta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-visual {
    order: -1;
  }

  .screenshot-placeholder,
  .app-screenshot {
    max-width: 280px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* Cookie banner stacks on mobile */
  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  /* Legal pages */
  .legal-body {
    padding: 1.5rem;
  }

  .legal-header {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .lang-selector {
    gap: 0.15rem;
  }

  .lang-btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.75rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .hero-tagline {
    font-size: 1.85rem;
  }
}
