/* Kasbman shell: the tokens, reset and chrome that every page shares --
   the public site, the tool pages and anything else wrapped in the site
   header and footer. Page-section styling lives in site.css; the tool
   pages deliberately do not load it. */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: hsl(216 33% 97%);
  --foreground: hsl(210 61% 16%);
  --card: #fff;
  --primary: hsl(216.5 85% 34%);
  --primary-10: hsl(216.5 85% 34% / .1);
  --primary-5: hsl(216.5 85% 34% / .05);
  --primary-40: hsl(216.5 85% 34% / .4);
  --secondary: hsl(210 79% 46%);
  --muted: hsl(212 45% 95%);
  --muted-foreground: hsl(210 22% 40%);
  --accent: hsl(212 45% 94%);
  --border: hsl(212 33% 89%);
  --gold: hsl(45 96% 48%);
  --gold-90: hsl(45 96% 48% / .9);
  --gold-30: hsl(45 96% 48% / .3);
  --gold-15: hsl(45 96% 48% / .15);
  --radius: .75rem;
  --font: "Vazirmatn", ui-sans-serif, system-ui, Tahoma, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.5;
  color: var(--foreground); background: var(--background);
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01";
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 1.75rem; height: 1.75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- layout ---- */
.container { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }
.container-3xl { max-width: 48rem; }
.container-5xl { max-width: 64rem; }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.25rem; padding-inline: 1rem; border-radius: .375rem;
  font-size: .875rem; font-weight: 700; white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn-lg { height: 2.5rem; padding-inline: 2rem; }
.btn-xl { height: 3rem; padding-inline: 1.75rem; font-size: 1rem; }
.btn-gold { background: var(--gold); color: var(--primary); font-weight: 900; box-shadow: 0 4px 6px -1px var(--gold-30), 0 2px 4px -2px var(--gold-30); }
.btn-gold:hover { background: var(--gold-90); }
.btn-outline { border: 1px solid var(--primary-40); color: var(--primary); background: transparent; box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--primary-5); }
.btn-outline-light { border: 1px solid rgb(255 255 255 / .5); color: #fff; background: transparent; box-shadow: var(--shadow-sm); }
.btn-outline-light:hover { background: rgb(255 255 255 / .1); }
.btn-block { width: 100%; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.brand img { height: 3rem; width: auto; aspect-ratio: 370 / 260; object-fit: contain; }
@media (min-width: 768px) { .brand img { height: 3.5rem; } }
.nav { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 1024px) { .nav { display: flex; } }
.nav-link { display: flex; align-items: center; gap: .25rem; padding: .5rem .25rem; border-radius: .375rem; font-size: .875rem; font-weight: 500; color: hsl(210 61% 16% / .75); transition: color .15s; }
.nav-link:hover, .nav-link[aria-expanded="true"], .nav-link[aria-current="page"] { color: var(--primary); }
.nav-link .icon { transition: transform .15s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + .5rem); right: 0; width: 20rem; padding: .5rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xl);
}
.dropdown-panel a { display: block; padding: .625rem .75rem; border-radius: .5rem; font-size: .875rem; color: hsl(210 61% 16% / .8); transition: background-color .15s, color .15s; }
.dropdown-panel a:hover { background: var(--accent); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-actions .btn-outline { padding-inline: .75rem; font-size: .75rem; }
@media (min-width: 640px) { .header-actions .btn-outline { padding-inline: 1rem; font-size: .875rem; } }
.header-actions .btn-gold { display: none; font-weight: 700; }
@media (min-width: 768px) { .header-actions .btn-gold { display: inline-flex; } }
.menu-toggle { padding: .5rem; border-radius: .5rem; transition: background-color .15s; }
.menu-toggle:hover { background: var(--accent); }
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.mobile-menu { border-top: 1px solid var(--border); background: #fff; padding: .75rem 1rem 1.25rem; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }
.mobile-menu a, .mobile-menu summary { display: block; padding: .75rem .5rem; border-radius: .5rem; font-size: .9375rem; font-weight: 500; }
.mobile-menu a:hover, .mobile-menu summary:hover { background: var(--accent); color: var(--primary); }
.mobile-menu summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu details[open] summary .icon { transform: rotate(180deg); }
.mobile-menu details a { padding-inline-start: 1.25rem; font-size: .875rem; color: var(--muted-foreground); }
.mobile-menu .btn { margin-top: .75rem; }


/* ---- footer ---- */
.site-footer { background: var(--primary); color: #fff; }
.site-footer .inner { padding-block: 3.5rem 1.5rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-logo { display: inline-block; background: #fff; border-radius: .75rem; padding: .5rem; }
.footer-logo img { height: 2.5rem; width: auto; aspect-ratio: 370 / 260; object-fit: contain; }
.footer-tagline { margin-top: 1.25rem; max-width: 20rem; font-size: .875rem; line-height: 1.75rem; color: rgb(255 255 255 / .8); }
.socials { margin-top: 1.25rem; display: flex; gap: .75rem; }
.socials a { padding: .625rem; border-radius: .5rem; background: rgb(255 255 255 / .1); transition: background-color .15s, color .15s; }
.socials a:hover { background: var(--gold); color: var(--primary); }
.site-footer h3 { font-weight: 800; color: var(--gold); font-size: 1rem; }
.footer-links { margin-top: 1rem; display: grid; gap: .625rem; font-size: .875rem; color: rgb(255 255 255 / .8); }
.footer-links a { transition: color .15s; }
.footer-links a:hover { color: var(--gold); }
.footer-contact li, .footer-contact a { display: flex; align-items: flex-start; gap: .5rem; }
.footer-contact .icon { color: var(--gold); width: 1rem; height: 1rem; margin-top: .25rem; }
.footer-contact .site { padding-top: .25rem; font-weight: 700; color: var(--gold); }
.copyright { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .15); text-align: center; font-size: .75rem; line-height: 1.5rem; color: rgb(255 255 255 / .6); }

/* Anchored sections must clear the sticky header when the browser jumps to
   one directly (a pasted /#contact); site.js handles the click path. */
html { scroll-padding-top: 6rem; }
:target { scroll-margin-top: 6rem; }
main > section:focus { outline: none; }

.dropdown-panel .dropdown-all { margin-top: .25rem; border-top: 1px solid var(--border); border-radius: 0 0 .5rem .5rem; font-weight: 700; color: var(--primary); }
