/* ============================================================
   NaaptolShop — Pillow & Sleep Reviews
   Cozy home-comfort design system
   ============================================================ */

:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-soft: #f5efe6;
  --primary: #6fa8a0;
  --primary-dark: #4f8a82;
  --primary-soft: #e6f0ee;
  --accent: #e5965f;
  --accent-dark: #d07f45;
  --accent-soft: #fbeadd;
  --ink: #3c3731;
  --muted: #8a8075;
  --border: #ece3d7;
  --shadow-sm: 0 2px 10px rgba(96, 74, 52, 0.06);
  --shadow-md: 0 14px 34px rgba(96, 74, 52, 0.10);
  --shadow-lg: 0 22px 50px rgba(96, 74, 52, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.25; margin: 0 0 0.6em; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.brand-text small {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; align-items: center; gap: 6px; }

.nav-link {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--ink); background: var(--surface-soft); }
.nav-link.active { color: var(--primary-dark); background: var(--primary-soft); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (index) ---------- */
.hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--primary-soft), transparent 60%),
    radial-gradient(900px 420px at 0% 10%, var(--accent-soft), transparent 55%),
    var(--bg);
}

.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }

.hero-kicker {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin: 22px 0 16px;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 30px;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- Section ---------- */
.articles { padding: 72px 0 96px; }

.section-head { text-align: center; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 10px; }
.section-head p { color: var(--muted); }

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.card-link { display: block; color: inherit; height: 100%; }
.card-link:hover { color: inherit; }

.card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }

.card-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary);
}

.card-body { padding: 22px 22px 24px; }

.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.card:nth-child(3n) .chip,
.chip.accent { background: var(--accent-soft); color: var(--accent-dark); }

.card-title {
  font-size: 1.22rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

.card-excerpt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.card-meta {
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Article page ---------- */
.article-main { padding: 40px 0 90px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--primary-dark); }
.breadcrumb span { color: var(--muted); }

.post {
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 48px 56px;
  box-shadow: var(--shadow-sm);
}

.post-header { margin-bottom: 28px; }
.post-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 14px 0 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}
.post-meta .dot { color: var(--accent); }

.post-body { font-size: 17px; }

.post-body h2 { font-size: 1.7rem; margin: 1.8em 0 0.6em; }
.post-body h3 { font-size: 1.35rem; margin: 1.6em 0 0.5em; }
.post-body h4 { font-size: 1.1rem; margin: 1.4em 0 0.4em; color: var(--primary-dark); }

.post-body p { margin: 0 0 1.15em; }

.post-body ul,
.post-body ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.post-body li { margin-bottom: 0.4em; }
.post-body li::marker { color: var(--primary); }

.post-body blockquote {
  margin: 1.4em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

.post-image {
  margin: 1.6em 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.post-image img { width: 100%; height: auto; }

.media-embed {
  position: relative;
  margin: 1.6em 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #000;
}
.media-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* Tables */
.table-wrap {
  margin: 1.6em 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
}
.table-wrap th,
.table-wrap td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table-wrap thead th {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--serif);
  font-size: 16px;
}
.table-wrap tbody tr:nth-child(even) { background: var(--surface-soft); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: #f1e9dd;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-top: 52px;
  padding-bottom: 40px;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}

.footer-brand p { color: var(--muted); margin: 10px 0 0; max-width: 300px; }

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 15px; }
.footer-links a:hover { color: var(--accent-dark); }

.copyright {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .post { padding: 40px 36px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 13px 16px; }
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .post { padding: 32px 22px; border-radius: 16px; }
  .hero { padding: 60px 0 52px; }
  .articles { padding: 52px 0 70px; }
}
