/* Hezardeh website: the game's own palette (app/lib/ui/theme.dart) and font. */
@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url(fonts/Vazirmatn-ExtraBold.ttf); font-weight: 800; font-display: swap; }

:root {
  --night: #141B33; --indigo: #1F2A4D; --wood: #22100A;
  --gold: #F2B84B; --glow: #FFE3A1; --clay: #C98B5E; --cream: #EFE2CC; --paper: #FBF6EC;
  --turq: #1E9AA0; --red: #B8323A; --green: #5E8C4A; --ink: #2B2320; --muted: #7A6C60;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Bigger text (owner, 2026-11-29). */
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.9; font-size: 13px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; }
h2 { font-size: clamp(14px, 1.84vw, 22px); font-weight: 800; }
.wrap { width: min(1180px, 92%); margin: 0 auto; }
.center { text-align: center; }
.lead { color: var(--muted); max-width: 820px; margin: 0 auto 2em; font-size: 12px; }
.light { color: var(--paper); }
.lead.light { color: #E9DCC4; }
section { padding: clamp(27px, 3.84vw, 53px) 0; }

/* Buttons: the game's gold pill. */
.btn { display: inline-flex; align-items: center; gap: .6em; text-decoration: none; font-weight: 800; border-radius: 999px; transition: transform .15s, box-shadow .15s; }
.btn.gold { color: var(--wood); background: linear-gradient(180deg, #FFE08A 0%, var(--gold) 45%, #C98A1E 100%); border: 2px solid #8A5A12;
  box-shadow: 0 3px 0 #8A5A12, 0 10px 24px rgba(242, 184, 75, .35), inset 0 2px 0 rgba(255, 255, 255, .55); }
.btn.gold:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #8A5A12, 0 16px 30px rgba(242, 184, 75, .45), inset 0 2px 0 rgba(255, 255, 255, .55); }
.btn.ghost { color: var(--paper); border: 2px solid rgba(255, 227, 161, .7); background: rgba(20, 27, 51, .35); backdrop-filter: blur(4px); }
.btn.ghost:hover { background: rgba(20, 27, 51, .6); }
.btn.big { padding: .75em 1.6em; font-size: 12px; }
.btn.small { padding: .35em 1.1em; font-size: 12px; }
.btn small { font-weight: 700; font-size: 12px; background: var(--wood); color: var(--glow); padding: 0 .7em; border-radius: 99px; }

/* Header. */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 5px 4%;
  background: linear-gradient(180deg, rgba(20, 27, 51, .92), rgba(20, 27, 51, .75)); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(242, 184, 75, .25); }
.brand { display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--gold); font-weight: 800; font-size: 12px; }
.brand img { width: 23px; height: 23px; border-radius: 12px; box-shadow: 0 0 0 2px rgba(242, 184, 75, .6); }
.menu { display: flex; gap: 2px; margin-inline-start: auto; }
.menu a { color: var(--cream); text-decoration: none; padding: 3px 6px; border-radius: 10px; font-weight: 500; font-size: 12px; }
.menu a:hover { background: rgba(242, 184, 75, .15); color: var(--glow); }
.burger { display: none; background: none; border: 0; padding: 4px; cursor: pointer; }
.burger span { display: block; width: 14px; height: 2px; background: var(--glow); margin: 3px 0; border-radius: 2px; }

/* The first page. */
.hero { position: relative; min-height: min(66vh, 600px); padding: 0; display: flex; align-items: flex-end; overflow: hidden; background: var(--night); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; transform: scale(1.06); animation: drift 30s ease-in-out infinite alternate; }
.hero-bg.on { opacity: 1; }
@keyframes drift { from { transform: scale(1.06) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(20, 27, 51, 0) 30%, rgba(20, 27, 51, .55) 80%), linear-gradient(180deg, rgba(20, 27, 51, .55) 0%, rgba(20, 27, 51, 0) 25%, rgba(20, 27, 51, .25) 55%, rgba(20, 27, 51, .92) 100%); }
.hero-in { position: relative; width: min(1180px, 92%); margin: 0 auto; padding: 0 0 clamp(23px, 4.32vh, 46px); text-align: center; color: var(--paper); }
.kicker { display: inline-block; margin: 0 0 3px; padding: 3px 8px; border-radius: 99px; background: rgba(30, 154, 160, .85); color: #fff; font-weight: 700; font-size: 12px; }
.hero h1 { font-size: clamp(30px, 5.2vw, 70px); font-weight: 800; color: var(--gold); margin: 0; line-height: 1.1;
  text-shadow: 0 2px 0 #8A5A12, 0 6px 0 rgba(34, 16, 10, .6), 0 0 40px rgba(255, 227, 161, .55), 0 0 90px rgba(242, 184, 75, .35); }
.tagline { font-size: clamp(12px, 1.0vw, 13px); margin: 5px auto 13px; max-width: 760px; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.cta { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.seasons { margin-top: 13px; display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 9px; border-radius: 99px; border: 1.5px solid rgba(255, 227, 161, .6); background: rgba(20, 27, 51, .45); color: var(--cream); }
.chip.on, .chip:hover { background: var(--gold); color: var(--wood); border-color: var(--gold); }
.scroll-hint { position: absolute; bottom: 18px; left: 50%; width: 14px; height: 23px; margin-left: -6px; border: 2px solid rgba(255, 227, 161, .7); border-radius: 14px; }
.scroll-hint::after { content: ''; position: absolute; top: 8px; left: 50%; width: 3px; height: 4px; margin-left: -2px; border-radius: 2px; background: var(--glow); animation: wheel 1.6s infinite; }
@keyframes wheel { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(14px); } }

/* A kilim band between parts. */
.kilim { height: 12px; background:
  linear-gradient(135deg, var(--red) 25%, transparent 25%) -11px 0 / 22px 22px,
  linear-gradient(225deg, var(--red) 25%, transparent 25%) -11px 0 / 22px 22px,
  linear-gradient(315deg, var(--turq) 25%, transparent 25%) 0 0 / 22px 22px,
  linear-gradient(45deg, var(--turq) 25%, transparent 25%) 0 0 / 22px 22px, var(--gold);
  border-block: 3px solid var(--wood); }

/* Four pillars. */
.pillars { background: var(--night); color: var(--cream); padding: 24px 0; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.pillar { padding: 10px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(31, 42, 77, .9), rgba(20, 27, 51, .9)); border: 1px solid rgba(242, 184, 75, .3); }
.pillar b { display: block; font-size: 12px; color: var(--gold); margin-bottom: 3px; }
.pillar p { margin: 0; font-size: 12px; color: #D9CDB6; }

/* The legend, on a parchment scroll. */
.legend { background: radial-gradient(ellipse at 50% 0%, #FFF3D6, var(--cream) 70%); }
.legend-in { display: grid; grid-template-columns: 1.35fr 1fr; gap: 19px; align-items: start; }
.scroll { position: relative; padding: 18px 19px; background: linear-gradient(180deg, #FBF0D9, #F3E2BF); border-radius: 10px;
  border: 2px solid #C9A46A; box-shadow: 0 18px 40px rgba(34, 16, 10, .18), inset 0 0 60px rgba(201, 139, 94, .25); }
.scroll::before, .scroll::after { content: ''; position: absolute; inset-inline: -10px; height: 10px; border-radius: 9px; background: linear-gradient(180deg, #A9743C, #6E4520); }
.scroll::before { top: -10px; }
.scroll::after { bottom: -10px; }
.scroll h2 { color: var(--wood); text-align: center; }
.scroll p { margin: 0 0 1em; text-align: justify; font-size: 12px; line-height: 2.1; }
.masters h3 { font-size: 13px; color: var(--wood); margin-bottom: 5px; }
.master { margin: 0 0 6px; display: flex; gap: 6px; align-items: center; background: var(--paper); border: 2px solid #E2CFAF; border-radius: 16px; padding: 5px 6px; }
.master img { width: 51px; height: 51px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(34, 16, 10, .25)); }
.master b { display: block; font-size: 12px; color: var(--red); }
.master span { font-size: 12px; color: var(--muted); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Picture beside text. */
.split { background: var(--paper); }
.split-in, .world-in, .grow-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 23px; align-items: center; }
.split-pic { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(34, 16, 10, .25); aspect-ratio: 9 / 12; }
.split-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-pic .over { opacity: 0; transition: opacity 1.2s; }
.split-pic:hover .over { opacity: 1; }
.ticks { list-style: none; padding: 0; margin: 1em 0 0; }
.ticks li { padding-inline-start: 30px; position: relative; margin: .45em 0; font-weight: 500; }
.ticks li::before { content: ''; position: absolute; inset-inline-start: 0; top: .55em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--turq); border: 2px solid var(--gold); border-radius: 3px; }

/* Buildings. */
.buildings { background: var(--cream); }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bcard { background: var(--paper); border-radius: var(--radius); border: 2px solid #E2CFAF; padding: 8px 9px 9px; transition: transform .2s, box-shadow .2s; }
.bcard:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(34, 16, 10, .18); border-color: var(--clay); }
.bpic { background: radial-gradient(circle at 50% 60%, #F7EBD4 0%, #EAD7B5 70%); border-radius: 14px; margin-bottom: 6px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.bpic img { width: 92%; transition: transform .4s; }
.bcard:hover .bpic img { transform: scale(1.07); }
.bcard h3 { font-size: 12px; color: var(--wood); margin: 0 0 2px; }
.bcard p { margin: 0; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.bcard p.open { -webkit-line-clamp: unset; }

/* From a hut to a palace. */
.grow { background: linear-gradient(180deg, var(--paper), var(--cream)); }
.grow-pic { background: radial-gradient(circle at 50% 65%, #FFF6DE, #EAD7B5 70%); border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; box-shadow: inset 0 0 0 10px rgba(242, 184, 75, .25); }
.grow-pic img { width: 82%; transition: opacity .15s; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chips .chip { color: var(--ink); background: var(--paper); border-color: var(--clay); }
.chips .chip.on, .chips .chip:hover { background: var(--gold); border-color: #8A5A12; }
.slider { display: block; font-weight: 700; margin-top: 5px; }
.slider b { color: var(--red); font-size: 12px; }
.slider input { width: 100%; accent-color: var(--gold); height: 17px; }

/* People. */
.peoplesec { background: var(--paper); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 9px; }
.tab { font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 9px; border-radius: 14px; border: 2px solid #E2CFAF; background: var(--cream); color: var(--ink); }
.tab.on { background: var(--indigo); color: var(--gold); border-color: var(--indigo); }
.pane { display: none; }
.pane.on { display: block; animation: rise .5s ease; }
.pane .lead { margin-bottom: 1.2em; }
/* Centred, however many people a tab has (owner, 2026-11-29). */
.people { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.people .person { width: 94px; }
.person { margin: 0; text-align: center; background: linear-gradient(180deg, #F6E9D2, #EAD7B5); border-radius: var(--radius); padding: 5px 4px 6px; border: 2px solid #E2CFAF; transition: transform .2s; }
.person:hover { transform: translateY(-5px) rotate(-.5deg); border-color: var(--gold); }
.person img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(34, 16, 10, .25)); }
.person figcaption b { display: block; font-size: 12px; }
.person figcaption span { font-size: 12px; color: var(--muted); }

/* Crafts. */
.crafts { background: radial-gradient(ellipse at 50% 0%, var(--indigo), var(--night) 70%); }
.craftgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.craft { position: relative; min-height: 234px; border-radius: var(--radius); overflow: hidden; background: var(--bg) center / cover; display: flex; align-items: flex-end; border: 2px solid rgba(242, 184, 75, .35); }
.craft::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 27, 51, 0) 30%, rgba(20, 27, 51, .95) 92%); transition: opacity .3s; }
.craft:hover { border-color: var(--gold); }
.craft-in { position: relative; padding: 9px; color: var(--paper); }
.craft .emblem { width: 36px; height: 36px; margin-bottom: 3px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.craft h3 { color: var(--gold); font-size: 13px; margin: 0; }
.craft p { margin: 0; color: #E9DCC4; }

/* Rivalry. */
.rivalry { background: linear-gradient(180deg, var(--night), var(--wood)); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trio figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--indigo); border: 2px solid rgba(242, 184, 75, .3); }
.trio img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.trio figcaption { padding: 6px 8px 9px; color: var(--cream); }
.trio figcaption b { display: block; color: var(--gold); font-size: 12px; }
.trio figcaption span { font-size: 12px; color: #D9CDB6; }
.note { max-width: 820px; margin: 2em auto 0; font-size: 12px; opacity: .9; }

/* World. */
.world { background: var(--cream); }
.map4 { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(34, 16, 10, .3); border: 4px solid var(--wood); }
.map4 img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Friday bazaar banner. */
.banner { position: relative; min-height: min(45.5vh, 640px); display: flex; align-items: flex-end; background: var(--bg) center / cover; }
.banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 27, 51, 0) 30%, rgba(20, 27, 51, .9)); }
.banner-in { position: relative; width: min(760px, 92%); margin: 0 auto; text-align: center; color: var(--paper); }
.banner-in h2 { color: var(--gold); }

/* Festivals. */
.events { background: var(--paper); }
.evgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.event { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 9 / 15; }
.event img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.event:hover img { transform: scale(1.06); }
.event figcaption { position: absolute; inset: auto 0 0 0; padding: 19px 6px 6px; background: linear-gradient(180deg, transparent, rgba(20, 27, 51, .92)); color: var(--paper); }
.event b { display: block; font-size: 13px; color: var(--gold); }
.event span { font-size: 12px; }

/* Questions. */
.faq { background: var(--cream); }
.faq-in { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.faq-guide { width: 100%; filter: drop-shadow(0 12px 18px rgba(34, 16, 10, .3)); }
details { background: var(--paper); border: 2px solid #E2CFAF; border-radius: 14px; padding: 2px 9px; margin: 5px 0; }
details[open] { border-color: var(--clay); }
summary { cursor: pointer; font-weight: 700; font-size: 12px; padding: 5px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '+'; display: inline-block; width: 14px; color: var(--red); font-weight: 800; }
details[open] summary::before { content: '−'; }
details p { margin: 0 0 6px; color: var(--muted); }

/* The last call. */
.final { position: relative; text-align: center; background: var(--bg) center / cover; padding: 43px 0; }
.final::before { content: ''; position: absolute; inset: 0; background: rgba(20, 27, 51, .72); }
.final-in { position: relative; color: var(--paper); width: min(700px, 92%); margin: 0 auto; }
.final-in h2 { color: var(--gold); }
.final-guide { width: 94px; margin: 0 auto 5px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }

.foot { background: var(--wood); color: #CDBB9C; padding: 18px 0; }
.foot-in { text-align: center; }
.foot .brand { justify-content: center; margin-bottom: 3px; }
.foot p { margin: 2px 0; }
.small { font-size: 12px; opacity: .8; }

/* A card's story, in a window (owner, 2026-11-29). */
[data-story] { cursor: pointer; }
.story { width: min(560px, 50.83vw); max-height: 90vh; border: 3px solid var(--gold); border-radius: 22px; padding: 0 0 10px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: auto; }
.story::backdrop { background: rgba(20, 27, 51, .72); backdrop-filter: blur(3px); }
.story[open] { animation: pop .28s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.story img { width: 100%; max-height: 46vh; object-fit: contain; background: radial-gradient(circle at 50% 60%, #F7EBD4, #EAD7B5 75%); }
.story img.wide { object-fit: cover; object-position: 50% 18%; }
.story h3 { font-size: 13px; color: var(--wood); margin: 8px 11px 2px; }
.story p { margin: 0 11px; font-size: 12px; line-height: 2.1; text-align: start; }
.story-close { position: sticky; top: 10px; float: left; margin: 5px 5px -25px; z-index: 2; width: 23px; height: 23px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--night); color: var(--glow); font-size: 13px; line-height: 1; cursor: pointer; }

/* Appearing while scrolling. */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.seen { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Tablets and phones (down to 360 px). */
@media (max-width: 980px) {
  .grid4 { grid-template-columns: 1fr 1fr; }
  .split-in, .world-in, .grow-in, .legend-in { grid-template-columns: 1fr; }
  .scroll { padding: 14px 10px; }
  .scroll p { font-size: 12px; }
  .craftgrid, .trio { grid-template-columns: 1fr 1fr; }
  .evgrid { grid-template-columns: 1fr 1fr; }
  .menu { position: fixed; inset: 62px 0 auto 0; flex-direction: column; background: rgba(20, 27, 51, .97); padding: 5px 6%; display: none; }
  .menu.open { display: flex; }
  .burger { display: block; }
  .top .btn.small { margin-inline-start: auto; }
  .banner { background-attachment: scroll; }
}
@media (max-width: 600px) {
  .grid4, .craftgrid, .trio { grid-template-columns: 1fr; }
  .faq-in { grid-template-columns: 1fr; }
  .faq-guide { width: 88px; margin: 0 auto; }
  .brand span { font-size: 12px; }
  .people .person { width: calc(50% - 4px); }
  .btn.big { font-size: 12px; }
  body { font-size: 12px; }
  .lead { font-size: 12px; }
  .hero-in { padding-bottom: clamp(56px, 12vh, 110px); }
}
.craft-in p.about { font-size: 12px; line-height: 1.9; opacity: .92; margin-top: 4px; }
