@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --gap: clamp(1.25rem, 4vw, 3.5rem);
  --edge: clamp(4rem, 10vw, 8rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans Thai', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--gap);
  background: var(--ink);
  color: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.05rem;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.cta:hover {
  background: #e6e6e6;
  transform: translateY(-2px);
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}

.burger:hover {
  background: rgba(255, 255, 255, 0.16);
}

.burger-lines {
  display: block;
  width: 20px;
  height: 11px;
  border-top: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transition: transform 0.2s ease;
}

body.menu-open .burger-lines {
  transform: scaleY(0.8);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 100rem;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.doc {
  min-width: 0;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 70vh;
  margin-inline: calc(-1 * var(--gap));
  padding: var(--edge) var(--gap) clamp(2rem, 5vw, 3.5rem);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.hero h1 {
  position: relative;
  z-index: 2;
  max-width: 14ch;
  font-size: clamp(3rem, 10vw, 12rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-align: right;
  overflow-wrap: break-word;
  animation: drop 0.6s ease both;
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chip {
  position: absolute;
  z-index: 3;
  top: var(--gap);
  right: var(--gap);
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.collage {
  position: absolute;
  z-index: 1;
  top: clamp(4.5rem, 12vh, 9rem);
  left: var(--gap);
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(42%, 24rem);
}

.shot {
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  background: #141414;
  overflow: hidden;
}

.shot-1 {
  grid-column: 1;
  transform: translateY(8%);
}

.shot-2 {
  grid-column: 2;
  transform: translateY(-14%);
}

.shot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
}

.statement {
  text-align: right;
}

.statement h2 {
  font-size: clamp(2.25rem, 7.5vw, 5.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin-bottom: 1.25rem;
}

.subtitle {
  max-width: 32ch;
  margin-left: auto;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 500;
}

.doc section {
  padding: clamp(4rem, 10vw, 8rem) var(--gap);
  margin-inline: calc(-1 * var(--gap));
  scroll-margin-top: 5.5rem;
}

.doc section > :where(p, ul, ol, dl, blockquote, h3, h4, table, pre) {
  max-width: 44rem;
}

.doc section:nth-of-type(even) {
  background: var(--ink);
  color: var(--paper);
}

.doc section:nth-of-type(even) a {
  color: var(--paper);
}

.doc h2 {
  max-width: 26ch;
  font-size: clamp(1.9rem, 6vw, 4.25rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin-bottom: 1.6rem;
}

.doc h3 {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.doc h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.doc p {
  margin-bottom: 1.15rem;
  line-height: 1.8;
}

.doc p:last-child {
  margin-bottom: 0;
}

.doc a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.doc ul,
.doc ol {
  padding-left: 1.3rem;
  margin-bottom: 1.3rem;
}

.doc li {
  margin-bottom: 0.45rem;
}

.doc li::marker {
  font-weight: 700;
}

.doc img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.doc blockquote {
  padding-left: 1.15rem;
  border-left: 4px solid currentColor;
  font-weight: 500;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.doc th,
.doc td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid currentColor;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}

.doc pre {
  padding: 1rem;
  border-radius: 4px;
  background: #111;
  color: #fff;
  overflow-x: auto;
}

.side {
  position: sticky;
  top: 5.5rem;
  z-index: 20;
  align-self: start;
}

.side-nav ul {
  display: grid;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.side-nav a:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(6px);
}

.side.open {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(5rem, 14vw, 9rem) var(--gap) var(--gap);
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
}

.side.open .side-nav {
  width: 100%;
  max-width: 62rem;
}

.side.open ul {
  gap: clamp(0.3rem, 1vw, 0.9rem);
}

.side.open a {
  justify-content: flex-end;
  min-height: 56px;
  color: var(--paper);
  font-size: clamp(1.9rem, 7vw, 4.75rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  text-align: right;
  padding: 0.2rem 0.4rem;
}

.side.open a:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translateX(-6px);
}

.side.open nav li {
  opacity: 0;
  transform: translateY(1rem);
  animation: rise 0.45s ease forwards;
}

.side.open nav li:nth-child(1) { animation-delay: 0.04s; }
.side.open nav li:nth-child(2) { animation-delay: 0.08s; }
.side.open nav li:nth-child(3) { animation-delay: 0.12s; }
.side.open nav li:nth-child(4) { animation-delay: 0.16s; }
.side.open nav li:nth-child(5) { animation-delay: 0.2s; }
.side.open nav li:nth-child(6) { animation-delay: 0.24s; }
.side.open nav li:nth-child(7) { animation-delay: 0.28s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.foot {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: clamp(2.75rem, 7vw, 4.5rem) var(--gap);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.foot p {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.foot small {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

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

  .side {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(5rem, 14vw, 8rem) var(--gap) var(--gap);
    background: var(--ink);
    color: var(--paper);
    overflow-y: auto;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.32s ease, visibility 0.32s ease;
  }

  .side.open {
    transform: none;
    visibility: visible;
  }

  .side .side-nav {
    width: 100%;
  }

  .side ul {
    gap: 0.35rem;
  }

  .side a {
    justify-content: flex-end;
    min-height: 56px;
    color: var(--paper);
    font-size: clamp(1.8rem, 8vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.1;
    text-align: right;
  }

  .side a:hover {
    background: var(--paper);
    color: var(--ink);
  }

  .hero {
    min-height: 70vh;
    padding-top: clamp(4.5rem, 16vw, 7rem);
  }

  .collage {
    position: static;
    width: min(100%, 15rem);
    margin-left: auto;
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 14vw, 4.5rem);
    line-height: 0.9;
  }

  .chip {
    top: clamp(4.25rem, 15vw, 6.5rem);
    right: var(--gap);
    font-size: 0.75rem;
  }

  .statement h2 {
    font-size: clamp(2rem, 9vw, 3.25rem);
  }

  .doc section {
    padding-block: clamp(3.25rem, 12vw, 5rem);
  }
}

@media (max-width: 420px) {
  .cta {
    padding: 0 0.8rem;
    font-size: 0.875rem;
  }

  .burger {
    padding: 0 0.6rem;
    gap: 0.4rem;
  }

  .burger-label {
    font-size: 0.875rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }

  .side.open nav li {
    opacity: 1;
    transform: none;
  }

  .hero h1 {
    opacity: 1;
    transform: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
