/* =========================================
   Monty — shared stylesheet
   ========================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #6B7280;
  background: #F9F9F9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Design tokens ---- */
:root {
  --primary:        #4F46E5;
  --primary-light:  #6366F1;
  --primary-dark:   #4338CA;
  --bg:             #F9F9F9;
  --card:           #FFFFFF;
  --dark:           #1E1B4B;
  --body:           #6B7280;
  --border:         #E5E7EB;
  --accent-tint:    #EEF2FF;
  --success:        #10B981;
  --error:          #EF4444;

  --radius-card: 16px;
  --radius-pill: 9999px;

  --shadow-card:       0 2px 16px rgba(79,70,229,.07), 0 1px 3px rgba(79,70,229,.04);
  --shadow-card-hover: 0 8px 32px rgba(79,70,229,.13), 0 2px 8px rgba(79,70,229,.06);
  --shadow-btn:        0 2px 14px rgba(79,70,229,.32);
  --shadow-btn-hover:  0 4px 22px rgba(79,70,229,.42);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  color: #1E1B4B;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a { color: #4F46E5; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Accessibility ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ============================
   NAVIGATION
   ============================ */
.nav {
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-logo {
  width: 32px;
  height: 32px;
  color: #4F46E5;
  flex-shrink: 0;
}
.nav-wordmark {
  font-weight: 700;
  font-size: 1.1875rem;
  color: #1E1B4B;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: #4F46E5;
  text-decoration: none;
}
.nav-links a:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 3px;
  border-radius: 4px;
}
.nav-links a[aria-current="page"] {
  color: #4F46E5;
  font-weight: 600;
}

/* ============================
   HERO
   ============================ */
.hero {
  text-align: center;
  padding: 96px 24px 80px;
}
.hero-paw {
  width: 68px;
  height: 68px;
  color: #4F46E5;
  margin: 0 auto 28px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1E1B4B;
  max-width: 760px;
  margin: 0 auto 20px;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: #6B7280;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
}

/* ============================
   BUTTON
   ============================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4F46E5;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 34px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 14px rgba(79,70,229,.32);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  background: #4338CA;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(79,70,229,.42);
  text-decoration: none;
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 8px rgba(79,70,229,.25);
}
.btn-primary:focus-visible {
  outline: 3px solid #6366F1;
  outline-offset: 3px;
}

/* ============================
   FEATURES
   ============================ */
.features {
  padding: 16px 0 100px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 2px 16px rgba(79,70,229,.07), 0 1px 3px rgba(79,70,229,.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(79,70,229,.13), 0 2px 8px rgba(79,70,229,.06);
}
.feature-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #EEF2FF;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 20px;
  line-height: 1;
}
.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1E1B4B;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 0.9375rem;
  color: #6B7280;
  line-height: 1.65;
}

/* ============================
   FOOTER
   ============================ */
.footer {
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-copy {
  font-size: 0.875rem;
  color: #6B7280;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  align-items: center;
}
.footer-links a {
  font-size: 0.875rem;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: #4F46E5;
  text-decoration: none;
}
.footer-links a:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
  border-radius: 3px;
}
.footer-sep {
  color: #E5E7EB;
}

/* ============================
   LEGAL PAGES
   ============================ */
.legal-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid #E5E7EB;
}
.legal-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 0.875rem;
  color: #6B7280;
}

.legal-content {
  padding: 52px 0 100px;
}
.legal-body {
  max-width: 720px;
}
.legal-body h2 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: #1E1B4B;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p {
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 0.9375rem;
}
.legal-body ul {
  margin: 0 0 16px 20px;
  line-height: 1.75;
}
.legal-body ul li {
  font-size: 0.9375rem;
  margin-bottom: 6px;
}
.legal-body a { color: #4F46E5; }
.legal-body a:hover { text-decoration: underline; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 640px) {
  .hero {
    padding: 64px 16px 56px;
  }
  .features {
    padding: 16px 0 72px;
  }
  .features-grid {
    gap: 16px;
  }
  .feature-card {
    padding: 24px 20px;
  }
  .nav-links {
    gap: 18px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .legal-header {
    padding: 48px 0 28px;
  }
  .legal-content {
    padding: 36px 0 72px;
  }
}

/* ============================
   COOKIE BANNER
   ============================ */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 360px;
  width: calc(100% - 3rem);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(79,70,229,.1), 0 2px 8px rgba(79,70,229,.06);
  z-index: 200;
}
#cookie-banner.show { display: block; }
#cookie-banner p {
  font-size: .875rem;
  color: #6B7280;
  line-height: 1.65;
  margin-bottom: .875rem;
}
.cookie-banner-title {
  font-weight: 700;
  font-size: .9rem;
  color: #1E1B4B;
  margin-bottom: .3rem;
}
.cookie-btns { display: flex; gap: .5rem; flex-wrap: wrap; }

.btn-cookie-accept {
  display: inline-flex; align-items: center;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .875rem;
  padding: .5rem 1.125rem; border-radius: 9999px;
  background: #4F46E5; color: #FFFFFF; border: none; cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.btn-cookie-accept:hover { background: #4338CA; }
.btn-cookie-accept:active { transform: translateY(1px); }

.btn-cookie-settings {
  display: inline-flex; align-items: center;
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: .875rem;
  padding: .5rem 1.125rem; border-radius: 9999px;
  background: transparent; color: #4F46E5;
  border: 1px solid #6366F1; cursor: pointer;
  transition: background .15s ease;
}
.btn-cookie-settings:hover { background: #EEF2FF; }

.btn-cookie-reject {
  display: inline-flex; align-items: center;
  font-family: 'Inter', sans-serif; font-weight: 400; font-size: .875rem;
  padding: .5rem 1.125rem; border-radius: 9999px;
  background: transparent; color: #6B7280;
  border: 1px solid #E5E7EB; cursor: pointer;
  transition: background .15s ease;
}
.btn-cookie-reject:hover { background: #F9F9F9; }

/* ============================
   COOKIE SETTINGS MODAL
   ============================ */
#cookie-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(30,27,75,.4);
  z-index: 300;
  align-items: center; justify-content: center;
  padding: 1rem;
}
#cookie-overlay.show { display: flex; }

.cookie-modal {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 2rem;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(79,70,229,.15);
}
.cookie-modal h3 {
  font-size: 1.125rem; font-weight: 800;
  letter-spacing: -0.02em; color: #1E1B4B;
  margin-bottom: .5rem;
}
.cookie-modal > p {
  font-size: .875rem; color: #6B7280;
  line-height: 1.65; margin-bottom: 1.5rem;
}
.cookie-item {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1.5rem;
  padding: .875rem 0; border-top: 1px solid #E5E7EB;
}
.ci-title { font-weight: 600; font-size: .9375rem; color: #1E1B4B; margin-bottom: .2rem; }
.ci-desc  { font-size: .8125rem; color: #6B7280; line-height: 1.6; }

.toggle-wrap { position: relative; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 9999px;
  background: #E5E7EB; cursor: pointer; transition: background .2s;
}
.toggle-track::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; top: 3px; left: 3px;
  border-radius: 9999px; background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.toggle-wrap input:checked ~ .toggle-track { background: #4F46E5; }
.toggle-wrap input:checked ~ .toggle-track::before { transform: translateX(20px); }
.toggle-disabled { opacity: .5; pointer-events: none; }
.cookie-modal-actions { display: flex; gap: .75rem; margin-top: 1.375rem; flex-wrap: wrap; }

/* ============================
   FOOTER COOKIE BUTTON
   ============================ */
.footer-cookie-btn {
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  color: #6B7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color .15s ease;
}
.footer-cookie-btn:hover  { color: #4F46E5; }
.footer-cookie-btn:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================
   REDUCED MOTION
   ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
