:root {
  /* ── COLORS ── */
  --ink: #0f0e0d;
  --cream: #faf6ef;
  --warm-white: #fffdf9;

  --red: #c8362a;
  --red-dark: #a02820;
  --red-pale: #fdeee8;

  --gold: #c9922a;
  --gold-light: #e8b84b;

  --dark: #14181f;
  --dark-2: #1e2330;

  /* ── TEXT ── */
  --muted: #7a7268;
  --muted-light: #b0a89e;

  /* ── BORDERS ── */
  --border: #e2d9cc;
  --border-strong: #c8bfb5;

  /* ── SURFACES ── */
  --card-bg: #ffffff;

  /* ── LAYOUT ── */
  --nav-h: 64px;
  --sidebar-w: 220px;
  --page-pad: 8%;
  --page-pad-mobile: 5%;

  /* -- FONT -- */
  --header-font: "Prompt", sans-serif;
  --general-font: "Noto Sans Thai", sans-serif;
  --accent-font: "Athiti", sans-serif;
}
/* css-reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
}
button {
  background-color: transparent;
  border: none;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* ------------------font-------------------- */

.major-header {
  font-family: var(--header-font);
}

.secondary-header {
  font-family: var(--general-font);
}

.accent-text {
  font-family: var(--accent-font);
}

/* ------------------nav-------------------- */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  transition: all 0.25s;
}

nav.hidden {
  transform: translateY(-100%);
}

nav.scrolled {
  width: 100%;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
}

.nav-logo-container {
  width: 3em;
  height: 3em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#nav-logo-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.nav-links {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 36px;
  list-style: none;
  a {
    font-family: var(--accent-font), serif;
    text-decoration: none;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s;
  }
  a:hover {
    color: var(--ink);
  }
}

nav > button:first-of-type {
  justify-self: end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 4px;
  font-family: var(--general-font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-red {
  background-color: var(--red);
  border: 1.5px solid var(--red);
  color: white;
}
.btn-red:hover {
  background: transparent;
  color: var(--red-dark);
  border: 1.5px solid var(--red-dark);
  transform: translateY(-1px);
}

/* ------------------hamburger bar-------------------- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background-color: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 5% 24px;
  flex-direction: column;
  gap: 0;
}
.mobile-menu.open {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 20%;
}

.mobile-menu-tab a {
  display: block;
  padding: 14px 0;
  font-family: var(--general-font), serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-tab a:last-child {
  border-bottom: none;
}
.mobile-menu .btn-red {
  margin-top: 16px;
  text-align: center;
  border-radius: 6px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  width: 100%;
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ------------------footer-------------------- */
footer {
  background: var(--red-dark);
  color: var(--cream);
  padding: 36px 8%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: center;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-mark {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  img {
    object-fit: contain;
  }
}

.footer-name {
  font-family: var(--header-font), serif;
  font-size: 16px;
  font-weight: 700;
}
.footer-sub {
  font-family: var(--accent-font), serif;
  font-size: 12px;
}

.footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.social-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  text-decoration: none;
  font-weight: 900;
  transition: all 0.2s;
}

.social-pill:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

@media (max-width: 640px) {
  nav {
    padding: 0 5%;
  }
  .nav-links {
    display: none;
  }
  .nav-desktop-cta {
    display: none;
  }
  .nav-hamburger {
    display: flex;
    align-items: end;
  }

  .nav-logo-text {
    font-size: 13px;
  }

  .mobile-menu-tab > button.btn-red {
    color: white;
  }

  span.mobile-blur {
    content: "";
    position: absolute;
    bottom: -120px;
    left: 30%;
    width: 320px;
    height: 320px;
    border-radius: 15%;
    background-color: #fdeef0;
    z-index: -1;
  }

  footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 5%;
    text-align: center;
  }
  footer > div:nth-child(2) {
    display: none;
  }
  .footer-logo {
    justify-content: center;
  }
  .footer-name {
    display: none;
  }
  .footer-socials {
    justify-content: center;
  }
}
