/* =========================================================
   H'REN Coffee — Unified Design System Tokens & Transitions
   Dùng chung cho toàn bộ trang chính và 4 phân hệ con.
   ========================================================= */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

:root {
  /* Palette thương hiệu H'REN */
  --hren-black: #0a0502;
  --hren-coffee-dark: #2b1408;
  --hren-coffee: #3b1f12;
  --hren-coffee-soft: #5a3622;
  --hren-gold: #f3d791;
  --hren-gold-bright: #ffd874;
  --hren-gold-deep: #c9a658;
  --hren-cream: #f8ecd0;
  --hren-cream-soft: rgba(248, 236, 208, 0.85);
  --hren-red: #c8311e;
  --hren-red-bright: #e64a35;
  --hren-green: #1a3a2e;
  --hren-green-dark: #0d2018;

  /* Shadows & Glows */
  --hren-shadow: rgba(20, 8, 2, 0.55);
  --hren-overlay: rgba(43, 20, 8, 0.32);
  --hren-overlay-strong: rgba(43, 20, 8, 0.55);
  --hren-glow-gold: 0 0 20px rgba(255, 216, 116, 0.4), 0 0 40px rgba(255, 216, 116, 0.16);
  --hren-glow-gold-strong: 0 0 28px rgba(255, 216, 116, 0.65), 0 0 56px rgba(255, 216, 116, 0.3);

  /* Typography */
  --hren-font-display: "Caveat", "Cormorant Garamond", Georgia, serif;
  --hren-font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --hren-font-ui: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radii & Spacing */
  --hren-radius: 18px;
  --hren-radius-sm: 10px;
  --hren-radius-pill: 999px;
  --hren-gap: 14px;

  /* Motion Curves */
  --hren-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --hren-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Layers */
  --hren-z-stage: 1;
  --hren-z-nav: 120;
  --hren-z-shell: 220;
  --hren-z-modal: 400;
  --hren-z-toast: 500;
  --hren-z-curtain: 9999;
}

/* ---------- Page Transition Curtain (Zero-Flash Navigation) ---------- */
.hren-curtain {
  position: fixed;
  inset: 0;
  z-index: var(--hren-z-curtain);
  background:
    radial-gradient(circle at 50% 45%, rgba(90, 54, 34, 0.38) 0%, rgba(10, 5, 2, 0.96) 72%),
    #0a0502;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--hren-ease-out);
  will-change: opacity;
}

.hren-curtain.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .hren-curtain {
    transition-duration: 0.001ms !important;
  }
}
