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

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
  --bg-cream: #FDF8F0;
  --bg-warm: #F5EDE0;
  --bg-card: #FEFCF8;
  --text-primary: #2C1810;
  --text-secondary: #5A4A3A;
  --text-muted: #8A7A6A;
  --accent: #8B4513;
  --accent-hover: #A0522D;
  --accent-light: #D4A574;
  --border: #E0D5C5;
  --border-light: #EDE5D8;
  --shadow-sm: 0 1px 3px rgba(44,24,16,0.06);
  --shadow-md: 0 4px 12px rgba(44,24,16,0.08);
  --shadow-lg: 0 8px 30px rgba(44,24,16,0.12);
  --radius: 6px;
  --max-width: 820px;
  --max-width-wide: 1140px;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, serif;
  --transition: 0.3s ease;
}

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: 17px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
}

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

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

h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 1.7rem; font-weight: 600; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.8rem; }

p { margin-bottom: 1.2rem; color: var(--text-secondary); }

/* ── SITE HEADER ── */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: color var(--transition);
}
.site-logo:hover { color: var(--accent-hover); }

.site-nav {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--accent);
  background: var(--bg-warm);
}

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

/* ── ARTICLE ── */
.article-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

.article-meta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.article-meta-item svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 2;
}

.article-title {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 1.8rem;
  letter-spacing: -0.5px;
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-body h2 {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.article-img {
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.article-img img {
  width: 100%;
  display: block;
  border-radius: 0;
}

/* ── VISUALIZATION BLOCK ── */
.viz-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
}

.viz-block h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.balance-diagram {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.balance-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.balance-label {
  min-width: 120px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
}

.balance-track {
  flex: 1;
  height: 28px;
  background: var(--bg-warm);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.balance-fill {
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.balance-fill::after {
  content: attr(data-value);
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
}

.balance-fill.animated { width: var(--target-width) !important; }

/* ── READ ALSO ── */
.read-also {
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-light);
}

.read-also h3 {
  margin-bottom: 1.2rem;
}

.read-also-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.read-also-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.read-also-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent-light);
}

.read-also-card h4 {
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  text-align: left;
}

.read-also-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── SUBSCRIBE ── */
.subscribe-section {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.subscribe-section h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.subscribe-section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.subscribe-form {
  display: flex;
  gap: 0.8rem;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.subscribe-form button {
  padding: 0.85rem 1.8rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

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

/* ── FOOTER ── */
.site-footer {
  background: var(--text-primary);
  color: var(--bg-warm);
  padding: 3rem 2rem 2rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h4 {
  color: var(--accent-light);
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: var(--bg-warm);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity var(--transition);
  text-align: left;
  display: block;
  margin-bottom: 0.4rem;
}

.footer-col a:hover { opacity: 1; }

.footer-disclaimer {
  font-size: 0.82rem;
  color: var(--bg-warm);
  opacity: 0.6;
  line-height: 1.6;
  margin-top: 0.8rem;
}

.footer-bottom {
  max-width: var(--max-width-wide);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(253,248,240,0.15);
  text-align: center;
  font-size: 0.85rem;
  color: var(--bg-warm);
  opacity: 0.5;
}

/* ── COOKIE MODAL ── */
.cookie-modal {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-modal p {
  font-size: 0.88rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.cookie-modal a {
  color: var(--accent);
  text-decoration: underline;
  text-align: left;
}

.cookie-btns {
  display: flex;
  gap: 0.6rem;
}

.cookie-btns button {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.cookie-accept {
  background: var(--accent);
  color: white;
  border-color: var(--accent) !important;
}
.cookie-accept:hover { background: var(--accent-hover); }

.cookie-decline {
  background: transparent;
  color: var(--text-secondary);
}
.cookie-decline:hover { background: var(--bg-warm); }

.cookie-modal.hidden { display: none; }

/* ── HERO ── */
.hero-section {
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--bg-cream) 100%);
  padding: 3.5rem 2rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-section h1 {
  font-size: 2.8rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.hero-section p {
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* ── POLICY/TERMS PAGES ── */
.legal-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.legal-page h1 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.legal-page h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem;
  color: var(--accent);
}

.legal-page p, .legal-page li {
  font-size: 0.95rem;
  line-height: 1.8;
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.legal-page li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ── SUCCESS PAGE ── */
.success-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
}

.success-page .checkmark {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,69,19,0.3); }
  50% { box-shadow: 0 0 0 15px rgba(139,69,19,0); }
}

.success-page .checkmark svg {
  width: 40px;
  height: 40px;
  stroke: white;
  fill: none;
  stroke-width: 3;
}

.success-page h1 { font-size: 2.5rem; margin-bottom: 0.8rem; }
.success-page p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }

.btn-home {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition);
}
.btn-home:hover { background: var(--accent-hover); }

/* ── 404 PAGE ── */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
}

.page-404 .num-404 {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  opacity: 0.5;
  margin-bottom: 1rem;
}

.page-404 h1 { font-size: 2rem; margin-bottom: 0.8rem; }
.page-404 p { color: var(--text-muted); margin-bottom: 2rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  .article-title { font-size: 1.9rem; }
  .hero-section h1 { font-size: 2rem; }
  .hero-section { padding: 2.5rem 1.5rem 1.5rem; }
  .article-container { padding: 1.5rem; }
  .site-header-inner { padding: 0.8rem 1rem; }
  .site-nav a { font-size: 0.82rem; padding: 0.3rem 0.6rem; }
  .balance-label { min-width: 80px; font-size: 0.8rem; }
  .cookie-modal { left: 1rem; right: 1rem; max-width: none; bottom: 1rem; }
  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .success-page .num-404, .page-404 .num-404 { font-size: 5rem; }
  .read-also-grid { grid-template-columns: 1fr; }
}
