/* ============================================================
   Huyền Học Aha Sage — trang chủ
   "Luxury Noir + Imperial Gold" (clone từ co-thu-so-6)
   ============================================================ */

:root {
  --background: hsl(220 25% 5%);
  --foreground: hsl(40 30% 92%);
  --card: hsl(220 22% 8%);

  --primary-foreground: hsl(220 25% 6%);
  --muted: hsl(40 8% 55%);
  --muted-foreground: hsl(40 12% 62%);

  --border: hsl(42 40% 60% / 0.16);
  --gold: hsl(42 65% 58%);
  --gold-soft: hsl(42 55% 72%);

  --gradient-gold: linear-gradient(135deg, hsl(42 65% 58%) 0%, hsl(38 75% 68%) 40%, hsl(42 55% 45%) 100%);
  --gradient-noir: radial-gradient(ellipse at top, hsl(220 25% 10%) 0%, hsl(220 30% 4%) 70%);
  --shadow-luxury: 0 40px 80px -20px hsl(42 60% 40% / 0.25), 0 0 0 1px hsl(42 40% 60% / 0.08);
  --shadow-gold-glow: 0 0 60px hsl(42 65% 58% / 0.35);

  --font-display: "Cormorant Garamond", ui-serif, Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gradient-noir);
  background-attachment: fixed;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: hsl(42 65% 58% / 0.35);
  color: var(--foreground);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease, transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

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

.home {
  overflow-x: hidden;
}

/* ---------------- Shared utilities ---------------- */
.mono-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

.hairline-gold {
  display: block;
  height: 1px;
  background-image: linear-gradient(90deg, transparent, hsl(42 65% 58% / 0.6), transparent);
}

.gold-text {
  display: inline-block;
  background: var(--gradient-gold);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-sheen 6s linear infinite, shimmer 4s infinite ease-in-out;
}

.panel-luxury {
  background: linear-gradient(180deg, hsl(220 22% 9% / 0.9), hsl(220 25% 6% / 0.9));
  border: 1px solid hsl(42 40% 60% / 0.18);
  box-shadow: inset 0 1px 0 hsl(42 65% 58% / 0.08), 0 30px 60px -30px hsl(0 0% 0% / 0.7);
  backdrop-filter: blur(12px);
}

/* ---------------- Splash ---------------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--gradient-noir);
  transition: opacity 700ms var(--ease-out-expo), visibility 700ms;
}

.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3.5rem;
  color: var(--gold);
  text-shadow: var(--shadow-gold-glow);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

/* ---------------- Rails ---------------- */
.rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0.3;
  pointer-events: none;
}

.rail-left {
  left: 16px;
}

.rail-right {
  right: 16px;
}

.rail span {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: hsl(220 25% 5% / 0.7);
  backdrop-filter: blur(18px);
}

.nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  height: 36px;
  width: 36px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  box-shadow: var(--shadow-gold-glow);
}

.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

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

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  max-width: none;
  opacity: 0.18;
  mix-blend-mode: screen;
  animation: slow-spin 120s linear infinite;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, hsl(220 25% 5% / 0.4), hsl(220 25% 5% / 0.8) 55%, var(--background));
}

.hero-inner {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  padding: 96px 20px 80px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 24px;
}

.kicker-line {
  display: block;
  height: 1px;
  width: 32px;
  background: hsl(42 65% 58% / 0.6);
}

.hero h1 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  text-wrap: balance;
  margin-bottom: 24px;
}

.hero-lede {
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn-gold,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.btn-gold {
  background: var(--gradient-gold);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-gold-glow);
  border: 0;
}

.btn-gold:hover {
  filter: brightness(1.1);
}

.btn-gold .btn-arrow {
  transition: transform 220ms ease;
}

.btn-gold:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-outline {
  border: 1px solid hsl(42 65% 58% / 0.4);
  color: var(--gold-soft);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.ornament {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0.7;
}

.ornament .hairline-gold {
  width: clamp(6rem, 15vw, 10rem);
}

.ornament-star {
  color: var(--gold);
  font-size: 1.125rem;
}

/* ---------------- Disciplines ---------------- */
.disciplines {
  padding: 88px 20px;
  max-width: 88rem;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-head .mono-eyebrow {
  margin-bottom: 12px;
}

.section-head h2 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.discipline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.discipline-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 32px;
  display: block;
  transition: transform 500ms var(--ease-out-expo), box-shadow 500ms var(--ease-out-expo);
}

.discipline-card.is-active:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-luxury);
}

.glyph-watermark {
  position: absolute;
  right: -16px;
  bottom: -32px;
  font-family: var(--font-display);
  font-size: 10rem;
  line-height: 1;
  color: hsl(42 65% 58% / 0.06);
  user-select: none;
  pointer-events: none;
  transition: color 700ms ease;
}

.discipline-card.is-active:hover .glyph-watermark {
  color: hsl(42 65% 58% / 0.12);
}

.card-body {
  position: relative;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.card-no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold);
}

.glyph-badge {
  display: grid;
  place-items: center;
  height: 40px;
  width: 40px;
  border-radius: 999px;
  border: 1px solid hsl(42 65% 58% / 0.3);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  transition: border-color 400ms ease, box-shadow 400ms ease;
}

.discipline-card.is-active:hover .glyph-badge {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold-glow);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}

.discipline-card h3 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  margin-bottom: 16px;
}

.discipline-card p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin-bottom: 24px;
}

.card-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-cta-muted {
  color: var(--muted);
}

.card-arrow {
  transition: transform 220ms ease;
}

.discipline-card.is-active:hover .card-arrow {
  transform: translateX(4px);
}

.is-soon {
  cursor: default;
}

.soon-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid hsl(42 65% 58% / 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  background: hsl(220 25% 5% / 0.6);
}

/* ---------------- Philosophy ---------------- */
.philosophy {
  position: relative;
  padding: 88px 20px;
  border-top: 1px solid var(--border);
}

.philosophy-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, hsl(42 65% 58% / 0.05), transparent 70%);
}

.philosophy-inner {
  position: relative;
  max-width: 88rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 80px;
  align-items: center;
}

.philosophy-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, hsl(220 22% 9% / 0.9), hsl(220 25% 6% / 0.9));
  border: 1px solid hsl(42 40% 60% / 0.18);
  box-shadow: var(--shadow-luxury);
}

.philosophy-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background), hsl(220 25% 5% / 0.2) 60%, transparent);
}

.figure-frame {
  position: absolute;
  inset: 16px;
  border: 1px solid hsl(42 65% 58% / 0.3);
  border-radius: 4px;
  pointer-events: none;
}

.figure-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
}

.figure-eyebrow {
  margin-bottom: 8px;
}

.figure-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: hsl(40 30% 92% / 0.9);
}

.philosophy-text {
  min-width: 0;
}

.philosophy-text .mono-eyebrow {
  margin-bottom: 16px;
}

.philosophy-text h2 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 32px;
}

.philosophy-text p {
  color: var(--muted-foreground);
  line-height: 1.7;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.hairline-short {
  width: 6rem;
  margin: 32px 0;
}

.philosophy-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--muted-foreground);
  text-wrap: balance;
}

/* ---------------- Footer ---------------- */
.site-footer {
  padding: 64px 20px 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, transparent, var(--background));
}

.footer-inner {
  max-width: 88rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  max-width: 24rem;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 64px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.footer-col a:hover {
  color: var(--foreground);
}

.soon-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.7;
  margin-left: 6px;
}

.footer-bottom {
  max-width: 80rem;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 1px solid hsl(42 40% 60% / 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: hsl(40 12% 62% / 0.6);
}

.footer-seal {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  color: hsl(42 65% 58% / 0.7);
}

/* ---------------- Animations ---------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%,
  100% {
    text-shadow: 0 0 12px hsl(42 65% 58% / 0.35);
  }
  50% {
    text-shadow: 0 0 32px hsl(42 65% 58% / 0.8), 0 0 60px hsl(42 65% 58% / 0.4);
  }
}

@keyframes gold-sheen {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes slow-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.animate-fade-up {
  animation: fade-up 1.2s var(--ease-out-expo) both;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 800ms var(--ease-out-expo), transform 800ms var(--ease-out-expo), filter 800ms var(--ease-out-expo);
  will-change: opacity, transform, filter;
}

[data-reveal][data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Progressive image load */
img[data-loaded="false"] {
  opacity: 0;
  filter: blur(12px);
  transform: scale(1.02);
}

img[data-loaded="true"] {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
  transition: opacity 600ms ease, filter 600ms ease, transform 800ms ease;
}

.hero-spin[data-loaded] {
  opacity: 0.18;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .rail {
    display: none;
  }
}

@media (max-width: 1024px) {
  .discipline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .philosophy-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .philosophy-figure {
    max-width: 30rem;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .discipline-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-inner {
    padding: 64px 20px 56px;
  }

  .disciplines,
  .philosophy {
    padding: 56px 20px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 1.05rem;
  }

  .footer-cols {
    gap: 40px;
  }

  .discipline-card {
    padding: 24px;
  }
}
