@font-face {
  font-family: "Be Vietnam Pro";
  src: url("assets/BeVietnamPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("assets/BeVietnamPro-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Phudu;
  src: url("assets/Phudu-variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #17181c;
  --navy: #19212a;
  --ink: #2d2119;
  --paper: #f4e4c6;
  --muted-paper: #d1c2a7;
  --gold: #e6ba6e;
  --red: #963b2b;
  --line: #72553a;
  --header-height: 4.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 400 1rem/1.65 "Be Vietnam Pro", sans-serif;
}

body:has(dialog[open]) {
  overflow: hidden;
}

[data-lang="en"] .lang-vi,
[data-lang="vi"] .lang-en {
  display: none !important;
}

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

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

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.shell {
  width: min(73rem, calc(100% - 4rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  transform: translateY(-150%);
  background: var(--paper);
  color: var(--ink);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: rgba(23, 22, 23, 0.96);
  border-bottom: 1px solid #513e2e;
}

.header-inner {
  width: min(73rem, calc(100% - 4rem));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: grid;
  align-items: center;
  min-height: 2.75rem;
  flex-shrink: 0;
}

.brand img {
  width: auto;
  height: 2rem;
}

.header-actions,
.nav-links {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: clamp(0.8rem, 2.6vw, 2.4rem);
}

.nav-links {
  gap: clamp(0.4rem, 1.8vw, 1.45rem);
  color: var(--muted-paper);
  font-size: 0.85rem;
}

.nav-links a {
  display: grid;
  align-items: center;
  min-height: 2.75rem;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--gold);
}

.language-toggle,
.lightbox-close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #9b7351;
  border-radius: 50%;
  background: #302624;
  color: var(--paper);
  font-weight: 600;
  cursor: pointer;
}

.language-toggle:hover,
.lightbox-close:hover {
  background: #53342b;
  border-color: var(--gold);
}

.hero {
  isolation: isolate;
  position: relative;
  background: var(--navy);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, var(--night), transparent 47%),
    linear-gradient(93deg, rgba(23, 24, 28, 0.97) 4%, rgba(23, 24, 28, 0.82) 43%, rgba(23, 24, 28, 0.22)),
    url("assets/hero-village.jpg") center 44% / cover no-repeat;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.7rem, 4.2vw, 4rem);
  padding-block: clamp(3rem, 7.8vw, 7rem) clamp(2.6rem, 5.8vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Phudu, "Be Vietnam Pro", sans-serif;
  font-weight: 800;
  line-height: 1.04;
}

h1 {
  font-size: clamp(3.35rem, 5.35vw, 4.75rem);
  letter-spacing: -0.025em;
  text-shadow: 0 0.12em 0.22em rgba(16, 14, 14, 0.64);
}

@media (min-width: 851px) {
  [data-lang="en"] h1 {
    font-size: clamp(2.55rem, 4.1vw, 3.6rem);
  }
}

h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-lead {
  max-width: 31rem;
  margin: 1.35rem 0 1.55rem;
  color: var(--paper);
  font-size: clamp(0.97rem, 1.25vw, 1.14rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  min-height: 3rem;
  padding: 0.62rem 1rem;
  border: 1px solid #c58756;
  border-radius: 0.35rem;
  background: var(--red);
  color: #fff5e1;
  font-weight: 600;
  box-shadow: inset 0 0 0 2px rgba(76, 26, 19, 0.55);
}

.button:hover {
  background: #aa4631;
  border-color: var(--gold);
}

.build-status {
  color: var(--muted-paper);
  font-size: 0.83rem;
  white-space: nowrap;
}

.tide-feature {
  margin: 0;
  padding: 0.55rem;
  background: #332520;
  border: 1px solid #88633e;
  outline: 1px solid rgba(240, 193, 113, 0.16);
  outline-offset: 4px;
  border-radius: 0.6rem;
  box-shadow: 0 1.25rem 3.5rem rgba(13, 11, 13, 0.55);
}

.image-link {
  position: relative;
  display: block;
  border-radius: 0.28rem;
  background: #2b312c;
}

.image-link img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.image-link:hover {
  box-shadow: 0 0 0 2px var(--gold);
}

.expand-label,
.expand-icon {
  position: absolute;
  top: calc(100% + 0.46rem);
  right: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid #ac8554;
  border-radius: 0.25rem;
  background: #241d1a;
  color: #fff0ce;
  font-size: 0.78rem;
  font-weight: 600;
}

.expand-icon {
  min-width: 2rem;
  font-size: 1rem;
  line-height: 1;
}

.tide-feature figcaption {
  display: grid;
  gap: 0.15rem;
  min-height: 3.9rem;
  padding: 0.65rem 6.05rem 0.35rem 0.45rem;
  color: var(--muted-paper);
  font-size: 0.82rem;
  line-height: 1.45;
}

.tide-feature figcaption strong {
  color: var(--paper);
  font-family: Phudu, sans-serif;
  font-size: 1.14rem;
  line-height: 1.14;
}

.development {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 2.15fr);
  gap: 0.85rem 2rem;
  align-items: center;
  padding: 1.35rem clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-left: 3px solid #b87943;
  border-radius: 0.3rem;
  background: #282320;
}

.development .eyebrow {
  margin-bottom: 0.25rem;
}

.development h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

.development > p {
  margin: 0;
  color: var(--muted-paper);
  font-size: 0.92rem;
}

.content-section {
  padding-block: clamp(3rem, 6.5vw, 6rem);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: clamp(1.35rem, 3.6vw, 2.5rem);
}

.section-heading h2 {
  font-size: clamp(2.25rem, 4.8vw, 3.9rem);
}

.section-heading p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted-paper);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.gallery figure {
  min-width: 0;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid #5e4936;
  border-radius: 0.5rem;
  background: #26211f;
}

.gallery figcaption {
  min-height: 2.55rem;
  padding: 0.62rem 3rem 0.25rem 0.4rem;
  color: var(--paper);
  font-size: 0.9rem;
}

.world {
  --gold: #8b4327;
  border-block: 1px solid #b98b55;
  background: radial-gradient(ellipse at 50% 2%, #faeed3, #e2c99d);
  color: var(--ink);
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 3vw, 2.4rem);
}

.world-grid article {
  border-top: 1px solid #b59064;
  padding-top: 0.85rem;
}

.world-grid img {
  width: min(100%, 11rem);
  height: auto;
  margin-inline: auto;
}

.world-grid h3 {
  margin: 0.55rem 0 0.35rem;
  font-size: clamp(1.4rem, 2.3vw, 1.8rem);
}

.world-grid p {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding-block: 1.3rem;
  color: var(--muted-paper);
  font-size: 0.82rem;
}

.lightbox {
  width: min(86rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--night);
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(10, 9, 11, 0.9);
}

.lightbox-panel {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 0.7rem;
}

.lightbox-close {
  justify-self: end;
  font-size: 1.55rem;
  line-height: 1;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: min(76vh, calc(100dvh - 9rem));
  object-fit: contain;
}

.lightbox-caption {
  margin: 0;
  padding: 0 0.5rem 0.3rem;
  color: var(--muted-paper);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 850px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    max-width: 46rem;
  }

  .tide-feature {
    width: 100%;
  }

  .hero::before {
    background:
      linear-gradient(0deg, var(--night), transparent 65%),
      linear-gradient(95deg, rgba(23, 24, 28, 0.96), rgba(23, 24, 28, 0.53)),
      url("assets/hero-village.jpg") 55% center / cover no-repeat;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 3.65rem;
  }

  .shell,
  .header-inner {
    width: calc(100% - 2rem);
  }

  .brand img {
    height: 1.55rem;
  }

  .nav-links {
    display: none;
  }

  .hero-inner {
    gap: 1.5rem;
    padding-block: 2.2rem 2rem;
  }

  h1 {
    font-size: clamp(2.55rem, 10.8vw, 3.8rem);
  }

  [data-lang="en"] h1 {
    font-size: clamp(2.1rem, 10.25vw, 3.8rem);
  }

  .hero-lead {
    margin-block: 0.95rem 1.15rem;
  }

  .hero-actions {
    gap: 0.6rem;
  }

  .build-status {
    font-size: 0.76rem;
  }

  .development,
  .gallery,
  .world-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .world-grid article {
    display: grid;
    grid-template-columns: clamp(4.25rem, 22vw, 7rem) minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
  }

  .world-grid h3 {
    margin-top: 0;
  }
}

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