/* =========================================
   DESIGN TOKENS
   Palette: near-white base, ink text, 
   electric-amber accent, coral CTA gradient
   Type: Inter (body), Playfair Display (display)
   ========================================= */

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

:root {
  --bg:        #F9F8F6;
  --surface:   #FFFFFF;
  --ink:       #1A1A1A;
  --ink-muted: #5C5C5C;
  --border:    #E8E6E1;
  --accent:    #F5A623;
  --cta-a:     #E8400C;
  --cta-b:     #FF8C00;
  --radius-card: 12px;
  --radius-btn:  50px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-btn:  0 4px 18px rgba(232,64,12,0.35);
  --max-w: 760px;
  --nav-h: 60px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--cta-a); }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

/* ---- HERO (homepage) ---- */
.hero {
  text-align: center;
  padding: 72px 20px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cta-a);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 16px;
}
.hero p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ---- DIVIDER ---- */
.divider {
  height: 1px;
  background: var(--border);
  max-width: 1100px;
  margin: 0 auto 48px;
}

/* ---- CARD GRID ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.11);
}
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #fff1e6 0%, #ffe0cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cta-a);
  margin-bottom: 8px;
}
.card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--ink);
}
.card p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
  flex: 1;
}
.card-arrow {
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cta-a);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- POST LAYOUT ---- */
.post-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px 120px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.post-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--surface);
  background: var(--cta-a);
  padding: 3px 10px;
  border-radius: 4px;
}
.post-date {
  font-size: 0.82rem;
  color: var(--ink-muted);
}
.post-read {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-left: auto;
}
.post-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  color: var(--ink);
}
.post-lead {
  font-size: 1.1rem;
  color: var(--ink-muted);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 36px;
  line-height: 1.65;
}
.post-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--ink);
}
.post-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--ink);
}
.post-body p {
  margin-bottom: 20px;
  color: var(--ink);
}
.post-body ul, .post-body ol {
  margin: 0 0 20px 20px;
}
.post-body li {
  margin-bottom: 8px;
}

/* ---- AD PLACEHOLDERS ---- */
.ad-native {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin: 32px 0;
}

/* ---- CTA BUTTONS ---- */
.cta-btn {
  display: block;
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(90deg, var(--cta-a) 0%, var(--cta-b) 100%);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  margin: 28px 0;
  position: relative;
  overflow: hidden;
}
.cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}
.cta-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 28px rgba(232,64,12,0.45);
  filter: brightness(1.06);
}
.cta-btn:active {
  transform: translateY(0) scale(0.99);
}
.cta-btn .btn-icon { margin-right: 8px; }
.cta-btn.cta-secondary {
  background: transparent;
  color: var(--cta-a);
  border: 2px solid var(--cta-a);
  box-shadow: none;
}
.cta-btn.cta-secondary:hover {
  background: rgba(232,64,12,0.06);
  box-shadow: none;
}

/* ---- STICKY MOBILE CTA ---- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.sticky-cta a {
  display: block;
  padding: 14px;
  background: linear-gradient(90deg, var(--cta-a) 0%, var(--cta-b) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-btn);
}

/* ---- BACK LINK ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ink); }

/* ---- FOOTER ---- */
.footer {
  background: var(--ink);
  color: #aaa;
  text-align: center;
  padding: 32px 20px;
  font-size: 0.82rem;
}
.footer a { color: #ccc; text-decoration: none; margin: 0 10px; }
.footer a:hover { color: #fff; }
.footer-links { margin-bottom: 10px; }

/* ---- TOOL PAGE ---- */
.tool-wrap {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.tool-wrap h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}
.tool-wrap p { color: var(--ink-muted); margin-bottom: 32px; }
.progress-ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
}
.progress-ring {
  transform: rotate(-90deg);
}
.progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.progress-ring-fill {
  fill: none;
  stroke: url(#grad);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.1s linear;
}
.progress-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}
.status-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cta-a);
  margin: 0 3px;
  animation: bounce 1.2s infinite;
}
.status-dots span:nth-child(2) { animation-delay: 0.2s; }
.status-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .sticky-cta { display: block; }
  .nav-links { display: none; }
  .post-wrap { padding-bottom: 100px; }
  .card-grid { grid-template-columns: 1fr; }
}
