/* alireza.app — one stylesheet, no third-party anything. */

:root {
  --canvas: #f5f3ed;
  --surface: #ffffff;
  --surface-2: #ece9e0;
  --ink: #142a32;
  --ink-2: #4a5d63;
  --ink-3: #6b7b80;
  --line: rgba(20, 42, 50, 0.12);
  --accent: #00a889;
  --accent-soft: rgba(0, 168, 137, 0.12);
  --btn: #142a32;
  --btn-ink: #ffffff;
  --on-accent: #142a32;
  --shadow: 0 1px 2px rgba(20, 42, 50, 0.06), 0 12px 32px -12px rgba(20, 42, 50, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1120px;
  --prose: 68ch;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0c191e;
    --surface: #132830;
    --surface-2: #1a333d;
    --ink: #ecf1f1;
    --ink-2: #b4c3c6;
    --ink-3: #8a9ea2;
    --line: rgba(236, 241, 241, 0.12);
    --accent: #4ad3b4;
    --accent-soft: rgba(74, 211, 180, 0.16);
    --btn: #ecf1f1;
    --btn-ink: #0c191e;
    --on-accent: #0c191e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

/* ---------- header / footer ---------- */

.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-round); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.brand-dot { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--canvas); display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 22px; font-size: 15px; color: var(--ink-2); }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 560px) { .nav { gap: 16px; font-size: 14px; } }

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--font-round); letter-spacing: -0.025em; line-height: 1.08; margin: 0; font-weight: 700; }
h1 { font-size: clamp(40px, 7vw, 76px); }
h2 { font-size: clamp(30px, 4.4vw, 46px); }
h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--ink-2); max-width: 36ch; margin: 22px 0 0; line-height: 1.45; }
.muted { color: var(--ink-3); }
.accent { background: linear-gradient(transparent 60%, var(--accent-soft) 60%, var(--accent-soft) 92%, transparent 92%); padding: 0 0.06em; }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------- buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.btn[aria-disabled="true"] { cursor: default; }
.btn svg { width: 20px; height: 20px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- home ---------- */

.home-hero { padding: 72px 0 40px; }
.home-hero h1 { max-width: 14ch; }
.section { padding: 72px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.app-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.app-card:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { a.app-card:hover { transform: none; } }
.app-card img.icon { width: 76px; height: 76px; }
.app-card h3 { font-size: 24px; }
.app-card p { margin: 0; color: var(--ink-2); }
.app-card .meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.app-card .go { position: absolute; top: 28px; right: 28px; color: var(--ink-3); }
.app-card.placeholder { background: transparent; border-style: dashed; box-shadow: none; justify-content: center; color: var(--ink-3); min-height: 240px; }

.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 8px; }
.principles h3 { margin-bottom: 8px; }
.principles p { margin: 0; color: var(--ink-2); }

/* ---------- app page ---------- */

.app-hero { padding-top: 56px; padding-bottom: 24px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .app-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; } }
.app-hero h1 { font-size: clamp(36px, 5.2vw, 62px); }
.app-hero .icon { width: 96px; height: 96px; margin-bottom: 28px; filter: drop-shadow(0 12px 24px rgba(0, 120, 98, 0.25)); }
.app-hero .tagline { font-family: var(--font-round); font-weight: 650; font-size: 18px; color: var(--ink-2); margin: 0 0 12px; }
.fine { font-size: 14px; color: var(--ink-3); margin-top: 16px; }

.stage { position: relative; display: grid; place-items: center; min-height: 520px; }
.stage::before { content: ""; position: absolute; inset: 6% 4%; border-radius: 48px; background: radial-gradient(120% 90% at 30% 20%, var(--accent-soft), transparent 60%), radial-gradient(90% 80% at 80% 90%, var(--accent-soft), transparent 60%); }
.phone { position: relative; width: 300px; aspect-ratio: 9 / 19.2; border-radius: 48px; background: #0b1518; padding: 10px; box-shadow: 0 40px 80px -30px rgba(20, 42, 50, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset; }
.screen { position: relative; height: 100%; border-radius: 39px; overflow: hidden; background: linear-gradient(180deg, #dfe8e4 0%, #cfdcd6 100%); }

/* split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split p { color: var(--ink-2); }

.questions { display: grid; gap: 14px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px; }
.q h3 { font-size: 18px; margin-bottom: 6px; }
.q p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.opt { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); }
.opt.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; }

.nots { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 28px 0; }
.not { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; font-family: var(--font-round); font-weight: 650; font-size: 18px; }
.not small { display: block; font-family: var(--font); font-weight: 400; font-size: 14px; color: var(--ink-3); margin-top: 4px; }

.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 32px; }
.callout p:last-child { margin-bottom: 0; }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); margin: 12px 0 0; max-width: var(--prose); }

.cta-band { margin-top: 96px; background: var(--btn); color: var(--btn-ink); border-radius: 32px; padding: 56px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); }
.cta-band p { margin: 10px 0 0; opacity: 0.75; }
.cta-band .btn { background: var(--canvas); color: var(--ink); }
.cta-band img { width: 72px; height: 72px; }
@media (max-width: 560px) { .cta-band { padding: 40px 24px; border-radius: 24px; } }

/* ---------- legal / prose pages ---------- */

.doc { padding: 40px 0 0; }
.doc-head { max-width: var(--prose); margin-bottom: 40px; }
.doc-head h1 { font-size: clamp(36px, 5.5vw, 56px); }
.doc-head .updated { margin-top: 14px; color: var(--ink-3); font-size: 15px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 20px; display: flex; gap: 8px; align-items: center; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.prose { max-width: var(--prose); }
.prose h2 { font-size: 26px; margin: 48px 0 14px; letter-spacing: -0.015em; }
.prose h3 { font-size: 19px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: 6px 0; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 0 0 8px; }
.summary-box h2 { margin-top: 0 !important; font-size: 20px !important; }
.summary-box ul { margin: 10px 0 0; }
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.prose th { color: var(--ink); background: var(--surface); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

.notfound { padding: 120px 0; text-align: left; }

.demo-stage { min-height: 0; padding: 12px 0; }

/* ---------- one-tap demo: real screenshots, animated (11s loop) ---------- */

.phone.real { aspect-ratio: auto; width: 300px; padding: 9px; border-radius: 50px; }
.phone.real .screen { height: auto; aspect-ratio: 402 / 874; border-radius: 41px; background: #fff; }
.phone.real .fx-layer { position: absolute; display: block; }
@media (max-width: 420px) { .phone.real { width: 270px; } }

.fx { --t: 11s; }
.fx * { animation-duration: var(--t); animation-iteration-count: infinite; animation-timing-function: cubic-bezier(.25, .8, .25, 1); }
.fx-layer { width: 100%; height: auto; left: 0; top: 0; }
.fx-menu { left: 22.139%; top: 36.499%; width: 62.687%; border-radius: 24px; transform-origin: 10% 95%; opacity: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); animation-name: fx-menu; }
.fx-share { top: 52.174%; transform: translateY(100%); animation-name: fx-share; }
.fx-apple { opacity: 0; transform: scale(.9); border-radius: 30px; animation-name: fx-apple; }
.fx-tap { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 2px rgba(0, 0, 0, .22), 0 4px 12px rgba(0, 0, 0, .18); opacity: 0; pointer-events: none; }
.fx-tap1 { left: 28.36%; top: 93.36%; animation-name: fx-tap1; }
.fx-tap2 { left: 43.78%; top: 40.16%; animation-name: fx-tap2; }
.fx-tap3 { left: 17.16%; top: 88.79%; animation-name: fx-tap3; }
.fx-ring { position: absolute; border-radius: 50%; opacity: 0; pointer-events: none; }
.fx-pin { left: 49.3%; top: 27.6%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 3px solid rgba(255, 149, 0, .9); animation-name: fx-pin; }
.fx-plan { left: 15.9%; top: 67.6%; width: 66px; height: 42px; margin: -21px 0 0 -33px; border-radius: 14px; border: 3px solid rgba(10, 132, 255, .9); animation-name: fx-plan; }

@keyframes fx-tap1 { 0%, 8% { opacity: 0; transform: scale(.4); } 10% { opacity: 1; transform: scale(1); } 12.5%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes fx-menu { 0%, 10.5% { opacity: 0; transform: scale(.25); } 13.5% { opacity: 1; transform: scale(1.02); } 14.5%, 21.4% { opacity: 1; transform: scale(1); } 23.4%, 100% { opacity: 0; transform: scale(.96); } }
@keyframes fx-tap2 { 0%, 17.5% { opacity: 0; transform: scale(.4); } 19.5% { opacity: 1; transform: scale(1); } 22%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes fx-share { 0%, 21.8% { transform: translateY(100%); } 26.4%, 40.9% { transform: translateY(0); } 44.5%, 100% { transform: translateY(100%); } }
@keyframes fx-tap3 { 0%, 35.5% { opacity: 0; transform: scale(.4); } 37.5% { opacity: 1; transform: scale(1); } 40.5%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes fx-apple { 0%, 47.5% { opacity: 0; transform: scale(.9); border-radius: 30px; } 53.5% { opacity: 1; transform: scale(1); border-radius: 0; } 93.6% { opacity: 1; transform: scale(1); } 98.5%, 100% { opacity: 0; transform: scale(1); } }
@keyframes fx-pin { 0%, 55% { opacity: 0; transform: scale(.6); } 58% { opacity: 1; } 66%, 100% { opacity: 0; transform: scale(1.7); } }
@keyframes fx-plan { 0%, 67% { opacity: 0; transform: scale(1); } 70% { opacity: 1; transform: scale(1); } 78% { opacity: 0; transform: scale(1.35); } 79% { opacity: 0; transform: scale(1); } 82% { opacity: 1; transform: scale(1); } 90%, 100% { opacity: 0; transform: scale(1.35); } }

@media (prefers-reduced-motion: reduce) {
  .fx * { animation: none !important; }
  .fx-menu, .fx-tap, .fx-ring { opacity: 0; }
  .fx-share { transform: translateY(100%); }
  .fx-apple { opacity: 1; transform: none; border-radius: 0; }
}
