/* NARA landing — single-screen hero in the unseen.co idiom */

/* Neue Montreal: licensed font, loaded from /fonts when the files are present (see fonts/README.txt) */
@font-face {
  font-family: 'Neue Montreal';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local('Neue Montreal Medium'), local('NeueMontreal-Medium'),
       url('../fonts/NeueMontreal-Medium.woff2') format('woff2'),
       url('../fonts/NeueMontreal-Medium.woff') format('woff');
}

:root {
  --ink: #1b1715;
  --ink-soft: rgba(27, 23, 21, 0.72);
  --paper: rgba(255, 255, 255, 0.86);
  --gold: #c9a24a;
  --loader-bg: #000; /* matches the solid black of nara_official_logo.png so its square edge is invisible */
  --sans: 'Prompt', 'Noto Sans Thai', system-ui, sans-serif;
  --serif: 'Taviraj', 'Noto Serif Thai', Georgia, serif;
  --display: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --gutter: clamp(20px, 3vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #e3ddd6;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- canvas + fallback ------------------------------------------- */
.gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.fallback { display: none; }
.no-webgl .gl { display: none; }
.no-webgl .fallback {
  display: block;
  position: fixed; inset: 0;
  background: url('../Images/hero.webp') center / cover no-repeat;
  filter: brightness(0.95);
}
.no-webgl .fallback::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(124deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
  background-size: 300% 300%;
  -webkit-mask: url('../Images/hero-mask.png') center / cover no-repeat;
  mask: url('../Images/hero-mask.png') center / cover no-repeat;
  animation: fallback-sweep 7s ease-in-out infinite;
}
@keyframes fallback-sweep {
  0%, 15% { background-position: 120% 120%; }
  60%, 100% { background-position: -20% -20%; }
}

/* ---------- loader ------------------------------------------------------- */
.loader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--loader-bg);
  display: grid; place-content: center; justify-items: center; gap: 22px;
  color: #d9d2c8;
}
.loader__logo { width: 136px; height: auto; } /* the PNG has ~13% padding, so the artwork shows at about 100px */
.loader__track { width: 160px; height: 1px; background: rgba(255,255,255,0.14); overflow: hidden; }
.loader__bar { height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }
.loader__label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.55; }

/* ---------- nav ---------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--gutter) * 0.75) var(--gutter);
}
.nav__logo img { height: 54px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; }
.nav__links a { position: relative; padding: 10px 16px; border-radius: 999px; background: var(--paper); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 12px rgba(0,0,0,0.08); transition: background .3s ease; }
.nav__links a:hover { background: #fff; }
.nav__links a[data-th]::after {
  content: attr(data-th);
  position: absolute; left: 50%; top: calc(100% + 6px);
  font-size: 12px; opacity: 0; transform: translate(-50%, -4px);
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap; color: var(--ink);
  background: var(--paper); padding: 4px 10px; border-radius: 999px;
}
.nav__links a[data-th]:hover::after { opacity: 1; transform: translate(-50%, 0); }
.nav__line {
  margin-left: 6px; padding: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); color: #41bf01;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: transform .3s ease, background .3s ease;
}
.nav__line:hover { transform: scale(1.08); background: #fff; }
.nav__links a.nav__line { padding: 0; }
.nav__line svg { display: block; width: 26px; height: 26px; margin: 0; }

/* ---------- hero copy ---------------------------------------------------- */
.hero {
  position: fixed; z-index: 5;
  right: var(--gutter);
  bottom: calc(13vh - 20px);
  width: min(52vw, 820px);
  display: flex; flex-direction: column; align-items: flex-end;
  text-align: right;
  gap: clamp(10px, 1.4vw, 18px);
}
.eyebrow {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
/* each half of the eyebrow and the status pill is its own span, so a line can only break at the separator */
.eyebrow > span, .pill > span { white-space: nowrap; }
.eyebrow .sep, .pill .sep { margin: 0 -4px; }
.headline { margin: 0; font-weight: 400; line-height: 1; display: flex; flex-direction: column; }
.line { display: block; overflow: hidden; }
.line > span { display: inline-block; will-change: transform; }
.line--serif {
  font-family: var(--display); font-style: normal; font-weight: 600;
  font-size: clamp(34px, 4vw, 70px);
  line-height: 1.1; letter-spacing: -0.025em;
  text-transform: none;
  color: var(--ink);
}
.line--sans {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(36px, 4.3vw, 76px);
  line-height: 1.22; letter-spacing: -0.02em; white-space: nowrap;
  margin-top: -0.1em;
}
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500; line-height: 1;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
/* the transform transition only switches on after the intro, so it cannot fight the GSAP tween */
body.intro-done .btn { transition: transform .3s ease, background .3s ease, color .3s ease, border-color .3s ease; }
/* primary call to action: the one dark, larger pill directly under the headline */
.btn--enter {
  font-family: 'Neue Montreal', 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  font-weight: 500; letter-spacing: 0.01em;
  margin-top: clamp(6px, 0.8vw, 12px);
  padding: 15px 28px;
  font-size: clamp(14px, 1.05vw, 16px);
  background: var(--ink); color: #fff;
  box-shadow: 0 6px 24px rgba(27,23,21,0.22);
}
.btn--enter:hover { background: #000; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(27,23,21,0.28); }
.btn--enter .arrow { font-size: 0.9em; transition: transform .3s ease; }
.btn--enter:hover .arrow { transform: translate(2px, -2px); }
.btn--ghost { padding: 9px 16px; font-size: 13px; border: 1px solid rgba(27,23,21,0.3); color: var(--ink); background: rgba(255,255,255,0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-weight: 400; }
.btn--ghost:hover { border-color: var(--ink); background: rgba(255,255,255,0.7); }

/* ---------- bottom bar --------------------------------------------------- */
.bottom {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding: calc(var(--gutter) * 0.75) var(--gutter);
  font-size: 12px;
}
.pill {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(27,23,21,0.25);
  background: rgba(255,255,255,0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); white-space: nowrap;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(201,162,74,0.6); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,162,74,0.55); } 100% { box-shadow: 0 0 0 9px rgba(201,162,74,0); } }
.copy { justify-self: end; color: var(--ink-soft); letter-spacing: 0.04em; white-space: nowrap; }

/* desktop: the status pill sits in the horizontal centre, on the same line as the buttons */
@media (min-width: 821px) {
  .bottom { grid-template-columns: 1fr; }
  .pill--status {
    position: fixed; left: 50%; bottom: calc(13vh - 20px); z-index: 6;
    transform: translateX(-50%);
    height: 32px; /* same height as the ghost button row so the two centre on one line */
  }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .pill--status { bottom: calc(12vh - 20px); }
}

/* ---------- cursor ------------------------------------------------------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(27,23,21,0.9);
  pointer-events: none; opacity: 0;
  transition: opacity .3s ease, width .25s ease, height .25s ease, background .25s ease;
  mix-blend-mode: multiply;
}
.cursor.visible { opacity: 1; }
.cursor.hover { width: 56px; height: 56px; background: rgba(27,23,21,0.08); border-color: rgba(27,23,21,0.5); }
.cursor::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%) scale(0); transition: transform .25s ease; }
.cursor.hover::after { transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 1100px) {
  .hero { width: min(60vw, 700px); bottom: calc(12vh - 20px); }
  .line--sans { white-space: normal; }
}
@media (max-width: 820px) {
  .hero {
    left: var(--gutter); right: var(--gutter); width: auto;
    bottom: 150px;
    gap: 10px;
    align-items: flex-start; text-align: left;
  }
  .actions { justify-content: flex-start; }
  /* eyebrow on two rows: "● Premium Decorative Stainless" then "อันดับ 1 คิ้วสแตนเลส" aligned under the text */
  .eyebrow { flex-wrap: wrap; row-gap: 4px; }
  .eyebrow .sep { display: none; }
  .eyebrow > span:last-child { flex-basis: 100%; padding-left: 16px; }
  .line--serif { font-size: clamp(28px, 8vw, 42px); }
  .line--sans { font-size: clamp(32px, 8.8vw, 48px); white-space: normal; }
  .btn--enter { padding: 13px 24px; font-size: 14px; }
  .btn { padding: 11px 16px; font-size: 13px; }
  /* status pill and copyright stack on their own rows; the pill may break at its separator on very narrow phones */
  .bottom { grid-template-columns: 1fr; gap: 8px; justify-items: start; padding-bottom: calc(var(--gutter) * 0.6 + env(safe-area-inset-bottom)); }
  .pill { font-size: 11px; padding: 8px 12px; flex-wrap: wrap; row-gap: 2px; max-width: 100%; }
  .pill .sep { display: none; }
  .copy { justify-self: start; }
  .nav__logo img { height: 38px; }
  .nav__links { gap: 14px; font-size: 14px; }
  /* darken the lower part so copy stays legible over the trims on phones */
  body::after {
    content: ''; position: fixed; inset: auto 0 0 0; height: 62vh; z-index: 2; pointer-events: none;
    background: linear-gradient(to top, rgba(239,233,226,0.96) 0%, rgba(239,233,226,0.82) 40%, rgba(239,233,226,0) 100%);
  }
}
@media (max-width: 480px) {
  .nav__links a[data-th] { display: none; }
  .actions .btn--ghost:last-child { display: none; }
  /* clears the two-row footer, plus the home-indicator area on phones that have one */
  .hero { bottom: calc(112px + env(safe-area-inset-bottom)); }
}

/* ---------- reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .no-webgl .fallback::after { animation-duration: 14s; }
}
