﻿/* ========================================================================== */
/* Variables                                                                  */
/* ========================================================================== */

:root {
  /* Color palette */
  --color-background: #ffffff;
  --color-surface: #f7f8fb;
  --color-surface-alt: #eef0f6;
  --color-text: #1f2933;
  --color-text-muted: #6b7280;
  --color-border-subtle: #e5e7eb;
  --color-border-strong: #d1d5db;

  --color-primary: #22c55e;
  --color-primary-soft: rgba(34, 197, 94, 0.1);
  --color-primary-strong: #16a34a;

  --color-success: #059669;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: 'Nunito', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-serif: "Merriweather", "Georgia", "Times New Roman", serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 3px rgba(34, 197, 94, 0.3);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 240ms ease-out;

  /* Layout */
  --container-width: 1120px;
  --container-padding-x: var(--space-4);

  /* Z-index */
  --z-header: 100;
  --z-overlay: 400;
  --z-modal: 500;
}

@media (min-width: 768px) {
  :root {
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.375rem;   /* 22px */
    --font-size-2xl: 1.75rem;   /* 28px */
    --font-size-3xl: 2.125rem;  /* 34px */
    --font-size-4xl: 2.5rem;    /* 40px */
    --container-padding-x: var(--space-6);
  }
}


/* ========================================================================== */
/* Reset / Normalize                                                          */
/* ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
ul, ol, dl {
  margin: 0;
}

ul, ol {
  padding-left: 1.4rem;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

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

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

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


/* ========================================================================== */
/* Base styles                                                                */
/* ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

main {
  min-height: 60vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--gray-900);
  line-height: 1.2;
}

h1 {
  font-size: var(--font-size-4xl);
  line-height: 1.1;
  margin-bottom: var(--space-4);
  font-weight: 800;
}

h2 {
  font-size: var(--font-size-3xl);
  line-height: 1.15;
  margin-bottom: var(--space-3);
  font-weight: 700;
}

h3 {
  font-size: var(--font-size-2xl);
  line-height: 1.25;
  margin-bottom: var(--space-2);
  font-weight: 700;
}

h4 {
  font-size: var(--font-size-xl);
  line-height: 1.3;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text);
  line-height: 1.65;
  font-weight: 400;
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

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

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

a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

code, pre {
  font-family: var(--font-mono);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}


/* ========================================================================== */
/* Accessibility                                                              */
/* ========================================================================== */

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--shadow-focus);
}

::-moz-focus-inner {
  border: 0;
}

/* Visually hidden but accessible */
.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;
}


/* ========================================================================== */
/* Layout Utilities                                                           */
/* ========================================================================== */

.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
}

/* Mobile padding adjustments */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section--muted {
  background-color: var(--color-surface);
}

.section__header {
  max-width: 720px;
  margin-bottom: var(--space-6);
}

.section__title {
  margin-bottom: var(--space-2);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section__subtitle {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  line-height: 1.6;
}

/* Flex utilities */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

/* Grid utilities */

.grid {
  display: grid;
}

/* Single column layout - no multi-column grids */

/* Spacing utilities (limited, for layout tweaks) */

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

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


/* ========================================================================== */
/* Components                                                                 */
/* ========================================================================== */

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--font-size-sm);
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  background-color: var(--color-primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.25);
  color: #ffffff;
}

.btn--secondary {
  background-color: #ffffff;
  color: var(--color-text);
  border-color: var(--color-border-subtle);
}

.btn--secondary:hover {
  border-color: var(--color-border-strong);
  background-color: var(--color-surface);
}

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

.btn--ghost:hover {
  background-color: var(--color-primary-soft);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn[disabled],
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}


/* Form controls */

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
}

.input[disabled],
.textarea[disabled],
.select[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.form-helper {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
}


/* Card */

.card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: var(--space-5);
}

.card--soft {
  background-color: var(--color-surface);
  border-style: dashed;
}

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.card__body {
  font-size: var(--font-size-sm);
}

.card__footer {
  margin-top: var(--space-4);
}


/* Hero layout (generic) */

.hero {
  position: relative;
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  background-color: var(--color-surface);
  color: var(--color-text);
}

.hero--with-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__inner {
  max-width: 720px;
}

.hero__kicker {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.hero__title {
  font-size: var(--font-size-4xl);
  line-height: 1.1;
  margin-bottom: var(--space-3);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero__lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.65;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}


/* Simple badges (e.g., for ratings, categories) */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}

.badge--primary {
  border-color: rgba(34, 197, 94, 0.3);
  background-color: var(--color-primary-soft);
  color: var(--color-primary-strong);
}

.badge--success {
  border-color: rgba(5, 150, 105, 0.25);
  background-color: rgba(5, 150, 105, 0.08);
  color: var(--color-success);
}


/* FAQ / Accordion (structure only вЂ“ interaction via JS) */

.accordion {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
}

.accordion__item + .accordion__item {
  border-top: 1px solid var(--color-border-subtle);
}

.accordion__button {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--font-size-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  cursor: pointer;
}

.accordion__button:hover {
  background-color: var(--color-surface);
}

.accordion__panel {
  padding: 0 var(--space-5) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}


/* Tables (for methodology, comparison, etc.) */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table thead {
  background-color: var(--color-surface-alt);
}

.table th,
.table td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
  text-align: left;
}

.table th {
  font-weight: 600;
  color: var(--gray-800);
}

.table tbody tr:nth-child(even) {
  background-color: var(--gray-50);
}


/* Lists inside editorial content */

.content {
  font-size: var(--font-size-base);
}

.content p + p {
  margin-top: var(--space-3);
}

.content ul,
.content ol {
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
  padding-left: 1.5rem;
}

.content .content h2:not(:first-child),
.content h3:not(:first-child) {
  margin-top: var(--space-6);
}

/* Single column content (replacement for grid-2) */
.content-single {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.content-single > * {
  max-width: 100%;
}


/* ========================================================================== */
/* Helper classes specific to editorial layout                               */
/* ========================================================================== */

.kicker {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  font-weight: 700;
}

.lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.highlight-box {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background-color: var(--color-primary-soft);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.note-muted {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}


/* ========================================================================== */
/* End of base                                                               */
/* ========================================================================== */

