/* =========================================================
   กชกร คอร์ปอเรชั่น — โทเค็นดีไซน์
   ========================================================= */

:root {
  --forest-dark: #16281f;
  --forest: #21402f;
  --moss: #4c7a5b;
  --moss-light: #7d9f83;
  --sage: #cdd9c1;
  --cream: #f7f3e8;
  --cream-deep: #efe8d4;
  --ink: #1b2420;
  --ink-soft: #4a544c;
  --gold: #a9822f;
  --gold-soft: #d9c184;
  --white: #ffffff;

  --font-display: "Noto Serif Thai", "Noto Serif", serif;
  --font-body: "Noto Sans Thai", "Noto Sans", sans-serif;

  --measure: 62ch;
  --radius-organic: 4% 96% 6% 94% / 94% 4% 96% 6%;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest-dark);
  line-height: 1.3;
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* -------------------- Header -------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid rgba(33, 64, 47, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--forest-dark);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.66rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.7rem);
}

.main-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  white-space: nowrap;
  color: var(--ink-soft);
  padding: 0.3rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--forest-dark);
}

.main-nav a[aria-current="page"] {
  color: var(--forest-dark);
  border-color: var(--gold);
  font-weight: 600;
}

.nav-cta {
  background: var(--forest-dark);
  color: var(--cream) !important;
  padding: 0.6rem 1.3rem !important;
  border-radius: 2px;
  border-bottom: none !important;
  font-weight: 600;
  margin-left: 0.4rem;
}

.nav-cta:hover {
  background: var(--forest);
  color: var(--cream) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--forest-dark);
  border-radius: 2px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--forest-dark);
  margin: 4px auto;
}

@media (max-width: 1180px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(33, 64, 47, 0.14);
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open {
    max-height: 320px;
  }
  .main-nav a {
    width: 100%;
    padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem);
    border-bottom: 1px solid rgba(33, 64, 47, 0.08);
  }
  .nav-cta {
    margin: 0.9rem clamp(1.25rem, 4vw, 2.5rem);
    width: calc(100% - 2 * clamp(1.25rem, 4vw, 2.5rem));
    text-align: center;
  }
}

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--forest-dark);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--forest-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--forest-dark);
  border-color: var(--forest-dark);
}

.btn-ghost:hover {
  background: var(--forest-dark);
  color: var(--cream);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* -------------------- Hero -------------------- */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  background: linear-gradient(180deg, var(--cream-deep) 0%, var(--cream) 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  color: var(--moss);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  margin-bottom: 1.1rem;
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-figure {
  position: relative;
}

.hero-figure img {
  width: 100%;
  height: clamp(280px, 34vw, 440px);
  object-fit: cover;
  border-radius: var(--radius-organic);
  box-shadow: 0 24px 55px -25px rgba(22, 40, 31, 0.45);
}

.hero-figure figcaption {
  position: absolute;
  left: -1.2rem;
  bottom: -1.3rem;
  background: var(--forest-dark);
  color: var(--cream);
  padding: 1rem 1.3rem;
  max-width: 240px;
  font-size: 0.85rem;
  line-height: 1.55;
  border-left: 3px solid var(--gold);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-figure figcaption {
    position: static;
    margin-top: 1rem;
    max-width: none;
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease both;
}

.fade-in-up.delay-1 { animation-delay: 0.12s; }
.fade-in-up.delay-2 { animation-delay: 0.24s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------- Sections -------------------- */

section {
  padding: clamp(2.8rem, 6vw, 5.5rem) 0;
}

.section-head {
  max-width: 56ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head .kicker {
  color: var(--moss);
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-alt {
  background: var(--cream-deep);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(33,64,47,0.28), rgba(33,64,47,0));
  border: none;
  margin: 0;
}

/* -------------------- Service list (vine layout) -------------------- */

.service-vine {
  position: relative;
  padding-left: 2.4rem;
}

.service-vine::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--moss-light);
}

.service-row {
  position: relative;
  padding: 0 0 clamp(2rem, 4vw, 2.8rem);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.6rem;
}

.service-row:last-child {
  padding-bottom: 0;
}

.service-row::before {
  content: "";
  position: absolute;
  left: -2.4rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--gold);
}

.service-row h3 {
  font-size: 1.15rem;
  color: var(--forest-dark);
}

.service-row .service-tag {
  color: var(--moss);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: block;
}

.service-row p {
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 700px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* -------------------- Values / principles -------------------- */

.principle-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.principle-list > div {
  border-top: 2px solid var(--forest-dark);
  padding-top: 1rem;
}

.principle-list h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.principle-list p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

@media (max-width: 640px) {
  .principle-list {
    grid-template-columns: 1fr;
  }
}

/* -------------------- Split content with image band -------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split img {
  width: 100%;
  height: clamp(260px, 30vw, 400px);
  object-fit: cover;
}

.split .text-col p {
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split.reverse .img-col {
    order: -1;
  }
}

/* -------------------- Quote band -------------------- */

.quote-band {
  position: relative;
  background: var(--forest-dark);
  color: var(--cream);
}

.quote-band .container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}

.quote-band img {
  width: 100%;
  height: clamp(240px, 26vw, 340px);
  object-fit: cover;
}

.quote-band blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.55;
}

.quote-band cite {
  display: block;
  margin-top: 1.2rem;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--sage);
}

@media (max-width: 860px) {
  .quote-band .container {
    grid-template-columns: 1fr;
  }
}

/* -------------------- CTA banner -------------------- */

.cta-banner {
  background: var(--cream-deep);
  border-top: 1px solid rgba(33,64,47,0.16);
  border-bottom: 1px solid rgba(33,64,47,0.16);
}

.cta-banner .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.cta-banner h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  max-width: 34ch;
}

/* -------------------- Footer -------------------- */

.site-footer {
  background: var(--forest-dark);
  color: var(--sage);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.6rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(247, 243, 232, 0.14);
}

.footer-grid h4 {
  color: var(--cream);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-brand {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}

.footer-grid p, .footer-grid a {
  font-size: 0.92rem;
  color: var(--sage);
  text-decoration: none;
  line-height: 1.8;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid a:hover {
  color: var(--gold-soft);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1.4rem;
  font-size: 0.82rem;
  color: rgba(205, 217, 193, 0.75);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

/* -------------------- Page header (inner pages) -------------------- */

.page-header {
  padding: clamp(2.4rem, 5vw, 3.6rem) 0 clamp(1.6rem, 3vw, 2.4rem);
  background: var(--cream-deep);
}

.page-header .kicker {
  color: var(--moss);
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.7rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.page-header p.lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 0.9rem;
}

/* -------------------- Contact page -------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.contact-card {
  border: 1px solid rgba(33,64,47,0.18);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--white);
}

.contact-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.8rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(33,64,47,0.1);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--moss);
  margin-top: 0.15rem;
}

.contact-item h4 {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-item a, .contact-item p {
  margin: 0;
  color: var(--forest-dark);
  text-decoration: none;
  font-size: 1rem;
}

.map-frame {
  width: 100%;
  height: clamp(300px, 34vw, 420px);
  border: 1px solid rgba(33,64,47,0.18);
  filter: grayscale(0.15) sepia(0.08);
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------- Policy page -------------------- */

.policy-body {
  max-width: 74ch;
}

.policy-body h2 {
  font-size: 1.25rem;
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
}

.policy-body h2:first-child {
  margin-top: 0;
}

.policy-body p, .policy-body li {
  color: var(--ink-soft);
}

.policy-body ul {
  padding-left: 1.3rem;
}

.policy-body li {
  margin-bottom: 0.5rem;
}

.policy-updated {
  display: inline-block;
  background: var(--sage);
  color: var(--forest-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.6rem;
}
