/* YuniKey — shared.css */
/* All the styles shared between index.html, blog.html, and post pages */
/* This is included via <link rel="stylesheet" href="style.css"> */

:root {
  /* --cream: #f8f4ee;
  --cream-dark: #ede7dc;
  --ink: #1a1612;
  --ink-muted: #5a5248;
  --ink-faint: #8c857d;
  --accent: #c4622d;
  --accent-light: #f0d9c8;
  --accent-dark: #8a3d17;
  --teal: #2d7a6e;
  --teal-light: #c8e8e4;
  --gold: #b8962e;
  --white: #ffffff;
  --border: rgba(26, 22, 18, 0.12);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --max: 1200px;
  --nav-h: 64px; */

  --cream: #f5f5f5;
  --cream-dark: #e8e8e8;
  --ink: #2c2c2c;
  --ink-muted: #5a5a5a;
  --ink-faint: #8a8a8a;
  --accent: #87ceeb;
  --accent-light: #b0e0e6;
  --accent-dark: #5f9ea0;
  --teal: #4682b4;
  --teal-light: #b0c4de;
  --gold: #708090;
  --white: #ffffff;
  --border: rgba(44, 44, 44, 0.12);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --max: 1200px;
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-logo span {
  color: var(--accent);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-links a:hover {
  color: var(--ink);
  background: var(--cream-dark);
}
.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  border-radius: 6px;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  padding: 0.5rem 1rem !important;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.15s !important;
}
.nav-cta:hover {
  background: var(--accent-dark) !important;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
}

/* SECTION */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 2rem;
}
.section-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-subtitle {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
  max-width: 55ch;
}
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.view-all {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.view-all:hover {
  color: var(--accent-dark);
}

/* PILLS */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 2rem;
}
.pill {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
}
.pill:hover,
.pill.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* BLOG GRID */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.article-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(26, 22, 18, 0.1);
}
.card-img {
  aspect-ratio: 16/9;
  background: var(--cream-dark);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--ink-faint);
  flex-wrap: wrap;
}
.card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card-excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.card-read-more {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.15s;
}
.article-card:hover .card-read-more {
  gap: 0.5rem;
}
.card-affiliate-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  background: #faf3dc;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #e8d98a;
}

/* SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.widget-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.widget-body {
  padding: 1rem 1.25rem;
}

.etsy-widget {
  background: linear-gradient(135deg, #2d7a6e, #1a4a43);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}
.etsy-widget p {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.etsy-widget strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-bottom: 0.375rem;
}
.etsy-btn {
  display: inline-block;
  background: white;
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  width: 100%;
  text-align: center;
  transition: opacity 0.15s;
}
.etsy-btn:hover {
  opacity: 0.9;
}

.pinterest-widget {
  background: #e60023;
  color: white;
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
}
.pinterest-widget p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.875rem;
}
.pin-btn {
  display: inline-block;
  background: white;
  color: #e60023;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  width: 100%;
  text-align: center;
}

.popular-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.popular-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.popular-item:last-child {
  border-bottom: none;
}
.popular-num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--cream-dark);
  font-weight: 400;
  min-width: 2rem;
  line-height: 1;
}
.popular-item:hover .popular-num {
  color: var(--accent);
}
.popular-text {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}
.popular-cat {
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: 0.1rem;
}

/* SEARCH */
.search-bar-wrap {
  position: relative;
}
.search-bar-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--ink);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.search-bar-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 98, 45, 0.12);
}
.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}

/* FOOTER */
footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5rem;
  padding: 3rem 2rem 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.footer-brand span {
  color: var(--accent);
}
.footer-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 28ch;
  margin-bottom: 1.25rem;
}
.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition:
    background 0.15s,
    color 0.15s;
}
.social-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.15s;
}
.footer-col ul li a:hover {
  color: white;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.affiliate-notice {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  max-width: 60ch;
  line-height: 1.5;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .nav-links {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 101;
  }
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  .nav-links.active {
    transform: translateX(0);
  }
  .nav-overlay.active {
    display: block;
  }
  .hamburger {
    display: block;
  }
  .hamburger.active svg {
    transform: rotate(90deg);
  }
  .section {
    padding: 2.5rem 1.25rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
