/* NOVA's site. The colours are the app's: roast green, the paper of a receipt,
   crema from the logo, and the live green only where something is live. */
:root {
  --roast: #1E4D3B;
  --deep: #133429;
  --paper: #F7F0E4;
  --paper-2: #EFE5D3;
  --ink: #1B2722;
  --ink-soft: #4A5852;
  --crema: #C87D55;
  --live: #3DF5B0;
  --on-green: #F7F0E4;
  --on-green-soft: #C9D6CE;

  --display: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --body: 'IBM Plex Sans Arabic', 'Alexandria', system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.8 var(--body);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--crema); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 12px; }

h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; line-height: 1.25; text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.sub { margin-top: 14px; max-width: 58ch; color: var(--ink-soft); font-size: 1.125rem; }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 1.0625rem/1 var(--body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 1rem; }
.btn-paper { background: var(--paper); color: var(--roast); }
.btn-paper:hover { background: #fff; }
.btn-line { border-color: currentColor; color: var(--on-green); }
.btn-line:hover { background: rgba(247, 240, 228, .1); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* --- top bar ------------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--roast); color: var(--on-green); }
.bar-in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-green); }
.brand span { font: 800 1.35rem/1 var(--display); letter-spacing: .04em; }
.links { display: flex; gap: 28px; margin-inline-start: 24px; }
.links a { text-decoration: none; color: var(--on-green-soft); font-weight: 500; }
.links a:hover { color: var(--on-green); }
.bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.lang {
  background: none; border: 0; color: var(--on-green-soft); font: 500 1rem var(--body);
  cursor: pointer; padding: 8px 10px; border-radius: 8px;
}
.lang:hover { color: var(--on-green); }

/* --- hero ---------------------------------------------------------------- */
.hero { background: var(--roast); color: var(--on-green); padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.3; }
.hero h1 span { display: block; }
/* Arabic breaks after the comma, each half on its line. English runs longer,
   so it flows as one sentence, balanced across the lines its column allows. */
.hero h1 { text-wrap: balance; }
html[lang="en"] .hero h1 span { display: inline; }
.lead { margin-top: 24px; font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--on-green-soft); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.live { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--on-green-soft); font-size: .98rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgba(61, 245, 176, .18); flex: none; }

/* The receipt printer. */
.printer { position: relative; justify-self: center; width: min(340px, 100%); padding-top: 18px; }
/* The paper comes out of the slot: hide it above, leave room for the shadow below. */
.feed { overflow: hidden; margin: 0 -30px -60px; padding: 0 30px 60px; }
.slot {
  position: absolute; top: 0; inset-inline: -18px; height: 26px; z-index: 2;
  background: linear-gradient(#0B1F18, #163C2F); border-radius: 10px;
  box-shadow: inset 0 -6px 0 #0A1A14, 0 10px 24px rgba(0, 0, 0, .35);
}
.ticket {
  position: relative; margin-inline: 6px; padding: 30px 24px 104px;
  background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1rem; line-height: 1.6;
  /* torn edge */
  --tooth: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + 1px) no-repeat;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--tooth)) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + 1px) no-repeat;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .3));
  animation: print 1.9s steps(19, end) .35s both;
}
.t-head { text-align: center; padding-bottom: 14px; border-bottom: 2px dashed #C9BFAE; }
.t-head strong { display: block; font: 700 1.2rem/1.5 var(--display); }
.t-head > span { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
.t-lines { list-style: none; margin: 14px 0; padding: 0; }
.t-lines li { display: flex; justify-content: space-between; gap: 16px; }
.t-lines b, .t-total b { font-variant-numeric: tabular-nums; font-weight: 600; }
.t-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 2px dashed #C9BFAE; font: 700 1.2rem/1.6 var(--display); }
.t-foot { display: flex; justify-content: space-between; margin-top: 14px; color: var(--ink-soft); font-size: .9rem; }
.stamp {
  position: absolute; left: 50%; bottom: 36px; translate: -50% 0;
  padding: 4px 16px; border: 3px solid var(--crema); border-radius: 10px;
  color: var(--crema); font: 800 1.5rem/1.3 var(--display);
  transform: rotate(-12deg); opacity: .92;
  animation: stamp .32s cubic-bezier(.3, 1.6, .5, 1) 2.45s both;
}
@keyframes print { from { transform: translateY(-104%); } to { transform: translateY(0); } }
@keyframes stamp {
  from { transform: rotate(-12deg) scale(2.2); opacity: 0; }
  to { transform: rotate(-12deg) scale(1); opacity: .92; }
}

/* --- device frames, drawn rather than photographed --------------------------- */
.device { margin: 0; position: relative; background: #0F1A16; }
.device img { border-radius: 4px; }
.laptop { padding: 12px 12px 14px; border-radius: 14px 14px 6px 6px; width: 100%; }
.laptop::after {
  content: ''; position: absolute; inset-inline: -7%; bottom: -16px; height: 16px;
  background: linear-gradient(#C4CCC7, #8E9893); border-radius: 0 0 16px 16px;
}
.phone { padding: 10px; border-radius: 40px; width: min(62%, 300px); }
.phone img { border-radius: 30px; }

.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.points li { position: relative; padding-inline-start: 26px; }
.points li::before { content: ''; position: absolute; inset-inline-start: 4px; top: .7em; width: 9px; height: 9px; border-radius: 50%; background: var(--crema); }

/* --- why: the owner's problems, each with what changes ------------------------ */
.why { padding: var(--section) 0; }
.why h2 { max-width: 22ch; }
.pains { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pains li { padding: 28px; border-radius: 18px; background: var(--paper-2); }
.pain { color: var(--ink-soft); font-size: 1.05rem; padding-inline-start: 14px; border-inline-start: 3px solid var(--crema); }
.fix { margin-top: 12px; font: 600 1.2rem/1.6 var(--display); color: var(--roast); }

/* --- what you can do: one outcome per row, the real screen beside it ---------- */
.features { padding: 0 0 var(--section); overflow-x: clip; }
.pillar { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: clamp(40px, 6vw, 72px); }
.pillar + .pillar { border-top: 1px solid #E4DACA; }
.pillar.flip .pillar-copy { order: 2; }
.pillar-copy p { margin-top: 16px; color: var(--ink-soft); font-size: 1.125rem; max-width: 46ch; }
.pillar .phone { justify-self: center; width: min(70%, 290px); }

/* --- grow ------------------------------------------------------------------------ */
.grow { padding: var(--section) 0; background: var(--deep); color: var(--on-green); }
.grow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: 44px; }
.grow-grid h3 { padding-top: 18px; border-top: 3px solid var(--crema); color: var(--paper); }
.grow-grid p { margin-top: 10px; color: var(--on-green-soft); }

/* --- the rest ----------------------------------------------------------------- */
.download { background: var(--roast); color: var(--on-green); padding: var(--section) 0; }
.download .sub { color: var(--on-green-soft); }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 44px; }
.dl { padding: 32px; border: 2px solid rgba(247, 240, 228, .22); border-radius: var(--radius); display: flex; flex-direction: column; align-items: flex-start; }
.dl-ico { width: 40px; height: 40px; fill: var(--paper); }
.dl h3 { margin-top: 18px; font-size: 1.6rem; }
.dl-for { margin-top: 8px; color: var(--on-green-soft); }
.dl-btn { margin-top: 24px; }
.dl-meta { margin-top: 12px; min-height: 1.8em; color: var(--on-green-soft); font-size: .95rem; font-variant-numeric: tabular-nums; }
.dl-none { margin-top: 24px; color: var(--paper); }
.dl-none a { color: var(--live); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.btn.is-off { opacity: .45; cursor: not-allowed; pointer-events: none; }

.contact { padding: var(--section) 0; }

.foot { background: var(--deep); color: var(--on-green-soft); padding: 40px 0; font-size: .95rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-in p:last-child { margin-inline-start: auto; }
.foot .brand span { font-size: 1.15rem; }

/* --- live chips around the ticket ---------------------------------------- */
.chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 14px; max-width: 250px;
  background: rgba(19, 52, 41, .92); color: var(--on-green); font-size: .92rem; line-height: 1.4;
  border: 1px solid rgba(247, 240, 228, .16); box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
  backdrop-filter: blur(6px);
  animation: chip .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
.chip b { display: block; font-weight: 600; }
.chip span span { color: var(--on-green-soft); }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); flex: none; box-shadow: 0 0 0 4px rgba(61, 245, 176, .16); }
.chip-dot.warn { background: #F2B48E; box-shadow: 0 0 0 4px rgba(242, 180, 142, .18); }
.chip { display: none; inset-inline-start: calc(100% - 14px); }
.chip-1 { top: 16%; animation-delay: 2.9s; }
.chip-2 { top: 42%; inset-inline-start: calc(100% + 26px); animation-delay: 3.4s; }
.chip-3 { top: 68%; animation-delay: 3.9s; }
@media (min-width: 1280px) {
  .hero-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .printer { justify-self: start; }
}
/* The notes hang off the ticket's outer edge, so they only show where the
   page has room for them beside it; narrower, the ticket stands alone. */
@media (min-width: 1440px) {
  .chip { display: flex; }
}
@keyframes chip { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }

/* --- who it's for --------------------------------------------------------- */
.kinds { background: var(--deep); color: var(--on-green-soft); }
.kinds-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 76px; padding-block: 14px; }
.kinds ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.kinds li { padding: 6px 16px; border: 1px solid rgba(247, 240, 228, .22); border-radius: 999px; color: var(--paper); font-weight: 500; }

/* --- getting started (a real sequence, so it's numbered) ----------------------- */
.start { padding: var(--section) 0; }
.start-steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.start-steps li { counter-increment: step; position: relative; padding-top: 64px; }
.start-steps li::before {
  content: counter(step); position: absolute; top: 0; inset-inline-start: 0;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--roast); color: var(--paper); font: 700 1.2rem/1 var(--display);
}
.start-steps li:not(:last-child)::after {
  content: ''; position: absolute; top: 22px; inset-inline-start: 60px; inset-inline-end: -18px;
  border-top: 2px dashed #C9BFAE;
}
.start-steps p { margin-top: 8px; color: var(--ink-soft); }

/* --- questions ---------------------------------------------------------------- */
.faq { padding: var(--section) 0; background: var(--paper-2); }
.faq-in { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.faq-list { display: grid; gap: 10px; }
.faq details { background: var(--paper); border-radius: 14px; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font: 600 1.1rem/1.5 var(--display); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.6rem/1 var(--body); color: var(--roast); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; color: var(--ink-soft); max-width: 62ch; }

/* --- demo request: what happens next, beside the form ------------------------- */
.request { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); margin-top: 40px; border-radius: 24px; overflow: hidden; }
.next { padding: clamp(28px, 4vw, 48px); background: var(--roast); color: var(--on-green); }
.next h3 { font-size: 1.35rem; color: var(--paper); }
.next ol { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; counter-reset: next; }
.next li { counter-increment: next; position: relative; padding-inline-start: 46px; color: var(--on-green-soft); }
.next li::before {
  content: counter(next); position: absolute; inset-inline-start: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(247, 240, 228, .35); color: var(--paper); font: 700 .95rem/1 var(--display);
}
.next-alt { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(247, 240, 228, .16); color: var(--on-green-soft); }
.next-alt a { color: var(--paper); font-weight: 600; }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-content: start; padding: clamp(24px, 4vw, 48px); background: var(--paper-2); }
.demo label { display: grid; gap: 6px; font-weight: 500; }
.demo label i { font-style: normal; color: var(--crema); }
.demo .wide { grid-column: 1 / -1; }
.demo input, .demo select {
  min-height: 50px; width: 100%; padding: 0 14px; border-radius: 12px; border: 2px solid #DDD2BF;
  background: #FFFDF8; color: var(--ink); font: 400 1rem var(--body);
}
.demo input[dir="ltr"] { text-align: start; }
html[dir="rtl"] .demo input[dir="ltr"] { text-align: right; }
.demo input:focus, .demo select:focus { outline: none; border-color: var(--roast); }
.form-error { color: #A3361B; font-weight: 500; }
.form-note { color: var(--ink-soft); font-size: .92rem; margin-top: -6px; }
.btn-roast { background: var(--roast); color: var(--paper); margin-top: 6px; }
.btn-roast:hover { background: var(--deep); }

/* --- the download page --------------------------------------------------------- */
.download.page { min-height: calc(100vh - 72px - 112px); }
.dl-noacct { margin-top: 28px; color: var(--on-green-soft); }
.dl-noacct a { color: var(--paper); font-weight: 600; }
.foot a { color: var(--on-green-soft); }
.foot a:hover { color: var(--paper); }

.wa-float {
  position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 30;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* --- English reads left to right with Latin-first fonts --------------------------- */
html[lang="en"] { --body: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
html[lang="en"] body { line-height: 1.7; }

/* --- smaller screens ---------------------------------------------------------------- */
@media (max-width: 960px) {
  .links { display: none; }
  .hero-in, .pillar, .faq-in, .request { grid-template-columns: 1fr; }
  .pillar.flip .pillar-copy { order: 0; }
  .grow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-steps li::after { display: none; }

  .printer { width: min(300px, 86%); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .bar-in { gap: 12px; min-height: 64px; }
  .brand img { width: 32px; height: auto; }
  .demo-link.btn-sm { display: none; }
  .grow-grid, .dl-grid, .pains { grid-template-columns: 1fr; gap: 20px; }
  .pains li { padding: 22px; }
  .dl { padding: 24px; }
  .actions .btn { flex: 1 1 100%; }
  .foot-in p:last-child { margin-inline-start: 0; }
  .start-steps, .demo { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticket, .stamp, .chip { animation: none; }
}
