/* karmania.net: the public site. Same brand as the app: Karmania green, IRANYekanX, RTL first. */
@font-face { font-family: "IRANYekanX"; src: url("fonts/IRANYekanX-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("fonts/IRANYekanX-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("fonts/IRANYekanX-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IRANYekanX"; src: url("fonts/IRANYekanX-ExtraBold.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f7f8f7;
  --surface: #ffffff;
  --surface-2: #eef2f1;
  --text: #14201f;
  --muted: #626f6d;
  --border: rgba(22, 54, 51, 0.12);
  --border-strong: rgba(22, 54, 51, 0.2);
  --accent: #0d655b;
  --accent-hover: #0b5048;
  --accent-soft: #e1f5f1;
  --accent-text: #ffffff;
  --band: #0f675c;
  --shadow: 0 12px 38px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.08);
  font-family: "IRANYekanX", Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b; --surface: #111214; --surface-2: #17181b; --text: #f2f3f5; --muted: #a0a5ad;
    --border: rgba(255, 255, 255, 0.09); --border-strong: rgba(255, 255, 255, 0.16);
    --accent: #14a999; --accent-hover: #1bc0ae; --accent-soft: rgba(20, 184, 166, 0.12); --accent-text: #041b18;
    --band: #0b4d45; --shadow: none; --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --surface: #111214; --surface-2: #17181b; --text: #f2f3f5; --muted: #a0a5ad;
  --border: rgba(255, 255, 255, 0.09); --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #14a999; --accent-hover: #1bc0ae; --accent-soft: rgba(20, 184, 166, 0.12); --accent-text: #041b18;
  --band: #0b4d45; --shadow: none; --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.9; font-size: 15px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.4; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.center { display: flex; justify-content: center; margin-top: 32px; }

/* Buttons and small parts */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 13px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 0.85rem; }
.btn--lg { height: 50px; padding: 0 24px; font-size: 0.98rem; }
.btn--primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 10px 24px -12px var(--accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--border-strong); }
.btn--light { background: #fff; color: #0d3d37; }
.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.08); }
.btn svg { width: 18px; height: 18px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: none;
  background: none; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: block; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-dark { display: block; }
  :root:not([data-theme="light"]) .when-light { display: none; }
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-size: 0.78rem; font-weight: 700;
}
.kicker--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.76rem; font-weight: 700;
}
.chip svg { width: 15px; height: 15px; color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.pill--live { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pill--live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Header: transparent at the top, a floating bar once the page scrolls. */
.site-header { position: sticky; top: 0; z-index: 50; padding-top: 14px; margin-bottom: -82px; }
.site-header__bar {
  display: flex; align-items: center; gap: 16px; height: 68px; padding: 0 12px; border-radius: 20px; border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled .site-header__bar, .site-header.is-open .site-header__bar {
  background: color-mix(in srgb, var(--surface) 86%, transparent); border-color: var(--border);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1rem; }
.brand img { border-radius: 10px; }
.site-nav { display: flex; gap: 4px; margin-inline: auto; }
.site-nav a { padding: 8px 14px; border-radius: 12px; color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.site-header__actions { display: flex; align-items: center; gap: 6px; }
.menu-btn { display: none; }

/* Hero */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0 0 auto; height: 760px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 420px at 22% 18%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(480px 380px at 92% 60%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0; opacity: 0.45;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 52px 52px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 75%); -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 75%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 60px; align-items: center; min-height: 600px; }
.hero h1 { font-size: clamp(3rem, 7vw, 5rem); font-weight: 900; letter-spacing: -0.02em; margin: 18px 0 4px; line-height: 1.25; }
.hero__tagline { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 800; }
.hero__tagline span { color: var(--accent); }
.hero__body { margin-top: 18px; max-width: 560px; color: var(--muted); font-size: 1rem; line-height: 2.05; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero__copy > * { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.06s; }
.hero__copy > :nth-child(3) { animation-delay: 0.12s; }
.hero__copy > :nth-child(4) { animation-delay: 0.18s; }
.hero__copy > :nth-child(5) { animation-delay: 0.24s; }
.hero__copy > :nth-child(6) { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* The ecosystem: the Karmania mark with the products around it. */
.orbit { --r: min(230px, 38vw); position: relative; width: calc(var(--r) * 2 + 90px); aspect-ratio: 1; justify-self: center; }
.orbit__ring { position: absolute; inset: 45px; border-radius: 50%; border: 2px dashed var(--border-strong); animation: spin 90s linear infinite; }
.orbit__spoke {
  position: absolute; top: 50%; left: 50%; width: var(--r); height: 1.5px; transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent 30%, var(--border-strong)); transform: rotate(calc(var(--i) * 60deg - 90deg));
}
.orbit__core {
  position: absolute; top: 50%; left: 50%; width: calc(var(--r) * 0.95); translate: -50% -50%; border-radius: 22%;
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--accent) 60%, transparent); animation: pop 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.orbit__item {
  position: absolute; top: 50%; left: 50%; width: calc(var(--r) * 0.34); aspect-ratio: 1; margin: calc(var(--r) * -0.17);
  transform: rotate(calc(var(--i) * 60deg - 90deg)) translate(var(--r)) rotate(calc(var(--i) * -60deg + 90deg));
}
.orbit__item img {
  width: 100%; height: 100%; display: block; border-radius: 22%; box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.35);
  animation: float 6s ease-in-out infinite, pop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * -1s), calc(0.2s + var(--i) * 0.08s);
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pop { from { opacity: 0; scale: 0.7; } }

/* Sections */
.section { padding: 96px 0; }
.section--tight { padding: 32px 0 96px; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { max-width: 720px; }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 900; letter-spacing: -0.01em; margin: 14px 0 12px; }
.section__head p { color: var(--muted); font-size: 0.98rem; }
.section__split { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: end; }
.note { border-radius: 22px; border: 1px solid var(--border); background: var(--surface-2); padding: 20px; }
.note strong { color: var(--accent); font-size: 0.85rem; }
.note p { margin-top: 6px; color: var(--muted); font-size: 0.8rem; line-height: 2; }

.page-hero { position: relative; padding: 150px 0 40px; overflow: hidden; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.02em; margin: 18px 0 16px; max-width: 760px; }
.page-hero p { color: var(--muted); max-width: 680px; font-size: 1rem; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 46px; }
.bento--three { margin-top: 0; }
.bento__card { border-radius: 24px; border: 1px solid var(--border); background: var(--bg); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.section:not(.section--alt) .bento__card { background: var(--surface); }
.bento__card--wide { grid-row: span 2; }
.bento__card h3 { font-size: 1.08rem; font-weight: 800; }
.bento__card p { color: var(--muted); font-size: 0.86rem; }
.feature-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.feature-icon svg { width: 21px; height: 21px; }
.mock { margin-top: auto; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(160deg, var(--accent-soft), var(--surface-2)); display: grid; gap: 10px; }
.mock__row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.mock__row img { width: 30px; height: 30px; border-radius: 9px; }
.mock__row i { height: 8px; border-radius: 8px; background: var(--surface-2); }
.mock__row b { margin-inline-start: auto; font-size: 0.68rem; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; }
.mock__row b.off { color: var(--muted); background: var(--surface-2); }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 46px; }
.app-grid--featured > :nth-child(1), .app-grid--featured > :nth-child(4) { grid-column: span 1; }
.app-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; min-height: 230px; padding: 26px;
  border-radius: 26px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; scroll-margin-top: 110px;
}
.app-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.app-card__glow { position: absolute; inset-inline-end: -80px; top: -96px; width: 224px; height: 224px; border-radius: 50%; background: var(--c); opacity: 0.1; filter: blur(48px); pointer-events: none; }
.app-card__top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.app-card__logo { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); }
.app-card__logo img, .app-letter { width: 48px; height: 48px; border-radius: 22%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.3rem; }
.app-card h3 { position: relative; font-size: 1.3rem; font-weight: 800; }
.app-card p { position: relative; color: var(--muted); font-size: 0.84rem; }

.steps { list-style: none; padding: 0; margin: 46px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.steps li { position: relative; padding: 28px 22px 0; border-top: 1px solid var(--border-strong); }
.steps li::before { content: ""; position: absolute; top: -3px; inset-inline-start: 0; width: 36px; height: 5px; border-radius: 5px; background: var(--accent); }
.steps b { color: var(--accent); font-size: 0.78rem; }
.steps h3 { font-size: 1.02rem; font-weight: 800; margin: 8px 0 6px; }
.steps p { color: var(--muted); font-size: 0.84rem; }

.cta-band {
  position: relative; overflow: hidden; margin-block: 96px; padding: 56px 32px; border-radius: 30px; text-align: center; color: #fff;
  background: radial-gradient(600px 300px at 90% -10%, rgba(255, 255, 255, 0.14), transparent 60%), var(--band);
  box-shadow: 0 40px 70px -40px color-mix(in srgb, var(--band) 90%, transparent);
}
.cta-band h2 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); font-weight: 800; max-width: 700px; margin: 0 auto 14px; }
.cta-band p { color: rgba(255, 255, 255, 0.82); max-width: 640px; margin: 0 auto; }
.cta-band__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer__about p { margin-top: 14px; color: var(--muted); max-width: 320px; }
.site-footer h3 { font-size: 0.86rem; font-weight: 800; margin-bottom: 12px; }
.site-footer__grid > div:not(.site-footer__about) { display: flex; flex-direction: column; gap: 8px; font-size: 0.84rem; color: var(--muted); }
.site-footer__grid a:hover { color: var(--accent); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; }

/* Reveal on scroll; content stays visible without JavaScript. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; min-height: 0; }
  .orbit { order: -1; --r: min(170px, 34vw); }
  .bento, .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__card--wide { grid-row: auto; grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .section__split { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-nav {
    display: none; position: absolute; top: 76px; inset-inline: 0; margin: 0; flex-direction: column; padding: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-header__bar { position: relative; }
  .site-header__actions { margin-inline-start: auto; }
  .menu-btn { display: inline-grid; }
  .hero { padding: 110px 0 64px; }
  .page-hero { padding: 120px 0 24px; }
  .section { padding: 70px 0; }
  .bento, .app-grid, .steps { grid-template-columns: 1fr; }
  .app-card { min-height: 0; }
  .cta-band { padding: 40px 20px; border-radius: 24px; margin-block: 70px; }
  .site-footer__grid { grid-template-columns: 1fr; }
}
