/* ============================================
   FOUNDATION
   ============================================ */

/* CSS Custom Properties */
:root {
  /* Color Palette */
  --color-text-primary: #1a1a1a;        /* Near-black for headlines */
  --color-text-body: #2d2d2d;           /* Deep graphite for body text */
  --color-bg-primary: #f0f2f5;          /* Very light blue-gray */
  --color-bg-secondary: #e8ebef;        /* Soft blue-gray */
  --color-accent: #5b6c8d;               /* Muted indigo */
  --color-accent-micro: #d97706;         /* Warm amber (sparingly) */
  
  /* Theme variable names (used throughout components) */
  --theme-text: var(--color-text-body);
  --theme-text-heading: var(--color-text-primary);
  --theme-background: var(--color-bg-primary);
  --theme-bg: var(--color-bg-primary);
  --theme-card-bg: #f8f9fa;               /* Slightly lighter blue-gray for cards */
  --theme-button-bg: #f8f9fa;
  --theme-input-bg: #f8f9fa;
  --theme-accent: var(--color-accent);
  --theme-text-on-primary: #ffffff;
  
  /* Borders and subtle elements */
  --theme-card-border: rgba(26, 26, 26, 0.08);
  
  /* Status colors (minimal, functional) */
  --theme-error: #dc2626;
  --theme-success: #16a34a;
  --theme-warning: var(--color-accent-micro);
  --theme-info: var(--color-accent);
  
  /* Typography */
  --theme-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --theme-font-logo: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Line heights */
  --line-height-body: 1.65;
  --line-height-heading: 1.2;
  
  /* Max content width for readability */
  --max-width-content: 65ch;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Header height */
  --header-height: 4rem;
}

/* Base Styles */
* {
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body {
  font-family: var(--theme-font-sans);
  background-color: var(--theme-background);
  color: var(--theme-text);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--theme-text-heading);
  font-family: var(--theme-font-sans);
  line-height: var(--line-height-heading);
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Global link styles */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:not(.header__link):not(.footer__link):not(.btn) {
  border-bottom: 1px solid transparent;
}

a:not(.header__link):not(.footer__link):not(.btn):hover {
  border-bottom-color: var(--color-accent);
}

/* Form elements */
input, textarea, select {
  background-color: var(--theme-input-bg);
  color: var(--theme-text);
  border: 1px solid var(--theme-card-border);
  border-radius: 4px;
  padding: 0.5rem;
  transition: border-color 0.2s ease;
  font-family: var(--theme-font-sans);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(91, 108, 141, 0.1);
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */

/* Header Component */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: var(--theme-card-bg);
  border-bottom: 1px solid var(--theme-card-border);
  z-index: 1000;
  height: var(--header-height);
}

.header__container {
  max-width: 80rem; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

@media (min-width: 1024px) {
  .header__container {
    padding: 0 var(--spacing-xl);
  }
}

.header__logo {
  font-family: var(--theme-font-logo);
  color: var(--theme-text-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1.875rem;
  line-height: 2.25rem;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  text-decoration: none;
  border-bottom: none;
}

.header__logo:hover {
  color: var(--theme-text-heading);
  border-bottom: none;
}

.header__nav {
  display: none;
  align-items: center;
  gap: var(--spacing-xl);
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__link {
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header__link:hover {
  color: var(--color-accent);
  border-bottom: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header__menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--theme-text);
  transition: color 0.2s ease;
}

.header__menu-toggle:hover {
  color: var(--color-accent);
}

.header__menu-toggle:focus {
  outline: none;
}

@media (min-width: 768px) {
  .header__menu-toggle {
    display: none;
  }
  
  .header__actions .header__lang-switcher {
    display: none;
  }
}

/* Mobile Menu */
.header__mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: 0;
  background-color: var(--theme-card-bg);
  border-left: 1px solid var(--theme-card-border);
  border-bottom: 1px solid var(--theme-card-border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-md);
  min-width: 12rem;
  display: none;
  flex-direction: column;
  gap: var(--spacing-md);
  z-index: 999;
}

.header__mobile-menu.is-open {
  display: flex;
}

@media (min-width: 768px) {
  .header__mobile-menu {
    display: none !important;
  }
}

.header__mobile-link {
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: none;
  padding: var(--spacing-sm) 0;
  transition: color 0.2s ease;
}

.header__mobile-link:hover {
  color: var(--color-accent);
  border-bottom: none;
}

/* Language Switcher */
.header__lang-switcher {
  position: relative;
}

.header__lang-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: var(--theme-text);
  transition: color 0.2s ease;
}

.header__lang-button:hover {
  color: var(--color-accent);
}

.header__lang-button:focus {
  outline: none;
}

.header__lang-dropdown {
  position: absolute;
  top: calc(100% + var(--spacing-sm));
  right: 0;
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
}

.header__lang-switcher:hover .header__lang-dropdown {
  opacity: 1;
  visibility: visible;
}

.header__lang-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--spacing-sm) var(--spacing-md);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--theme-text);
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header__lang-option:hover {
  background-color: var(--theme-background);
}

.header__lang-option:focus {
  outline: none;
}

/* Footer Component */
.footer {
  background-color: var(--theme-card-bg);
  color: var(--theme-text);
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--theme-card-border);
  margin-top: var(--spacing-3xl);
}

.footer__container {
  max-width: 80rem; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

@media (min-width: 1024px) {
  .footer__container {
    padding: 0 var(--spacing-xl);
  }
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

@media (min-width: 768px) {
  .footer__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.footer__logo {
  font-family: var(--theme-font-logo);
  color: var(--theme-text-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1.5rem;
  line-height: 2rem;
  text-decoration: none;
  border-bottom: none;
  display: inline-block;
}

.footer__logo:hover {
  color: var(--theme-text-heading);
  border-bottom: none;
}

.footer__tagline {
  color: var(--theme-text);
  opacity: 0.7;
  margin: 0;
}

.footer__social {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
}

.footer__social-link:hover {
  color: var(--color-accent);
  border-bottom: none;
}

.footer__section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.footer__section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--theme-text);
  margin: 0;
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer__link {
  color: var(--theme-text);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
}

.footer__link:hover {
  color: var(--color-accent);
  border-bottom: none;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--theme-card-border);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
  }
}

.footer__copyright {
  font-size: 0.875rem;
  color: var(--theme-text);
  opacity: 0.7;
  margin: 0;
}

.footer__lang-switcher {
  position: relative;
}

.footer__lang-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: var(--theme-text);
  transition: color 0.2s ease;
}

.footer__lang-button:hover {
  color: var(--color-accent);
}

.footer__lang-button:focus {
  outline: none;
}

.footer__lang-dropdown {
  position: absolute;
  bottom: calc(100% + var(--spacing-sm));
  right: 0;
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
}

.footer__lang-switcher:hover .footer__lang-dropdown {
  opacity: 1;
  visibility: visible;
}

.footer__lang-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--spacing-sm) var(--spacing-md);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--theme-text);
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer__lang-option:hover {
  background-color: var(--theme-background);
}

.footer__lang-option:focus {
  outline: none;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height) - 0.5rem);
  margin-top: calc(var(--header-height) + 0.5rem);
  align-items: stretch;
}

@media (min-width: 768px) {
  .hero-section {
    flex-direction: row;
    align-items: stretch;
  }
}

.hero-image-container {
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
}

@media (min-width: 768px) {
  .hero-image-container {
    width: 40%;
  }
}

.hero-image-container > a {
  display: flex;
  width: 100%;
  height: 100%;
}

.hero-text-container {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
}

@media (min-width: 768px) {
  .hero-text-container {
    width: 60%;
  }
}

/* ============================================
   CONTENT COMPONENTS
   ============================================ */

/* Logo styling is now handled by component classes:
   - .header__logo
   - .footer__logo
*/

/* Section Component */
.section {
  padding: var(--spacing-3xl) 0;
}

.section--default {
  background-color: var(--theme-background);
}

.section--card {
  background-color: var(--theme-card-bg);
}

.section__container {
  max-width: 80rem; /* max-w-7xl */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

@media (min-width: 1024px) {
  .section__container {
    padding: 0 var(--spacing-xl);
  }
}

.section__container--narrow {
  max-width: 56rem; /* max-w-4xl */
}

.section__container--medium {
  max-width: 72rem; /* max-w-6xl */
}

.section__container--content {
  max-width: 48rem; /* max-w-3xl */
}

.section__title {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--theme-text-heading);
  margin-bottom: var(--spacing-xl);
}

.section__title--center {
  text-align: center;
}

.section__subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--theme-text-heading);
  margin-bottom: var(--spacing-sm);
}

/* Content Component */
.content {
  max-width: 48rem; /* max-w-3xl */
}

.content__text {
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--theme-text);
  margin-bottom: var(--spacing-lg);
}

.content__list {
  list-style-type: disc;
  padding-left: var(--spacing-lg);
  margin: var(--spacing-md) 0;
}

.content__list-item {
  margin-bottom: var(--spacing-sm);
  line-height: 1.625;
}

.content__spacing {
  margin-bottom: var(--spacing-xl);
}

/* Button Component */
.btn {
  background-color: var(--theme-button-bg);
  color: var(--theme-text);
  border: 1px solid var(--theme-card-border);
  border-radius: 4px;
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: var(--theme-font-sans);
  border-bottom: none;
}

.btn:hover {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-accent);
  color: var(--theme-text);
  border-bottom: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--theme-text-on-primary);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background-color: #4a5a75;
  border-color: #4a5a75;
  color: var(--theme-text-on-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: var(--theme-text-on-primary);
  border-color: var(--color-accent);
}

/* Card Component */
.card {
  background-color: var(--theme-background);
  border: 1px solid var(--theme-card-border);
  border-radius: 0.5rem;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--theme-text-heading);
  margin-bottom: var(--spacing-md);
}

.card__subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--spacing-md);
}

.card__content {
  flex-grow: 1;
  margin-bottom: var(--spacing-md);
}

.card__content p {
  margin-bottom: var(--spacing-md);
  line-height: 1.625;
}

.card__content strong {
  font-weight: 600;
}

.card__list {
  list-style-type: disc;
  padding-left: var(--spacing-md);
  margin: var(--spacing-sm) 0;
}

.card__list-item {
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
  line-height: 1.625;
}

.card__footer {
  margin-top: auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--theme-card-border);
}

.card__price {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--theme-text-heading);
  margin-bottom: var(--spacing-xs);
}

.card__price-note {
  font-size: 0.875rem;
  color: var(--theme-text);
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Automatic section numbering for Terms of Service */
.prose {
  counter-reset: section-number;
}

.prose > section:not(.intro-section) {
  counter-increment: section-number;
}

.prose > section:not(.intro-section) > h2::before {
  content: counter(section-number, decimal-leading-zero) " ";
  font-weight: inherit;
}


/* ============================================
   UTILITIES
   Minimal set - only what's actually used
   ============================================ */

/* Typography utilities - For hero titles */
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

@media (min-width: 768px) {
  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
}

@media (min-width: 1024px) {
  .lg\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
  
  .lg\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.leading-tight {
  line-height: 1.25;
}

/* Spacing utilities - Minimal set for fine-tuning */
.mb-4 {
  margin-bottom: var(--spacing-md);
}

.mb-6 {
  margin-bottom: var(--spacing-lg);
}

.mb-8 {
  margin-bottom: var(--spacing-xl);
}

.mb-12 {
  margin-bottom: var(--spacing-2xl);
}

.mt-12 {
  margin-top: var(--spacing-2xl);
}

/* Width/Height utilities - For hero image */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* Object utilities */
.object-cover {
  object-fit: cover;
}

/* Text alignment */
.text-center {
  text-align: center;
}

/* Visibility utilities for mobile dropdowns */
.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

/* RemixIcon size classes */
.ri-sm {
  font-size: 0.875rem;
}

.ri-lg {
  font-size: 1.5rem;
}

.ri-xl {
  font-size: 2rem;
}
