/*
Theme Name: Custom Auto Theme
Author: System
Version: 1.0
*/
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&family=Work+Sans:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #FAFAF5;
  --text: #1A1A2E;
  --accent: #B8963E;
  --accent-light: #F5EDDA;
  --secondary: #6B7280;
  --card-bg: #FFFFFF;
  --border: #E2E0D8;
  --code-bg: #F0EDE4;
  --heading-font: 'Fraunces', Georgia, serif;
  --body-font: 'Work Sans', Helvetica, sans-serif;
  --max-w: 1140px;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(26,26,46,0.06);
  --transition: 0.25s ease;
}

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

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

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

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-top: 2rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.25rem; color: #333340; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #8A6F2A; }

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

/* ─── Layout ─── */
.wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Site Header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-logo {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  text-align: left;
}
.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(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

@media(max-width:768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
}

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--secondary);
  margin: 1.5rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.breadcrumbs a { color: var(--secondary); font-size: 0.8rem; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.15rem; }

/* ─── Article Layout ─── */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  margin: 1rem 0 3rem;
}
@media(max-width:900px) {
  .article-grid { grid-template-columns: 1fr; }
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--secondary);
  margin: 0.75rem 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.article-meta .tag {
  background: var(--accent-light);
  color: #7A5F1C;
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-body h2 {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.article-body h2:first-of-type { border-top: none; padding-top: 0; }

/* ─── Aside ─── */
.article-aside {
  position: sticky;
  top: 5rem;
  align-self: start;
}
.aside-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.aside-box h3 {
  font-size: 0.95rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aside-box ul {
  list-style: none;
  padding: 0;
}
.aside-box li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0ede4;
  font-size: 0.88rem;
  line-height: 1.5;
}
.aside-box li:last-child { border-bottom: none; }
.aside-box .book-author {
  display: block;
  font-size: 0.78rem;
  color: var(--secondary);
  margin-top: 0.15rem;
}

/* ─── Blockquote ─── */
blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-light);
  font-family: var(--heading-font);
  font-style: italic;
  font-size: 1.05rem;
  color: #3A3A4E;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ─── Highlight Box ─── */
.highlight-box {
  background: var(--code-bg);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.highlight-box h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

/* ─── Numbered List ─── */
.numbered-steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}
.numbered-steps li {
  counter-increment: step;
  padding: 0.75rem 0 0.75rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.numbered-steps li:last-child { border-bottom: none; }
.numbered-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.75rem;
  font-family: var(--heading-font);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

/* ─── Image Figure ─── */
.article-figure {
  margin: 2rem 0;
  position: relative;
}
.article-figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
}
.article-figure figcaption {
  font-size: 0.78rem;
  color: var(--secondary);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ─── Read Also ─── */
.read-also {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 2px solid var(--text);
}
.read-also h2 { margin-top: 0; border: none; }
.read-also-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.read-also-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.read-also-card:hover {
  box-shadow: 0 4px 12px rgba(26,26,46,0.08);
  transform: translateY(-2px);
}
.read-also-card .card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.read-also-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.read-also-card h3 a {
  color: var(--text);
  text-align: left;
}
.read-also-card h3 a:hover { color: var(--accent); }
.read-also-card p {
  font-size: 0.85rem;
  color: var(--secondary);
  margin: 0;
  line-height: 1.6;
}

/* ─── Subscribe ─── */
.subscribe-section {
  background: var(--text);
  color: #fff;
  padding: 3rem;
  border-radius: var(--radius);
  margin: 3rem 0;
  text-align: center;
}
.subscribe-section h2 {
  color: #fff;
  margin-top: 0;
  border: none;
}
.subscribe-section p { color: #b0b0c0; }
.subscribe-form {
  display: flex;
  gap: 0.75rem;
  max-width: 460px;
  margin: 1.5rem auto 0;
  justify-content: center;
}
.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #3A3A5E;
  border-radius: var(--radius);
  background: #2A2A4E;
  color: #fff;
  font-family: var(--body-font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.subscribe-form input[type="email"]::placeholder { color: #7A7A9E; }
.subscribe-form input[type="email"]:focus { border-color: var(--accent); }
.subscribe-form button {
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.subscribe-form button:hover { background: #8A6F2A; }

@media(max-width:500px) {
  .subscribe-form { flex-direction: column; }
  .subscribe-section { padding: 2rem 1.5rem; }
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
  font-size: 0.82rem;
  color: var(--secondary);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.82rem; color: var(--secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-disclaimer {
  max-width: 600px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #999;
}

/* ─── Cookie Modal ─── */
.cookie-modal {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(26,26,46,0.12);
  padding: 1.5rem;
  z-index: 9999;
  font-size: 0.85rem;
  animation: fadeSlideUp 0.4s ease;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-modal h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.cookie-modal p { font-size: 0.82rem; color: var(--secondary); margin-bottom: 1rem; }
.cookie-btns { display: flex; gap: 0.75rem; }
.cookie-btns button {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-accept { background: var(--accent); color: #fff; }
.btn-accept:hover { background: #8A6F2A; }
.btn-decline { background: var(--code-bg); color: var(--text); }
.btn-decline:hover { background: #E2E0D8; }

@media(max-width:500px) {
  .cookie-modal { left: 1rem; right: 1rem; max-width: none; }
}

/* ─── Home Hero ─── */
.home-hero {
  padding: 3rem 0 2rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2rem;
}
.home-hero h1 { margin-bottom: 0.75rem; }
.home-hero .subtitle {
  font-size: 1.1rem;
  color: var(--secondary);
  font-family: var(--heading-font);
  font-style: italic;
}

/* ─── Policy Pages ─── */
.policy-page { padding: 2rem 0 3rem; }
.policy-page h1 { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--text); }
.policy-page h2 { font-size: 1.25rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.policy-content { max-width: 780px; }
.policy-content p { font-size: 0.92rem; }

/* ─── Success Page ─── */
.success-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.success-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.success-page p { font-size: 1.1rem; color: var(--secondary); margin-bottom: 2rem; }
.btn-home {
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition);
}
.btn-home:hover { background: #8A6F2A; }

/* ─── 404 ─── */
.page-404 {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.page-404 .error-code {
  font-family: var(--heading-font);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}
.page-404 h1 { margin-bottom: 0.75rem; }
.page-404 p { color: var(--secondary); margin-bottom: 2rem; }

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Disclaimer ─── */
.article-disclaimer {
  background: var(--code-bg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--secondary);
  margin: 2.5rem 0;
  line-height: 1.7;
}