/* ============================================================
   LIVAS — Design System
   Direction: Light Luxury (Scandinavian / Japanese minimal)
   Adapted from FULL Direction MD with light theme override
   ============================================================ */

@font-face {
  font-family: 'Aguda';
  src: url('../fonts/SVN-Aguda-Light.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Aguda';
  src: url('../fonts/SVN-Aguda-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Aguda';
  src: url('../fonts/SVN-Aguda-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Aguda';
  src: url('../fonts/SVN-Aguda-Black.otf') format('opentype');
  font-weight: 900; font-style: normal; font-display: swap;
}

:root {
  /* ── Color (light luxury, white-dominant, per user override) ── */
  --c-bg: #FFFFFF;            /* main page background */
  --c-bg-soft: #F5F4F2;       /* warm off-white section */
  --c-bg-mute: #FAF9F7;       /* subtle alternative */
  --c-ink: #0A0A0A;           /* primary text — near black */
  --c-ink-2: #3D3D3D;         /* body / secondary */
  --c-mute: #8A8A88;          /* captions, eyebrow */
  --c-line: rgba(10, 10, 10, 0.08);
  --c-line-strong: #0A0A0A;
  --c-red: #DA2128;           /* accent only */
  --c-red-deep: #C1000E;

  /* ── Typography ── */
  --ff-display: 'Aguda', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ff-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Type scale */
  --fs-hero: clamp(2.5rem, 6vw, 4.5rem);   /* 72px cap per brief */
  --fs-h1: clamp(2rem, 4.5vw, 3.75rem);
  --fs-h2: clamp(1.875rem, 3.4vw, 3rem);
  --fs-h3: clamp(1.25rem, 1.6vw, 1.5rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;

  /* Layout */
  --container: 1480px;
  --gutter: clamp(20px, 4vw, 72px);
  --section-y: clamp(56px, 6vw, 96px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-quick: cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Hero-only fullpage snap — chỉ section hero là snap point */
  scroll-snap-type: y proximity;
  scroll-padding-top: 0;
}

body {
  font-family: var(--ff-body);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
}

img, picture, video {
  max-width: 100%;
  display: block;
}
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--c-red); color: #fff; }

/* ── Type utilities ── */
.eyebrow {
  font-family: var(--ff-body);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--c-mute);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--c-ink);
  display: inline-block;
}

.h-display {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--c-ink);
}

.h-section {
  font-family: var(--ff-display);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--c-ink);
}
.h-section em {
  font-style: normal;
  font-weight: 700;
  color: var(--c-red);
  letter-spacing: -0.025em;
}

/* Cinematic title mask reveal — default visible; JS hides + replays on enter */
.h-mask {
  display: block;
  /* padding gives Vietnamese diacritics/descenders (ạ ụ ỷ g . dấu nặng) room
     inside the clip-path box so they are not chopped off — task105 */
  padding-top: 0.1em;
  padding-bottom: 0.22em;
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
  transform: translateY(0);
  transition: clip-path 1s var(--ease), -webkit-clip-path 1s var(--ease), transform 1s var(--ease);
}
html.reveal-ready .h-mask:not(.is-in) {
  clip-path: inset(0 0 100% 0);
  -webkit-clip-path: inset(0 0 100% 0);
  transform: translateY(22px);
}

.lead {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  color: var(--c-ink-2);
  max-width: 56ch;
  font-weight: 400;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 1.25fr 1fr;
    align-items: end;
    gap: 64px;
  }
}
.section-head__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
@media (min-width: 900px) {
  .section-head__aside {
    align-items: flex-end;
    text-align: right;
  }
}
.section-lead {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--c-ink-2);
  max-width: 36ch;
  font-weight: 400;
}

/* ── Buttons (minimal, thin border, hover fill) ── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink);
  border: 1px solid var(--c-ink);
  border-radius: 999px;
  overflow: hidden;
  transition: color 0.45s var(--ease), transform 0.5s var(--ease);
  z-index: 1;
  will-change: transform;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-ink);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
  z-index: -1;
}
.btn:hover { color: #fff; }
.btn:hover::before { transform: translateY(0); }
.btn--filled {
  background: var(--c-ink);
  color: #fff;
}
.btn--filled::before { background: var(--c-red); }
.btn--filled:hover { color: #fff; }
.btn--on-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--on-dark::before { background: #fff; }
.btn--on-dark:hover { color: var(--c-ink); }

.btn .arr { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink);
  padding-bottom: 6px;
  position: relative;
}
.link-arrow::after {
  content: '';
  position: absolute;
  left: 0; right: 26px; bottom: 0;
  height: 1px;
  background: var(--c-ink);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.55s var(--ease), background-color 0.3s var(--ease), right 0.5s var(--ease);
}
.link-arrow:hover::after { background: var(--c-red); right: 0; }
.link-arrow svg {
  width: 14px; height: 14px;
  transition: transform 0.45s var(--ease), color 0.3s var(--ease);
}
.link-arrow:hover svg { transform: translateX(10px); color: var(--c-red); }
.link-arrow:hover { color: var(--c-red); }

/* ── Reveal animations (cinematic / architectural) ──
   Default state is fully VISIBLE. JS may add `.is-in` to play subtle
   entrance polish — but if JS fails, all content stays readable. */
[data-reveal] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
html.reveal-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(22px);
}

/* Image RISE — slide up from below + fade in when entering viewport */
[data-reveal="image"] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
  will-change: opacity, transform;
}
html.reveal-ready [data-reveal="image"]:not(.is-in) {
  opacity: 0;
  transform: translateY(80px);
}

[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }

/* Scroll progress bar — thin top line */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--c-red);
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* =============================================================
   PAGE-LOAD CURTAIN — cinematic open on first paint
   ============================================================= */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}
.page-curtain__panel {
  flex: 1;
  background: #0A0A0A;
  transition: transform 1.1s cubic-bezier(0.77, 0, 0.18, 1) 0.4s;
  will-change: transform;
}
.page-curtain__panel--top    { transform-origin: top;    }
.page-curtain__panel--bottom { transform-origin: bottom; }
.page-curtain__brand {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
  z-index: 2;
  white-space: nowrap;
}
.page-curtain__brand .one { color: var(--c-red); font-weight: 900; }
.page-curtain__brand .reg {
  font-size: 0.4em;
  margin-left: 6px;
  opacity: 0.65;
  vertical-align: 0.85em;
  font-weight: 400;
  display: inline-block;
}
.page-curtain__brand img { width: clamp(180px, 32vw, 340px); height: auto; display: block; }

/* Stage 1: brand fades in */
.page-curtain.is-stage-1 .page-curtain__brand { opacity: 1; transform: translateY(0); }
/* Stage 2: brand fades out + panels split */
.page-curtain.is-stage-2 .page-curtain__brand { opacity: 0; transition-duration: 0.4s; }
.page-curtain.is-stage-2 .page-curtain__panel--top    { transform: translateY(-101%); }
.page-curtain.is-stage-2 .page-curtain__panel--bottom { transform: translateY( 101%); }
/* Stage 3: remove from DOM flow */
.page-curtain.is-done { display: none; }


/* =============================================================
   CUSTOM CURSOR — dot + ring follower (desktop only)
   ============================================================= */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  /* Hide native cursor on cards/buttons we mark */
  body.cursor-on { /* keep native cursor too for accessibility */ }
}
.cursor__dot {
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease);
  will-change: transform;
}
.cursor__ring {
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.3s var(--ease), opacity 0.3s var(--ease);
  will-change: transform;
}
/* Hover state — over interactive elements (.cursor-hover added by JS) */
.cursor.is-hover .cursor__dot {
  width: 48px; height: 48px;
  background: var(--c-red);
}
.cursor.is-hover .cursor__ring { opacity: 0; }


/* =============================================================
   MARQUEE BAND — kinetic horizontal slogan strip
   ============================================================= */
.marquee-band {
  background: var(--c-ink);
  color: #fff;
  overflow: hidden;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.marquee-band__track {
  display: flex;
  gap: 48px;
  width: max-content;
  white-space: nowrap;
  animation: marquee-band 32s linear infinite;
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.marquee-band__sep {
  color: var(--c-red);
  align-self: center;
  font-size: 0.6em;
  opacity: 0.7;
}
.marquee-band__track > span:not(.marquee-band__sep) {
  font-style: normal;
  font-weight: 700;
  color: #fff;
}
@keyframes marquee-band {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================================
   WORD-BY-WORD REVEAL — for titles split by JS into spans
   Important:
   - keep parent's natural display (block for h2, inline for span)
   - extend .word padding so Vietnamese marks below baseline
     (ệ ọ ạ ụ ị ậ) and above (ấ ố ề ơ) aren't clipped
   ============================================================= */
.word-split .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: baseline;
  padding: 0.18em 0.02em 0.30em 0.02em;
  margin: -0.18em -0.02em -0.30em -0.02em;
  line-height: inherit;
}
.word-split .word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
html.reveal-ready .word-split.is-in .word > span {
  transform: translateY(0);
}

/* =============================================================
   IMAGE FILTER — grayscale on load, color when in view
   ============================================================= */
[data-color-on-view] img {
  filter: grayscale(1) contrast(1.02);
  transition: filter 1.4s var(--ease);
}
html.reveal-ready [data-color-on-view].is-in img,
html.reveal-ready [data-color-on-view]:hover img {
  filter: grayscale(0) contrast(1);
}

/* =============================================================
   CARD 3D TILT — JS adds .has-tilt and inline CSS vars
   ============================================================= */
.has-tilt {
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.has-tilt.is-tilting {
  transition: transform 0.12s linear;
}

/* =============================================================
   STAT COUNT-UP — subtle fade + lift (no blur — was breaking
   the large display digits visually)
   ============================================================= */
[data-count] {
  display: inline-block;
  opacity: 0.7;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
html.reveal-ready [data-count].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; clip-path: none; -webkit-clip-path: none; }
  .word-split .word > span { transform: none; }
  [data-color-on-view] img { filter: none; }
  [data-count] { filter: none; transform: none; opacity: 1; }
  .page-curtain { display: none; }
  .cursor { display: none; }
  .marquee-band__track { animation: none; }
}

/* ── Grain overlay (cinematic) ── */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ============================================================
   MOBILE DRAWER (hamburger) — hiện < 1100px, ẩn hẳn ở desktop
   ============================================================ */
.header__mobile {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}
.header__mobile.is-open { visibility: visible; pointer-events: auto; }
@media (min-width: 1100px) { .header__mobile { display: none; } }

.header__mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.5);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.header__mobile.is-open .header__mobile-overlay { opacity: 1; }

.header__mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(86vw, 360px);
  background: #fff;
  box-shadow: -20px 0 60px -30px rgba(10, 10, 10, 0.6);
  display: flex;
  flex-direction: column;
  padding: 18px 22px calc(env(safe-area-inset-bottom, 0px) + 22px);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
}
.header__mobile.is-open .header__mobile-panel { transform: translateX(0); }

.header__mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}
.header__mobile-logo { height: 34px; width: auto; display: block; }
.header__mobile-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: none;
  border: none;
  color: var(--c-ink);
  cursor: pointer;
}
.header__mobile-x svg { width: 22px; height: 22px; }

.header__mobile-links { display: flex; flex-direction: column; }

.m-acc { border-bottom: 1px solid var(--c-line); }
.m-acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 15px 2px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-ink);
  text-align: left;
}
.m-acc__chev { width: 18px; height: 18px; transition: transform 0.3s var(--ease); flex: 0 0 auto; }
.m-acc.is-open .m-acc__chev { transform: rotate(180deg); }
.m-acc__body { display: none; padding-bottom: 6px; }
.m-acc.is-open .m-acc__body { display: block; }
.m-acc__body a {
  display: block;
  padding: 11px 2px 11px 14px;
  font-size: 0.92rem;
  color: var(--c-ink-2);
  text-decoration: none;
}
.m-acc__body a:first-child { padding-top: 4px; }
.m-acc__body a:last-child { padding-bottom: 16px; }
.m-acc__body a:hover { color: var(--c-red); }

.m-link {
  display: block;
  padding: 15px 2px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-ink);
  text-decoration: none;
}
.m-link:hover { color: var(--c-red); }

.header__mobile-hotline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--c-red);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.header__mobile-hotline svg { width: 18px; height: 18px; }

/* khoá cuộn nền khi drawer mở */
body.is-menu-open { overflow: hidden; }

/* burger → X khi mở */
.js-header-mobile span { transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
.js-header-mobile[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.js-header-mobile[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.js-header-mobile[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
