/* Infoscopex - Main Styles */

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --color-primary: #2b3a67; /* Deep Slate Blue */
  --color-accent: #2d5f5d; /* Nordic Pine */
  --color-background: #f7f7f5; /* Porcelain White */
  --color-border: #d9d9d6; /* Mist Grey */
  --color-highlight: #ba8b5e; /* Copper Sand */
  --color-text: #2b3a67;
  --color-text-light: #666;
  --color-white: #ffffff;

  /* Typography */
  --font-primary: "Lora", serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  --line-height-tight: 1.4;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;

  /* Breakpoints */
  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-large: 1440px;
  --bp-xlarge: 1920px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Base Typography */
html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.375rem;
  }
}

/* Text Elements */
p {
  margin-bottom: var(--spacing-sm);
}

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

a:hover,
a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Lists */
ul,
ol {
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

/* Header */
.header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-normal);
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(43, 58, 103, 0.1);
}

.header-top {
  padding: var(--spacing-md) 0;
  text-align: center;
}

.logo h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--color-primary);
}

.logo a {
  color: inherit;
  text-decoration: none;
}

.logo a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* Navigation */
.nav {
  border-top: 1px solid var(--color-border);
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  position: absolute;
  right: var(--spacing-sm);
  top: 50%;
  transform: translateY(-50%);
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 5px 0;
  transition: var(--transition-normal);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-highlight);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
  width: 80%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    flex-direction: column;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 5px 15px rgba(43, 58, 103, 0.1);
  }

  .nav-list.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link::after {
    display: none;
  }
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

/* Sections */
.section {
  padding: var(--spacing-xxl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  font-size: 2.25rem;
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-xl) 0;
  }

  .section-title {
    font-size: 1.875rem;
    margin-bottom: var(--spacing-lg);
  }
}

/* Page Header */
.page-header {
  background-color: var(--color-white);
  padding: var(--spacing-xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
}

.last-updated {
  font-size: 0.875rem;
  color: var(--color-text-light);
  font-style: italic;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(43, 58, 103, 0.8), rgba(45, 95, 93, 0.6));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--color-white);
  text-align: center;
  width: 100%;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    min-height: 50vh;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-xxl);
}

.footer-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 var(--spacing-lg) 0;
  padding: 0;
  gap: var(--spacing-lg);
}

.footer-nav a {
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-highlight);
  text-decoration: underline;
}

.footer-info {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-info p {
  margin-bottom: var(--spacing-xs);
}

.disclaimer {
  font-weight: 600;
  color: var(--color-white) !important;
}

@media (max-width: 768px) {
  .footer-nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-md);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

.cookie-content p {
  margin: 0;
  flex: 1;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
}

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

/* Focus styles */
*:focus {
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}
