/* ================================================================
   IRENOXIS - Institutional Knowledge Portal
   Design System: Dark Institutional Aesthetic
   ================================================================ */

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

/* CSS Variables - Color System */
:root {
  --primary-dark: #1A2E44;
  --light-gray: #E0E0E0;
  --warm-beige: #D4B89C;
  --muted-green: #6B8E7A;
  --white: #FFFFFF;
  --black: #000000;
  --text-dark: #1A1A1A;
  --text-light: #FFFFFF;
  --border-light: #D0D0D0;
  
  /* Spacing System */
  --space-xs: 20px;
  --space-sm: 40px;
  --space-md: 60px;
  --space-lg: 80px;
  
  /* Typography */
  --font-serif: 'Lora', serif;
  --font-sans: 'Inter', sans-serif;
}

/* ================================================================
   RESET & BASE STYLES
   ================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}

/* ================================================================
   TYPOGRAPHY
   ================================================================ */

h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-md);
}

h3 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-xs);
  margin-top: var(--space-sm);
}

h4 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
  color: var(--text-dark);
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

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

ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

li {
  margin-bottom: 0.8rem;
}

/* ================================================================
   LAYOUT - CONTAINERS & GRID
   ================================================================ */

.container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.content-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-xs);
}

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

.section-hero {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: 120px var(--space-xs);
  background-image: url('../images/hero-macronutrients.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.section-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 46, 68, 0.75);
  z-index: 1;
}

.section-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.section-hero h1 {
  color: var(--text-light);
  font-size: 4rem;
  margin-bottom: var(--space-md);
}

.section-light {
  background-color: var(--white);
}

.section-light-gray {
  background-color: var(--light-gray);
}

.section-dark {
  background-color: var(--primary-dark);
  color: var(--text-light);
}

.section-dark h2,
.section-dark h3 {
  color: var(--text-light);
}

.section-dark a {
  color: var(--warm-beige);
}

.section-dark a:hover {
  color: var(--light-gray);
}

/* ================================================================
   GRID LAYOUTS
   ================================================================ */

.grid {
  display: grid;
  gap: var(--space-md);
}

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

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.grid-image-text {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.grid-image-text.reverse {
  direction: rtl;
}

.grid-image-text.reverse > * {
  direction: ltr;
}

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

/* ================================================================
   HEADER & NAVIGATION
   ================================================================ */

header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem var(--space-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
  margin: 0;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-dark);
  position: relative;
  padding-bottom: 0.5rem;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--warm-beige);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* ================================================================
   CARDS
   ================================================================ */

.card {
  background-color: var(--white);
  border: 1px solid var(--border-light);
  padding: var(--space-sm);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-dark {
  background-color: var(--light-gray);
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--primary-dark);
  background-color: var(--primary-dark);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.btn:hover {
  background-color: var(--warm-beige);
  border-color: var(--warm-beige);
  color: var(--text-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background-color: var(--primary-dark);
  color: var(--text-light);
}

.btn-light {
  background-color: var(--light-gray);
  border-color: var(--light-gray);
  color: var(--text-dark);
}

.btn-light:hover {
  background-color: var(--white);
  border-color: var(--primary-dark);
}

/* ================================================================
   FORMS
   ================================================================ */

form {
  max-width: 600px;
  margin: var(--space-md) 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-dark);
}

input[type="text"],
input[type="email"],
input[type="phone"],
textarea,
select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-light);
  background-color: var(--white);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="phone"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--warm-beige);
  box-shadow: 0 0 0 3px rgba(212, 184, 156, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ================================================================
   FOOTER
   ================================================================ */

footer {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: var(--space-lg) var(--space-xs);
  margin-top: var(--space-lg);
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column h4 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
}

.footer-column a {
  color: var(--light-gray);
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: var(--warm-beige);
}

.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: var(--space-sm);
  text-align: center;
  font-size: 0.9rem;
  color: var(--light-gray);
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

/* ================================================================
   IMAGES & MEDIA
   ================================================================ */

.image-section {
  margin: var(--space-md) 0;
  overflow: hidden;
}

.image-section img {
  width: 100%;
  height: auto;
  display: block;
}

.image-small {
  max-width: 500px;
  width: 100%;
  height: auto;
}

.image-medium {
  max-width: 800px;
  width: 100%;
  height: auto;
}

/* ================================================================
   DIVIDERS & DECORATIVE ELEMENTS
   ================================================================ */

.divider {
  width: 60px;
  height: 3px;
  background-color: var(--warm-beige);
  margin: var(--space-sm) 0;
}

.quote-block {
  border-left: 4px solid var(--warm-beige);
  padding-left: var(--space-sm);
  margin: var(--space-md) 0;
  font-style: italic;
  color: var(--primary-dark);
}

/* ================================================================
   DISCLAIMER & COMPLIANCE SECTIONS
   ================================================================ */

.disclaimer-section {
  background-color: var(--light-gray);
  border-left: 4px solid var(--muted-green);
  padding: var(--space-sm);
  margin: var(--space-md) 0;
  border-radius: 0;
}

.disclaimer-section h3 {
  color: var(--primary-dark);
  margin-top: 0;
}

.disclaimer-section p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.disclaimer-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

/* ================================================================
   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-width: 0;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .grid-2,
  .grid-image-text {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  
  nav ul {
    gap: 2rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xs: 16px;
    --space-sm: 24px;
    --space-md: 40px;
    --space-lg: 60px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .section-hero {
    min-height: 400px;
    padding: 60px var(--space-xs);
  }
  
  .section-hero h1 {
    font-size: 2rem;
  }
  
  nav ul {
    display: none;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

@media print {
  header,
  footer,
  .no-print {
    display: none;
  }
  
  body {
    background-color: var(--white);
    color: var(--text-dark);
  }
}
