/* ─── Kahroba design system ───────────────────────────────────────────── */
:root {
  --cream: #f6f1e8; --paper: #fffcf7; --paper-2: #fbf6ee;
  --ink: #2a1a10; --ink-2: #4a3628; --muted: #7c6b5c; --hair: rgba(42, 26, 16, .10); --hair-2: rgba(42, 26, 16, .18);
  --amber: #d9962c; --amber-2: #b26f14; --amber-soft: #f4e4c4; --amber-glow: rgba(217, 150, 44, .35);
  --espresso: #221510; --espresso-2: #33221a;
  --analysis: #7a4a2a; --learning: #c0672d; --health: #3f7d5a;
  --r-sm: 10px; --r: 16px; --r-lg: 26px;
  --sh-sm: 0 1px 2px rgba(42, 26, 16, .06), 0 2px 8px rgba(42, 26, 16, .05);
  --sh: 0 2px 4px rgba(42, 26, 16, .05), 0 14px 40px -12px rgba(42, 26, 16, .18);
  --sh-lg: 0 30px 80px -30px rgba(42, 26, 16, .45);
  --font: "Vazirmatn", system-ui, sans-serif; --serif: "Cormorant Garamond", Georgia, serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font); line-height: 1.75; -webkit-font-smoothing: antialiased; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .featured h2, html[lang="en"] .wordmark b, html[lang="en"] .lead { font-family: var(--serif); letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--amber-soft); }

/* motion */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* buttons, chips */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: .95rem;
  background: linear-gradient(180deg, #e6a63c, var(--amber-2)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -8px var(--amber-glow); transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 14px 28px -10px var(--amber-glow); filter: saturate(1.05); }
.btn.lg { padding: 14px 28px; font-size: 1.02rem; }
.btn.sm { padding: 8px 16px; font-size: .88rem; }
.btn.ghost { background: rgba(255, 255, 255, .55); color: var(--ink); border-color: var(--hair-2); box-shadow: none; backdrop-filter: blur(8px); }
.btn.ghost:hover { background: #fff; border-color: var(--amber); box-shadow: var(--sh-sm); }
.chip { background: rgba(255, 255, 255, .7); border: 1px solid var(--hair); border-radius: 999px; padding: 7px 16px; font-size: .9rem; transition: all .2s; }
.chip:hover { border-color: var(--hair-2); background: #fff; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ─── nav ─────────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; padding: 14px 32px; margin: 0 auto;
  background: rgba(246, 241, 232, .72); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; stroke: none; flex: none; filter: drop-shadow(0 4px 8px rgba(138, 79, 18, .35)); }
.wordmark { display: grid; line-height: 1.1; }
.wordmark b { font-size: 1.35rem; font-weight: 900; letter-spacing: -.01em; }
.wordmark small { font-family: var(--serif); font-size: .72rem; letter-spacing: .28em; color: var(--muted); text-transform: uppercase; direction: ltr; text-align: start; }
.links { display: flex; gap: 6px; margin-inline-start: auto; }
.links a { padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; }
.links a:hover { background: rgba(42, 26, 16, .06); color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; background: rgba(42, 26, 16, .06); border-radius: 999px; padding: 3px; }
.lang button { background: none; border: 0; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.lang button.is-active { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); }

main { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ─── hero ────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 72px 0 40px; min-height: 640px; }
body::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1000px; z-index: -1; pointer-events: none;
  background: radial-gradient(640px 640px at 24% -4%, rgba(243, 196, 107, .6), transparent 70%), radial-gradient(520px 520px at 74% 34%, rgba(232, 210, 176, .85), transparent 70%); }
html[dir="ltr"] body::before { background: radial-gradient(640px 640px at 76% -4%, rgba(243, 196, 107, .6), transparent 70%), radial-gradient(520px 520px at 26% 34%, rgba(232, 210, 176, .85), transparent 70%); }
.hero > .botanical { position: absolute; inset-inline-start: 47%; top: -50px; width: 360px; height: 560px; color: var(--amber-2); opacity: .16; transform: rotate(8deg); z-index: -1; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--amber-2); margin-bottom: 20px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--amber); }
.hero h1 { margin: 0; font-size: clamp(3.2rem, 7.2vw, 6rem); line-height: 1.02; font-weight: 900; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, #e0a03a 0%, #b26f14 55%, #7a4a2a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="en"] .hero h1 em { font-style: italic; font-weight: 600; }
.lead { font-size: 1.5rem; font-weight: 700; margin: 18px 0 10px; color: var(--ink-2); }
.sub { margin: 0; max-width: 520px; font-size: 1.06rem; color: var(--muted); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 34px; }
.stats { display: flex; gap: 34px; margin: 0; padding-top: 22px; border-top: 1px solid var(--hair); }
.stats div { display: grid; }
.stats dt { font-size: 1.9rem; font-weight: 900; line-height: 1.1; }
html[lang="en"] .stats dt { font-family: var(--serif); font-size: 2.2rem; }
.stats dd { margin: 0; font-size: .82rem; color: var(--muted); }
.hero-copy .reveal:nth-child(2) { transition-delay: .08s; } .hero-copy .reveal:nth-child(3) { transition-delay: .16s; } .hero-copy .reveal:nth-child(4) { transition-delay: .22s; } .hero-copy .reveal:nth-child(5) { transition-delay: .3s; } .hero-copy .reveal:nth-child(6) { transition-delay: .38s; }

/* hero art: amber orb + 3D featured book */
.hero-art { position: relative; display: grid; place-items: center; min-height: 520px; transition-delay: .25s; }
.orb { position: absolute; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd98a, #e09a2e 45%, #8a4f12 80%, #5a2f0c); box-shadow: 0 60px 120px -40px rgba(138, 79, 18, .7), inset -30px -40px 80px rgba(60, 30, 5, .35), inset 20px 20px 60px rgba(255, 240, 200, .35); }
.orb::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--grain); opacity: .18; mix-blend-mode: soft-light; }
.featured { position: relative; z-index: 1; display: flex; align-items: center; gap: 30px; padding: 30px 32px; border-radius: var(--r-lg);
  background: rgba(34, 21, 16, .82); color: #fff; backdrop-filter: blur(12px); box-shadow: var(--sh-lg), inset 0 1px 0 rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .08); transform: translateY(30px); }
.book3d { perspective: 1100px; flex: none; }
.vol { position: relative; width: 150px; height: 216px; transform: rotateY(22deg) rotateX(3deg); transform-style: preserve-3d; transition: transform .8s var(--ease); }
html[dir="ltr"] .vol { transform: rotateY(-22deg) rotateX(3deg); }
.featured:hover .vol { transform: rotateY(8deg) rotateX(1deg); }
html[dir="ltr"] .featured:hover .vol { transform: rotateY(-8deg) rotateX(1deg); }
.vol .front { position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; background: linear-gradient(160deg, #fbf3e4 0%, #eadfc9 55%, #d6c7ab 100%); display: grid; place-items: center; box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .5); overflow: hidden; }
html[dir="rtl"] .vol .front { border-radius: 8px 3px 3px 8px; }
.vol .front::after { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(90, 47, 12, .25); border-radius: 4px; }
.vol .num { font-size: 6.4rem; font-weight: 900; line-height: 1; color: #1b1b1b; letter-spacing: -.05em; }
.vol .fl { position: absolute; left: -60%; top: -20%; width: 60%; height: 140%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: shine 6s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.vol::before { content: ''; position: absolute; top: 4px; bottom: 4px; inset-inline-end: -14px; width: 14px; background: repeating-linear-gradient(90deg, #f7f0e1 0 1.5px, #d9cdb6 1.5px 3px); transform-origin: left; transform: rotateY(90deg); border-radius: 0 2px 2px 0; box-shadow: inset 0 0 6px rgba(0, 0, 0, .15); }
html[dir="rtl"] .vol::before { transform-origin: right; transform: rotateY(-90deg); }
.vol::after { content: ''; position: absolute; top: 0; bottom: 0; inset-inline-start: -18px; width: 18px; background: linear-gradient(90deg, #bfae90, #e5d8c0); transform-origin: right; transform: rotateY(-90deg); border-radius: 3px 0 0 3px; }
html[dir="rtl"] .vol::after { transform-origin: left; transform: rotateY(90deg); }
.featured-body { display: grid; gap: 8px; justify-items: start; }
.badge { background: linear-gradient(180deg, #e6a63c, var(--amber-2)); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.featured h2 { margin: 2px 0 0; font-size: 2rem; font-weight: 900; letter-spacing: -.02em; }
.featured p { margin: 0; color: rgba(255, 255, 255, .72); font-size: .95rem; max-width: 260px; }
.link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; color: #f3c46b; border-bottom: 1px solid rgba(243, 196, 107, .4); padding-bottom: 2px; transition: gap .2s; }
.link:hover { gap: 14px; }
.arr { font-style: normal; }
html[dir="ltr"] .arr { display: inline-block; transform: scaleX(-1); }

/* ─── finder / domains ────────────────────────────────────────────────── */
.finder { padding: 80px 0 40px; }
.sec-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 30px; }
.index { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .2em; color: var(--amber-2); padding-top: 10px; border-top: 1px solid var(--amber); }
.sec-head h2 { margin: 0; font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 900; letter-spacing: -.02em; }
.sec-head p { margin: 8px 0 0; color: var(--muted); max-width: 640px; font-size: 1.02rem; }
.cmd { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid var(--hair); box-shadow: var(--sh-sm); backdrop-filter: blur(8px); margin-bottom: 26px; }
.search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; padding: 6px 16px; }
.search svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: inherit; min-width: 0; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.groups { display: grid; grid-template-columns: 1fr 1fr 1.55fr; gap: 20px; }
.group { position: relative; background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--sh-sm); overflow: hidden; }
.group::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--c), transparent); }
.group[data-group="analysis"] { --c: var(--analysis); } .group[data-group="learning"] { --c: var(--learning); } .group[data-group="health"] { --c: var(--health); }
.group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.group-head .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.group-head .ico svg { width: 28px; height: 28px; }
.group-head h3 { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.group-head small { display: block; font-family: var(--serif); letter-spacing: .18em; font-size: .72rem; color: var(--muted); text-transform: uppercase; direction: ltr; text-align: start; }
.group > p { margin: 6px 0 18px; color: var(--muted); font-size: .95rem; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--hair); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.item:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.item .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.item .ico svg { width: 20px; height: 20px; }
.item b { display: block; font-size: .96rem; line-height: 1.4; font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: .72rem; color: var(--muted); background: var(--cream); border-radius: 999px; padding: 2px 9px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.item.is-open { background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--c) 7%, #fff)); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.item.is-open .status { background: var(--c); color: #fff; }
.item.is-open .status::before { background: #fff; opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, #fff 40%, transparent); }
.item.is-open::after { content: '←'; position: absolute; inset-inline-end: 12px; top: 12px; color: var(--c); font-weight: 700; opacity: 0; transform: translateX(4px); transition: all .25s; }
html[dir="ltr"] .item.is-open::after { content: '→'; transform: translateX(-4px); }
.item.is-open:hover::after { opacity: 1; transform: none; }
.item.is-hidden, .group.is-hidden { display: none; }
.note { margin: 30px 0 0; padding: 18px 22px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .95rem; border: 1px dashed var(--hair-2); border-radius: var(--r); }
.note svg { width: 24px; height: 24px; color: var(--amber); }

/* ─── footer ──────────────────────────────────────────────────────────── */
.foot { position: relative; margin-top: 90px; background: var(--espresso); color: #efe6d8; overflow: hidden; }
.foot::before { content: ''; position: absolute; inset: 0; background: var(--grain); opacity: .12; mix-blend-mode: overlay; pointer-events: none; }
.foot .botanical { position: absolute; inset-inline-end: 6%; bottom: -80px; width: 300px; height: 460px; color: #f3c46b; opacity: .12; transform: rotate(-12deg); }
.foot-grid { position: relative; max-width: 1240px; margin: 0 auto; padding: 64px 32px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-brand { display: flex; gap: 16px; align-items: flex-start; }
.foot-brand .brand-mark { width: 48px; height: 48px; }
.foot-brand b { font-size: 1.5rem; font-weight: 900; }
.foot-brand p { margin: 6px 0 0; color: rgba(239, 230, 216, .65); max-width: 320px; }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col h4 { margin: 0 0 6px; font-family: var(--serif); letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; color: #f3c46b; direction: ltr; text-align: start; }
.foot-col a { color: rgba(239, 230, 216, .78); transition: color .2s; }
.foot-col a:hover { color: #fff; }
.foot-end { position: relative; max-width: 1240px; margin: 0 auto; padding: 22px 32px 30px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; color: rgba(239, 230, 216, .55); }
.fine { font-family: var(--serif); letter-spacing: .12em; direction: ltr; }

/* ─── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) { .groups { grid-template-columns: 1fr 1fr; } .group[data-group="health"] { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .hero { padding-top: 40px; min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 420px; }
  .orb { width: 340px; height: 340px; }
  .featured { transform: none; }
  .hero > .botanical { display: none; }
}
@media (max-width: 720px) {
  .nav { padding: 12px 16px; gap: 12px; }
  .links, .nav-end .btn { display: none; }
  .nav-end { margin-inline-start: auto; }
  main { padding: 0 16px; }
  .groups { grid-template-columns: 1fr; }
  .featured { flex-direction: column; text-align: center; padding: 24px; }
  .featured-body { justify-items: center; }
  .stats { gap: 22px; }
  .foot-grid { grid-template-columns: 1fr; padding: 44px 16px 24px; }
  .foot-end { flex-direction: column; padding: 18px 16px 26px; }
  .cmd { border-radius: var(--r-lg); }
}
