﻿/* =========================================================
   Hafeziyeh — Fal-e Hafez
   Design tokens follow the Hafeziyeh homepage system
   ========================================================= */
:root {
  /* palette */
  --night: #13243f;
  --night-2: #0c1a30;
  --night-3: #1c3459;
  --turquoise: #2f8f8a;
  --turquoise-light: #7cc3b8;
  --teal-ink: #1d5c4f;
  --gold: #b38e4f;
  --gold-light: #d9bf86;
  --gold-pale: #efe1bf;
  --ivory: #faf6ec;
  --paper: #f4ecd9;
  --paper-2: #ecdfc2;
  --ink: #26302e;
  --ink-soft: #5b6461;
  --line: rgba(29, 92, 79, .14);

  --fs-sm: .8125rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.15rem, 2.2vw, 1.55rem);
  --fs-xl: clamp(1.8rem, 4vw, 2.75rem);
  --fs-hero: clamp(4rem, 10vw, 8.25rem);

  /* shape & motion */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-card: 0 40px 70px -36px rgba(4, 12, 26, .75), 0 0 0 1px rgba(179, 142, 79, .25);

  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .34  0 0 0 0 .27  0 0 0 0 .17  0 0 0 .55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(124, 195, 184, .16), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, rgba(217, 191, 134, .14), transparent 60%),
    var(--ivory);

}

/* paper grain over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: var(--noise);
  opacity: .16;
  mix-blend-mode: multiply;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--teal-ink);
  color: var(--ivory);
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(250, 246, 236, .55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(250, 246, 236, .86);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--teal-ink);
  line-height: 1;
}
.brand__mark {
  width: 34px; height: 34px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.brand__text { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 4px; }
.brand__fa { font-weight: 700; font-size: .95rem; }
.brand__en { font-family: var(--font-latin); font-size: .5rem; letter-spacing: .28em; color: var(--gold); }

.primary-nav ul { display: flex; gap: clamp(.9rem, 2vw, 2rem); }
.primary-nav a {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--teal-ink);
  padding-block: .4rem;
  transition: color .2s var(--ease);
}
.primary-nav a:hover { color: var(--turquoise); }
.primary-nav a[aria-current="page"] { color: var(--gold); }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 30%;
  bottom: -2px;
  height: 6px;
  background: center / contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 6'><path d='M0 3H7M13 3H20' stroke='%23b38e4f'/><path d='M10 .5L12.5 3L10 5.5L7.5 3Z' fill='%23b38e4f'/></svg>");
}

.lang-switch {
  display: flex;
  gap: 1rem;
  margin-inline-start: auto;
  font-size: .72rem;
}
.lang-switch a { color: var(--ink-soft); display: inline-flex; align-items: center; gap: .3rem; }
.lang-switch a::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.lang-switch a[aria-current="true"] { color: var(--teal-ink); font-weight: 700; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  place-items: center;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--teal-ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
  content: "";
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 46px;
  padding: .55rem 1.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.4;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .3s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--solid { background: var(--teal-ink); color: var(--ivory); }
.btn--solid:hover { background: var(--turquoise); }

/* the outlined pill with a small notch — from the homepage */
.btn--outline { border-color: var(--gold); color: var(--gold); background: rgba(255, 255, 255, .35); }
.btn--outline::after {
  content: "";
  position: absolute;
  bottom: -5px;
  inset-inline-start: calc(50% - 4px);
  width: 8px; height: 8px;
  background: var(--ivory);
  border-inline-end: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
}
.btn--outline:hover { background: rgba(217, 191, 134, .18); }

.btn--gold {
  background: linear-gradient(180deg, #e3cc95, var(--gold-light) 40%, #c4a265);
  color: var(--night);
  border-color: var(--gold-pale);
  box-shadow: 0 0 0 6px rgba(217, 191, 134, .08), 0 14px 34px -14px rgba(217, 191, 134, .7);
}
.btn--gold:hover { box-shadow: 0 0 0 10px rgba(217, 191, 134, .12), 0 18px 40px -14px rgba(217, 191, 134, .85); }
.btn--gold:disabled { cursor: progress; opacity: .85; }
.btn--gold .icon { stroke-width: 2.6; }
.btn--lg { min-height: 56px; padding-inline: 2.4rem; font-size: 1.05rem; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  padding: .45rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(29, 92, 79, .28);
  background: rgba(255, 255, 255, .55);
  color: var(--teal-ink);
  font-size: .875rem;
  font-weight: 700;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip-btn:hover { background: var(--teal-ink); color: var(--ivory); border-color: var(--teal-ink); }
.chip-btn--quiet { border-color: rgba(179, 142, 79, .45); color: #8a6a35; }
.chip-btn--quiet:hover { background: var(--gold); border-color: var(--gold); color: var(--ivory); }
.chip-btn:disabled { opacity: .45; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}
.hero__art { order: -1; margin: 0; }
.hero__art svg { width: 100%; height: auto; }

.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }

.hero__title {
  font-family: var(--font-poem);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 1.25;
  color: var(--teal-ink);
}
.hero__subtitle {
  margin-top: .25rem;
  font-size: var(--fs-lg);
  color: var(--teal-ink);
  font-weight: 500;
}
.hero__divider {
  width: min(340px, 90%);
  height: 24px;
  margin-top: 1rem;
  fill: none;
  stroke: var(--teal-ink);
  stroke-width: 1.2;
}
.hero__latin {
  margin-top: .9rem;
  font-family: var(--font-latin);
  font-weight: 800;
  font-size: clamp(.8rem, 1.3vw, 1rem);
  letter-spacing: .05em;
  color: var(--gold-light);
}
.hero__latin span { color: var(--gold); }
.hero__lead {
  max-width: 44ch;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  line-height: 2.1;
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.8rem; }

/* ---------- features ---------- */
.features { padding-block: 1rem 3.5rem; }
.features__list { display: grid; grid-template-columns: repeat(5, 1fr); }
.features__list li + li { border-inline-start: 1px solid var(--line); }

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: .75rem .5rem;
  color: var(--teal-ink);
}
.feature__icon {
  width: 50px; height: 50px;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
  transition: color .25s var(--ease);
}
.feature__orn { width: 44px; height: 8px; fill: none; stroke: var(--gold); stroke-width: 1; }
.feature__label { font-size: var(--fs-sm); font-weight: 700; }
.feature:hover .feature__icon { color: var(--turquoise); }

/* ---------- oracle (night) ---------- */
.oracle {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ivory);
  z-index:9;
}
.oracle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff8e6 50%, transparent 52%),
    radial-gradient(1px 1px at 28% 42%, #fff8e6 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 46% 12%, #f3e3b8 50%, transparent 52%),
    radial-gradient(1px 1px at 63% 30%, #fff8e6 50%, transparent 52%),
    radial-gradient(1.3px 1.3px at 78% 14%, #fff8e6 50%, transparent 52%),
    radial-gradient(1px 1px at 88% 46%, #f3e3b8 50%, transparent 52%),
    radial-gradient(1px 1px at 6% 60%, #fff8e6 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 36% 70%, #fff8e6 50%, transparent 52%);
  background-size: 520px 420px;
  opacity: .7;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .85; } }

.oracle__moon {
  position: absolute;
  top: clamp(1.5rem, 4vw, 3rem);
  inset-inline-end: clamp(1rem, 8vw, 8rem);
  width: clamp(70px, 9vw, 120px);
  z-index: -1;
}

.oracle__horizon {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  height: clamp(120px, 16vw, 180px);
  z-index: -1;
}

.oracle__inner { display: flex; flex-direction: column; align-items: center; text-align: center;width: 100%; }

.oracle__star {
  width: 34px; height: 34px;
  fill: none; stroke: var(--gold-light); stroke-width: 1.2;
}
.oracle__title {
  font-weight: 400;
  font-family: 'IranNastaliq';
  font-size: 50px;
  line-height: 1.7;
  color: var(--primary-color-nd);
  padding-top:32px;
}
.oracle__invocation {
  max-width: 91ch;
  margin-top: .75rem;
  color: var(--primary-color-nd);
  line-height: 2.1;
}
#falButton{
    background-color:var(--primary-color-nd);
    color:#faf6ec;
}
.oracle .btn--gold { margin-top: 2rem; }

.stage {
  position: relative;
  width: min(100%, 880px);
  margin-top: 2.05rem;
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: clamp(.9rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217, 191, 134, .22);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.stage__placeholder { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; width: 100%;  }
.stage__placeholder[hidden] { display: none; }
.stage__hint { color: #000; font-size: .95rem; max-width: 45ch;}

.divan {
  --divan-img: url("../images/divan-book.png");
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 444px);
}
.divan::before {
  content: "";
  position: absolute;
  inset: -10% 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(243, 227, 184, .22), rgba(124, 195, 184, .1) 45%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.stage.is-loading .divan::before { animation: halo 1.6s ease-in-out infinite alternate; }
@keyframes halo { from { opacity: .55; transform: scale(.96); } to { opacity: 1; transform: scale(1.05); } }
.divan__ring {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 60%;
  aspect-ratio: 2.4;
  border-radius: 50%;
  border: 1px solid rgba(124, 195, 184, .6);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.75);
  pointer-events: none;
}
.divan__ring:nth-child(2) { border-color: rgba(217, 191, 134, .7); }
.stage.is-loading .divan__ring { animation: ring 2.4s var(--ease) infinite; }
.stage.is-loading .divan__ring:nth-child(2) { animation-delay: .8s; }
.stage.is-loading .divan__ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes ring {
  0%   { opacity: .9; transform: translate(-50%, -50%) scale(.75); }
  100% { opacity: 0;  transform: translate(-50%, -50%) scale(1.75); }
}

.divan__book {
  position: relative;
  width: 100%;
  aspect-ratio: 444 / 156;
  perspective: 700px;
  perspective-origin: 49% 25%;
}
.divan__img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
.divan__leaf {
  --d: 0s;
  position: absolute;
  left: 27.03%;
  top: 7.69%;
  width: 22.07%;
  height: 62.82%;
  transform-origin: right center;
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
}
.divan__leaf:nth-of-type(2) { --d: .5s; }
.divan__leaf:nth-of-type(3) { --d: 1s; }

.divan__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image: var(--divan-img);
  background-repeat: no-repeat;
  background-size: 453.06% 159.18%;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
.divan__face--front {
  background-position: 34.68% 20.69%;
  clip-path: polygon(18% 0, 100% 3%, 100% 100%, 0 98%);
}
.divan__face--back {
  background-position: 63.01% 20.69%;
  clip-path: polygon(0 3%, 84% 0, 100% 98%, 0 100%);
  transform: rotateY(180deg);
}
.divan__face::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(90deg, rgba(70, 48, 18, .05), rgba(70, 48, 18, .45));
}
.divan__face--back::after { background: linear-gradient(270deg, rgba(70, 48, 18, .05), rgba(70, 48, 18, .45)); }

.stage.is-loading .divan__leaf { animation: leaf-turn 1.5s cubic-bezier(.45, .05, .35, 1) var(--d) infinite; }
.stage.is-loading .divan__face::after { animation: leaf-shade 1.5s cubic-bezier(.45, .05, .35, 1) var(--d) infinite; }

@keyframes leaf-turn {
  0%   { opacity: 1; transform: rotateY(0deg); }
  50%  { opacity: 1; transform: rotateY(90deg) scaleY(1.03); }
  86%  { opacity: 1; transform: rotateY(180deg); }
  100% { opacity: 0; transform: rotateY(180deg); }
}
@keyframes leaf-shade {
  0%   { opacity: 0; }
  50%  { opacity: .85; }
  86%  { opacity: 0; }
  100% { opacity: 0; }
}
.divan__light {
  position: absolute;
  left: 33%;
  top: 0;
  width: 32%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 242, 205, .9), rgba(124, 195, 184, .35) 45%, transparent 72%);
  mix-blend-mode: screen;
  filter: blur(4px);
  opacity: 0;
  pointer-events: none;
}
.stage.is-loading .divan__light { animation: spine-light 1.6s ease-in-out infinite alternate; }
@keyframes spine-light { from { opacity: .15; } to { opacity: .8; } }

.stage.is-loading .stage__hint { animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .45; } to { opacity: 1; } }

.stage__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 2.5rem 1rem;
  animation: rise .6s var(--ease) both;
}
.stage__error[hidden] { display: none; }
.stage__error-icon {
  width: 58px; height: 58px;
  fill: none; stroke: var(--gold-light); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.stage__error-title {
  font-family: var(--font-poem);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.8;
  color: var(--gold-light);
}
.stage__error-text { max-width: 44ch; color:#000; line-height: 2; }
.stage__error .btn { margin-top: .75rem;color:var(--primary-color-nd); }

.btn--ghost-gold {
  border-color: var(--gold-light);
  color: var(--gold-pale);
  background: rgba(217, 191, 134, .06);
}
.btn--ghost-gold:hover { background: rgba(217, 191, 134, .18); }
.btn--ghost-gold .icon { stroke-width: 2.6; }

.fal-card {
  position: relative;
  width: 100%;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  padding: clamp(2.5rem, 6vw, 3.75rem) clamp(1.25rem, 6vw, 3.75rem) clamp(1.75rem, 4vw, 2.5rem);
  border-radius: 10px;
  color: var(--ink);
  text-align: center;
  
  box-shadow: var(--shadow-card);
}
.fal-card[hidden] { display: none; }
.fal-card:focus { outline: none; }
.fal-card::before,
.fal-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 6px;
}
.fal-card::before { inset: 12px; border: 1.5px solid rgba(179, 142, 79, .75); }
.fal-card::after { inset: 18px; border: 1px solid rgba(179, 142, 79, .35); }

.fal-card__corner {
  position: absolute;
  z-index: 1;
  width: 30px; height: 30px;
  fill: var(--paper);
  stroke: var(--gold);
  stroke-width: 1.4;
}
.fal-card__corner--tr { top: -1px; right: -1px; }
.fal-card__corner--tl { top: -1px; left: -1px; }
.fal-card__corner--br { bottom: -1px; right: -1px; }
.fal-card__corner--bl { bottom: -1px; left: -1px; }

.fal-card__head { display: flex; flex-direction: column; align-items: center; }
.fal-card__star { width: 40px; height: 40px; fill: none; stroke: var(--gold); stroke-width: 1.2; }
.fal-card__kicker { margin-top: .6rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.fal-card__title {
  margin-top: .15rem;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 800;
  color: var(--teal-ink);
}
.fal-card__date { font-size: .78rem; color: var(--gold); }

.fal-card__verses {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(179, 142, 79, .3);
}
.verse { padding-block: .55rem; }
.verse + .verse { border-top: 1px dashed rgba(179, 142, 79, .22); }
.verse__pair,
.verse__single {
  font-family: var(--font-poem);
  font-size: var(--fs-lg);
  line-height: 2.2;
  color: #22312e;
}
.verse__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.verse__single { display: flex; flex-direction: column; align-items: center; }
.verse__mesra { text-wrap: balance;font-size:16px; }

.verse__note { margin-top: .1rem; }
.verse__note summary {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .1rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 700;
  color: #8a6a35;
  cursor: pointer;
  list-style: none;
  transition: background-color .2s var(--ease);
}
.verse__note summary::-webkit-details-marker { display: none; }
.verse__note summary::before { content: "+"; font-size: .95rem; line-height: 1; }
.verse__note[open] summary::before { content: "−"; }
.verse__note summary:hover { background: rgba(179, 142, 79, .12); }
.verse__note p {
  max-width: 62ch;
  margin: .4rem auto .2rem;
  padding: .65rem 1rem;
  text-align: start;
  font-size: .9rem;
  line-height: 2;
  color: var(--ink-soft);
  border-radius: 10px;
  background: rgba(179, 142, 79, .08);
}

.fal-card__meaning {
  margin-top: 1.75rem;
  padding: 1.1rem 1.4rem;
  text-align: start;
  border-radius: var(--radius-md);
  border-inline-start: 3px solid var(--turquoise);
  background: rgba(47, 143, 138, .08);
}
.fal-card__meaning-title { font-size: .95rem; font-weight: 800; color: var(--teal-ink); }
.fal-card__meaning[hidden] { display: none; }
.fal-card__meaning p { margin-top: .35rem; line-height: 2.1; color: #34403d; max-width: 70ch; }
.fal-card__meaning .fal-card__meaning-note { margin-top: .5rem; font-size: .75rem; color: var(--ink-soft); }

.fal-card__source {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.25rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--teal-ink);
  border-bottom: 1px dotted rgba(29, 92, 79, .5);
  transition: color .2s var(--ease);
}
.fal-card__source:hover { color: var(--turquoise); }

.fal-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-top: 1.75rem;
}

.fal-card.is-revealed { animation: unfold 1.05s var(--ease) both; }
@keyframes unfold {
  from { opacity: 0; transform: perspective(1400px) rotateX(16deg) translateY(36px) scale(.96); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.fal-card.is-revealed .verse,
.fal-card.is-revealed .fal-card__meaning,
.fal-card.is-revealed .fal-card__source,
.fal-card.is-revealed .fal-card__actions {
  animation: rise .8s var(--ease) both;
  animation-delay: calc(.55s + var(--i, 0) * .11s);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.site-footer { position: relative; margin-top: 1rem; }
.site-footer__garden { width: 100%; height: clamp(140px, 18vw, 240px); }
.site-footer__bar {
  border-top: 4px solid var(--teal-ink);
  background: var(--teal-ink);
  color: rgba(250, 246, 236, .85);
  font-size: var(--fs-sm);
}
.site-footer__bar a { color: var(--gold-pale); border-bottom: 1px dotted currentColor; }
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  padding-block: 1rem;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 300;
  max-width: calc(100% - 2rem);
  padding: .7rem 1.4rem;
  border-radius: var(--radius-pill);
  background: rgba(19, 36, 63, .92);
  color: var(--ivory);
  font-size: .9rem;
  border: 1px solid rgba(217, 191, 134, .35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .3s var(--ease);
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .site-header__inner { gap: 1.25rem; }
  .nav-toggle { display: grid; order: 3; }
  .lang-switch { order: 2; }
  .primary-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    padding: .5rem 1.25rem 1.25rem;
    background: rgba(250, 246, 236, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding-block: .7rem; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .primary-nav a[aria-current="page"]::after { display: none; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: 0; max-width: 560px; margin-inline: auto; }
  .features__list { grid-template-columns: repeat(3, 1fr); row-gap: 1rem; }
  .features__list li + li { border-inline-start: 0; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .lang-switch { gap: .6rem; }
  .features__list { grid-template-columns: repeat(2, 1fr); }
  .verse__pair { grid-template-columns: 1fr; gap: 0; }
  .verse__pair .verse__mesra:first-child { text-align: right; padding-inline-end: 1.5rem; }
  .verse__pair .verse__mesra:last-child { text-align: left; padding-inline-start: 1.5rem; }
  .fal-card__actions .chip-btn { flex: 1 1 calc(50% - .6rem); justify-content: center; }
  .site-footer__inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}


main{
    position:relative;
}
main:before{
    background-image: url('../images/fl-bc.png');
    position:absolute;
    width:100px;
    height:100%;
    content:"";
    top:0;
    right:0;
    background-size:100% 100%;
}
main:after{
    background-image: url('../images/r2.png');
    position:absolute;
   width: 64px;
    height:176px;
    content:"";
    top:0;
    left:0;
    background-size:100% 100%;
}
.bt-2{
    /*background-image: url(../images/bt-k.png);*/
    position: absolute;
    width: 100%;
    content: "";
    bottom: -97px;
    right: 0;
    background-size: 100% 100%;
}

@media (min-width: 760px) and (max-width: 1100px){
main {
    position: relative;
    height: calc(100vh - 420px);
    display: flex
;
    justify-content: center;
    align-items: center;
}
main:before {
    max-height: 734px;
}
}
@media only screen and (max-width: 760px){
    .oracle__title {
    font-size: 36px;
}
    .oracle__invocation {
          max-width: 100ch;
        font-size: 13px;
        line-height: 26px;
}
      .oracle__invocation br{
          display:none;
      }
      main:before {
    position: absolute;
    width: 57px;
    height:397px;
}
      .stage{
          min-height:223px;
          margin-bottom:32px;
      }
      .stage__hint {
    color: #000;
    font-size: 11px;
 
}
      #falButton{
          display:block!important;
      }
      .bt-2{
          bottom:0;
      }
}