/* Albion Market Iran — home page. Palette comes from the crest: gold, crimson and green. */

/* ---------- Tokens ---------- */
:root {
  --bg: #fbf9f4;
  --bg-alt: #f3efe6;
  --surface: #ffffff;
  --text: #17130b;
  --muted: #62594a;
  --border: #e5decd;
  --gold: #e4b23a;
  --gold-deep: #9a6a00;
  --gold-text: #8a5d00;
  --crimson: #c1272d;
  --green: #19a043;
  --grad-btn: linear-gradient(120deg, #f6d365 0%, #f0b13a 55%, #e0902a 100%);
  --btn-text: #2b1b00;
  --shadow: 0 18px 50px -20px rgba(80, 55, 10, .35);
  --header-h: 68px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1012;
  --bg-alt: #141517;
  --surface: #1a1b1e;
  --text: #f5f1e6;
  --muted: #a8a290;
  --border: #2a2b2f;
  --gold-text: #f3c455;
  --gold-deep: #f3c455;
  --shadow: 0 22px 60px -22px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--gold); color: var(--btn-text); padding: .6rem 1rem; border-radius: 8px; z-index: 1200; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.gradient-text { background: linear-gradient(100deg, #f6d365, #f0a23c 45%, #e0556b); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root:not([data-theme="dark"]) .gradient-text { background-image: linear-gradient(100deg, #c98a00, #d9760f 50%, #c1272d); }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .25s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn--primary { color: var(--btn-text); background: var(--grad-btn); box-shadow: 0 10px 30px -10px rgba(240, 177, 58, .75), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn--primary:hover { box-shadow: 0 16px 38px -10px rgba(240, 177, 58, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn--ghost { border-color: var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--gold); }
.btn svg { transition: transform .25s; flex: none; }
.btn:hover svg { transform: translateX(4px); }
.btn--shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); animation: shine 4.5s ease-in-out 2.2s infinite; pointer-events: none; }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* ---------- Header ---------- */
.header { position: fixed; inset-inline: 0; top: 0; height: var(--header-h); z-index: 100; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.header.is-scrolled { background: var(--bg); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--border); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { white-space: nowrap; display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.logo__img { display: block; flex: none; border-radius: 10px; object-fit: cover; }
.nav { display: flex; gap: 1.5rem; margin-inline: auto; }
.nav a { white-space: nowrap; color: var(--muted); font-weight: 500; font-size: .93rem; padding: .35rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--text); }
.nav a.is-current { color: var(--text); border-bottom-color: var(--gold); }
.header__actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); transition: transform .2s, border-color .2s; }
.icon-btn:hover { border-color: var(--gold); transform: rotate(14deg); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; }
.menu-btn span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + 3.5rem) 0 5rem; }
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; animation: drift 16s ease-in-out infinite; will-change: transform; }
.glow--green { width: 480px; height: 480px; background: var(--green); top: -160px; inset-inline-start: -80px; opacity: .3; }
.glow--red { width: 460px; height: 460px; background: var(--crimson); bottom: -180px; inset-inline-end: 4%; opacity: .3; animation-delay: -7s; }
.glow--gold { width: 420px; height: 420px; background: var(--gold); top: 10%; inset-inline-end: 18%; opacity: .32; animation-delay: -3s; }
:root:not([data-theme="dark"]) .glow { opacity: .22; }
.grid-overlay { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 15%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 15%, transparent 70%); opacity: .5; }
@keyframes drift { 50% { transform: translate(30px, 36px) scale(1.07); } }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 3rem; }
.pill { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .95rem; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); border-radius: 999px; font-size: .85rem; color: var(--muted); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; margin: 1.4rem 0 1.2rem; max-width: 15ch; }
.lead { font-size: clamp(1rem, 1.9vw, 1.18rem); color: var(--muted); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero__crest-wrap { display: grid; place-items: center; }
.hero__crest { position: relative; width: min(340px, 72vw); border-radius: 30px; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .1), 0 0 90px -12px rgba(240, 177, 58, .55); animation: float 7s ease-in-out infinite; }
.hero__crest img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 30px; object-fit: cover; }
@keyframes float { 50% { transform: translateY(-14px) rotate(.6deg); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.eyebrow { color: var(--gold-text); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; }
.section__head p:not(.eyebrow) { color: var(--muted); margin-top: 1rem; }

/* Calculator card */
.calc-list { display: grid; gap: 1.5rem; }
.calc-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: center; padding: clamp(1.6rem, 4vw, 2.8rem); border: 1px solid var(--border); border-radius: 26px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 9%, var(--surface)), var(--surface) 55%); box-shadow: var(--shadow); overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s; }
.calc-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(520px circle at 85% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%); pointer-events: none; }
.calc-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--gold) 60%, var(--border)); }
.calc-card__body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.calc-card__badge { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; padding: .25rem .75rem; border-radius: 999px; color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.calc-card__badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.calc-card h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
.calc-card p { color: var(--muted); max-width: 52ch; }
.calc-card__cta { margin-top: .6rem; }
.calc-card__res { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; justify-items: center; }
.calc-card__res li { display: flex; flex-direction: column; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; color: var(--muted); transition: transform .3s; }
.calc-card__res img { width: 56px; height: 56px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }
.calc-card:hover .calc-card__res li { transform: translateY(-4px); }
.calc-card:hover .calc-card__res li:nth-child(2) { transition-delay: .04s; } .calc-card:hover .calc-card__res li:nth-child(3) { transition-delay: .08s; }
.calc-card:hover .calc-card__res li:nth-child(4) { transition-delay: .12s; } .calc-card:hover .calc-card__res li:nth-child(5) { transition-delay: .16s; }
.calc-card:hover .btn svg { transform: translateX(4px); }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.card { padding: 1.7rem; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); transition: transform .3s, box-shadow .3s, border-color .3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: var(--btn-text); background: var(--grad-btn); margin-bottom: 1.1rem; }
.card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .94rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2.4rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; color: var(--muted); font-size: .88rem; }
.footer__note { flex: 1 1 320px; max-width: 560px; }
.footer__note a { text-decoration: underline; text-underline-offset: 3px; }
.footer__note a:hover { color: var(--text); }
.to-top { position: fixed; inset-inline-end: 1.2rem; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .3s; z-index: 90; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Logo intro ----------
 * 1. the page is covered, only the crest shows in the middle of the screen
 * 2. the crest flies to its place in the hero while the whole page eases back in around it */
html.intro-pending body { visibility: hidden; }
html.intro { overflow: hidden; }
html.intro::before { content: ""; position: fixed; inset: 0; z-index: 900; background: var(--bg); background-image: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 55%); transition: opacity .9s ease .15s; }
html.intro.intro-play::before { opacity: 0; }
html.intro [data-intro] { opacity: 0; transform: translateY(26px) scale(.97); filter: blur(8px); }
html.intro.intro-play [data-intro] { opacity: 1; transform: none; filter: none; transition: opacity .8s ease, transform .95s cubic-bezier(.2, .8, .2, 1), filter .8s ease; transition-delay: calc(var(--i, 0) * 110ms + 350ms); }
html.intro .hero__crest { z-index: 1000; transform: translate(var(--dx, 0), var(--dy, 0)) scale(var(--s, 1)); animation: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 0 120px 10px rgba(240, 177, 58, .6); }
html.intro .hero__crest img { animation: crestIn .9s cubic-bezier(.2, .8, .2, 1) both; }
html.intro .hero__crest::after { content: ""; position: absolute; inset: -6px; border-radius: 34px; border: 2px solid rgba(240, 177, 58, .65); animation: ring 1.4s ease-out .3s 1 both; }
html.intro.intro-play .hero__crest { transform: none; transition: transform 1.15s cubic-bezier(.65, 0, .2, 1), box-shadow 1.2s ease; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .1), 0 0 90px -12px rgba(240, 177, 58, .55); }
html.intro.intro-play .hero__crest::after { opacity: 0; animation: none; }
@keyframes crestIn { from { opacity: 0; transform: scale(.82); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ring { from { transform: scale(.94); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero__crest-wrap { order: -1; }
  .hero__crest { width: min(210px, 56vw); border-radius: 24px; }
  .hero__crest img { border-radius: 24px; }
  .hero h1 { margin-inline: auto; }
  .lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .calc-card { grid-template-columns: 1fr; text-align: start; }
}
@media (max-width: 1240px) {
  .header__cta { display: none; } /* the same link is in the menu, and the account button needs the room */
}
@media (max-width: 1080px) {
  .menu-btn { display: flex; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; padding: .6rem 1.25rem 1.4rem; margin: 0; background: var(--bg); border-bottom: 1px solid var(--border); transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .9rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
}
@media (max-width: 860px) {
  .footer__inner { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
  .hero { padding-top: calc(var(--header-h) + 2rem); }
  .hero__cta .btn { width: 100%; }
  .calc-card__res { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
  .calc-card__res img { width: 44px; height: 44px; }
  .logo span { font-size: .92rem; }
  .logo__img { width: 34px; height: 34px; }
  .header__actions { gap: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
/* site version beside the logo */
.ver { display: inline-block; padding: .18rem .5rem; border-radius: 6px; background: rgba(127, 127, 127, .2); color: inherit; opacity: .85; font-size: .75rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
/* account button in the header + "N online" in the footer */
.authlink { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid rgba(127, 127, 127, .4); color: inherit; font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.authlink:hover { background: rgba(127, 127, 127, .15); }
.authlink--user { padding: .2rem .7rem .2rem .25rem; }
.authlink__av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #0d6efd; color: #fff; font-size: .8rem; font-weight: 700; object-fit: cover; flex: none; }
.authlink__name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.online { display: inline-flex; align-items: center; gap: .45rem; font-size: .8125rem; }
.online[hidden] { display: none; }
.online__dot { width: 8px; height: 8px; border-radius: 50%; background: #3fb950; box-shadow: 0 0 0 3px rgba(63, 185, 80, .22); }
.foot__online, .footer__online { margin: .35rem 0 0; }
.authlink__ic { flex: none; }
.logo .ver { font-size: .75rem; }
@media (max-width: 520px) {
  .authlink__name, .authlink__txt { display: none; }
  .authlink { padding: .35rem; }
  .authlink--user { padding: .2rem; }
  .header .logo .ver { display: none; } /* on a phone the header has room for the account button or the version, not both */
  .header .icon-btn { width: 34px; height: 34px; flex: none; }
  .header .lang__btn { padding-inline: .5rem; }
  .header .lang__chev { display: none; }
  .header .logo span { font-size: .85rem; }
  .header .logo { gap: .45rem; }
  .header__actions { gap: .3rem; }
}
/* ---------- about + FAQ text at the end of each page (also read by search engines) ---------- */
.seo-about { max-width: 920px; margin: 3rem auto 0; padding: 2rem 0 1rem; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.seo-about h2 { margin: 0 0 .8rem; font-size: 1.35rem; font-weight: 700; }
.seo-about h3 { margin: 1.7rem 0 .6rem; font-size: 1.1rem; font-weight: 700; }
.seo-about p { margin: 0 0 .9rem; line-height: 1.85; opacity: .88; }
.seo-faq { margin: .5rem 0; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 8px; background: color-mix(in srgb, currentColor 4%, transparent); }
.seo-faq summary { padding: .75rem 1rem; font-weight: 600; cursor: pointer; }
.seo-faq summary:focus-visible { outline: 2px solid #6ea8fe; outline-offset: 2px; }
.seo-faq p { margin: 0; padding: 0 1rem 1rem; }