/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --primary: #0f172a;
  --accent: #22d3ee;
  --bg: #ffffff;
  --bg-secondary: #f0f9ff;
  --text: #0f172a;
  --text-light: #64748b;
  --radius: 8px;
  --shadow: 4px 4px 0px #22d3ee;
  --shadow-sm: 2px 2px 0px #22d3ee;
  --max-w: 820px;
  --max-w-wide: 1200px;
}

html { scroll-behavior: smooth; }
a { display: inline-block; text-align: center; }

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-weight: 600; }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--primary);
  padding: 0 1.5rem;
}
.site-header__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.site-logo:hover { color: var(--accent); }

/* burger */
.burger-toggle { display: none; }
.burger-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  width: 28px;
  z-index: 110;
}
.burger-label span {
  display: block;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.site-nav { display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover {
  background: var(--accent);
  color: var(--primary);
}

@media (max-width: 768px) {
  .burger-label { display: flex; }
  .site-nav {
    position: fixed;
    top: 0; left: 0; right: 0; 
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transform: translateY(-100%);
    transition: transform 0.35s ease;
    z-index: 105;
  }
  .site-nav a { font-size: 1.2rem; }
  .burger-toggle:checked ~ .site-nav {
    transform: translateY(0);
  }
  .burger-toggle:checked ~ .burger-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger-toggle:checked ~ .burger-label span:nth-child(2) { opacity: 0; }
  .burger-toggle:checked ~ .burger-label span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* ── BREADCRUMBS ── */
.breadcrumbs {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--text-light); }

/* ── ARTICLE ── */
.article-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 1.25rem 0 1.5rem;
}
.article-meta__category {
  background: var(--accent);
  color: var(--primary);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-lead {
  font-size: 1.15rem;
  color: var(--text-light);
  border-left: 4px solid var(--accent);
  padding-left: 1.25rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.article-body h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-secondary);
}
.article-body p { margin-bottom: 1.25rem; }
.article-body .article-img {
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* pull-quote */
.pull-quote {
  margin: 2.5rem 0;
  padding: 2rem 2rem 2rem 2.5rem;
  background: var(--bg-secondary);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  position: relative;
}
.pull-quote::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--accent);
  position: absolute;
  top: -0.2rem;
  left: 0.6rem;
  line-height: 1;
  font-style: normal;
}

/* tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}
.article-tags a {
  background: var(--bg-secondary);
  color: var(--primary);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.article-tags a:hover {
  border-color: var(--accent);
  background: var(--bg);
}

/* disclaimer */
.disclaimer {
  background: var(--bg-secondary);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 2.5rem 0;
  line-height: 1.65;
}

/* ── POPULAR ── */
.popular-section {
  max-width: var(--max-w);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.popular-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.popular-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.popular-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.popular-card__cat {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.popular-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
}
.popular-card__time {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ── SUBSCRIBE ── */
.subscribe-section {
  max-width: var(--max-w);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}
.subscribe-box {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}
.subscribe-box h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}
.subscribe-box p {
  font-size: 0.92rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}
.subscribe-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.subscribe-form input[type="email"]:focus { border-color: var(--accent); }
.subscribe-form button {
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.subscribe-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34,211,238,0.4);
}

/* ── FOOTER ── */
.site-footer {
  margin-top: auto;
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 1.5rem 1.5rem;
  font-size: 0.88rem;
}
.site-footer__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .site-logo { color: #fff; font-size: 1.3rem; }
.footer-brand .site-logo:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-disclaimer {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 1rem;
  line-height: 1.6;
}
.footer-copy {
  font-size: 0.82rem;
  opacity: 0.5;
  margin-top: 0.75rem;
}

/* ── COOKIE MODAL (CSS only) ── */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 380px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  z-index: 999;
  font-size: 0.88rem;
  line-height: 1.55;
  transition: opacity 0.3s, transform 0.3s;
}
.cookie-banner p { margin-bottom: 1rem; }
.cookie-banner a { color: var(--accent); }
.cookie-toggle { display: none; }
.cookie-toggle:checked ~ .cookie-banner {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.cookie-actions { display: flex; gap: 0.5rem; }
.cookie-accept,
.cookie-decline {
  border-radius: var(--radius);
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
}
.cookie-accept {
  background: var(--accent);
  color: var(--primary);
}
.cookie-decline {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.25);
}
.cookie-accept:hover,
.cookie-decline:hover { transform: scale(1.03); }

/* ── POLICY / TERMS / COOKIE PAGES ── */
.legal-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.legal-page h1 { margin-bottom: 1.5rem; }
.legal-page h2 { margin-top: 2rem; }
.legal-page p { margin-bottom: 1rem; }

/* ── SUCCESS PAGE ── */
.success-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2.5rem;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.success-page h1 { margin-bottom: 1rem; }
.success-page p { color: var(--text-light); margin-bottom: 2rem; font-size: 1.1rem; }
.btn-home {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  transition: box-shadow 0.2s, transform 0.15s;
}
.btn-home:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ── 404 ── */
.page-404 {
  max-width: 600px;
  margin: 0 auto;
  padding: 8rem 1.5rem;
  text-align: center;
}
.page-404 h1 {
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}
.page-404 p { color: var(--text-light); margin-bottom: 2rem; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.article-wrapper { animation: fadeUp 0.5s ease both; }
.popular-card { animation: fadeUp 0.5s ease both; }
.popular-card:nth-child(2) { animation-delay: 0.08s; }
.popular-card:nth-child(3) { animation-delay: 0.16s; }

@media (max-width: 600px) {
  .subscribe-form { flex-direction: column; }
  .subscribe-form button { width: 100%; }
  .cookie-banner { left: 1rem; right: 1rem; max-width: none; bottom: 0.5rem; }
}