/* Art First Aid — Styles */
/* Fonts: Lora (serif body) + DM Sans (UI/nav) */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg: #FBF7F4;
  --bg-card: #FFFFFF;
  --text: #2D2320;
  --text-light: #6B5E57;
  --text-lighter: #9B8E87;
  --accent: #C4705A;
  --accent-hover: #A85A45;
  --accent-soft: #F0DED6;
  --border: #E8DDD6;
  --border-light: #F0E8E2;
  --mindset: #7B6B8A;
  --mindset-bg: #F0ECF3;
  --technical: #5A7B6B;
  --technical-bg: #ECF3EF;
  --rescue: #A0654A;
  --rescue-bg: #F5EDE8;
  --shadow-sm: 0 1px 3px rgba(45,35,32,0.06);
  --shadow-md: 0 4px 16px rgba(45,35,32,0.08);
  --shadow-lg: 0 8px 32px rgba(45,35,32,0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 720px;
  --max-w-wide: 1080px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Texture overlay on body */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ---- LAYOUT ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 24px; }

/* ---- HEADER ---- */
.site-header {
  padding: 32px 0 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.site-header__logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.site-header__logo span {
  color: var(--accent);
}

.site-header__title {
  font-family: 'Lora', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.2;
}

.site-header__sub {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 6px;
  font-style: italic;
}

.site-header__proof {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 10px;
  letter-spacing: 0.03em;
}

/* ---- NAVIGATION / FILTERS ---- */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 24px 0;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

/* ---- CARD GRID (INDEX) ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0 0 48px;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.card-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}

.card-preview:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-2px);
  color: var(--text);
}

.card-preview__tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  width: fit-content;
}

.tag-mindset { background: var(--mindset-bg); color: var(--mindset); }
.tag-technical { background: var(--technical-bg); color: var(--technical); }
.tag-rescue { background: var(--rescue-bg); color: var(--rescue); }

.card-preview__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.card-preview__arrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-top: auto;
}

/* ---- CARD PAGE ---- */
.card-page {
  padding: 40px 0 64px;
}

.card-breadcrumb {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-lighter);
  margin-bottom: 24px;
}

.card-breadcrumb a { color: var(--text-light); }
.card-breadcrumb a:hover { color: var(--accent); }

.card-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .card-content { padding: 28px 20px; }
}

.card-content__tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 16px;
}

.card-content h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .card-content h1 { font-size: 30px; }
}

.card-section {
  margin-bottom: 32px;
}

.card-section h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.card-section p {
  margin-bottom: 14px;
}

.card-section ol {
  padding-left: 0;
  counter-reset: step;
  list-style: none;
}

.card-section ol li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 16px;
  counter-increment: step;
}

.card-section ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nelli note */
.nelli-note {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin: 24px 0;
  border-left: 3px solid var(--accent);
  font-style: italic;
}

.nelli-note strong:first-child {
  font-style: normal;
}

/* Extra section */
.card-extra {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-top: 16px;
}

/* Product recommendation */
.card-product {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-top: 24px;
}

.card-product h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.card-product p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 0;
}

.card-product a {
  font-weight: 600;
}

.card-extra h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 10px;
}

/* Related cards */
.related-cards {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.related-cards h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .related-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.related-link {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  transition: all 0.2s;
}

.related-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}

.related-link__tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

/* ---- FOOTER ---- */
.site-footer {
  text-align: center;
  padding: 32px 0;
  border-top: 1px solid var(--border-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-lighter);
}

.site-footer a { color: var(--text-light); }
.site-footer a:hover { color: var(--accent); }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-preview {
  animation: fadeUp 0.4s ease both;
}

.card-grid .card-preview:nth-child(1) { animation-delay: 0.03s; }
.card-grid .card-preview:nth-child(2) { animation-delay: 0.06s; }
.card-grid .card-preview:nth-child(3) { animation-delay: 0.09s; }
.card-grid .card-preview:nth-child(4) { animation-delay: 0.12s; }
.card-grid .card-preview:nth-child(5) { animation-delay: 0.15s; }
.card-grid .card-preview:nth-child(6) { animation-delay: 0.18s; }

.card-content {
  animation: fadeUp 0.5s ease both;
}

/* ---- BACK TO TOP ---- */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-lighter);
  margin-top: 24px;
}

.back-to-top:hover { color: var(--accent); }
