/*
Theme Name: Coder Care
Theme URI: https://coder-care.com
Author: Coder Care
Description: Wellness for high-performance minds. Custom theme for the Coder Care affiliate website.
Version: 1.0
License: GNU General Public License v2 or later
Tags: wellness, affiliate, blog
*/

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

/* ── Brand tokens ─────────────────────────────── */
:root {
  --cc-deep-canopy:  #12201A;
  --cc-moss-green:   #4A8C1C;
  --cc-lime-core:    #7EC832;
  --cc-light-lime:   #B8F06A;
  --cc-mist:         #E8F7D4;
  --cc-slate:        #5A6B74;
  --cc-off-white:    #F5F3EE;
  --cc-border:       #E0DDD6;
  --cc-footer-muted: #9AB0A8;
  --cc-footer-dark:  #0D1A13;

  --font-head: 'DM Sans', sans-serif;
  --font-body: 'Lora', serif;
  --font-ui:   'Inter', sans-serif;

  --radius:    8px;
  --max-width: 1200px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--cc-off-white);
  color: var(--cc-slate);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--cc-moss-green); text-decoration: none; }
a:hover { color: var(--cc-lime-core); }

/* ── Typography ───────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--cc-deep-canopy);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout helpers ───────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: 72px 0; }
.section--mist { background: var(--cc-mist); }
.section--dark  { background: var(--cc-deep-canopy); }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border: none;
  text-decoration: none;
}
.btn--primary {
  background: var(--cc-lime-core);
  color: var(--cc-deep-canopy);
}
.btn--primary:hover {
  background: var(--cc-moss-green);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: var(--cc-moss-green);
  border: 1.5px solid var(--cc-lime-core);
}
.btn--outline:hover {
  background: var(--cc-lime-core);
  color: var(--cc-deep-canopy);
}

/* ── Badge / pill ─────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--cc-mist);
  color: var(--cc-moss-green);
}

/* ── Cards ────────────────────────────────────── */
.card {
  background: #fff;
  border: 0.5px solid var(--cc-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-3px); }
.card__body { padding: 20px; }
.card__meta {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cc-moss-green);
  margin-bottom: 8px;
}
.card__title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cc-deep-canopy);
  margin-bottom: 8px;
  line-height: 1.3;
}
.card__excerpt {
  font-size: 14px;
  color: var(--cc-slate);
  line-height: 1.6;
  margin-bottom: 16px;
}
.card__link {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--cc-lime-core);
  letter-spacing: 0.04em;
}

/* ── Post grid ────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Category strip ───────────────────────────── */
.cat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── Single post ──────────────────────────────── */
.post-content {
  max-width: 720px;
  margin: 0 auto;
}
.post-content h2,
.post-content h3 { margin: 2rem 0 1rem; }
.post-content ul,
.post-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  border-left: 3px solid var(--cc-lime-core);
  padding: 12px 20px;
  background: var(--cc-mist);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  margin: 1.5rem 0;
}

/* ── Affiliate CTA box ────────────────────────── */
.affiliate-box {
  background: var(--cc-mist);
  border: 1px solid var(--cc-light-lime);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.affiliate-box__text { font-family: var(--font-head); font-weight: 500; color: var(--cc-deep-canopy); }
.affiliate-box__sub  { font-size: 13px; color: var(--cc-slate); margin-top: 4px; }

/* ── Newsletter box ───────────────────────────── */
.newsletter {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.newsletter h2 { margin-bottom: 12px; }
.newsletter p  { margin-bottom: 24px; color: var(--cc-slate); }
.newsletter__form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.newsletter__input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--cc-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: #fff;
  color: var(--cc-deep-canopy);
  outline: none;
}
.newsletter__input:focus { border-color: var(--cc-lime-core); }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section   { padding: 48px 0; }

  .site-nav__links { display: none; }
  .site-nav__toggle { display: flex; }

  .post-grid { grid-template-columns: 1fr; }

  .affiliate-box { flex-direction: column; }
}
