/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #f8f7f2;
  --bg-alt: #f0efe8;
  --text: #1a1a2e;
  --text-muted: #5a5a6e;
  --accent: #2d6a6a;
  --accent-light: #c8e6c9;
  --accent-hover: #1e4e4e;
  --border: #d4d2cb;
  --white: #ffffff;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --max-w: 780px;
  --max-w-wide: 1100px;
  --radius: 3px;
}

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
a { display: inline-block; text-align: center; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.5rem 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }

p { margin-bottom: 1.25rem; }

/* HEADER */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}
.site-header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.site-logo span { color: var(--accent); }

.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--accent); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* BREADCRUMBS */
.breadcrumbs {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding: 0 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
  text-align: left;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 0.4rem; }

/* ARTICLE */
.article-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem;
}
.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-meta-item { display: flex; align-items: center; gap: 0.35rem; }
.article-hero { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; }
.article-hero img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }

.article-body p { color: var(--text); }
.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text);
}
.article-body li { margin-bottom: 0.5rem; }

/* HIGHLIGHT BOX */
.highlight-box {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.highlight-box p:last-child { margin-bottom: 0; }

/* PULL QUOTE */
.pull-quote {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2.5rem 0;
  line-height: 1.4;
}

/* SIDEBAR LAYOUT */
.content-with-sidebar {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 80px;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sidebar h3 {
  font-size: 1rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-body);
  font-weight: 600;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar ul li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.sidebar ul li:last-child { border: none; }
.sidebar ul li a {
  color: var(--accent);
  text-decoration: none;
  text-align: left;
}
.sidebar ul li a:hover { text-decoration: underline; }

/* CHALLENGE BLOCK */
.challenge-block {
  background: var(--text);
  color: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  margin: 3rem 0;
}
.challenge-block h2 {
  color: var(--accent-light);
  border: none;
  margin-top: 0;
  padding-bottom: 0;
}
.challenge-block p { color: rgba(255,255,255,0.85); }
.challenge-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.challenge-day {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
}
.challenge-day strong {
  display: block;
  color: var(--accent-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.challenge-day span { font-size: 0.85rem; color: rgba(255,255,255,0.8); }

/* READ ALSO */
.read-also {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.read-also h2 { border: none; padding-bottom: 0; }
.read-also-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.read-also-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.read-also-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.read-also-card h3 { font-size: 1.05rem; color: var(--text); margin: 0 0 0.5rem; }
.read-also-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* SUBSCRIBE */
.subscribe-section {
  background: var(--bg-alt);
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem 0 0;
}
.subscribe-section h2 { border: none; padding-bottom: 0; margin-top: 0; }
.subscribe-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 1.5rem auto 0;
  flex-wrap: wrap;
  justify-content: center;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-form input[type="email"]:focus { border-color: var(--accent); }
.subscribe-form button {
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.subscribe-form button:hover { background: var(--accent-hover); }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  margin-top: 3rem;
  text-align: center;
  background: var(--white);
}
.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.6;
  font-style: italic;
}

/* COOKIE MODAL */
.cookie-modal {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 360px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  font-size: 0.85rem;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-modal p { margin-bottom: 1rem; color: var(--text-muted); }
.cookie-modal-btns { display: flex; gap: 0.5rem; }
.cookie-modal-btns button {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid var(--border);
}
.btn-accept {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent) !important;
}
.btn-accept:hover { background: var(--accent-hover); }
.btn-decline { background: var(--white); color: var(--text-muted); }
.btn-decline:hover { background: var(--bg-alt); }

/* POLICY PAGES */
.policy-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem;
}
.policy-container h1 { margin-bottom: 2rem; }
.policy-container h2 { font-size: 1.3rem; }
.policy-container p, .policy-container li { font-size: 0.92rem; color: var(--text-muted); }

/* SUCCESS PAGE */
.success-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}
.success-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2rem;
  color: var(--accent);
}
.success-page h1 { margin-bottom: 0.75rem; }
.success-page p { color: var(--text-muted); margin-bottom: 2rem; }
.btn-home {
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}
.btn-home:hover { background: var(--accent-hover); }

/* 404 */
.page-404 {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}
.page-404 .code-404 {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}
.page-404 h1 { font-size: 1.8rem; margin-bottom: 0.75rem; }
.page-404 p { color: var(--text-muted); margin-bottom: 2rem; }

/* DATA BADGE */
.data-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* NUMBERED LIST STYLED */
.numbered-list {
  counter-reset: item;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.numbered-list li {
  counter-increment: item;
  padding: 1rem 0 1rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.numbered-list li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

/* ENERGY METER */
.energy-meter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.energy-bar {
  height: 6px;
  background: var(--accent-light);
  border-radius: 3px;
  flex: 1;
  overflow: hidden;
}
.energy-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.energy-label { font-size: 0.78rem; color: var(--text-muted); min-width: 30px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .site-nav { display: none; }
  .site-nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
  }
  .hamburger { display: block; }
  .site-header-inner { padding: 0.75rem 1.5rem; }
  .article-container { padding: 1.5rem; }
  .challenge-days { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
  .cookie-modal { left: 1rem; right: 1rem; max-width: none; bottom: 1rem; }
}

@media (max-width: 480px) {
  .subscribe-form { flex-direction: column; }
  .subscribe-form input[type="email"] { min-width: 100%; }
}
