/* ==========================================================================
   Better Tourism — Portfolio / Case Study Styles
   ยึดตาม styles.css ต้นแบบทุก token
   ========================================================================== */

/* ── Hero ── */
.cs-hero {
  position: relative;
  min-height: 74vh;
  max-height: 820px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  background-color: var(--ink);
}
.cs-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,76,109,.18) 0%, rgba(0,76,109,.55) 55%, rgba(7,21,30,.88) 100%);
}
.cs-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  color: #fff;
  padding-top: 130px;
  padding-bottom: clamp(56px,8vh,100px);
}
.cs-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  letter-spacing: .04em;
  font-weight: 500;
  margin-bottom: 30px;
  transition: color var(--t), gap var(--t);
  text-decoration: none;
}
.cs-breadcrumb svg { width: 18px; height: 18px; }
.cs-breadcrumb:hover { color: var(--secondary); gap: 13px; }
.cs-hero-eyebrow {
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.cs-hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--secondary); }
.cs-hero h1 { color: #fff; font-weight: 800; max-width: 16ch; margin-bottom: 26px; }
.cs-hero h1 em { font-style: normal; color: var(--secondary); }
.cs-hero-sub {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255,255,255,.92);
}

/* Status pill */
.cs-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 22px;
}
.cs-status-pill.is-progress { background: var(--secondary); color: var(--ink); }
.cs-status-pill.is-done {
  background: rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
}
.cs-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.cs-status-pill.is-progress .cs-status-dot { animation: csPulse 1.6s ease-in-out infinite; }
@keyframes csPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.65)} }

/* ── Meta Strip ── */
.cs-meta-section { border-bottom: 1px solid var(--line); background: var(--bg); }
.cs-meta { display: grid; grid-template-columns: repeat(4,1fr); }
.cs-meta-item {
  padding: 38px 36px 38px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.cs-meta-item + .cs-meta-item { padding-left: 36px; }
.cs-meta-item:last-child { border-right: none; }
.cs-meta-label {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}
.cs-meta-value { font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.4; letter-spacing: -.01em; }
.cs-meta-flag { display: inline-flex; align-items: center; gap: 9px; }
.cs-meta-flag .d { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.cs-meta-flag.is-progress .d { background: var(--secondary-dark); animation: csPulse 1.6s ease-in-out infinite; }
.cs-meta-flag.is-done .d { background: var(--primary); }

/* ── Overview ── */
.cs-overview-section {
  padding: clamp(64px,8vw,100px) 0;
  border-bottom: 1px solid var(--line);
}
.cs-overview-body { max-width: 760px; }
.cs-overview-body p {
  font-size: clamp(17px,1.8vw,20px);
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 1.2em;
}
.cs-overview-body p:last-child { margin-bottom: 0; }

/* ── Section head (2 cols — Challenge & Solution) ── */
.cs-sect-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 56px;
}
.cs-sect-head .eyebrow { margin-bottom: 18px; }
.cs-sect-head h2 {
  font-size: clamp(32px,4.2vw,54px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.cs-sect-head p { font-size: 17px; line-height: 1.75; max-width: 480px; color: var(--muted); }

/* ── Challenge ── */
.cs-ch-section {
  padding: clamp(80px,10vw,140px) 0;
  background: var(--bg);
}
.cs-points.cols-3 {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.cs-point {
  background: var(--bg);
  padding: 46px 38px 54px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 230px;
  position: relative;
  transition: background var(--t);
}
.cs-point::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--primary);
  transform: scaleY(0); transform-origin: top;
  transition: transform var(--t);
}
.cs-point:hover::before { transform: scaleY(1); }
.cs-point:hover { background: var(--bg-tinted); }
.cs-point-num {
  font-size: 50px;
  font-weight: 200;
  letter-spacing: -.04em;
  color: var(--primary);
  line-height: 1;
}
.cs-point-num::after { content: "."; color: var(--secondary); }
.cs-point h3 { font-size: 21px; font-weight: 600; line-height: 1.38; letter-spacing: -.01em; margin-top: auto; }

/* ── Solution ── */
.cs-sol-section {
  padding: clamp(80px,10vw,140px) 0;
  background: var(--bg-soft);
}
.cs-points.cols-4 {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 8px;
}
/* .cs-point ใช้ร่วมกัน — defined above */

/* ── Impact ── */
.cs-impact-section { background: #005085; padding: clamp(80px,10vw,140px) 0; }
.cs-impact-section .eyebrow { color: var(--secondary); margin-bottom: 18px; }
.cs-impact-section .eyebrow::before { background: var(--secondary); }
.cs-impact-section h2 { color: #fff; margin-bottom: 48px; }
.cs-impact-section > .wrap > p { color: rgba(255,255,255,.75); font-size: 17px; max-width: 480px; margin-bottom: 64px; }

.cs-impact {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.16);
}
.cs-impact-item {
  background: #005085;
  padding: 52px 44px 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  justify-content: flex-end;
}
.cs-impact-icon { color: var(--secondary); margin-bottom: 4px; }
.cs-impact-icon svg { width: 44px; height: 44px; stroke-width: 1.2; }
.cs-impact-num {
  font-size: clamp(58px,7vw,92px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--secondary);
}
.cs-impact-label { font-size: 16px; color: rgba(255,255,255,.88); line-height: 1.55; max-width: 24ch; }

/* ── Roadmap ── */
.cs-roadmap-section { background: #005085; padding: clamp(80px,10vw,140px) 0; }
.cs-roadmap-section .eyebrow { color: var(--secondary); margin-bottom: 18px; }
.cs-roadmap-section .eyebrow::before { background: var(--secondary); }
.cs-roadmap-section h2 { color: #fff; margin-bottom: 8px; }

.cs-roadmap {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.16);
  margin-top: 48px;
}
.cs-phase {
  background: #005085;
  padding: 40px 32px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 250px;
  position: relative;
}
.cs-phase-top { display: flex; align-items: center; justify-content: space-between; }
.cs-phase-num { font-size: 46px; font-weight: 200; letter-spacing: -.04em; line-height: 1; color: rgba(255,255,255,.45); }
.cs-phase.is-done .cs-phase-num { color: var(--secondary); }
.cs-phase.is-current .cs-phase-num { color: #fff; }
.cs-phase-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cs-phase.is-done .cs-phase-mark { background: var(--secondary); color: var(--ink); }
.cs-phase.is-done .cs-phase-mark svg { width: 16px; height: 16px; }
.cs-phase.is-current .cs-phase-mark { background: rgba(255,255,255,.16); }
.cs-phase.is-current .cs-phase-mark .cs-status-dot { background: #fff; animation: csPulse 1.6s ease-in-out infinite; }
.cs-phase.is-upcoming .cs-phase-mark { border: 1px solid rgba(255,255,255,.3); }
.cs-phase.is-upcoming .cs-phase-mark .cs-status-dot { background: rgba(255,255,255,.4); }
.cs-phase h4 { color: #fff; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.cs-phase p { color: rgba(255,255,255,.7); font-size: 13.5px; line-height: 1.62; }
.cs-phase.is-upcoming h4 { color: rgba(255,255,255,.7); }
.cs-phase-chip {
  margin-top: auto;
  align-self: flex-start;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
}
.cs-phase.is-done .cs-phase-chip { background: rgba(255,255,255,.14); color: #fff; }
.cs-phase.is-current .cs-phase-chip { background: var(--secondary); color: var(--ink); }
.cs-phase.is-upcoming .cs-phase-chip { background: transparent; border: 1px solid rgba(255,255,255,.28); color: rgba(255,255,255,.65); }

/* ── Testimonial ── */
.cs-testi-section {
  padding: clamp(80px,10vw,140px) 0;
  background: var(--bg-soft);
}
.cs-testi-inner { max-width: 940px; margin: 0 auto; text-align: center; }
.cs-testi-inner .eyebrow { justify-content: center; margin-bottom: 0; }
.cs-testi-mark {
  display: block;
  font-family: Georgia, serif;
  font-size: 120px;
  line-height: .2;
  height: 54px;
  color: var(--primary);
  opacity: .32;
  margin: 26px 0 8px;
}
.cs-testi-quote {
  font-size: clamp(26px,3.5vw,44px);
  font-weight: 300;
  line-height: 1.42;
  letter-spacing: -.012em;
  color: var(--ink);
  text-wrap: balance;
}
.cs-testi-quote em { font-style: normal; color: var(--primary); font-weight: 400; }
.cs-testi-stars { color: var(--secondary); letter-spacing: 2px; font-size: 14px; margin: 14px 0 0; }
.cs-testi-person {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}
.cs-testi-ava {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  flex-shrink: 0;
}
.cs-testi-meta { text-align: left; }
.cs-testi-name { font-weight: 600; font-size: 16px; color: var(--ink); }
.cs-testi-role { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.cs-testi-note {
  margin-top: 30px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-testi-note .d { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary-dark); animation: csPulse 1.6s ease-in-out infinite; }

/* ── CTA ── */
.cs-cta-split { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.cs-cta-img {
  background-size: cover;
  background-position: center top;
  min-height: 560px;
  background-color: var(--bg-soft);
}
.cs-cta-img img { width: 100%; height: 100%; object-fit: cover; }
.cs-cta-body {
  padding: clamp(56px,6vw,96px) clamp(40px,6vw,92px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cs-cta-body .eyebrow { margin-bottom: 22px; }
.cs-cta-body h2 { margin-bottom: 18px; }
.cs-cta-body p { font-size: 17px; color: var(--muted); max-width: 470px; line-height: 1.75; margin-bottom: 38px; }
.cs-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Archive ── */
.cs-archive-section { padding: clamp(80px,10vw,140px) 0; }
.cs-archive-section .sect-head--single { margin-bottom: 64px; }
.cs-archive-section .sect-head--single .eyebrow { margin-bottom: 14px; }
.cs-archive-section .sect-head--single h1 { font-size: clamp(36px,5vw,64px); margin-bottom: 16px; }
.cs-archive-section .sect-head--single p { font-size: 17px; color: var(--muted); max-width: 560px; line-height: 1.75; }
.cs-archive-grid .case { aspect-ratio: 4/3; }
.cs-archive-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.cs-archive-pill.is-done { background: rgba(0,136,192,.15); color: var(--primary); border: 1px solid rgba(0,136,192,.25); }
.cs-archive-pill.is-progress { background: rgba(254,222,20,.18); color: #8a7200; border: 1px solid rgba(254,222,20,.35); }
.cs-archive-pagination { margin-top: 64px; text-align: center; }
.cs-archive-pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.cs-archive-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: all var(--t);
}
.cs-archive-pagination .page-numbers:hover,
.cs-archive-pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.cs-archive-empty { color: var(--muted); font-size: 16px; padding: 80px 0; text-align: center; }

/* ── Reveal ── */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta-item:nth-child(2) { border-right: none; }
  .cs-meta-item:nth-child(3), .cs-meta-item:nth-child(4) { border-top: 1px solid var(--line); }
  .cs-sect-head { grid-template-columns: 1fr; gap: 20px; }
  .cs-points.cols-3, .cs-points.cols-4 { grid-template-columns: repeat(2,1fr); }
  .cs-impact { grid-template-columns: 1fr; }
  .cs-roadmap { grid-template-columns: repeat(2,1fr); }
  .cs-cta-split { grid-template-columns: 1fr; }
  .cs-cta-img { min-height: 380px; }
}
@media (max-width: 640px) {
  .cs-meta { grid-template-columns: 1fr; }
  .cs-meta-item, .cs-meta-item + .cs-meta-item { padding: 26px 0; border-right: none; border-top: 1px solid var(--line); }
  .cs-meta-item:first-child { border-top: none; }
  .cs-points.cols-3, .cs-points.cols-4 { grid-template-columns: 1fr; }
  .cs-roadmap { grid-template-columns: 1fr; }
  .cs-hero { min-height: 0; }
  .cs-cta-actions { flex-direction: column; }
  .cs-cta-actions .btn { width: 100%; justify-content: center; }
}

/* ── Solution v2 — split layout ── */
.cs-sol-section {
  padding: clamp(80px,10vw,140px) 0;
  background: var(--bg-soft);
}
.cs-sol-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
  align-items: start;
}
.cs-sol-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-sol-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  cursor: default;
  transition: border-color var(--t), background var(--t);
}
.cs-sol-card.active,
.cs-sol-card:hover {
  border-color: var(--primary);
  background: var(--bg-tinted);
}
.cs-sol-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cs-sol-icon .ti {
  font-size: 20px;
  color: var(--primary);
}
.cs-sol-card-body h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px;
  color: var(--text);
}
.cs-sol-card-body p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}
.cs-sol-image-wrap {
  position: sticky;
  top: 100px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.cs-sol-image-inner {
  padding: 12px;
}
.cs-sol-image-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .cs-sol-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cs-sol-image-wrap {
    position: static;
  }
}
