/* ===========================================================
   Khut Akhet — public landing page
   Dark mystical aesthetic throughout, modelled on
   zagros.ro/memphis. Mobile-first responsive.
   =========================================================== */

:root {
  /* Dark palette — near-black with warm metallic gold */
  --bg:           #0A0A0F;
  --bg-soft:      #141019;
  --bg-card:      rgba(20, 16, 25, 0.55);
  --bg-card-strong: rgba(28, 22, 33, 0.72);

  --gold:         #C9A86A;
  --gold-bright:  #E8C97F;
  --gold-dim:     #8A7440;
  --gold-deep:    #5C4D26;

  --parchment:    #EADFC4;
  --ink:          #E8DFC9;
  --ink-dim:      #B6AC94;
  --ink-mute:     #807459;

  --red:          #7A1F1F;
  --red-bright:   #B33232;

  --rule:         rgba(201, 168, 106, 0.18);
  --rule-strong:  rgba(201, 168, 106, 0.45);
  --gold-glow:    rgba(201, 168, 106, 0.28);

  --serif-display: "Cinzel", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-body:    "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:          "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max-w: 1180px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient aurora glow over the whole background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 700px at 70% -10%, rgba(201, 168, 106, 0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(122, 31, 31, 0.07), transparent 60%),
    radial-gradient(600px 400px at 50% 50%, rgba(201, 168, 106, 0.04), transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: aurora 28s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0); opacity: 0.85; }
  100% { transform: translate3d(0, -20px, 0); opacity: 1; }
}

/* Subtle grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.79 0 0 0 0 0.66 0 0 0 0 0.42 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: -1;
}

a { color: var(--gold); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--gold-bright); }

img, svg { display: block; max-width: 100%; height: auto; }

/* ----- Typography ------------------------------------------------ */
h1, h2, h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--parchment);
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(3rem, 9vw, 6.4rem);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  letter-spacing: 0.05em;
}
h3 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

p { margin: 0 0 1.1em; }
strong { color: var(--parchment); font-weight: 600; }
em { font-style: italic; color: var(--ink); }

.overline {
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.40em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2em;
  display: inline-block;
}

.lede {
  font-family: var(--serif-body);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-style: italic;
  color: var(--parchment);
  max-width: 62ch;
  line-height: 1.55;
  margin-bottom: 1.5em;
}

/* Decorative ornamental rule */
.ornament {
  height: 24px;
  margin: 3rem auto 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  max-width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
}
.ornament-glyph {
  width: 26px;
  height: 26px;
  color: var(--gold);
  opacity: 0.85;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.divider-thin {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--rule-strong), transparent);
  margin: 2rem auto;
  max-width: 280px;
}

/* ----- Layout ---------------------------------------------------- */
.section {
  padding: clamp(4.5rem, 9vw, 8.5rem) 1.5rem;
  position: relative;
}
.section-tight { padding: clamp(3rem, 6vw, 5rem) 1.5rem; }
.container { max-width: var(--max-w); margin: 0 auto; }

.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(201, 168, 106, 0.03) 50%, transparent 100%);
}
.section-deep {
  background: linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.20) 100%);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ----- Cards ----------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: clamp(1.4rem, 2.5vw, 2rem);
  position: relative;
  transition: border-color 280ms ease, transform 280ms ease, box-shadow 280ms ease;
  --mx: 50%; --my: 50%;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 180px at var(--mx) var(--my), rgba(201, 168, 106, 0.10), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
  border-radius: inherit;
}
.card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.45);
}
.card:hover::before { opacity: 1; }

/* ----- Header / nav --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 1.25rem;
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: background 240ms ease, border-color 240ms ease;
  /* Clip any content that would overflow the fixed-height bar — happens
   * when the user uses text-only zoom or pinch-zoom on mobile and the
   * brand text or nav items grow taller than var(--header-h). Without
   * this clip, the overflow visibly leaks into the page below. */
  overflow: hidden;
  box-sizing: border-box;
}
.site-header.is-transparent {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex; align-items: center; gap: 0.75rem;
  min-width: 0; /* allow children to shrink below their content size */
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--serif-display);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--parchment);
  /* Shrink gracefully when the header is space-starved (zoom or narrow
   * landscape). Text gets ellipsised instead of wrapping into a 2nd row
   * which used to push other items out of the bar. */
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}
.brand img {
  height: 36px; width: auto;
  flex-shrink: 0; /* logo never shrinks */
  filter: drop-shadow(0 0 8px var(--gold-glow));
}
.brand-text {
  display: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
@media (min-width: 480px) { .brand-text { display: inline; } }

.nav-links {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a {
  color: var(--ink-dim);
  padding: 9px 0;
  position: relative;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 240ms ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions {
  display: flex; align-items: center; gap: 0.6rem;
  margin-left: auto;
}
@media (min-width: 1024px) { .nav-actions { margin-left: 1.75rem; } }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.20em;
  background: rgba(20, 16, 25, 0.55);
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--ink-dim);
  padding: 6px 11px;
  font: inherit; letter-spacing: inherit;
  cursor: pointer;
  border-radius: 999px;
  transition: all 200ms ease;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--bg);
}
.lang-toggle button:hover:not([aria-pressed="true"]) { color: var(--gold-bright); }

.btn-gold {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--bg) !important;
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 60%, var(--gold-dim) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 245, 220, 0.4) inset,
    0 0 24px -8px var(--gold-glow);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 245, 220, 0.5) inset,
    0 0 36px -6px rgba(232, 201, 127, 0.55);
  filter: brightness(1.05);
}
.btn-gold:active { transform: translateY(-1px); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: grayscale(0.4); }

.btn-ghost {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  cursor: pointer;
  transition: all 220ms ease;
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 106, 0.08);
  color: var(--gold-bright);
}

/* Circular "Members" link — gold padlock by default; transparent with gold
 * border on hover/focus/active. Inverts the previous behaviour so the lock
 * reads as a clear call to action even at rest. */
.member-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--bg);
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 60%, var(--gold-dim) 100%);
  box-shadow: 0 0 18px -6px var(--gold-glow), 0 1px 0 rgba(255, 245, 220, 0.35) inset;
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease,
              box-shadow 220ms ease, transform 220ms ease;
  flex-shrink: 0;
}
.member-link svg { width: 17px; height: 17px; }
.member-link:hover,
.member-link:focus-visible,
.member-link:active {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(201, 168, 106, 0.10);
  box-shadow: 0 0 24px -6px var(--gold-glow);
  transform: translateY(-1px);
}

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 0; background: transparent; color: var(--parchment);
  cursor: pointer;
  margin-left: -8px;
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-drawer {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: saturate(140%) blur(10px);
  z-index: 49;
  display: flex; flex-direction: column; padding: 2rem 1.75rem 3rem;
  gap: 1.25rem;
  font-family: var(--serif-display);
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transform: translateY(-100%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  /* If the drawer's items exceed the viewport (small phones in landscape,
   * or any zoom level), let the drawer scroll internally instead of
   * spilling its tail items into the page below. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-drawer[data-open="true"] { transform: translateY(0); }
/* On desktop the hamburger is hidden, so force-hide the drawer too —
 * defends against any rogue state where data-open got stuck "true" on
 * mobile and the user resized to desktop, or page zoom changes the
 * effective layout while the drawer has been opened. */
@media (min-width: 1024px) {
  .mobile-drawer {
    display: none !important;
  }
}
.mobile-drawer a {
  color: var(--parchment);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-drawer a:hover { color: var(--gold-bright); }

/* Scroll progress bar at top */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 0 12px var(--gold-glow);
  transition: width 60ms linear;
}

/* ----- Hero ----------------------------------------------------- */
.hero {
  min-height: calc(100dvh - var(--header-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  /* Tighter vertical padding on small viewports so the CTAs stay above the
   * fold on phones; mobile fine-tune block below trims further. */
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.hero-ornament {
  position: relative;
  /* Smaller-by-default so it doesn't dominate on phones; scales up on large
   * screens via clamp. */
  width: clamp(170px, 36vw, 320px);
  height: clamp(170px, 36vw, 320px);
  margin: 0 auto clamp(0.75rem, 2vw, 1.5rem);
  display: grid;
  place-items: center;
}
/* Soft modern halo behind the seal — radial glow, no rotation */
.hero-halo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 201, 127, 0.45) 0%, rgba(232, 201, 127, 0.18) 30%, transparent 65%);
  filter: blur(24px);
  pointer-events: none;
  animation: halo-pulse 8s ease-in-out infinite;
}
@keyframes halo-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.85; }
  50%      { transform: scale(1.05); opacity: 1; }
}
.hero-seal {
  width: 88%;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 22px var(--gold-glow)) drop-shadow(0 0 4px rgba(232, 201, 127, 0.4));
  animation: breath 7s ease-in-out infinite;
}
@keyframes breath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); filter: drop-shadow(0 0 36px rgba(232, 201, 127, 0.55)) drop-shadow(0 0 6px rgba(232, 201, 127, 0.6)); }
}

.hero .overline { margin-bottom: 0.6em; }
.hero h1 { margin-top: 0.4rem; margin-bottom: 0.35em; }

/* The deviza — KHA EM AKHET — sits prominently below the title. */
.hero-deviza {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0.2rem 0 0.25rem;
  text-shadow: 0 0 28px rgba(232, 201, 127, 0.18);
}
/* "Răsărind la Orizont" — the small italic translation under the deviza. */
.hero-deviza-sub {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--ink-dim);
  margin: 0;
  letter-spacing: 0.04em;
}

.hero-cta {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center;
}
.scroll-cue {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-mute);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* Floating motes — visible on desktop. Rise from bottom of hero to top.
 * The CSS animation owns transform; JS only sets size, position and delay. */
.motes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.mote {
  position: absolute;
  bottom: -12px;
  width: 4px; height: 4px;
  background: var(--gold-bright);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 14px rgba(232, 201, 127, 0.75), 0 0 4px rgba(232, 201, 127, 0.95);
  animation: rise 14s linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0);          opacity: 0; }
  8%   { opacity: 0.85; }
  92%  { opacity: 0.85; }
  100% { transform: translateY(-100dvh);    opacity: 0; }
}

/* ----- Two-column / grid blocks --------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch; /* equal heights for cards in a row */
}
@media (min-width: 880px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
.two-col.align-top { align-items: start; }

.numbered { counter-reset: item; padding-left: 0; list-style: none; margin: 0; display: grid; gap: 1.75rem; }
.numbered li { display: flex; gap: 1.4rem; align-items: flex-start; }
.numbered li::before {
  counter-increment: item;
  content: counter(item, lower-roman) ".";
  font-family: var(--serif-display);
  font-style: italic;
  color: var(--gold);
  font-size: 1.15rem;
  flex: 0 0 1.7em;
  text-align: left;
  letter-spacing: 0;
  line-height: 1.1;
  padding-top: 2px;
}
.numbered h3 { margin: 0 0 0.4rem; letter-spacing: 0.10em; text-transform: none; color: var(--parchment); }

.three-col { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: stretch; }
@media (min-width: 720px) { .three-col { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; } }

.feature {
  border-top: 1px solid var(--rule-strong);
  padding-top: 1.5rem;
}
.feature h3 {
  font-family: var(--serif-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.6rem;
  color: var(--gold-bright);
}

/* Pillars grid (philosophy) */
.pillars { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: stretch; }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 1024px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillars > div {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  padding: 1.5rem;
  position: relative;
  --mx: 50%; --my: 50%;
  transition: border-color 240ms ease, transform 240ms ease;
  border-radius: 6px;
}
.pillars > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 140px at var(--mx) var(--my), rgba(201, 168, 106, 0.12), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
  border-radius: inherit;
}
.pillars > div:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.pillars > div:hover::before { opacity: 1; }
.pillars-icon {
  width: 36px; height: 36px;
  color: var(--gold);
  margin-bottom: 1rem;
}
.pillars h3 {
  font-family: var(--serif-display);
  font-size: 1.05rem;
  letter-spacing: 0.10em;
  text-transform: none;
  color: var(--parchment);
  margin-bottom: 0.5rem;
}
.pillars p { font-size: 16px; color: var(--ink-dim); line-height: 1.65; margin: 0; }

/* Degree tiers */
.degrees { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: tier; list-style: none; padding: 0; margin: 0; }
.degrees li {
  counter-increment: tier;
  border-left: 1px solid var(--rule-strong);
  padding: 1.5rem 0 1.5rem 2rem;
  position: relative;
}
.degrees li::before {
  content: counter(tier, upper-roman);
  position: absolute;
  left: -0.7em;
  top: 1.3rem;
  font-family: var(--serif-display);
  font-style: italic;
  color: var(--bg);
  background: var(--gold);
  width: 1.4em; height: 1.4em;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--bg);
}
.degrees h3 {
  font-family: var(--serif-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--parchment);
  margin: 0 0 0.35rem;
}
.degrees .range {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: block;
  margin-bottom: 0.5rem;
}
.degrees p { color: var(--ink-dim); margin: 0; font-size: 17px; }

/* Symbols grid */
.symbols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; align-items: stretch; }
@media (min-width: 720px) { .symbols { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; } }
.symbols figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 1.75rem 1.25rem 1.4rem;
  text-align: center;
  position: relative;
  --mx: 50%; --my: 50%;
  transition: border-color 280ms ease, transform 240ms ease;
  border-radius: 6px;
}
.symbols figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 140px at var(--mx) var(--my), rgba(201, 168, 106, 0.10), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
  border-radius: inherit;
}
.symbols figure:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.symbols figure:hover::before { opacity: 1; }
.symbols svg {
  width: 48px; height: 48px;
  color: var(--gold);
  margin: 0 auto 0.85rem;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}
.symbols figcaption {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.4rem;
}
.symbols p {
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 1.55;
  margin: 0;
}

/* Hieroglyph illustration block */
.hieroglyph-figure {
  background: linear-gradient(180deg, rgba(20, 16, 25, 0.6), rgba(10, 10, 15, 0.4));
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.hieroglyph-figure svg { width: 75%; height: auto; }
.hieroglyph-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 60%, rgba(201, 168, 106, 0.10), transparent 60%);
  pointer-events: none;
}
.figcaption {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 1rem;
  text-align: center;
}

/* Reading list */
.readings { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.readings li {
  border-left: 2px solid var(--gold-deep);
  padding: 0.5rem 0 0.5rem 1.1rem;
  color: var(--ink-dim);
  font-size: 16.5px;
  transition: border-color 240ms ease, color 240ms ease;
}
.readings li:hover { border-left-color: var(--gold); color: var(--ink); }
.readings strong { color: var(--parchment); }

/* Quote (blockquote) */
.quote {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  color: var(--parchment);
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  line-height: 1.55;
}
.quote-cite {
  display: block;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1rem;
  font-style: normal;
}

/* ----- Contact form ---------------------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1.2fr 1fr; gap: 3rem; } }

.field-group { margin-bottom: 1.1rem; }
.field-group label {
  display: block;
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.field-group input,
.field-group textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--parchment);
  background: rgba(10, 10, 15, 0.55);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 12px 14px;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.field-group textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.field-group input:focus,
.field-group textarea:focus {
  outline: 0;
  border-color: var(--gold);
  background: rgba(20, 16, 25, 0.75);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.20), 0 0 18px -6px var(--gold-glow);
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--ink-mute); }

.contact-info {
  font-size: 17px; line-height: 1.85;
}
.contact-info p { margin-bottom: 1.4rem; }
.contact-info .label {
  font-family: var(--serif-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
}
.contact-info a { color: var(--parchment); }
.contact-info a:hover { color: var(--gold-bright); }

.recaptcha-notice {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-top: 1.2rem;
  line-height: 1.6;
}
.recaptcha-notice a { text-decoration: underline; color: var(--ink-dim); }
.recaptcha-notice a:hover { color: var(--gold-bright); }

.form-status {
  margin-top: 1.1rem;
  padding: 13px 16px;
  border-radius: 2px;
  font-size: 14.5px;
  border: 1px solid transparent;
}
.form-status.success {
  background: rgba(34, 90, 50, 0.20);
  color: #C7E5C7;
  border-color: rgba(80, 170, 100, 0.40);
}
.form-status.error {
  background: rgba(122, 31, 31, 0.20);
  color: #F4C4C4;
  border-color: rgba(179, 50, 50, 0.45);
}

/* ----- Footer ---------------------------------------------------- */
.site-footer {
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.50));
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.site-footer img {
  height: 44px; width: auto;
  margin: 0 auto 1.25rem;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px var(--gold-glow));
}
.footer-tagline {
  font-family: var(--serif-display);
  font-size: 12px;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 0.8rem;
}
.footer-meta {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 1.5rem;
  letter-spacing: 0.06em;
}
.footer-toggle { display: inline-flex; margin: 1.25rem auto 0; }

/* ----- Hero entrance stagger ------------------------------------ */
/* Five elements fan in 180ms apart from the bottom; --d is the slot index */
.hero-stagger {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-rise 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--d, 0) * 180ms + 200ms);
}
@keyframes hero-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Title with subtle gold shimmer — animated linear-gradient over the glyphs.
 * Falls back gracefully on browsers without background-clip:text. */
.hero-title {
  background: linear-gradient(100deg,
    var(--parchment) 0%,
    var(--parchment) 35%,
    var(--gold-bright) 50%,
    var(--parchment) 65%,
    var(--parchment) 100%);
  background-size: 250% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: title-shimmer 8s ease-in-out infinite;
}
@keyframes title-shimmer {
  0%   { background-position: 100% 50%; }
  50%  { background-position: 0%   50%; }
  100% { background-position: 100% 50%; }
}

/* ----- 3D card tilt — applied via CSS variable set by JS -------- */
.card, .pillars > div, .symbols figure {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 280ms ease,
              box-shadow 280ms ease;
}
.card[data-tilt],
.pillars > div[data-tilt],
.symbols figure[data-tilt] {
  transform:
    perspective(900px)
    rotateX(var(--ry, 0deg))
    rotateY(var(--rx, 0deg))
    translateY(var(--lift, 0px))
    translateZ(0);
}

/* Opt-out: card-shaped containers that should NOT receive 3D tilt or hover-lift.
 * The contact form sits inside .card but tilting it makes form inputs feel
 * unstable, so we skip the effect there. */
.card[data-no-tilt] { transform: none !important; }
.card[data-no-tilt]:hover { transform: none !important; }
.card[data-no-tilt]::before { display: none; }

/* ----- Magnetic buttons — tiny cursor follow when hovered ------- */
.magnetic {
  --tx: 0px; --ty: 0px;
  transform: translate(var(--tx), var(--ty));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 220ms ease, filter 220ms ease, color 220ms ease, background 220ms ease, border-color 220ms ease;
  will-change: transform;
}
@media (hover: none) {
  /* Disable magnetic on touch — it conflicts with tap targets */
  .magnetic { transform: none !important; }
}

/* ----- Reveal-on-scroll ----------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.from-left  { transform: translate(-32px, 12px); }
.reveal.from-right { transform: translate(32px, 12px); }
.reveal.from-scale { transform: scale(0.94); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Optional: stagger children inside a .reveal-stagger container */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 300ms; }

/* Section title underline that draws in from left when section enters viewport */
.title-underline {
  display: inline-block;
  position: relative;
  padding-bottom: 0.5em;
}
.title-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 12px var(--gold-glow);
  transition: width 1100ms cubic-bezier(0.22, 1, 0.36, 1) 200ms;
}
.reveal.is-visible .title-underline::after { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.from-left, .reveal.from-right, .reveal.from-scale,
  .reveal-stagger > *, .hero-stagger {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .hero-seal, .hero-halo, body::before, .scroll-cue, .hero-title { animation: none !important; }
  .hero-title { color: var(--parchment); -webkit-text-fill-color: var(--parchment); }
  .mote { display: none; }
  .magnetic, .card[data-tilt] { transform: none !important; }
  .title-underline::after { width: 100%; transition: none; }
}

/* ----- Back-to-top floating button ------------------------------ *
 * Hidden by default; JS adds [data-visible="true"] after the user
 * scrolls past the hero. Bottom-right, gold filled circle with an
 * up-arrow. Click → smooth-scroll to top. */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1.5rem, 3.5vw, 2.5rem);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--bg);
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 60%, var(--gold-dim) 100%);
  box-shadow:
    0 0 22px -6px var(--gold-glow),
    0 1px 0 rgba(255, 245, 220, 0.35) inset,
    0 12px 28px -12px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 220ms ease, filter 220ms ease;
  z-index: 60;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top[data-visible="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  filter: brightness(1.05);
  box-shadow:
    0 0 32px -6px rgba(232, 201, 127, 0.55),
    0 14px 30px -10px rgba(0, 0, 0, 0.65);
  transform: translateY(-2px) scale(1.04);
}

/* iOS safe-area offset on the back-to-top button */
@supports (padding: env(safe-area-inset-bottom)) {
  .back-to-top { bottom: calc(clamp(1.5rem, 3.5vw, 2.5rem) + env(safe-area-inset-bottom)); }
}

/* ----- Music toggle — bottom-left mirror of the back-to-top ----- *
 * Always visible (user can opt in any time). Two SVG icons inside;
 * the active one is shown via CSS based on the data-state attribute. */
.music-toggle {
  position: fixed;
  left: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1.5rem, 3.5vw, 2.5rem);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  color: var(--ink-dim);
  background: rgba(20, 16, 25, 0.78);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.55);
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 220ms ease, color 220ms ease, background 220ms ease;
  z-index: 60;
  /* Tiny entrance after the page settles */
  opacity: 0;
  animation: music-fade-in 600ms ease 1200ms forwards;
}
@keyframes music-fade-in { to { opacity: 1; } }
.music-toggle svg { width: 18px; height: 18px; }
.music-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(20, 16, 25, 0.92);
  transform: translateY(-2px);
}
/* Icon visibility: off-icon when paused, on-icon when playing.
 * Default state = paused. */
.music-toggle .icon-on  { display: none; }
.music-toggle .icon-off { display: block; }
.music-toggle[data-state="playing"] .icon-on  { display: block; }
.music-toggle[data-state="playing"] .icon-off { display: none; }
/* Glow when actively playing so it's clearly "live" */
.music-toggle[data-state="playing"] {
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 22px -6px var(--gold-glow), 0 8px 22px -10px rgba(0, 0, 0, 0.55);
}

@supports (padding: env(safe-area-inset-bottom)) {
  .music-toggle { bottom: calc(clamp(1.5rem, 3.5vw, 2.5rem) + env(safe-area-inset-bottom)); }
}

@media (max-width: 600px) {
  .music-toggle { width: 40px; height: 40px; }
  .music-toggle svg { width: 16px; height: 16px; }
}

/* ----- Hide grecaptcha v3 badge --------------------------------- */
.grecaptcha-badge { visibility: hidden !important; }

/* ----- Language switching --------------------------------------- *
 * Specificity must beat element-class rules like
 * `.field-group label { display: block }`, so we anchor on
 * `html[lang=...]` (specificity 0,1,1) plus a child attribute
 * selector (0,1,0) → total 0,2,1, beating 0,1,1.
 * ---------------------------------------------------------------- */
[data-lang-en] { display: none; }
html[lang="ro"] [data-lang-en] { display: none; }
html[lang="en"] [data-lang-ro] { display: none; }
html[lang="en"] [data-lang-en] { display: revert; }

/* ----- Mobile fine-tuning --------------------------------------- */
@media (max-width: 600px) {
  body { font-size: 17px; line-height: 1.7; }
  /* Tightest hero on phones — keeps CTAs above the fold on iPhone SE size. */
  .hero { padding: 1.5rem 1.25rem 2.5rem; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); margin-top: 0.3rem; margin-bottom: 0.2em; }
  .hero .overline { margin-bottom: 0.45em; font-size: 11px; letter-spacing: 0.30em; }
  .hero-deviza { font-size: 1.5rem; letter-spacing: 0.16em; margin: 0.15rem 0 0.2rem; }
  .hero-deviza-sub { font-size: 0.95rem; }
  .hero-cta { margin-top: 1.1rem; gap: 0.6rem; }
  .hero-cta .btn-gold, .hero-cta .btn-ghost { padding: 10px 18px; font-size: 11px; }
  .scroll-cue { margin-top: 1.4rem; font-size: 10px; letter-spacing: 0.30em; }
  .section { padding: 4rem 1.25rem; }
  .ornament { margin: 2rem auto 2.5rem; }
  .ornament::before, .ornament::after { max-width: 100px; }
  .lede { font-size: 1.15rem; }
  .quote { padding-left: 1rem; font-size: 1.2rem; }
  .pillars > div { padding: 1.4rem 1.25rem; }
  .back-to-top { width: 44px; height: 44px; }
  .back-to-top svg { width: 18px; height: 18px; }
}

/* Extra-narrow phones (iPhone SE etc.) — squeeze further */
@media (max-width: 380px) {
  .hero-ornament { width: 150px; height: 150px; margin-bottom: 0.5rem; }
  .hero h1 { font-size: 2.4rem; letter-spacing: 0.06em; }
  .hero-deviza { font-size: 1.3rem; }
  .hero-cta { margin-top: 0.9rem; }
}
