/* TomanPay landing — brand identity v1.0.
   "A T built like architecture: solid, stable and quiet." Ink carries the brand, mint is the
   signal (never text on light: use Mint 700). Ink and paper sections alternate; the mark is the
   main graphic. Vazirmatn for Persian, Manrope for Latin. */

@font-face { font-family: Vazirmatn; font-weight: 400; font-display: swap; src: url(/fonts/vazirmatn-400.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 500; font-display: swap; src: url(/fonts/vazirmatn-500.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 700; font-display: swap; src: url(/fonts/vazirmatn-700.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 800; font-display: swap; src: url(/fonts/vazirmatn-800.woff2) format("woff2"); }
@font-face { font-family: Vazirmatn; font-weight: 900; font-display: swap; src: url(/fonts/vazirmatn-900.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(/fonts/manrope-600.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(/fonts/manrope-700.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(/fonts/manrope-800.woff2) format("woff2"); }

:root {
  --mint: #3DDC97; --mint-700: #0B7D51; --lilac: #A99BFF;
  --ink: #111315; --ink-700: #2A2E33; --ink-500: #5F656D; --ink-300: #B4B9BF; --ink-100: #E7E9EC;
  --white: #FFFFFF;
  /* the two section "materials" */
  --ink-bg: #111315; --ink-text: #FFFFFF; --ink-muted: #B4B9BF; --ink-line: #24282D;
  --paper-bg: #F6F5F2; --paper-text: #111315; --paper-muted: #5F656D; --paper-line: #DEDFE0; --paper-accent: #0B7D51;
  --font: Manrope, Vazirmatn, system-ui, sans-serif;
  --gutter: clamp(20px, 6vw, 80px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
/* Dark preference: paper sections become a deep ink so the whole page stays dark. */
@media (prefers-color-scheme: dark) {
  :root { --paper-bg: #17191C; --paper-text: #EEF0F2; --paper-muted: #9BA2AA; --paper-line: #2A2E33; --paper-accent: #3DDC97; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink-bg); color: var(--ink-text); font-family: var(--font); font-size: 17px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Vazirmatn, Manrope, sans-serif; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
em { font-style: normal; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; padding: .12em .45em; border-radius: 6px; background: rgba(127, 127, 127, .14); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 4px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 100; background: var(--mint); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- lockup & nav */
.lockup { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--white); }
.lockup-mark { width: 28px; height: 28px; fill: var(--mint); flex: none; }
.lockup-fa { font-family: Vazirmatn; font-weight: 900; font-size: 21px; line-height: 1; }
.lockup-sep { width: 2px; height: 17px; background: var(--ink-700); }
.lockup-en { font-family: Manrope; font-weight: 800; font-size: 14.5px; letter-spacing: -.02em; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(17, 19, 21, .82); backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px); transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 1px 0 var(--ink-line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.nav-end { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--ink-muted); text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 14px; border-radius: 12px; min-height: 44px; display: inline-flex; align-items: center; transition: color .2s; }
.nav-link:hover { color: var(--white); }
@media (max-width: 460px) { .nav .lockup-sep, .nav .lockup-en { display: none; } }

/* ---------------------------------------------------------------- buttons & links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none; font-family: Vazirmatn, Manrope, sans-serif; font-weight: 800; font-size: 16px; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .25s, filter .2s; }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 13px; }
.btn-lg { min-height: 60px; padding: 0 30px; font-size: 18px; border-radius: 18px; }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-mint:hover { filter: brightness(1.05); box-shadow: 0 14px 36px -14px rgba(61, 220, 151, .75); transform: translateY(-1px); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-family: Vazirmatn; font-weight: 800; font-size: 17px; color: var(--white); text-decoration: none; }
.text-link .ic { transition: transform .25s var(--ease); }
.text-link:hover .ic { transform: translateX(-4px); }
.text-link-dark { color: var(--paper-text); }

/* ---------------------------------------------------------------- hero (ink) */
.hero { position: relative; overflow: hidden; min-height: min(100svh, 920px); display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 9vw, 120px) 0 clamp(28px, 4vw, 40px); isolation: isolate; }
/* 8 × 8 grid of the mark's 64-unit construction, fading out */
.hero-grid-bg { position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(var(--ink-line) 1px, transparent 1px), linear-gradient(90deg, var(--ink-line) 1px, transparent 1px); background-size: clamp(56px, 7vw, 96px) clamp(56px, 7vw, 96px); background-position: center; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 30% 45%, #000 20%, transparent 75%); opacity: .55; }
.hero-mark .beam, .hero-mark .pillar { fill: var(--mint); }
.hero-inner { display: flex; flex-direction: column; gap: 22px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: Vazirmatn; font-weight: 700; font-size: 15px; color: var(--mint); }
.kicker-dark { color: var(--paper-accent); }
.hero h1 { font-weight: 900; font-size: clamp(44px, 8.4vw, 112px); line-height: 1.12; letter-spacing: -.01em; max-width: 12.5em; }
.hero h1 em { color: var(--mint); }
.lead { font-size: clamp(17px, 2vw, 21px); line-height: 1.85; color: var(--ink-muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 10px; }
.hero-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(48px, 8vw, 96px); font-family: Manrope; font-weight: 700; font-size: 13px; color: #8E959D; letter-spacing: .02em; }
@media (max-width: 760px) {
  .hero-actions .btn { width: 100%; }
}

/* ---------------------------------------------------------------- chapters (paper) */
.chapters { background: var(--paper-bg); color: var(--paper-text); padding: clamp(80px, 11vw, 150px) 0; }
.chapter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
@media (min-width: 880px) { .chapter-list { grid-template-columns: repeat(3, 1fr); } }
.chapter { display: flex; flex-direction: column; gap: 12px; padding: 32px 0; border-top: 1px solid var(--paper-line); }
@media (min-width: 880px) {
  .chapter { padding: 8px 0; padding-inline-start: 40px; border-top: 0; border-inline-start: 1px solid var(--paper-line); }
  .chapter:first-child { border-inline-start: 0; padding-inline-start: 0; }
}
.chapter-no { font-family: Vazirmatn; font-weight: 900; font-size: clamp(56px, 6vw, 80px); line-height: 1; color: var(--paper-accent); letter-spacing: -.02em; }
.chapter h3 { font-weight: 900; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.4; }
.chapter p { color: var(--paper-muted); font-size: 16.5px; line-height: 1.9; max-width: 26em; }
.chapter a { color: var(--paper-accent); font-weight: 700; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- product (ink) */
.product { padding: clamp(88px, 12vw, 160px) 0; overflow: hidden; }
.product-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .product-grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.product-copy { display: flex; flex-direction: column; gap: 20px; }
.product h2, .dev h2, .final h2 { font-weight: 900; font-size: clamp(34px, 5.2vw, 64px); line-height: 1.2; }
.product h2 em { color: var(--mint); }
.product-copy > p { color: var(--ink-muted); font-size: 18px; line-height: 1.9; max-width: 30em; }
.facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.facts li { position: relative; padding: 14px 0; padding-inline-start: 28px; border-top: 1px solid var(--ink-line); font-weight: 500; font-size: 16.5px; }
.facts li:last-child { border-bottom: 1px solid var(--ink-line); }
/* bullet = the pillar's forward-cut top, from the mark */
.facts li::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 2px; background: var(--mint); clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%); }

.phone-stage { position: relative; display: flex; justify-content: center; padding: 8px 0 44px; isolation: isolate; }
.phone-stage::before { content: ""; position: absolute; inset: 8% 10% 16%; border-radius: 48px; background: radial-gradient(closest-side, rgba(61, 220, 151, .22), transparent); filter: blur(24px); z-index: -1; }
.phone { width: min(330px, 100%); background: #F6F5F2; color: var(--ink); border-radius: 36px; overflow: hidden; font-family: Vazirmatn, Manrope, sans-serif; box-shadow: 0 0 0 9px #1B1E22, 0 0 0 10px #2A2E33, 0 50px 90px -40px rgba(0, 0, 0, .9); }
.phone-head { background: var(--ink); color: var(--white); padding: 22px 20px 18px; display: flex; align-items: center; justify-content: space-between; }
.phone-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 900; font-size: 18px; }
.phone-brand svg { width: 24px; height: 24px; fill: var(--mint); }
.phone-secure { font-size: 12px; color: var(--ink-300); }
.phone-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pay-merchant { display: flex; align-items: center; gap: 10px; background: var(--white); border-radius: 16px; padding: 12px; }
.pay-merchant small { display: block; font-size: 11.5px; color: var(--ink-500); line-height: 1.4; }
.pay-merchant b { font-size: 15px; font-weight: 800; }
.pay-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--lilac); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: none; }
.pay-amount { display: flex; flex-direction: column; align-items: center; background: var(--white); border-radius: 16px; padding: 14px; line-height: 1.3; }
.pay-amount small { font-size: 12px; color: var(--ink-500); }
.pay-amount b { font-size: 36px; font-weight: 900; }
.pay-amount span { font-size: 13px; color: var(--ink-500); }
.pay-row { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 4px; }
.pay-row span { color: var(--ink-500); } .pay-row b { font-weight: 700; }
.pay-btn { margin-top: 4px; height: 52px; border-radius: 16px; background: var(--mint); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; }
.receipt-chip { position: absolute; bottom: 0; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; background: var(--white); color: var(--ink); border-radius: 999px; padding: 10px 14px 10px 18px; font-family: Vazirmatn; font-weight: 800; font-size: 14px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); }
.chip-check { width: 22px; height: 22px; border-radius: 50%; background: var(--mint); position: relative; flex: none; }
.chip-check::after { content: ""; position: absolute; left: 7.5px; top: 4px; width: 6px; height: 11px; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* ---------------------------------------------------------------- developers (paper) */
.dev { background: var(--paper-bg); color: var(--paper-text); padding: clamp(88px, 12vw, 160px) 0; }
.dev-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .dev-grid { grid-template-columns: .95fr 1.05fr; gap: 72px; } }
.dev-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.dev h2 em { color: var(--paper-accent); }
.dev-copy > p { color: var(--paper-muted); font-size: 17.5px; line-height: 1.95; max-width: 32em; }
.code { background: var(--ink); color: var(--ink-100); border-radius: 22px; overflow: hidden; min-width: 0; box-shadow: 0 40px 80px -48px rgba(17, 19, 21, .7); }
@media (prefers-color-scheme: dark) { .code { background: #0B0C0E; box-shadow: inset 0 0 0 1px var(--paper-line); } }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--ink-line); }
.code-title { font-family: Manrope; font-weight: 700; font-size: 13px; color: var(--ink-300); }
.code-copy { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-300); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .2s, background-color .2s; }
.code-copy:hover { color: var(--white); background: var(--ink-700); }
.code-copy.done { background: var(--mint); color: var(--ink); }
.code pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.8; text-align: left; }
.code pre code { background: none; padding: 0; font-size: inherit; }
.code-out { border-top: 1px solid var(--ink-line); }
.c-k { color: var(--mint); } .c-s { color: #C9C0FF; } .c-c { color: var(--mint); }

/* ---------------------------------------------------------------- FAQ (ink) */
.faq-sec { padding: clamp(88px, 12vw, 150px) 0; }
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: .6fr 1.4fr; gap: 72px; align-items: start; } }
.faq-grid > h2 { font-weight: 900; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.2; }
.faq details { border-top: 1px solid var(--ink-line); }
.faq details:last-child { border-bottom: 1px solid var(--ink-line); }
.faq summary { list-style: none; cursor: pointer; min-height: 72px; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-family: Vazirmatn; font-weight: 800; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.6; transition: color .2s; }
.faq summary:hover { color: var(--mint); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 22px; height: 22px; color: var(--mint); transition: transform .3s var(--ease); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--ink-muted); font-size: 16.5px; line-height: 1.95; max-width: 40em; }

/* ---------------------------------------------------------------- final CTA (mint signal on ink) */
.final { position: relative; overflow: hidden; padding: clamp(96px, 14vw, 180px) 0; border-top: 1px solid var(--ink-line); isolation: isolate; }
.final-mark { position: absolute; z-index: -1; width: clamp(280px, 40vw, 560px); height: clamp(280px, 40vw, 560px); inset-inline-start: -4%; bottom: -24%; fill: var(--mint); opacity: .12; }
.final-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.final h2 { font-size: clamp(48px, 8vw, 104px); }
.final p { color: var(--ink-muted); font-size: clamp(17px, 2vw, 21px); margin-bottom: 12px; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--ink-line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-top: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.lockup-sm .lockup-mark { width: 24px; height: 24px; }
.lockup-sm .lockup-fa { font-size: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 4px; }
.footer-links a { color: var(--ink-muted); text-decoration: none; font-weight: 700; font-size: 14.5px; padding: 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; }
.footer-links a:hover { color: var(--white); }
.footer-note { font-size: 13px; color: #8E959D; }   /* Ink 500 on ink fails (brand: avoid) */

/* ---------------------------------------------------------------- motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
/* the mark assembles as in the brand's logo motion: the beam slides in, the pillar rises */
.hero-mark .beam { transform-box: fill-box; transform-origin: right center; animation: beam 1.1s var(--ease) .15s both; }
.hero-mark .pillar { animation: pillar 1s cubic-bezier(.34, 1.56, .64, 1) .8s both; }
@keyframes beam { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pillar { from { transform: translateY(40px); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* hero: standard two-column layout — copy on the start side, the mark whole and centred in its own column */
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 80px); }
.hero h1 { font-size: clamp(36px, 5vw, 72px); max-width: 10em; }
.lead { max-width: 30em; }
.hero-visual { display: grid; place-items: center; aspect-ratio: 1; width: 100%; max-width: 540px; justify-self: center; border-radius: 40px; background: radial-gradient(circle at 50% 50%, rgba(61, 220, 151, .12), transparent 68%); }
.hero-mark { display: block; width: 86%; height: auto; overflow: visible; }
@media (max-width: 860px) {
  .hero-layout { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { order: -1; justify-self: start; width: 128px; max-width: none; border-radius: 30px; background: rgba(61, 220, 151, .08); }
  .hero-mark { width: 78%; }
}
