:root {
  --navy: #15353d;
  --teal: #0f766e;
  --teal-dark: #0a5b55;
  --mint: #dff3ed;
  --orange: #f59e5b;
  --cream: #fbf8f1;
  --white: #ffffff;
  --text: #263a3e;
  --muted: #65787b;
  --line: #dce8e5;
  --shadow: 0 22px 55px rgba(21, 53, 61, 0.12);
  --radius-large: 24px;
  --radius-medium: 16px;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--cream);
  font-family: "Anuphan", sans-serif;
  line-height: 1.7;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: relative;
  min-height: 100svh;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(9, 36, 42, 0.88) 0%, rgba(9, 36, 42, 0.56) 50%, rgba(9, 36, 42, 0.25) 100%),
    linear-gradient(180deg, rgba(9, 36, 42, 0.1), rgba(9, 36, 42, 0.55)),
    url("images/si-chomphu-community.jpg") center / cover no-repeat;
}

.navbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-family: "Kanit", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.nav-link {
  padding: 9px 0;
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 180ms ease;
}

.nav-link:hover {
  border-color: var(--orange);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 86px);
  align-items: center;
  padding: 80px 0 110px;
}

.hero-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffca91;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dark {
  color: var(--teal);
}

.hero h1,
.section-heading h2,
.travel-note h2,
.modal-header h2 {
  margin: 0;
  font-family: "Kanit", sans-serif;
  line-height: 1.16;
}

.hero h1 {
  max-width: 920px;
  overflow-wrap: anywhere;
  font-size: clamp(3.25rem, 7.8vw, 6.6rem);
  font-weight: 600;
  letter-spacing: -0.045em;
}

.hero h1 span {
  display: block;
  margin-top: 10px;
  color: #d9ece9;
  font-size: 0.48em;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 4px 0 22px;
  color: #d9ece9;
  font-family: "Kanit", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.hero-description {
  max-width: 630px;
  margin: 0 0 34px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
}

.primary-button,
.card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  min-height: 52px;
  padding: 0 24px;
  color: var(--navy);
  background: var(--orange);
  box-shadow: 0 12px 28px rgba(245, 158, 91, 0.24);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  background: #ffb576;
}

.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 24px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 99px;
  transform: translateX(-50%);
}

.hero-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 99px;
  background: var(--orange);
  transform: translateX(-50%);
  animation: scroll-dot 1.8s infinite;
}

@keyframes scroll-dot {
  0%, 100% { opacity: 0.35; transform: translate(-50%, 0); }
  45% { opacity: 1; transform: translate(-50%, 10px); }
}

.places-section {
  padding: 104px 0 116px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 470px);
  gap: 48px;
  align-items: end;
  margin-bottom: 42px;
}

.section-heading h2,
.travel-note h2 {
  color: var(--navy);
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section-heading > p,
.travel-note-inner > p {
  margin: 0;
  color: var(--muted);
}

.places-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.place-card {
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: 0 8px 30px rgba(21, 53, 61, 0.06);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.place-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.card-image-link {
  display: block;
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card-image-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 52%, rgba(10, 45, 51, 0.32));
  pointer-events: none;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.place-card:hover .card-image {
  transform: scale(1.045);
}

.card-number {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(9, 36, 42, 0.45);
  backdrop-filter: blur(8px);
}

.card-content {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  padding: 27px 28px 29px;
}

.card-category {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.card-title {
  margin: 0 0 10px;
  color: var(--navy);
  font-family: "Kanit", sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.25;
}

.card-title a {
  transition: color 180ms ease;
}

.card-title a:hover,
.card-title a:focus-visible {
  color: var(--teal);
}

.card-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 0.93rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-button {
  min-height: 46px;
  margin-top: auto;
  padding: 0 18px;
  color: var(--white);
  background: var(--teal);
}

.card-button:hover,
.card-button:focus-visible {
  transform: translateY(-1px);
  background: var(--teal-dark);
  box-shadow: 0 9px 20px rgba(15, 118, 110, 0.2);
}

.travel-note {
  padding: 0 0 108px;
}

.travel-note-inner {
  display: grid;
  grid-template-columns: auto 1.2fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 44px;
  border: 1px solid #cbe2dd;
  border-radius: var(--radius-large);
  background: var(--mint);
}

.travel-note-icon {
  display: grid;
  width: 70px;
  height: 70px;
  color: var(--white);
  font-size: 1.6rem;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
}

.travel-note h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.site-footer {
  padding: 34px 0;
  color: rgba(255, 255, 255, 0.72);
  background: var(--navy);
}

.footer-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.footer-inner p {
  margin: 0;
}

.photo-credits {
  position: relative;
}

.photo-credits summary {
  cursor: pointer;
  font-weight: 600;
}

.credit-links {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  width: min(540px, calc(100vw - 40px));
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 14px;
  border-radius: 12px;
  color: var(--navy);
  background: var(--white);
  box-shadow: var(--shadow);
}

.credit-links a {
  color: var(--teal);
  text-decoration: underline;
}

/* Modal */
.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  visibility: hidden;
  padding: 28px;
  opacity: 0;
  place-items: center;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 25, 29, 0.72);
  backdrop-filter: blur(7px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  width: min(100%, 930px);
  max-height: calc(100svh - 56px);
  padding: 42px;
  border-radius: var(--radius-large);
  background: var(--white);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.28);
  transform: translateY(18px) scale(0.985);
  transition: transform 200ms ease;
}

.modal.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--navy);
  font-size: 1.8rem;
  line-height: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #edf4f2;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--white);
  background: var(--teal);
  transform: rotate(5deg);
}

.modal-header {
  padding-right: 48px;
}

.modal-category {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.modal-header h2 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.05rem);
}

.modal-header > p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
}

.modal-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 26px 0 30px;
}

.highlight-item {
  padding: 14px 16px;
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--mint);
}

.highlight-item::before {
  margin-right: 7px;
  color: var(--orange);
  content: "✦";
}

.panorama-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.panorama-heading > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.panorama-heading h3 {
  margin: 0;
  color: var(--navy);
  font-family: "Kanit", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
}

.panorama-heading > span {
  color: var(--muted);
  font-size: 0.75rem;
}

.panorama-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34b897;
  box-shadow: 0 0 0 5px rgba(52, 184, 151, 0.15);
}

.map-frame {
  overflow: hidden;
  height: 400px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e5eeec;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(245, 158, 91, 0.72);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .section-heading,
  .travel-note-inner {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 17px;
  }

  .travel-note-icon {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .navbar {
    min-height: 74px;
  }

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

  .nav-link {
    font-size: 0.82rem;
  }

  .hero {
    min-height: calc(100svh - 74px);
    padding: 70px 0 95px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8.3vw, 2.35rem);
  }

  .hero h1 span {
    font-size: 0.64em;
  }

  .hero-description {
    font-size: 0.93rem;
  }

  .places-section {
    padding: 76px 0 86px;
  }

  .places-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-content {
    min-height: 0;
    padding: 23px 22px 24px;
  }

  .travel-note {
    padding-bottom: 80px;
  }

  .travel-note-inner {
    gap: 18px;
    padding: 30px 24px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .credit-links {
    right: auto;
    left: 0;
  }

  .modal {
    padding: 0;
    place-items: end center;
  }

  .modal-dialog {
    width: 100%;
    max-height: 94svh;
    padding: 32px 18px 22px;
    border-radius: 24px 24px 0 0;
  }

  .modal-close {
    top: 15px;
    right: 15px;
  }

  .modal-header {
    padding-right: 42px;
  }

  .modal-highlights {
    grid-template-columns: 1fr;
    gap: 7px;
    margin: 22px 0 26px;
  }

  .panorama-heading > span {
    display: none;
  }

  .map-frame {
    height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
