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

:root {
  color-scheme: light;
  --color-primary: #1a3a5c;
  --color-primary-light: #2a5a8c;
  --color-accent: #e8602c;
  --color-accent-hover: #d14e1c;
  --color-background: #f5f6f8;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-muted: #6b7280;
  --color-muted-text: #6b7280;
  --color-border: #e5e7eb;
  --color-focus: #0b66ff;
  --color-success: #16a34a;
  --color-warning: #dc2626;
  --color-star: #f59e0b;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Merriweather', Georgia, serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --content-width: 74rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --space-unit: 0.25rem;
}

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

html {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.3;
}

h1 { font-size: 2.25rem; font-weight: 900; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: 1rem; }

/* Skip Link */
.skip-link {
  left: 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-200%);
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Focus */
:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 3px;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.main-nav a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 0.25rem 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.2s ease;
}

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

.main-nav a.active {
  color: var(--color-primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-muted);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted-text);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: 0.75rem;
}

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--color-muted-text);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Container */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Section */
.section {
  padding: 3.5rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.6rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.view-all {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
}

.view-all:hover {
  color: var(--color-accent-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-cta {
  background: var(--color-accent);
  color: #fff;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(232, 96, 44, 0.35);
}

.btn-cta:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 96, 44, 0.4);
}

/* Cards */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.25rem;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--color-text);
}

.card-title a:hover {
  color: var(--color-accent);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Star Rating */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-star);
  font-size: 0.9rem;
}

.star-empty {
  color: var(--color-border);
}

.rating-score {
  font-weight: 700;
  color: var(--color-text);
  margin-left: 0.35rem;
  font-size: 0.9rem;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.badge-best { background: #fef3c7; color: #92400e; }
.badge-deal { background: #fee2e2; color: #991b1b; }
.badge-new { background: #d1fae5; color: #065f46; }
.badge-editors { background: #ede9fe; color: #5b21b6; }

/* Pros & Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.pros, .cons {
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.pros {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.cons {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.pros h4, .cons h4 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pros h4 { color: var(--color-success); }
.cons h4 { color: var(--color-warning); }

.pros li, .cons li {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
  list-style: none;
}

.pros li::before { content: '✓ '; color: var(--color-success); font-weight: 700; }
.cons li::before { content: '✗ '; color: var(--color-warning); font-weight: 700; }

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--color-primary);
  color: #fff;
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table tr:hover td {
  background: #f9fafb;
}

.comparison-table .highlight-row td {
  background: #fffbeb;
  border-left: 3px solid var(--color-accent);
}

/* Newsletter */
.newsletter {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--color-text);
  margin: 2rem 0;
}

.newsletter h3 {
  color: var(--color-text);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: var(--color-muted-text);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  max-width: 28rem;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.95);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: var(--color-accent-hover);
}

/* Disclosure */
.disclosure {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: #92400e;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .main-nav { display: none; }
  .menu-toggle { display: block; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .newsletter { padding: 2rem 1.25rem; }
  .newsletter-form { flex-direction: column; }

  .header-inner { padding: 0.75rem 1rem; }
  .container { padding: 0 1rem; }
  .section { padding: 2rem 0; }
}

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