:root {
  --color-primary: #1e1a17;
  --color-secondary: #e4b56a;
  --color-accent: #e4b56a;
  --color-background: #1e1a17;
  --color-surface: #2a2420;
  --color-text: #f6f1ea;
  --color-muted: #c9b8a4;
  --color-cta: #e4b56a;
  --line: rgba(246, 241, 234, 0.18);
  --pad: clamp(1.25rem, 4.5vw, 5rem);
  --display: "Fahkwang", "Noto Sans Thai", sans-serif;
  --sans: "Bai Jamjuree", "Noto Sans Thai", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--sans);
  font-size: 1.1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: #5c4a32;
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  z-index: 40;
  left: var(--pad);
  top: 0.75rem;
  transform: translateY(-160%);
  padding: 0.55rem 0.9rem;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

main:focus {
  outline: none;
}

#path,
#who,
#contact {
  scroll-margin-top: 5.5rem;
}

.top,
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--pad);
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: calc(0.8rem + env(safe-area-inset-top));
  padding-bottom: 0.8rem;
  background: rgba(30, 26, 23, 0.94);
  border-bottom: 2px solid var(--color-secondary);
}

.wordmark {
  color: var(--color-text);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 1.35rem;
}

.nav a {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--color-secondary);
}

.menu {
  display: none;
  min-height: 2.75rem;
  padding: 0.3rem 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.hero {
  padding: clamp(2.6rem, 9vh, 5.5rem) var(--pad) clamp(2.2rem, 6vh, 4rem);
}

.kicker {
  margin: 0 0 0.7rem;
  color: var(--color-secondary);
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.35;
}

h1 {
  max-width: 9em;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
}

.lede,
.steps p,
.who p,
.contact p {
  margin: 0;
}

.lede {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--color-muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  margin-top: 1.3rem;
  padding: 0.4rem 1.15rem;
  background: var(--color-cta);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.cta:hover {
  background: #f0c98a;
}

.path {
  padding: clamp(2.2rem, 6vw, 4rem) var(--pad);
  background: var(--color-surface);
}

h2 {
  margin-bottom: 1.6rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 0.4rem;
  right: 0.4rem;
  height: 1px;
  background: var(--color-secondary);
}

.steps li {
  padding-top: 1.5rem;
}

.steps h3 {
  font-size: 1.45rem;
}

.steps h3::before {
  content: "";
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  margin-bottom: 0.85rem;
  background: var(--color-secondary);
  border-radius: 50%;
}

.steps p {
  color: var(--color-muted);
}

.who {
  padding: clamp(2.2rem, 6vw, 3.8rem) var(--pad);
}

.who p {
  max-width: 32rem;
  margin-top: 0.45rem;
  color: var(--color-muted);
}

.contact {
  padding: clamp(2.4rem, 7vw, 4.2rem) var(--pad);
  border-top: 1px solid var(--line);
}

.mail {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--color-secondary);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.mail:hover {
  text-decoration: underline;
}

.foot {
  padding-top: 1.05rem;
  padding-bottom: calc(1.05rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.foot p {
  margin: 0;
  color: var(--color-muted);
}

.foot .wordmark {
  color: var(--color-text);
}

@media (max-width: 720px) {
  .menu {
    display: inline-flex;
    align-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.25rem var(--pad) 0.7rem;
    background: var(--color-surface);
  }

  .top.is-open .nav {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .steps::before {
    top: 0;
    bottom: 0;
    left: 0.3rem;
    right: auto;
    width: 1px;
    height: auto;
  }

  .steps li {
    padding: 0 0 1.4rem 1.4rem;
  }

  .steps h3::before {
    margin-left: -1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
