/* crystalERP marketing site - design system
   Brand: Crystaline ERP deep green (#0d5d40) from the application's own shell, warm surface #f2f4ef, Inter when installed.
   Logical properties throughout so an RTL language (Arabic) only needs dir="rtl". */

:root {
  --green-900: #073a28;
  --green-800: #0a4a33;
  --green-700: #0d5d40;   /* brand */
  --green-600: #11764f;
  --green-500: #159a6a;
  --green-200: #b9e3cc;
  --green-100: #d3eede;
  --green-050: #ebf3ed;
  --amber-600: #c66a12;
  --amber-100: #ffe5cd;
  --surface: #f2f4ef;
  --surface-2: #ffffff;
  --ink: #1c221e;
  --muted: #4d5a53;
  --muted-2: #5f6c64;
  --line: #d8ded8;
  --line-2: #cfd8d0;
  --danger: #b42318;
  --focus: #e58a2b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 34, 24, .06), 0 10px 30px -12px rgba(16, 34, 24, .18);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--surface); padding-bottom: 72px; }
@media (min-width: 720px) { body { padding-bottom: 0; } }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-900); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.small { font-size: .9rem; color: var(--muted-2); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 8px; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, background .12s ease, box-shadow .12s ease; font-family: inherit; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 6px 16px -6px rgba(13, 93, 64, .55); }
.btn-primary:hover { background: var(--green-800); color: #fff; }
.btn-secondary { background: var(--amber-100); color: var(--amber-600); border-color: #f5caa0; }
.btn-secondary:hover { background: #ffd9b5; color: #9a4f08; }
.btn-ghost { background: transparent; color: var(--green-700); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--green-050); color: var(--green-900); }
.btn-light { background: #fff; color: var(--green-800); }
.btn-light:hover { background: var(--green-050); color: var(--green-900); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 12px 30px; font-size: 1.08rem; }
.btn-wa { background: #25d366; color: #073a28; }
.btn-wa:hover { background: #1fbf5b; color: #073a28; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242, 244, 239, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.brand-wordmark { width: 180px; height: auto; }
@media (min-width: 720px) { .brand-wordmark { width: 210px; } }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line-2); background: #fff; border-radius: 10px; cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: ""; transition: transform .2s; }
.nav-toggle-bar::before { position: absolute; top: -7px; }
.nav-toggle-bar::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }
.site-nav { display: none; width: 100%; padding-block: 8px 16px; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; }
.site-nav li a { display: block; padding: 12px 6px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-nav li a[aria-current="page"] { color: var(--green-700); }
.nav-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex !important; width: auto; align-items: center; gap: 20px; padding: 0; }
  .site-nav ul { flex-direction: row; gap: 4px; margin: 0; }
  .site-nav li a { border: 0; padding: 8px 10px; border-radius: 8px; font-size: .97rem; }
  .site-nav li a:hover { background: var(--green-050); }
  .site-nav li a[aria-current="page"] { background: var(--green-100); }
}

/* ---------- sections / layout ---------- */
.section { padding-block: 56px; }
@media (min-width: 720px) { .section { padding-block: 84px; } }
.section-tight { padding-block: 36px; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-green { background: linear-gradient(160deg, var(--green-800), var(--green-700)); color: #fff; }
.section-green h2, .section-green h3, .section-green p { color: #fff; }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head .eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-600); margin-bottom: 8px; }
.section-green .eyebrow { color: var(--green-200); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } .split.split-wide { grid-template-columns: 5fr 7fr; } .split.split-rev > :first-child { order: 2; } }

/* ---------- cards ---------- */
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(16,34,24,.04); }
.card h3 { margin-top: 6px; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; margin-bottom: 12px; }
.card-icon svg { width: 24px; height: 24px; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .12s, transform .12s; }
.card-link:hover { border-color: var(--green-500); transform: translateY(-2px); color: inherit; }
.card-link .more { color: var(--green-700); font-weight: 700; }
.problem { border-inline-start: 4px solid var(--amber-600); }
.problem strong { display: block; margin-bottom: 4px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-inline-start: 30px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%230d5d40' d='M8.1 14.3 4.4 10.6l1.4-1.4 2.3 2.3 6-6 1.4 1.4z'/%3E%3C/svg%3E") center/16px no-repeat; }
.section-green .checks li::before { background-color: rgba(255,255,255,.18); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-800); vertical-align: middle; }
.badge-amber { background: var(--amber-100); color: #7a3d05; }
.badge-grey { background: #e6e9e4; color: var(--muted); }
.stat { font-size: 2rem; font-weight: 800; color: var(--green-700); line-height: 1; }
.notice { background: var(--amber-100); border: 1px solid #f5caa0; color: #6b3a08; padding: 14px 18px; border-radius: var(--radius-sm); }
.notice-green { background: var(--green-050); border-color: var(--green-200); color: var(--green-900); }
.kv { display: grid; grid-template-columns: 1fr; gap: 6px 18px; margin: 0; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0 0 10px; color: var(--muted); }
@media (min-width: 640px) { .kv { grid-template-columns: max-content 1fr; } .kv dd { margin-bottom: 4px; } }

/* ---------- hero ---------- */
.hero { padding-block: 44px 28px; background: radial-gradient(circle at 10% 0%, #d3eede 0, transparent 45%), radial-gradient(circle at 95% 100%, #ffe5cd 0, transparent 40%); }
@media (min-width: 900px) { .hero { padding-block: 72px 48px; } }
.hero .lead { font-size: 1.2rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 20px 0 0; list-style: none; color: var(--muted); font-size: .95rem; }
.hero-points li::before { content: "\2713"; color: var(--green-600); font-weight: 800; margin-inline-end: 6px; }
.hero-media { position: relative; }

/* ---------- screenshots ---------- */
.shot { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.shot-bar { display: flex; gap: 6px; padding: 9px 12px; background: #e9ede9; border-bottom: 1px solid var(--line-2); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9d2cb; display: block; }
.shot-bar i:first-child { background: #ea8a79; } .shot-bar i:nth-child(2) { background: #f1c45e; } .shot-bar i:nth-child(3) { background: #7dcf96; }
.shot img { width: 100%; height: auto; }
.shot-caption { font-size: .9rem; color: var(--muted-2); margin: 10px 2px 0; }
.shot-phone { max-width: 300px; margin-inline: auto; border-radius: 28px; border: 8px solid #1c221e; background: #1c221e; box-shadow: var(--shadow); overflow: hidden; }
.shot-phone img { border-radius: 20px; }
figure { margin: 0; }
figure.shot-wrap { margin: 0; }

/* ---------- feature rows ---------- */
.feature-row { padding-block: 36px; border-top: 1px solid var(--line); }
.feature-row:first-of-type { border-top: 0; }
.feature-row h2 { font-size: 1.45rem; }
.feature-row .status { margin-bottom: 8px; }

/* ---------- pricing ---------- */
.price-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .price-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .price-grid { grid-template-columns: repeat(4, 1fr); } }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.popular { border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100), var(--shadow); }
.price-card .ribbon { position: absolute; top: -12px; inset-inline-start: 18px; }
.price { font-size: 1.9rem; font-weight: 800; color: var(--green-800); line-height: 1.1; margin: 6px 0 2px; }
.price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.price-card .checks { margin: 14px 0; flex: 1; }
.price-card .btn { width: 100%; }
.price-card .limits { font-size: .88rem; color: var(--muted-2); }
.addon { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; }
.addon .price { font-size: 1.25rem; margin: 0; }
table.plain { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.plain th, table.plain td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form label { font-weight: 700; font-size: .95rem; display: block; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--green-700); outline: 3px solid rgba(13,93,64,.18); outline-offset: 0; }
.form .field-error { color: var(--danger); font-size: .88rem; margin-top: 4px; display: none; }
.form .is-invalid input, .form .is-invalid select { border-color: var(--danger); }
.form .is-invalid .field-error { display: block; }
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .92rem; }
.form .consent input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; }
.form-status { padding: 14px 16px; border-radius: 10px; display: none; }
.form-status.ok { display: block; background: var(--green-050); border: 1px solid var(--green-200); color: var(--green-900); }
.form-status.err { display: block; background: #fdecea; border: 1px solid #f3b5ae; color: var(--danger); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 4px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--green-700); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 4px 18px; color: var(--muted); max-width: 70ch; }

/* ---------- steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { position: relative; padding-inline-start: 56px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--green-700); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps strong { display: block; margin-bottom: 2px; }

/* ---------- quotes ---------- */
.quote { font-style: normal; }
.quote p { font-size: 1.02rem; }
.quote cite { font-style: normal; font-weight: 700; color: var(--green-800); }

/* ---------- cta band ---------- */
.cta-band { background: linear-gradient(160deg, var(--green-900), var(--green-700)); color: #fff; padding-block: 56px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--green-100); max-width: 56ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 20px; }

/* ---------- footer ---------- */
.site-footer { background: #10231a; color: #cfd8d0; padding-block: 44px 20px; font-size: .95rem; }
.site-footer a { color: #e8efe9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand img { width: 190px; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: .92; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 16px; font-size: .85rem; color: #b8c4bc; }
.site-footer .small, .site-footer .muted { color: #b8c4bc; }

/* ---------- WhatsApp floating button ---------- */
.wa-fab { position: fixed; inset-inline-end: 14px; bottom: 14px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #073a28; font-weight: 800; padding: 12px 18px; border-radius: 999px; text-decoration: none; box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); min-height: 48px; }
.wa-fab:hover { background: #1fbf5b; color: #073a28; }
@media (max-width: 719px) { .wa-fab span { font-size: .95rem; } }

/* ---------- misc ---------- */
.breadcrumb { font-size: .9rem; color: var(--muted-2); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted-2); }
.breadcrumb span::before { content: "/"; margin-inline: 8px; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-inline-start: 22px; }
.logo-strip { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; color: var(--muted); font-weight: 700; }
.compare th:first-child { width: 36%; }
.status-key { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.demo-cred { background: #10231a; color: #e8efe9; border-radius: var(--radius); padding: 20px; font-family: ui-monospace, Consolas, monospace; }
.demo-cred dt { color: #9fb0a5; font-family: var(--font); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.demo-cred dd { margin: 2px 0 12px; font-size: 1.1rem; word-break: break-all; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mb-0 { margin-bottom: 0; }
@media print { .site-header, .wa-fab, .cta-band, .site-footer { display: none; } }
