@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@300;400;500;600;700&family=Archivo+Expanded:wght@600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #0c0c0c;
  --ink-soft: #2c2c2c;
  --muted: #7a7a7a;
  --paper: #f1efe9;
  --paper-2: #e6e2d8;
  --white: #fafaf7;
  --line: rgba(12, 12, 12, 0.14);
  --accent: #d7ff3c;
  --accent-ink: #1a2400;
  --hero-shade: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.15) 0%,
    rgba(10, 10, 10, 0.25) 55%,
    rgba(10, 10, 10, 0.85) 100%
  );
  /* Anuphan = Thai + Latin body/headings · Archivo = Latin brand only */
  --font: 'Anuphan', 'Helvetica Neue', sans-serif;
  --heading: 'Anuphan', 'Helvetica Neue', sans-serif;
  --brand: 'Archivo Expanded', 'Anuphan', sans-serif;
  --mono: 'IBM Plex Mono', 'Anuphan', monospace;
  --max: 1180px;
  --nav-h: 72px;
  --demo-h: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Demo bar */
.demo-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.82rem;
}

.demo-bar strong {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
}

.demo-bar__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.demo-bar a {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), border-color 0.2s, color 0.2s;
}

.demo-bar a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.demo-bar a.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.demo-bar a.is-primary:hover {
  background: #c2ea1f;
  border-color: #c2ea1f;
}

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--nav-h);
}

.site-header.is-solid {
  position: fixed;
  top: var(--demo-h);
  background: rgba(241, 239, 233, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  animation: drop 0.35s var(--ease);
}

.site-header.is-solid .brand,
.site-header.is-solid .nav a {
  color: var(--ink);
}

.site-header.is-solid .nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

@keyframes drop {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand {
  font-family: var(--brand);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.brand small {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--white);
  padding: 0.4rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.site-header.is-solid .menu-toggle {
  border-color: var(--line);
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.95rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn--accent:hover {
  background: #c2ea1f;
  border-color: #c2ea1f;
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--ink {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn--ink:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

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

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: grayscale(0.35) contrast(1.08);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: kenburns 20s var(--ease) forwards;
}

@keyframes kenburns {
  to {
    transform: scale(1);
  }
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-shade);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 2rem) 0 3.5rem;
  width: 100%;
}

.hero__content .brand-mark {
  font-family: var(--brand);
  font-size: clamp(3.2rem, 11vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 1.1rem;
  animation: rise 0.9s var(--ease) both;
}

.hero__bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero h1 {
  font-family: var(--heading);
  font-size: clamp(1.1rem, 2.1vw, 1.3rem);
  font-weight: 400;
  line-height: 1.5;
  max-width: 30ch;
  color: rgba(255, 255, 255, 0.88);
  animation: rise 0.9s var(--ease) 0.12s both;
}

.hero .btn-row {
  animation: rise 0.9s var(--ease) 0.22s both;
}

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

/* Sections */
.section {
  padding: 5.5rem 0;
}

.section__head {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section__head .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* Thai headings: Anuphan only — never Archivo Expanded / uppercase */
.section__head h2 {
  font-family: var(--heading);
  font-size: clamp(1.85rem, 3.8vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  max-width: 16ch;
}

.section__head p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 32ch;
  font-weight: 400;
}

/* Work / Gallery — full-bleed, image-first */
.section--work {
  padding: 4.5rem 0 0;
}

.section__head--work {
  margin-bottom: 1.75rem;
  align-items: flex-end;
}

.gallery-bleed {
  width: min(100% - 1.5rem, 1280px);
  margin-inline: auto;
  margin-bottom: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, minmax(180px, 24vw));
  gap: 0.45rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #111;
  min-height: 0;
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.gallery-item.is-in {
  opacity: 1;
  transform: none;
}

/* Clean bento: feature + stack, then mid row, then wide pair */
.gallery-item:nth-child(1),
.gallery-item.is-hero {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.gallery-item:nth-child(2),
.gallery-item.is-tall {
  grid-column: 3;
  grid-row: 1;
}

.gallery-item:nth-child(3),
.gallery-item.is-wide {
  grid-column: 3;
  grid-row: 2;
}

.gallery-item:nth-child(4) {
  grid-column: 1;
  grid-row: 3;
}

.gallery-item:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
}

.gallery-item:nth-child(6) {
  grid-column: 3;
  grid-row: 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.85s var(--ease), filter 0.45s;
  filter: saturate(0.92) contrast(1.04);
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: saturate(1.05) contrast(1.06);
}

.gallery-item__tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.35rem 1.2rem 1.1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: var(--white);
  opacity: 0.92;
  transform: translateY(0);
  transition: opacity 0.3s var(--ease), padding 0.3s var(--ease);
}

.gallery-item:hover .gallery-item__tag {
  opacity: 1;
  padding-bottom: 1.25rem;
}

.gallery-item__tag .cat {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

.gallery-item__tag h3 {
  font-family: var(--heading);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* About */
.about {
  background: var(--ink);
  color: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.about .section__head .eyebrow {
  background: var(--accent);
}

.about .section__head h2 {
  color: var(--white);
  max-width: 18ch;
}

.about__visual {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
  filter: grayscale(0.2);
}

.about__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__body p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  max-width: 46ch;
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stats div {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 0.85rem;
}

.stats strong {
  display: block;
  font-family: var(--brand);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent);
}

.stats span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Packages */
.packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.package {
  border: 1.5px solid var(--ink);
  background: var(--white);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.25s var(--ease);
}

.package:hover {
  transform: translateY(-4px);
}

.package--featured {
  background: var(--ink);
  color: var(--white);
}

.package__tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.package--featured .package__tag {
  color: var(--accent);
}

.package h3 {
  font-family: var(--heading);
  font-size: 1.35rem;
  font-weight: 600;
}

.package .price {
  font-family: var(--brand);
  font-size: 1.9rem;
  font-weight: 800;
}

.package .price small {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.7;
}

.package ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  flex: 1;
}

.package li {
  font-size: 0.9rem;
  padding-left: 1rem;
  position: relative;
  color: var(--ink-soft);
}

.package--featured li {
  color: rgba(255, 255, 255, 0.78);
}

.package li::before {
  content: '—';
  position: absolute;
  left: 0;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--white);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.contact__info {
  padding: 4.5rem 3rem;
  background: var(--paper-2);
}

.contact__info .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.9rem;
}

.contact__info h2 {
  font-family: var(--heading);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contact__info > p {
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 36ch;
}

.info-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.info-list li {
  display: grid;
  gap: 0.15rem;
}

.info-list span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-list strong {
  font-weight: 600;
  font-size: 1.02rem;
}

.contact__form {
  padding: 4.5rem 3rem;
  border-left: 1.5px solid var(--ink);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem 0.85rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  background: var(--white);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 1.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__grid .brand {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer__grid h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.footer__grid a {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.footer__grid a:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(170px, 34vw);
  }

  .gallery-item:nth-child(1),
  .gallery-item.is-hero {
    grid-column: 1 / 3;
    grid-row: auto;
    min-height: 240px;
  }

  .gallery-item:nth-child(2),
  .gallery-item.is-tall,
  .gallery-item:nth-child(3),
  .gallery-item.is-wide,
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5),
  .gallery-item:nth-child(6) {
    grid-column: auto;
    grid-row: auto;
  }

  .about__grid,
  .packages,
  .contact,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .contact__form {
    border-left: none;
    border-top: 1.5px solid var(--ink);
  }

  .contact__info,
  .contact__form {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    padding: 0.5rem 1.25rem 1rem;
  }

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

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
  }

  .site-header.is-solid .nav {
    background: var(--paper);
  }

  .site-header.is-solid .nav a {
    color: var(--ink);
    border-color: var(--line);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .form-row,
  .stats {
    grid-template-columns: 1fr;
  }

  .demo-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .wrap {
    width: min(100% - 1.5rem, var(--max));
  }

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

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(220px, 56vw);
  }

  .gallery-item:nth-child(n) {
    grid-column: 1;
    grid-row: auto;
  }

  .gallery-item__tag {
    opacity: 1;
  }

  .section--work {
    padding-top: 3.5rem;
  }
}
