/* ══════════════════════════════════════════════════════════════
   FACCO — base.css  v6.0
   Reset · Layout · Buttons · Utilities · Animations · Responsive
══════════════════════════════════════════════════════════════ */

/* ── SKIP LINK (a11y) ───────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 1000;
  padding: 10px 18px; background: var(--red); color: #fff;
  font-family: var(--fb); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  border-radius: 4px; box-shadow: var(--sh-md);
  transition: top .18s ease;
}
.skip-link:focus-visible { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hh) + 18px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.65;
  background: var(--bg-1);
  color: var(--tx-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: auto;
}

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

/* ── CUSTOM CURSOR ───────────────────────────────── */
body:not(.has-custom-cursor) .cursor-dot,
body:not(.has-custom-cursor) .cursor-ring { display: none; }
body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .btn,
body.has-custom-cursor .filter-pill,
body.has-custom-cursor .project-card { cursor: none; }

.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .22s ease, height .22s ease, background .22s ease;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1.5px solid var(--gold-l);
  border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .22s ease, height .22s ease, border-color .22s ease, opacity .22s ease;
  opacity: .65;
}
body.cursor-hover .cursor-dot  { width: 10px; height: 10px; background: var(--red-d); }
body.cursor-hover .cursor-ring { width: 50px; height: 50px; border-color: var(--gold-w); opacity: 1; }

/* ── LAYOUT ──────────────────────────────────────── */
.container        { width: 100%; max-width: var(--mw); margin: 0 auto; padding: 0 var(--g); }
.container--narrow{ max-width: 720px; }
.section          { position: relative; z-index: 5; padding: clamp(72px, 9vw, 108px) 0; }
.see-more         { text-align: center; margin-top: 36px; }

/* BG grid — rất nhạt, chỉ thấy khi nhìn kỹ */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg,  transparent, transparent 119px, rgba(138,110,56,.018) 120px),
    repeating-linear-gradient(90deg, transparent, transparent 119px, rgba(138,110,56,.018) 120px);
}

/* Page corners */
.page-corner { position: fixed; width: 42px; height: 42px; z-index: 200; pointer-events: none; opacity: .45; }
.page-corner--tl { top: 16px; left: 16px;   border-top: 1px solid var(--gold-l); border-left: 1px solid var(--gold-l); }
.page-corner--tr { top: 16px; right: 16px;  border-top: 1px solid var(--gold-l); border-right: 1px solid var(--gold-l); }
.page-corner--bl { bottom: 16px; left: 16px;  border-bottom: 1px solid var(--gold-l); border-left: 1px solid var(--gold-l); }
.page-corner--br { bottom: 16px; right: 16px; border-bottom: 1px solid var(--gold-l); border-right: 1px solid var(--gold-l); }

/* Corner brackets bên trong section */
.cb { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.cb--tl { top: 14px; left: 14px;   border-top: .5px solid var(--gold-l); border-left: .5px solid var(--gold-l); }
.cb--tr { top: 14px; right: 14px;  border-top: .5px solid var(--gold-l); border-right: .5px solid var(--gold-l); }
.cb--bl { bottom: 14px; left: 14px;  border-bottom: .5px solid var(--gold-l); border-left: .5px solid var(--gold-l); }
.cb--br { bottom: 14px; right: 14px; border-bottom: .5px solid var(--gold-l); border-right: .5px solid var(--gold-l); }

/* ── SECTION HEADING ─────────────────────────────── */
.section-heading { text-align: center; margin-bottom: 48px; }

.section-eyebrow {
  display: block;
  font-family: var(--fb); font-size: 10px; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--gold);
}
.zone-dark  .section-eyebrow,
.zone-dark-2 .section-eyebrow,
.zone-dark-3 .section-eyebrow { color: var(--gold-w); }

.section-title {
  font-family: var(--fd);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 400;
  letter-spacing: .03em;
  line-height: 1.20;
  color: var(--tx-0);
}
.zone-dark   .section-title,
.zone-dark-2 .section-title,
.zone-dark-3 .section-title { color: var(--dk-t); }

.section-jp {
  display: block;
  font-family: var(--fj); font-size: 11px; letter-spacing: .24em;
  margin-top: 8px;
  color: var(--tx-3);
}
.zone-dark   .section-jp,
.zone-dark-2 .section-jp,
.zone-dark-3 .section-jp { color: var(--dk-m); }

.section-divider { display: flex; align-items: center; gap: 13px; width: 130px; margin: 14px auto 0; }
.section-divider__line    { flex: 1; height: .5px; background: var(--gold-m); }
.section-divider__diamond { width: 4px; height: 4px; background: var(--gold-m); transform: rotate(45deg); flex-shrink: 0; }

/* Vertical label — màn hình rộng */
.section-label-v {
  position: absolute; left: clamp(6px, 1.2vw, 16px); top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-family: var(--fb); font-size: 9px; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--tx-3); white-space: nowrap; pointer-events: none; display: none;
}
@media (min-width: 1400px) { .section-label-v { display: block; } }

/* ── SECTION TOOLBAR ─────────────────────────────── */
.section-toolbar { display: grid; gap: 12px; margin-bottom: 28px; align-items: start; }
.section-toolbar__note { font-size: 12px; color: var(--tx-3); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  font-family: var(--fb); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  padding: 12px 24px;
  border-radius: var(--r-full);
  transition: all var(--tn);
  white-space: nowrap; cursor: pointer;
}

/* Đỏ — CTA chính */
.btn--red { color: #fff; background: var(--red); border: 1.5px solid transparent; box-shadow: var(--sh-red); }
.btn--red:hover { background: var(--red-d); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(184,50,40,.30); }

/* Outline trên nền sáng */
.btn--outline { color: var(--tx-1); border: 1.5px solid var(--br-0); background: transparent; }
.btn--outline:hover { border-color: var(--gold); color: var(--tx-0); background: var(--gold-g); }

/* Outline trên nền tối */
.btn--outline-dark { color: var(--gold-w); border: 1.5px solid var(--gold-m); background: transparent; }
.btn--outline-dark:hover { color: var(--dk-t); border-color: var(--gold-w); background: var(--gold-g); }

/* Outline sáng dùng trên nền/tông đậm */
.btn--outline-light { color: var(--tx-1); border: 1.5px solid var(--br-0); background: transparent; }
.btn--outline-light:hover { border-color: var(--gold); color: var(--tx-0); background: var(--gold-g); }

/* Ghost — nền trong suốt có blur */
.btn--ghost { color: var(--dk-t); border: 1.5px solid rgba(236,227,211,.18); background: rgba(255,255,255,.05); backdrop-filter: blur(10px); }
.btn--ghost:hover { background: rgba(255,255,255,.10); border-color: rgba(236,227,211,.28); }

/* Soft — nhạt trên light bg */
.btn--soft { color: var(--tx-2); background: var(--bg-2); border: 1.5px solid var(--br-1); }
.btn--soft:hover { background: var(--bg-3); border-color: var(--br-0); }

/* Modifiers */
.btn--pill { padding-inline: 30px; }
.btn--sm   { min-height: 36px; font-size: 10px; letter-spacing: .16em; padding: 8px 16px; }

/* ── FILTER PILLS ────────────────────────────────── */
.filter-row, .tag-row { display: flex; flex-wrap: wrap; gap: 10px; }

.filter-pill {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 8px 18px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--br-1);
  background: var(--bg-0);
  color: var(--tx-2);
  font-family: var(--fb); font-size: 11px; font-weight: 400; letter-spacing: .06em;
  transition: all var(--tf); cursor: pointer;
  box-shadow: var(--sh-xs);
}
.filter-pill.is-active, .filter-pill:hover {
  border-color: var(--gold);
  color: var(--tx-0);
  box-shadow: var(--sh-sm);
}

.tag {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 3px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--br-1);
  background: transparent;
  font-family: var(--fb); font-size: 10px; letter-spacing: .06em;
  color: var(--tx-3);
}

/* ── SCROLL REVEAL ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .80s ease, transform .80s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--d1 { transition-delay: .08s; }
.reveal--d2 { transition-delay: .16s; }
.reveal--d3 { transition-delay: .24s; }
.reveal--d4 { transition-delay: .32s; }


/* Accessibility: trạng thái focus rõ ràng khi dùng bàn phím */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.project-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

/* Giảm chuyển động cho người dùng chọn reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── MATERIAL STRIP ──────────────────────────────── */
.material-strip {
  border-top: 1px solid var(--bg-3);
  border-bottom: 1px solid var(--bg-3);
  background: var(--bg-0);
  position: relative; z-index: 4;
  box-shadow: var(--sh-xs);
}
.material-strip__inner {
  min-height: 72px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 14px var(--g);
}
.material-strip__title {
  font-family: var(--fb); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .22em;
  color: var(--tx-3); flex-shrink: 0;
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleYIn { from { transform: scaleY(0); opacity: 0; }        to { transform: scaleY(1); opacity: 1; } }
@keyframes pulse    { 0%, 100% { opacity: .30; transform: translateY(0); } 50% { opacity: .88; transform: translateY(5px); } }

/* ── DARK MODE — filter pill ─────────────────────── */
@media (prefers-color-scheme: dark) {
  .filter-pill { background: var(--bg-0); }
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1100px) {
  .hero__shell, .banner__shell { grid-template-columns: 1fr; gap: 36px; }
  .hero__brand, .hero__tagline { max-width: none; }
  .catalogue-grid, .journal-grid, .cta-strip__grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .site-nav {
    display: none; flex-direction: column; gap: 0;
    position: fixed; top: var(--hh); left: 0; right: 0; z-index: 99;
    background: var(--dk-bg-glass);
    padding: 16px var(--g) 20px;
    border-bottom: 1px solid var(--dk-bd);
  }
  .site-nav.is-open { display: flex; }
  .site-nav__link {
    padding: 13px 4px; font-size: 12px; letter-spacing: .15em;
    border-bottom: 1px solid var(--dk-bd); width: 100%;
  }
  .site-nav__link:last-child { border-bottom: none; }
  .mobile-toggle { display: flex; }
  .header-cta { display: none; }
  .product-grid, .project-grid, .about-grid { grid-template-columns: repeat(2, 1fr); }
  .banner__facts { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .lang-switcher { display: none; }
  .hotline-float { right: 16px; left: 16px; justify-content: center; }
  .zalo-float { display: none; }
  .product-grid, .project-grid, .about-grid,
  .catalogue-grid, .journal-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero__meta { grid-template-columns: 1fr; }
  .hero-board__grid, .cta-strip__grid { grid-template-columns: 1fr; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  .btn, .filter-pill, .mobile-toggle,
  .lang-switcher__btn, .newsletter-form button,
  .social-link, .project-card { cursor: pointer; }
}
