html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
::selection { background: #c8a560; color: #0b0a09; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0b0a09; }
::-webkit-scrollbar-thumb { background: #2a2520; border-radius: 8px; }

/* Nav */
#nav.scrolled { background: rgba(11,10,9,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #2a2520; }
.nav-link { position: relative; transition: color .3s; }
.nav-link:hover, .nav-link.active { color: #f3ece0; }
.nav-link.active::after { content: ''; position: absolute; bottom: -8px; right: 0; left: 0; margin: auto; width: 4px; height: 4px; border-radius: 50%; background: #c8a560; }
#mobileMenu.open { display: flex; }
.m-link { border-bottom: 1px solid #2a2520; padding-bottom: 1rem; }

/* Hero */
#hero { background: #4a1520; }
.hero-grid {
  background-image: linear-gradient(#1a1714 1px, transparent 1px), linear-gradient(90deg, #1a1714 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  opacity: .6;
}
.draw path, .draw-late path, .draw-late circle { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.2s cubic-bezier(.6,.1,.2,1) forwards; }
.draw-late path, .draw-late circle { stroke-dasharray: 3 5; stroke-dashoffset: 0; opacity: 0; animation: fadeIn 2s 1.6s forwards; }
.dots circle { opacity: 0; animation: fadeIn .6s forwards; }
.dots circle:nth-child(n) { animation-delay: calc(2s + var(--i, 0) * .1s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUp 1.2s cubic-bezier(.2,.7,.2,1) forwards; }
.fade-up.d1 { animation-delay: .2s; } .fade-up.d2 { animation-delay: .5s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.bob { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* Chapter tag */
.chapter-tag { display: inline-flex; align-items: center; gap: .9rem; font-size: .8rem; letter-spacing: .15em; color: #a39a8c; }
.chapter-tag span { color: #c8a560; padding: .35rem .8rem; border: 1px solid rgba(200,165,96,.3); border-radius: 999px; letter-spacing: .05em; }

/* Story word reveal */
#storyText .w { color: #2a2520; transition: color .4s ease; }
#storyText .w.on { color: #f3ece0; }
#storyText .w.gold.on { color: #c8a560; }
#storyText .w.wine.on { color: #a13a4c; }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }

/* Why-us grid (chapter 02) */
.why-card {
  border: 1px solid rgb(var(--line)); border-radius: 1.75rem; padding: 2.5rem 1.75rem 2.25rem;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.35rem;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), border-color .4s, box-shadow .4s;
}
.why-card:hover { transform: translateY(-6px); border-color: rgba(200,165,96,.5); box-shadow: 0 24px 50px -30px rgba(120,90,30,.35); }
.why-ic { border-radius: 999px; display: grid; place-items: center; background: rgba(200,165,96,.1); border: 1px solid rgba(200,165,96,.4); box-shadow: 0 10px 24px -14px rgba(120,90,30,.5); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.why-ic svg { color: #c8a560; stroke-width: 1.6; filter: drop-shadow(0 0 6px rgba(200,165,96,.35)); }
.why-ic img { width: 58%; height: 58%; object-fit: contain; filter: drop-shadow(0 0 6px rgba(200,165,96,.3)); }
.why-card:hover .why-ic { transform: translateY(-3px) scale(1.06); }
.why-card p { font-size: .98rem; line-height: 1.9; color: rgb(var(--cream)); max-width: 22rem; }

/* Stats */
.stat { padding: 2.5rem 1.5rem; border-bottom: 1px solid #2a2520; border-left: 1px solid #2a2520; }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1; color: #f3ece0; }
.stat-num sup { color: #c8a560; font-size: .45em; top: -1em; margin-inline-start: .15em; }
.stat-label { margin-top: 1rem; color: #a39a8c; font-size: .9rem; }
.stat:hover .stat-num { color: #c8a560; transition: color .4s; }

/* AI steps */
.ai-step { position: absolute; inset: 0; opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; pointer-events: none; }
.ai-step.active { opacity: 1; transform: none; pointer-events: auto; }
.step-dot { height: 3px; width: 28px; background: #2a2520; border-radius: 3px; transition: all .5s; }
.step-dot.active { width: 56px; background: #c8a560; }

.scan-grid { background-image: linear-gradient(rgba(200,165,96,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(200,165,96,.07) 1px, transparent 1px); background-size: 24px 24px; }
.scan-line { position: absolute; left: 0; right: 0; height: 2px; background: #c8a560; top: 0; animation: scan 2.8s ease-in-out infinite; opacity: .8; }
.scan-line::after { content: ''; position: absolute; left: 0; right: 0; top: 2px; height: 50px; background: rgba(200,165,96,.08); }
@keyframes scan { 0% { top: 4%; } 50% { top: 92%; } 100% { top: 4%; } }
.scanner .face-o { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.6s ease; }
.scanner .mesh, .scanner .pts circle { opacity: 0; transition: opacity .8s; }
.scanner .plan-tags .tag { opacity: 0; transform: translateY(10px); transition: all .6s; }
.scanner[data-state="0"] .face-o, .scanner[data-state="1"] .face-o, .scanner[data-state="2"] .face-o { stroke-dashoffset: 0; }
.scanner[data-state="1"] .pts circle, .scanner[data-state="2"] .pts circle { opacity: 1; }
.scanner[data-state="1"] .mesh, .scanner[data-state="2"] .mesh { opacity: 1; }
.scanner[data-state="2"] .plan-tags .tag { opacity: 1; transform: none; }
.scanner[data-state="2"] .plan-tags .tag:nth-child(2) { transition-delay: .15s; }
.scanner[data-state="2"] .plan-tags .tag:nth-child(3) { transition-delay: .3s; }
.scanner[data-state="2"] .scan-line { opacity: 0; }
.tag { font-size: 11px; padding: .4rem .75rem; border-radius: 999px; background: rgba(11,10,9,.85); border: 1px solid rgba(200,165,96,.4); color: #e6cf9a; }
.tag-wine { border-color: rgba(161,58,76,.6); color: #f3ece0; background: rgba(122,36,51,.55); }

/* Loader */
.loader { width: 56px; height: 56px; border-radius: 50%; border: 1px solid #2a2520; border-top-color: #c8a560; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result */
.metric { border: 1px solid #2a2520; border-radius: 1rem; padding: 1rem; }
.bar { height: 4px; border-radius: 4px; background: #1a1714; overflow: hidden; margin-top: .75rem; }
.bar > i { display: block; height: 100%; background: #c8a560; width: 0; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.rec { display: flex; gap: .9rem; padding: 1rem 0; border-top: 1px solid #2a2520; }

/* Services — wine cards with round photo */
.svc { flex: 0 0 auto; width: min(82vw, 400px); height: min(58vh, 480px); border-radius: 1.75rem; border: 1px solid #7a2433; background: linear-gradient(160deg, #5a1a28 0%, #3a101a 100%); padding: 2rem; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: border-color .4s, transform .4s; }
.svc:hover { border-color: rgba(200,165,96,.55); transform: translateY(-4px); }
.svc .num { font-family: 'Cormorant Garamond', serif; font-size: 5rem; line-height: 1; color: rgba(243,236,224,.08); position: absolute; left: 1.5rem; top: 1rem; transition: color .4s; }
.svc:hover .num { color: rgba(200,165,96,.3); }
.svc-photo { width: 6rem; height: 6rem; border-radius: 999px; overflow: hidden; flex: 0 0 auto; border: 2px solid rgba(200,165,96,.55); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6), 0 0 0 4px rgba(200,165,96,.12); transition: transform .4s; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc:hover .svc-photo { transform: translateY(-2px) scale(1.04); }
.svc li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid rgba(243,236,224,.08); font-size: .9rem; color: #e2d3c8; }
.svc li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #c8a560; flex: 0 0 auto; }

/* Homepage services list */
.svc-dot { width: 1.75rem; height: 1.75rem; border-radius: .55rem; display: grid; place-items: center; color: #c8a560; background: rgba(200,165,96,.1); flex: 0 0 auto; }
.svc-group { display: block; padding: .9rem 0; border-bottom: 1px solid rgba(200,165,96,.14); text-decoration: none; transition: transform .25s; }
.svc-group:hover { transform: translateX(-2px); }
.svc-group-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; }
.svc-group-head h3 { font-size: .95rem; font-weight: 500; color: rgb(var(--cream)); transition: color .2s; }
.svc-group:hover .svc-group-head h3 { color: #c8a560; }
.svc-group p { font-size: .78rem; line-height: 1.8; color: rgb(var(--mute)); padding-inline-start: 2.45rem; }

/* Clinic environment carousel */
.env-carousel { position: relative; border-radius: 1.75rem; overflow: hidden; border: 1px solid rgba(200,165,96,.45); aspect-ratio: 4 / 3; box-shadow: 0 40px 90px -45px rgba(120,90,30,.75), 0 0 0 7px rgba(200,165,96,.1); }
.env-track { display: flex; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.3,.8,.2,1); }
.env-slide { flex: 0 0 100%; width: 100%; height: 100%; }
.env-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.env-nav { position: absolute; top: 50%; translate: 0 -50%; width: 2.75rem; height: 2.75rem; border-radius: 999px; display: grid; place-items: center; background: rgba(11,10,9,.55); color: #f6e6b4; border: 1px solid rgba(200,165,96,.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .2s, transform .2s; z-index: 2; }
.env-nav:hover { background: rgba(200,165,96,.85); color: #0b0a09; }
.env-prev { right: 1rem; }
.env-next { left: 1rem; }
.env-dots { position: absolute; bottom: 1rem; inset-inline: 0; display: flex; justify-content: center; gap: .5rem; z-index: 2; }
.env-dot { width: .5rem; height: .5rem; border-radius: 999px; background: rgba(243,236,224,.4); border: none; padding: 0; transition: background .2s, width .2s; }
.env-dot.on { background: #c8a560; width: 1.4rem; }
.env-row { display: flex; align-items: center; gap: .85rem; padding: .8rem 0; border-bottom: 1px solid rgba(200,165,96,.14); color: rgb(var(--cream)); text-decoration: none; font-size: .92rem; transition: color .2s; }
.env-row:hover { color: #c8a560; }

/* Team */
.doc { border: 1px solid #2a2520; border-radius: 1.5rem; padding: 1.5rem; background: #12100e; transition: border-color .4s, transform .4s; }
.doc:hover { border-color: rgba(200,165,96,.45); transform: translateY(-4px); }
.avatar { border-radius: 999px; display: grid; place-items: center; font-family: 'Cormorant Garamond', serif; color: #c8a560; border: 1px solid rgba(200,165,96,.35); background: #1a1714; }
.doc.lead { background: #0b0a09; padding: 2rem; }
.badge-sub { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; padding: .35rem .75rem; border-radius: 999px; background: #7a2433; color: #f3ece0; }

/* Reviews marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 1.25rem; width: max-content; animation: marquee 60s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.review { width: 360px; flex: 0 0 auto; border: 1px solid #2a2520; border-radius: 1.5rem; padding: 1.5rem; background: #0b0a09; direction: rtl; }
#reviewsGrid .review { width: auto; }
#reviewsGrid .review-fresh { border-color: rgba(200,165,96,.5); box-shadow: 0 0 0 1px rgba(200,165,96,.15); }

/* Form */
.field label { display: block; font-size: .8rem; color: #a39a8c; margin-bottom: .6rem; }
.field input, .field select, .field textarea { width: 100%; background: #0b0a09; border: 1px solid #2a2520; border-radius: .9rem; padding: .85rem 1rem; color: #f3ece0; font-size: .95rem; outline: none; transition: border-color .3s; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #c8a560; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23c8a560' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 1rem center; }
.field input::placeholder, .field textarea::placeholder { color: #5a534a; }
.info-ic { width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 1px solid #2a2520; display: grid; place-items: center; color: #c8a560; flex: 0 0 auto; }
.social { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid #2a2520; display: grid; place-items: center; transition: all .3s; }
.social:hover { color: #0b0a09; background: #c8a560; border-color: #c8a560; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ===== Typography: display font for headings & numbers (change here to swap everywhere) ===== */
:root { --font-display: 'Lalezar', 'Vazirmatn', sans-serif; --gold-grad: linear-gradient(135deg, #f6e6b4 0%, #c8a560 48%, #8c7445 100%); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
h2 { line-height: 1.35; }
.stat-num, .svc .num, #chapterNum, #svcCounter, .doc .font-serif, .avatar { font-family: var(--font-display); }
.stat-num > span, #chapterNum, #svcCounter, .doc .font-serif {
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.stat-num sup { font-family: var(--font-display); }
.stat:hover .stat-num > span { filter: drop-shadow(0 0 14px rgba(200,165,96,.45)); transition: filter .4s; }
.chapter-tag span { font-family: var(--font-display); background: rgba(200,165,96,.08); }
.avatar { background: linear-gradient(145deg, #241f19, #12100e); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }

/* ===== Hero logo ===== */
#heroArt { filter: drop-shadow(0 18px 50px rgba(0,0,0,.35)); }
.hero-logo { animation: floaty 7s ease-in-out infinite; }
.hero-glow { position: absolute; left: 50%; top: 38%; width: min(90vw, 820px); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(200,165,96,.16), transparent 62%); pointer-events: none; }

@keyframes floaty { 50% { transform: translateY(-8px); } }
.btn-gold { background: var(--gold-grad); box-shadow: 0 10px 30px -10px rgba(200,165,96,.6), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .3s, box-shadow .3s; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(200,165,96,.8), inset 0 1px 0 rgba(255,255,255,.4); }

/* ===== Modern icons: soft gold squircles with glow ===== */
.svc-ic, .info-ic, .social {
  border-radius: 1.1rem; border: 1px solid rgba(200,165,96,.38);
  background: linear-gradient(145deg, rgba(200,165,96,.22), rgba(200,165,96,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 10px 26px -12px rgba(200,165,96,.55);
}
.svc-ic svg, .info-ic svg { stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(200,165,96,.45)); }
.social:hover { background: var(--gold-grad); color: #0b0a09; border-color: transparent; }
.badge-sub { background: linear-gradient(135deg, #a13a4c, #6a1e2c); box-shadow: 0 6px 18px -8px rgba(161,58,76,.8); }
.scan-line { background: linear-gradient(90deg, transparent, #f3dfaa, transparent); box-shadow: 0 0 18px 2px rgba(200,165,96,.55); }

/* ===== Brand (logo) ===== */
.brand-mark { border-radius: .9rem; mix-blend-mode: lighten; object-fit: cover; }
.brand-word { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.85rem; line-height: 1; letter-spacing: .01em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.brand-sub { font-family: 'Cormorant Garamond', serif; font-size: .62rem; letter-spacing: .62em; color: #c8a560; margin-top: .3rem; padding-left: .15em; }
.footer-logo { mix-blend-mode: lighten; opacity: .95; }

/* ===== AI scanner: dotted-face visual ===== */
.scanner { border-color: rgba(200,165,96,.3); box-shadow: 0 0 0 1px rgba(200,165,96,.12), 0 40px 90px -40px rgba(200,165,96,.4); }
#scanner.scanner { background: linear-gradient(160deg, #5a1a28 0%, #3a101a 100%); }
.scanner .face-img { mix-blend-mode: lighten; opacity: .38; filter: saturate(.7) brightness(.85); transition: opacity 1.4s ease, filter 1.4s ease; }
.scanner[data-state="1"] .face-img { opacity: .75; filter: none; }
.scanner[data-state="2"] .face-img { opacity: 1; filter: brightness(1.05); }
.scanner .guides { opacity: 0; transition: opacity 1s; }
.scanner[data-state="1"] .guides, .scanner[data-state="2"] .guides { opacity: 1; }
.scanner .pts circle { transform-box: fill-box; transform-origin: center; animation: ptPulse 2.4s ease-in-out infinite; }
.scanner .pts circle:nth-child(2n) { animation-delay: .6s; } .scanner .pts circle:nth-child(3n) { animation-delay: 1.2s; }
@keyframes ptPulse { 50% { transform: scale(1.5); } }

/* ===== Upload area & result placeholders ===== */
.drop-bg { mix-blend-mode: lighten; opacity: .16; transition: opacity .5s, transform 1.2s; }
#drop:hover .drop-bg { opacity: .3; transform: scale(1.03); }
.drop-ic { animation: floaty 4s ease-in-out infinite; }
.ghost-card { height: 6.5rem; border-radius: 1.1rem; border: 1px solid #2a2520; background: linear-gradient(160deg, #17130f, #0f0d0b); padding: .9rem; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.ghost-ic { width: 1.9rem; height: 1.9rem; border-radius: .6rem; display: grid; place-items: center; color: #c8a560; border: 1px solid rgba(200,165,96,.35); background: rgba(200,165,96,.1); }
.ghost-line { display: block; height: 5px; width: 80%; border-radius: 5px; background: linear-gradient(90deg, #211c17 20%, rgba(200,165,96,.35) 50%, #211c17 80%); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
.ghost-line.short { width: 45%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Reviews: single row ===== */
.marquee-track { animation-duration: 110s; }

/* ===== Numbers: Yekan (digits only). Drop Yekan.woff2 into assets/fonts/ for a guaranteed result ===== */
@font-face {
  font-family: 'YekanNum'; font-weight: 100 900; font-display: swap;
  unicode-range: U+0030-0039, U+0660-0669, U+06F0-06F9, U+066B-066C;
  src: local('Yekan'), local('BYekan'), local('Yekan Bakh'),
       url('assets/fonts/Yekan.woff2') format('woff2'), url('assets/fonts/Yekan.woff') format('woff'), url('assets/fonts/Yekan.ttf') format('truetype'),
       url('https://cdn.jsdelivr.net/npm/typeface-yekan/dist/Yekan.woff2') format('woff2'), url('https://cdn.jsdelivr.net/npm/typeface-yekan/dist/Yekan.ttf') format('truetype');
}
:root { --font-display: 'YekanNum', 'Lalezar', 'Vazirmatn', sans-serif; }
body { font-family: 'YekanNum', 'Vazirmatn', sans-serif; }

/* ===== Colour system: dark by default (hero, header, footer), cream-gold for the rest ===== */
:root { --ink: 11 10 9; --coal: 18 16 14; --char: 26 23 20; --line: 42 37 32; --cream: 243 236 224; --mute: 163 154 140; --gold: 200 165 96; --gold-light: 230 207 154; --gold-dim: 140 116 69; }
.theme-cream {
  --ink: 246 237 215; --coal: 239 225 192; --char: 231 213 174; --line: 215 195 148; --cream: 42 34 22; --mute: 112 98 72;
  --gold: 150 112 36; --gold-light: 176 138 60; --gold-dim: 120 92 40;
  --gold-grad: linear-gradient(135deg, #c99c40 0%, #9a7428 55%, #6f4f16 100%);
  background:
    radial-gradient(1100px 560px at 50% -8%, rgba(200,165,96,.08), transparent 60%),
    linear-gradient(180deg, #f7f7f6 0%, #eeede9 45%, #e6e4de 100%);
  color: rgb(var(--cream));
}
/* elements that stay dark inside cream sections */
.theme-cream .svc, .theme-cream .scanner, .theme-cream #drop, .theme-cream .art-thumb {
  --ink: 11 10 9; --coal: 18 16 14; --char: 26 23 20; --line: 42 37 32; --cream: 243 236 224; --mute: 163 154 140;
  --gold: 200 165 96; --gold-light: 230 207 154; --gold-dim: 140 116 69;
  --gold-grad: linear-gradient(135deg, #f6e6b4 0%, #c8a560 48%, #8c7445 100%); color: rgb(var(--cream));
}
.theme-cream #drop { background: linear-gradient(160deg, #5a1a28 0%, #3a101a 100%); border-color: rgba(200,165,96,.45); }
.theme-cream .stat, .theme-cream .metric, .theme-cream .rec, .theme-cream .review, .theme-cream .doc, .theme-cream .ghost-card, .theme-cream .art-card { border-color: rgb(var(--line)); }
.theme-cream .doc, .theme-cream .review, .theme-cream .art-card { background: #fbf4e2; }
.theme-cream .doc.lead { background: #fffaf0; }
.theme-cream .doc:hover, .theme-cream .art-card:hover { border-color: rgba(150,112,36,.6); box-shadow: 0 24px 50px -30px rgba(120,90,30,.55); }
.theme-cream .avatar { background: linear-gradient(145deg, #f8efd8, #ead9ab); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); border-color: rgba(150,112,36,.4); }
.theme-cream .avatar svg { filter: drop-shadow(0 0 4px rgba(150,112,36,.25)); }
.theme-cream .field input, .theme-cream .field select, .theme-cream .field textarea { background: #fffaf0; border-color: rgb(var(--line)); color: rgb(var(--cream)); }
.theme-cream .field input::placeholder, .theme-cream .field textarea::placeholder { color: #a8977a; }
.theme-cream .field input:focus, .theme-cream .field select:focus, .theme-cream .field textarea:focus { border-color: rgb(var(--gold)); }
.theme-cream .bar { background: rgb(var(--char)); }
.theme-cream .bar > i { background: rgb(var(--gold)); }
.theme-cream .ghost-card { background: linear-gradient(160deg, #fbf4e2, #f3e7c9); }
.theme-cream .ghost-line { background: linear-gradient(90deg, #e6d5a8 20%, rgba(154,116,40,.4) 50%, #e6d5a8 80%); background-size: 200% 100%; }
.theme-cream .info-ic { color: rgb(var(--gold)); border-color: rgba(150,112,36,.4); }
.theme-cream .social { color: rgb(var(--cream)); border-color: rgb(var(--line)); }
.theme-cream .chapter-tag { color: rgb(var(--mute)); }
.theme-cream .chapter-tag span { color: rgb(var(--gold)); border-color: rgba(150,112,36,.4); background: rgba(150,112,36,.08); }
.theme-cream .stat:hover .stat-num > span { filter: drop-shadow(0 0 12px rgba(150,112,36,.35)); }
.theme-cream .btn-gold { color: #fff8e6; }
.theme-cream .badge-sub { color: #fff3e0; }
.theme-cream #storyText .w { color: rgba(42,34,22,.16); }
.theme-cream #storyText .w.on { color: #2a2216; }
.theme-cream #storyText .w.gold.on { color: #9a7428; }
.theme-cream #storyText .w.wine.on { color: #7a2433; }
.theme-cream .scan-grid { opacity: 1; }
body.on-cream #chapter { --gold: 150 112 36; --mute: 112 98 72; --line: 215 195 148; --gold-grad: linear-gradient(135deg, #c99c40 0%, #9a7428 55%, #6f4f16 100%); }

/* ===== Story: justified ===== */
#storyText { text-align: justify; text-justify: inter-word; }

/* ===== Analysis steps: golden pearls (1 -> 2 -> 3) ===== */
.step-dots { display: flex; align-items: center; height: 1.25rem; }
.step-dot { display: block; width: 0; height: 12px; margin: 0; border-radius: 50%; opacity: 0; transform: scale(0);
  background: radial-gradient(circle at 34% 30%, #fff3cf, #c8a560 55%, #8c7445); box-shadow: 0 0 12px rgba(200,165,96,.65);
  transition: width .5s, margin .5s, opacity .5s, transform .5s cubic-bezier(.2,.9,.3,1.4); }
.step-dot.on { width: 12px; margin-inline-end: .6rem; opacity: 1; transform: scale(1); }
.theme-cream .step-dot { background: radial-gradient(circle at 34% 30%, #f6e2a4, #b8892f 55%, #6f4f16); box-shadow: 0 0 12px rgba(150,112,36,.5); }

/* ===== Doctors ===== */
.badge-founder { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; padding: .35rem .75rem; border-radius: 999px; color: #2a2216; background: var(--gold-grad); }

/* ===== Articles ===== */
.art-card { display: flex; flex-direction: column; border: 1px solid rgb(var(--line)); border-radius: 1.5rem; overflow: hidden; transition: transform .4s, border-color .4s, box-shadow .4s; }
.art-card:hover { transform: translateY(-5px); }
.art-thumb { height: 8.5rem; display: grid; place-items: center; color: rgb(var(--gold-light));
  background: radial-gradient(circle at 30% 20%, rgba(200,165,96,.28), transparent 55%), linear-gradient(135deg, #1d1812, #0b0a09); }
.art-thumb svg { stroke-width: 1.3; filter: drop-shadow(0 0 10px rgba(200,165,96,.55)); transition: transform .5s; }
.art-card:hover .art-thumb svg { transform: scale(1.12) rotate(-6deg); }
.art-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.art-cat { color: rgb(var(--gold)); font-weight: 600; }
.art-more { margin-top: auto; padding-top: 1.25rem; display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: rgb(var(--gold)); }
.art-content p { font-size: 1.02rem; line-height: 2.1; color: rgb(var(--cream)); margin-bottom: 1.6rem; }
.art-content p:last-child { margin-bottom: 0; }
.art-card:hover .art-more svg { transform: translateX(-4px); transition: transform .3s; }

/* ===== Footer map ===== */
.map-card { position: relative; border-radius: 1.5rem; overflow: hidden; border: 1px solid rgba(200,165,96,.35); height: 280px; box-shadow: 0 30px 70px -40px rgba(200,165,96,.4); }
.map-card iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05) brightness(.92); }
.map-btn { position: absolute; bottom: 1rem; left: 1rem; height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .5rem; color: #0b0a09; font-size: .85rem; font-weight: 600; }

/* ===== Scanner: real photo (cut-out on dark) ===== */
.scanner .face-img { mix-blend-mode: normal; opacity: .55; filter: grayscale(.55) brightness(.7) contrast(1.05); transition: opacity 1.4s ease, filter 1.4s ease; }
.scanner[data-state="1"] .face-img { opacity: .85; filter: grayscale(.15) brightness(.92); }
.scanner[data-state="2"] .face-img { opacity: 1; filter: none; }
.scanner .mesh circle, .scanner .pts circle { transform-box: fill-box; transform-origin: center; }

/* ===== Upload area: illustrated background ===== */
.theme-cream #drop { --ink: 246 237 215; --coal: 239 225 192; --char: 231 213 174; --line: 215 195 148; --cream: 42 34 22; --mute: 112 98 72; --gold: 150 112 36; --gold-light: 176 138 60; --gold-dim: 120 92 40; color: rgb(var(--cream)); background: #fdfbf5; border-color: rgba(150,112,36,.5); }
.theme-cream .drop-bg { mix-blend-mode: normal; opacity: .5; object-position: center 24%; }
.theme-cream #drop:hover .drop-bg { opacity: 1; transform: scale(1.03); }
.drop-card { place-self: end center; margin: 0 1rem 1.1rem; padding: 1rem 1.6rem; border-radius: 1.25rem; background: rgba(255,251,240,.9); border: 1px solid rgba(150,112,36,.35); box-shadow: 0 18px 40px -22px rgba(90,60,10,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ===== Doctor photos ===== */
.avatar.has-photo { overflow: hidden; padding: 0; border: 2px solid rgba(200,165,96,.7); box-shadow: 0 0 0 4px rgba(200,165,96,.15), 0 12px 28px -14px rgba(120,90,30,.6); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }

/* ===== Doctors: large, equal circular portraits ===== */
.doc { --av: 156px; }
@media (max-width: 640px) { .doc { --av: 136px; } }
.doc .avatar { width: var(--av); height: var(--av); flex-shrink: 0; margin-inline: auto; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.doc.lead .avatar { margin-inline: 0; }
.doc .avatar.has-photo { padding: 5px; overflow: visible; border: 0; background: var(--gold-grad); box-shadow: 0 22px 44px -22px rgba(120,90,30,.7), 0 0 0 6px rgba(200,165,96,.14); }
.doc .avatar.has-photo img { width: 100%; height: 100%; display: block; border-radius: 50%; border: 5px solid #fbf4e2; object-fit: cover; object-position: center 24%; }
.doc.lead .avatar.has-photo img { border-color: #fffaf0; }
.doc:hover .avatar { transform: scale(1.04); }

/* ===== Story: text + video ===== */
.story-frame { position: relative; width: 100%; line-height: 0; }
.story-frame .story-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(74,21,32,.28)); }
.story-chip { position: absolute; top: 1rem; right: 1rem; display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; padding: .35rem .8rem; border-radius: 999px; color: #f6e6b4; background: rgba(11,10,9,.65); border: 1px solid rgba(200,165,96,.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
