/* The sales page. Same type and colours as the app: Rubik for Arabic and Latin, denim and thread orange on cotton,
   semibold sentence-case headings, tabular figures, shadows tinted with ink. It moves the way the shop does (see the
   app's docs/DESIGN.md, "Motion"): an entrance, blocks rising into view once, things answering the pointer, and a
   few fun moments. motion.js adds the `motion` class; without it, or with "reduce motion" on, everything just shows. */
@font-face { font-family: Rubik; src: url(/assets/assets/fonts/Rubik.ttf) format('truetype'); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #1B2A4E; --accent: #2B4C8C; --accent2: #EE7B30; --text: #18202E; --muted: #5A6170; --line: #E2DED4; --soft: #EFECE5; --page: #F7F5F0; --card: #fff;
  --on-ink: #fff; --good: #01ab31; --sale: #ff3333;
  --shade: 24 32 46; --shade-a: .35;
  --radius: 20px; --font: Rubik, system-ui, -apple-system, 'Segoe UI', Roboto, Tahoma, sans-serif;

  /* Motion, the same tokens as the app's Tk: a calm curve, an arriving curve, and a pop that runs a little past. */
  --calm: cubic-bezier(.2, 0, 0, 1); --enter: cubic-bezier(.05, .7, .1, 1); --pop: cubic-bezier(.34, 1.56, .64, 1);
  --hover: 200ms; --reveal: 600ms; --stagger: 60ms; --rise: 24px;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #EEF2FA; --accent: #8EAEF0; --accent2: #FF9F5A; --text: #EEF2FA; --muted: #9AA5BA; --line: #2A3448; --soft: #1E2737; --page: #0D121C; --card: #151C2A; --on-ink: #0D121C; --shade: 0 0 0; --shade-a: .6; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.bar { background: var(--ink); color: var(--on-ink); text-align: center; font-size: 14px; padding: 9px 16px; }
.bar a { font-weight: 500; }

.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 24px; text-decoration: none; letter-spacing: -.03em; }
.brand small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.mark { width: 34px; height: 34px; flex: none; align-self: center; }
.nav nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav nav a, footer nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav nav a:hover, footer nav a:hover { color: var(--ink); }

/* Links draw their underline from the start edge. */
.nav nav a, footer nav a { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px; padding-bottom: 2px; transition: background-size 280ms var(--calm), color var(--hover) var(--calm); }
[dir=rtl] .nav nav a, [dir=rtl] footer nav a { background-position: 100% 100%; }
.nav nav a:hover, footer nav a:hover, .nav nav a:focus-visible, footer nav a:focus-visible { background-size: 100% 1.5px; }

/* One button shape: it rises under the pointer, squishes when pressed and springs back. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; font: 500 16px var(--font); text-decoration: none; border: 1px solid var(--ink); transition: transform 420ms var(--pop), translate 260ms var(--calm), box-shadow var(--hover) var(--calm), background-color var(--hover) var(--calm); translate: var(--mx, 0) var(--my, 0); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgb(var(--shade) / .45); }
.btn:active { transform: scale(.95); transition-duration: 90ms, 260ms, 90ms, 90ms; transition-timing-function: var(--calm); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent2) 70%, transparent); outline-offset: 3px; }
.btn-dark { background: var(--accent); color: var(--on-ink); border-color: var(--accent); }
.btn-light { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-block { width: 100%; }

.hero { padding: 72px 0 40px; text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 500; letter-spacing: .02em; }
h1, h2, h3 { color: var(--ink); line-height: 1.08; margin: 0; letter-spacing: -.025em; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(40px, 6.6vw, 74px); letter-spacing: -.035em; line-height: 1.04; max-width: 17ch; margin-inline: auto; }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: 23px; letter-spacing: -.015em; }
:root[lang=ar] :is(h1, h2, h3) { line-height: 1.3; letter-spacing: 0; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 640px; margin: 22px auto 30px; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* A picture in its frame: continuous corners, a hairline and a shadow tinted with ink. */
.frame { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); box-shadow: 0 2px 6px rgb(var(--shade) / .06), 0 30px 80px -30px rgb(var(--shade) / var(--shade-a)); }
.frame img { width: 100%; transition: transform 520ms var(--calm); }
.hero .frame { margin: 52px auto 0; max-width: 1200px; }
@media (hover: hover) and (pointer: fine) {
  .frame:hover img, .row:hover .frame img { transform: scale(1.04); }
}

/* The figures, in tabular digits so they do not jump as they roll up. */
.facts { list-style: none; margin: 0; padding: 26px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-block: 1px solid var(--line); }
.facts li { text-align: center; color: var(--muted); font-size: 15px; }
.facts b { display: block; font-size: 42px; line-height: 1.1; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

section { padding: 88px 0 0; }
.head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.head p { color: var(--muted); margin: 14px 0 0; }

/* The house's orange stitch line, sewn in under a heading as it comes into view. */
.stitch { display: block; width: 76px; height: 2px; margin: 18px auto 0; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--accent2) 0 9px, transparent 9px 15px); }

.row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; margin-bottom: 72px; }
.row:nth-of-type(even) > :first-child { order: 2; }
.row ul { padding: 0; margin: 18px 0 0; list-style: none; }
.row li { position: relative; padding-inline-start: 30px; margin: 10px 0; }
.row li::before { content: ''; position: absolute; inset-inline-start: 0; top: .55em; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); -webkit-mask: radial-gradient(circle, #000 35%, transparent 37%); mask: radial-gradient(circle, #000 35%, transparent 37%); }
.kicker { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 10px; }
:root[lang=ar] .kicker { letter-spacing: 0; font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.pair .phone { width: 150px; border-radius: 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px rgb(var(--shade) / .04); transition: transform 320ms var(--calm), box-shadow 320ms var(--calm); }
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgb(var(--shade) / .06), 0 26px 50px -18px rgb(var(--shade) / var(--shade-a)); }
.card.tilting { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-4px); transition-duration: 120ms, 320ms; }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 280ms var(--calm); background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / .16), transparent 60%); }
.card.tilting::after { opacity: 1; }
.card p { margin: 0; color: var(--muted); }
.card.dark { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.card.dark h3, .card.dark .price { color: var(--on-ink); }
.card.dark p, .card.dark li { color: color-mix(in srgb, var(--on-ink) 75%, transparent); }
.card.dark .btn-dark { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.card .btn { margin-top: auto; }

.tech { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tech div { background: var(--soft); border-radius: var(--radius); padding: 24px; transition: transform 320ms var(--calm); }
.tech div:hover { transform: translateY(-3px); }
.tech b { display: block; color: var(--ink); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.tech span { color: var(--muted); font-size: 15px; }

.price { font-size: 44px; font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price s { font-size: 22px; color: var(--muted); font-weight: 500; margin-inline-start: 8px; }
.price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.tag { align-self: flex-start; font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--sale) 14%, transparent); color: var(--sale); }
.tag.plain { background: var(--soft); color: var(--ink); }
.card.dark .tag.plain { background: color-mix(in srgb, var(--on-ink) 16%, transparent); color: var(--on-ink); }
.card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.card li { padding-inline-start: 26px; position: relative; }
.card li::before { content: '✓'; position: absolute; inset-inline-start: 0; font-weight: 600; color: var(--good); }
.small { color: var(--muted); font-size: 14px; text-align: center; margin: 22px auto 0; max-width: 720px; }

.know { background: var(--soft); border-radius: calc(var(--radius) + 8px); padding: 40px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.know ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; }

.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 26px; line-height: 1; font-weight: 400; transition: rotate 420ms var(--pop); }
.faq details[open] summary::after { rotate: 45deg; }
.faq p { color: var(--muted); margin: 12px 0 0; }

.cta { margin: 96px 0 0; background: var(--ink); color: var(--on-ink); border-radius: calc(var(--radius) + 8px); padding: 56px 40px; text-align: center; }
.cta h2 { color: var(--on-ink); }
.cta p { color: color-mix(in srgb, var(--on-ink) 75%, transparent); margin: 14px auto 28px; max-width: 560px; }
.cta .btn-dark { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.cta .btn-light { color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 35%, transparent); }

footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* What is inside, sliding past. It pauses under the pointer; its button stops it. Without motion it is a still list. */
.ticker { position: relative; margin-top: 56px; padding: 14px 0; border-block: 1px solid var(--line); overflow: hidden; }
.ticker::before, .ticker::after { content: ''; position: absolute; inset-block: 0; width: 8%; z-index: 1; pointer-events: none; }
.ticker::before { inset-inline-start: 0; background: linear-gradient(to right, var(--page), transparent); }
.ticker::after { inset-inline-end: 0; background: linear-gradient(to left, var(--page), transparent); }
[dir=rtl] .ticker::before { background: linear-gradient(to left, var(--page), transparent); }
[dir=rtl] .ticker::after { background: linear-gradient(to right, var(--page), transparent); }
.track { display: flex; width: max-content; }
.track ul { display: flex; list-style: none; margin: 0; padding: 0; }
.track li { display: flex; align-items: center; gap: 22px; padding-inline-end: 22px; white-space: nowrap; font-weight: 500; color: var(--muted); }
.track li::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent2); box-shadow: inset 0 0 0 2.5px color-mix(in srgb, var(--accent2) 60%, var(--page)); }
:root:not(.motion) .track { width: auto; justify-content: center; }
:root:not(.motion) .track ul { flex-wrap: wrap; justify-content: center; row-gap: 6px; padding-inline: 16px; }
:root:not(.motion) .track ul[aria-hidden] { display: none; }
.ticker button { position: absolute; z-index: 2; box-shadow: 0 0 0 10px var(--page); inset-inline-end: 12px; top: 50%; translate: 0 -50%; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--page); color: var(--ink); font: 500 13px var(--font); cursor: pointer; }
.ticker button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent2) 70%, transparent); outline-offset: 2px; }

/* The secret on the logo: shirt buttons falling, and a line to say so. */
.rain { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }
.secret { position: fixed; z-index: 51; inset-inline: 0; bottom: 24px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 500; box-shadow: 0 16px 40px -16px rgb(var(--shade) / .6); }
.secret:not([hidden]) { animation: pop-in 420ms var(--pop) both; }
.smile { white-space: normal; }

/* ------------------------------------------------------------------ motion */

.motion .nav { animation: nav-in 600ms var(--enter) both; }
.motion .hero .eyebrow { animation: rise 600ms var(--enter) 60ms both; }
.motion .hero h1 .word { display: inline-block; animation: word 760ms var(--enter) both; animation-delay: calc(140ms + var(--i) * var(--stagger)); }
.motion .hero .lead { animation: rise 700ms var(--enter) 360ms both; }
.motion .hero .actions { animation: rise 700ms var(--enter) 440ms both; }
.motion .hero .note { animation: rise 700ms var(--enter) 520ms both; }
.motion .hero-shot { animation: unmask 1100ms var(--enter) 380ms both; }
.motion .hero-shot img { animation: settle 1200ms var(--enter) 380ms both; }
.motion .ticker .track { animation: slide 42s linear infinite; }
[dir=rtl].motion .ticker .track { animation-name: slide-rtl; }
.motion .ticker:hover .track, .motion .ticker.paused .track { animation-play-state: paused; }

/* Blocks rise once as they come into view, their parts a step apart; pictures are uncovered like a curtain. */
.motion [data-reveal] > * { opacity: 0; translate: 0 var(--rise); transition: opacity var(--reveal) var(--enter), translate var(--reveal) var(--enter), transform 320ms var(--calm), box-shadow 320ms var(--calm); transition-delay: calc(var(--i, 0) * var(--stagger) * 1.6), calc(var(--i, 0) * var(--stagger) * 1.6), 0s, 0s; }
.motion [data-reveal].in > * { opacity: 1; translate: none; }
.motion [data-reveal] [data-photo] { clip-path: inset(0 100% 0 0 round var(--radius)); transition: clip-path 950ms var(--enter) 120ms; }
[dir=rtl].motion [data-reveal] [data-photo] { clip-path: inset(0 0 0 100% round var(--radius)); }
.motion [data-reveal].in [data-photo] { clip-path: inset(0 0 0 0 round var(--radius)); }
.motion [data-reveal] [data-photo] img { scale: 1.06; transition: scale 1100ms var(--enter) 120ms, transform 520ms var(--calm); }
.motion [data-reveal].in [data-photo] img { scale: 1; }
.motion [data-reveal] .stitch { clip-path: inset(0 100% 0 0); transition: clip-path 900ms var(--calm) 300ms, opacity var(--reveal) var(--enter), translate var(--reveal) var(--enter); }
[dir=rtl].motion [data-reveal] .stitch { clip-path: inset(0 0 0 100%); }
.motion [data-reveal].in .stitch { clip-path: inset(0); }
.motion .faq details[open] p { animation: rise 420ms var(--enter) both; }

/* The logo gives a little shake under the pointer, and presses in like a button when clicked. */
@media (hover: hover) and (pointer: fine) {
  .motion .brand:hover .mark { animation: wiggle 520ms var(--calm); }
}
.motion .brand.pressed .mark { animation: press 520ms var(--calm); }

@keyframes nav-in { from { transform: translateY(-100%); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise)); } }
@keyframes word { from { opacity: 0; transform: translateY(.45em); } }
@keyframes unmask { from { clip-path: inset(14% 8% 0 8% round var(--radius)); opacity: 0; } }
@keyframes settle { from { transform: scale(1.06); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes slide-rtl { to { transform: translateX(50%); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.9); } }
@keyframes wiggle { 20% { rotate: -12deg; } 45% { rotate: 9deg; } 70% { rotate: -4deg; } 100% { rotate: 0deg; } }
@keyframes press { 25% { scale: .82; } 60% { scale: 1.08; } 100% { scale: 1; } }

/* Moving between the English and Arabic pages, the page cross-fades instead of flashing. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* Continuous corners where the browser draws them. */
@supports (corner-shape: squircle) {
  .frame, .card, .tech div, .know, .cta { corner-shape: superellipse(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}

@media (max-width: 860px) {
  :root { --stagger: 40ms; --rise: 16px; }
  .nav nav { display: none; }
  .nav .btn { margin-inline-start: auto; min-height: 42px; padding: 0 18px; font-size: 15px; }
  .hero { padding-top: 48px; }
  .facts { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  section { padding-top: 64px; }
  .row { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  .row:nth-of-type(even) > :first-child { order: 0; }
  .tech { grid-template-columns: 1fr; }
  .know { grid-template-columns: 1fr; padding: 28px 22px; gap: 20px; }
  .cta { padding: 40px 22px; }
  .pair .phone { width: 110px; }
  .ticker { margin-top: 40px; }
  .ticker button { inset-inline-end: 8px; min-height: 28px; padding: 0 10px; font-size: 12px; }
}
