/* ===========================================================
   ไปคาเฟ่กัน — paicafekan.com
   Pastel blue cafe review theme (static, no build step)
   =========================================================== */

:root {
  --bg: #f1f8fd;
  --bg-soft: #e6f2fb;
  --card: #ffffff;
  --ink: #17293a;
  --ink-soft: #3d5568;
  --muted: #7c93a6;
  --brand: #57a6dc;
  --brand-deep: #2e6c99;
  --brand-pale: #d6ebfa;
  --peach: #ffe3c7;
  --line: #dceaf6;
  --shadow: 0 10px 30px rgba(45, 105, 150, 0.08);
  --shadow-lg: 0 18px 50px rgba(45, 105, 150, 0.13);
  --radius: 20px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, #dff0ff 0%, rgba(223, 240, 255, 0) 60%),
    radial-gradient(900px 500px at -10% 10%, #eaf6ff 0%, rgba(234, 246, 255, 0) 55%),
    var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-deep); text-decoration: none; }
a:hover { color: var(--brand); }

img { max-width: 100%; display: block; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(241, 248, 253, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #8ecbf0, #4d94c9);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  box-shadow: 0 6px 16px rgba(60, 130, 180, 0.28);
}

.brand small {
  display: block;
  font-family: "IBM Plex Sans Thai", sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover { background: var(--brand-pale); color: var(--brand-deep); }
.nav a.cta {
  background: var(--brand-deep);
  color: #fff;
  box-shadow: 0 8px 18px rgba(46, 108, 153, 0.25);
}
.nav a.cta:hover { background: #25587d; color: #fff; }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ---------- hero ---------- */
.hero { padding: 62px 0 40px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: clamp(2.1rem, 4.4vw, 3.35rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 20px 0 16px;
  font-weight: 600;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, transparent 62%, #cfe8f9 62%);
  padding: 0 4px;
}

.hero p.lead {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--brand-deep);
  color: #fff;
  box-shadow: 0 12px 26px rgba(46, 108, 153, 0.26);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(46, 108, 153, 0.3); color: #fff; }

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

.hero-art {
  position: relative;
  aspect-ratio: 4 / 4.3;
  border-radius: 28px;
  background:
    radial-gradient(120px 120px at 20% 20%, #ffffff 0%, rgba(255,255,255,0) 70%),
    linear-gradient(160deg, #bfe2f8 0%, #8ec5ea 45%, #6aa9d2 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60px 60px at 78% 76%, rgba(255,255,255,0.45), rgba(255,255,255,0) 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.14) 0 2px, rgba(255,255,255,0) 2px 12px);
}

.hero-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  box-shadow: 0 8px 22px rgba(30, 80, 120, 0.14);
  z-index: 2;
}

.hero-badge strong { display: block; color: var(--ink); font-size: 1rem; }

/* ---------- section heading ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 22px;
}

.section-head h2 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; }
.section-head .more { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }

/* ---------- post grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #c9e2f5;
}

.card-photo {
  aspect-ratio: 16 / 11;
  background: linear-gradient(150deg, #cfe7f8, #a9d2ec 60%, #8dbfe0);
  position: relative;
  overflow: hidden;
}

.card-photo img { width: 100%; height: 100%; object-fit: cover; }

.card-photo .zone {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(40, 90, 130, 0.12);
}

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card-body h3 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--brand-deep); }

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.dot { width: 4px; height: 4px; border-radius: 50%; background: #c3d6e4; }

/* ---------- article ---------- */
.article-head { padding: 44px 0 8px; text-align: center; }

.article-head .zone-pill {
  display: inline-block;
  background: var(--brand-pale);
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

.article-head h1 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 18px auto 14px;
  max-width: 20ch;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.article-cover {
  margin: 28px 0 0;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #cfe7f8, #a9d2ec 60%, #8dbfe0);
  box-shadow: var(--shadow-lg);
}

.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-body {
  max-width: 720px;
  margin: 34px auto 0;
  font-size: 1.045rem;
  line-height: 1.95;
  color: #24384a;
}

.article-body h2 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2.1em 0 0.6em;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
  line-height: 1.45;
}

.article-body h3 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.7em 0 0.5em;
}

.article-body p { margin: 0 0 1.05em; }

.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.article-body li { margin-bottom: 0.4em; }
.article-body li::marker { color: var(--brand); }

.article-body blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 14px 14px 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.article-body strong { color: var(--ink); font-weight: 600; }

.article-body a { border-bottom: 1px solid var(--brand-pale); }

.info-box {
  max-width: 720px;
  margin: 40px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.info-box h3 {
  font-family: "Prompt", "IBM Plex Sans Thai", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 12px;
  font-weight: 600;
}

.info-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}
.info-row:first-of-type { border-top: 0; }
.info-row .k { color: var(--muted); min-width: 96px; }
.info-row .v { color: var(--ink-soft); }

.tags {
  max-width: 720px;
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
  padding: 6px 13px;
  border-radius: 999px;
}

/* ---------- related ---------- */
.related { padding: 56px 0 20px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links { display: flex; gap: 18px; }

/* ---------- empty state ---------- */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { aspect-ratio: 16 / 11; order: -1; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav a:not(.cta) { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 20px; }
  .article-head { padding: 28px 0 4px; }
  .article-body { font-size: 1rem; }
  .info-box { padding: 18px; }
}
