/* Gromla's website: the downloads. A receipt counter: the shop's printer prints the receipt of what is offered, and
   each version is a ticket torn off for it. Brand colours from the logo: the navy of its board, the coral of its sign. */
:root {
  --night: #120E24;
  --navy: #1B1440;
  --plum: #2B1E5E;
  --line: rgba(239, 235, 250, .14);
  --ink: #EFEBFA;
  --soft: #B3AACD;
  --coral: #FF6B57;
  --coral-deep: #E2503C;
  --mint: #34E2C6;
  --paper: #F4F2FA;
  --thermal: #231B4D;
  --thermal-soft: #6F6893;
  --display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --text: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 400 17px/1.75 var(--text);
  background:
    radial-gradient(70vw 50vh at 100% 0%, rgba(255, 107, 87, .16), transparent 70%),
    radial-gradient(60vw 50vh at 0% 30%, rgba(52, 226, 198, .07), transparent 70%),
    linear-gradient(180deg, var(--navy), var(--night) 70vh);
  background-repeat: no-repeat;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

/* ---- the bar on top */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1140px; margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--display); }
.brand .mark { width: 40px; height: 37px; }
.snd { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(239, 235, 250, .06); color: var(--ink); font: 500 15px/1 var(--text); cursor: pointer; }
.snd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.snd svg path:first-child { fill: currentColor; stroke: none; }
.snd .snd-off { display: none; }
.snd[aria-pressed="false"] { color: var(--soft); }
.snd[aria-pressed="false"] .snd-on { display: none; }
.snd[aria-pressed="false"] .snd-off { display: block; }
/* the language: a menu of three (lang.js); the page stays hidden while its words change (on.js) */
.xl body { visibility: hidden; }
.top-end { display: inline-flex; align-items: center; gap: 10px; }
.langs { position: relative; border: 0; padding: 0; }
.langs summary { gap: 7px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(239, 235, 250, .06);
  color: var(--ink); font: 500 15px/1 var(--text); justify-content: center; }
.langs summary::after { content: none; }
.langs summary svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.langs[open] summary { background: rgba(239, 235, 250, .12); }
.langs-menu { position: absolute; z-index: 20; top: calc(100% + 8px); inset-inline-end: 0; display: grid; gap: 2px; min-width: 156px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--plum); box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .8); }
.langs-menu a { display: block; padding: 11px 14px; border-radius: 9px; text-decoration: none; font: 500 15.5px/1.2 var(--text); }
.langs-menu a[aria-current="true"] { background: rgba(239, 235, 250, .12); }
@media (hover: hover) { .langs-menu a:hover { background: rgba(239, 235, 250, .08); } }
@media (max-width: 440px) { .snd-word { display: none; } .snd { padding: 0 12px; } .top-end { gap: 8px; } }

main { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---- the hero: what it is, and the printer */
.hero { display: grid; gap: 30px; padding: 36px 0 10px; }
h1 { margin: 0; font: 700 clamp(46px, 12vw, 92px)/1.05 var(--display); letter-spacing: 0; }
.say { margin: 18px 0 0; max-width: 32em; font-size: 18px; color: var(--ink); }
.free { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.free b { flex: 0 0 auto; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--coral); color: #fff;
  font: 700 22px/1 var(--display); transform: rotate(-8deg); }

/* the shop's printer, and the receipt it prints */
.printer { position: relative; width: min(300px, 82vw); margin: 0 auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.printer .body { position: relative; z-index: 2; height: 58px; border-radius: 16px 16px 10px 10px; background: linear-gradient(180deg, #3A2A78, var(--plum));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 26px -16px rgba(0, 0, 0, .8); }
.printer .slot { position: absolute; left: 18px; right: 18px; bottom: 12px; height: 7px; border-radius: 4px; background: #0B0818; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .7); }
.printer .led { position: absolute; top: 14px; inset-inline-end: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); opacity: .45; }
.printer.busy .led { animation: blink .35s steps(2, jump-none) infinite; opacity: 1; }
/* the paper leaves the slot: drawn from under it, its top first */
.feed { position: relative; z-index: 1; margin: -15px 24px 0; padding-bottom: 14px; }
.paper { position: relative; padding: 26px 20px 18px; background: var(--paper); color: var(--thermal); transform-origin: 50% 0;
  box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .75); }
/* its torn edge */
.paper::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background: linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 12px 10px repeat-x, linear-gradient(-135deg, var(--paper) 50%, transparent 50%) 0 0 / 12px 10px repeat-x; }
.rc { font: 500 14px/1.6 var(--text); }
.rc-head { text-align: center; font: 700 26px/1.1 var(--display); }
.rc-sub { text-align: center; color: var(--thermal-soft); font-size: 13px; margin-top: 4px; }
.rc-date { text-align: center; color: var(--thermal-soft); font-size: 12.5px; letter-spacing: .04em; }
.rc-cut { height: 0; margin: 12px 0; border-top: 2px dashed rgba(35, 27, 77, .28); }
.rc-row { display: flex; align-items: baseline; gap: 6px; margin: 6px 0; }
.rc-row i { flex: 1; min-width: 12px; border-bottom: 2px dotted rgba(35, 27, 77, .32); transform: translateY(-4px); }
.rc-row b { font: 700 14px/1 var(--display); }
.rc-total { font-weight: 600; }
.rc-total b { color: var(--coral-deep); }
.rc-bars { height: 38px; margin: 16px 8px 8px;
  background: repeating-linear-gradient(90deg, var(--thermal) 0 2px, transparent 2px 4px, var(--thermal) 4px 5px, transparent 5px 8px, var(--thermal) 8px 11px, transparent 11px 12px, var(--thermal) 12px 13px, transparent 13px 17px); }
.rc-thanks { text-align: center; font-size: 13px; color: var(--thermal-soft); }
.tap { margin: 14px 0 0; text-align: center; color: var(--soft); font-size: 13.5px; }

/* printing: the paper comes out step by step, as a thermal printer feeds it, then it is torn off and hangs */
.js .paper { clip-path: inset(0 0 100% 0); }
.js .printer.printed .paper, .js .printer.still .paper { clip-path: inset(0 0 -20px 0); }
.printer.printing .paper { animation: feed 2.3s steps(23, jump-end) forwards; }
.printer.torn .paper { animation: hang .7s var(--ease) forwards, sway 5s ease-in-out .7s infinite alternate; }

/* ---- the tickets: one version each, torn off the same roll */
.tickets { display: grid; gap: 26px; padding: 34px 0 10px; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); }
/* the perforation it was torn along: holes cut in its top edge, the page seen through them */
.ticket { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 22px 20px; border-radius: 4px 4px 14px 14px;
  background: var(--paper); color: var(--thermal);
  -webkit-mask: radial-gradient(circle 5px at 8px 0, transparent 97%, #000) 0 0 / 16px 100% repeat-x;
  mask: radial-gradient(circle 5px at 8px 0, transparent 97%, #000) 0 0 / 16px 100% repeat-x; }
.t-head { display: flex; align-items: center; gap: 12px; }
.t-ic { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: var(--ink); }
.t-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.t-name { flex: 1; min-width: 0; }
.t-name h2 { margin: 0; font: 700 20px/1.25 var(--display); }
.t-name span { display: block; color: var(--thermal-soft); font-size: 13.5px; line-height: 1.4; }
.pill { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; font: 600 12.5px/1.2 var(--text); white-space: nowrap; }
.pill.on { background: #D7F7F0; color: #0B5C4F; }
.pill.both { background: #E8E4F7; color: var(--thermal); }
.pill.off { background: #FFE3DE; color: #8F2A1C; }
.ticket p { margin: 0; font-size: 15.5px; line-height: 1.75; color: #3B3463; }
.ticket .ios { color: #8F2A1C; font-weight: 600; }
.get { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; margin-top: 4px; padding: 0 22px; border-radius: 12px;
  background: var(--navy); color: #fff; font: 700 18px/1 var(--display); text-decoration: none; transition: transform .16s var(--ease), background-color .2s; }
.get svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.get:active { transform: scale(.97); }
@media (hover: hover) { .get:hover { transform: translateY(-2px); } }
/* the version this device came for: the coral of the sign along its edge, and on its button */
.ticket.first { background: linear-gradient(var(--coral), var(--coral)) 0 0 / 100% 7px no-repeat, var(--paper); }
.ticket.first .get { background: var(--coral); }
.ticket.first .get:active { background: var(--coral-deep); }
.meta { min-height: 1.4em; color: var(--thermal-soft); font-size: 13.5px; text-align: center; }
.scan { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px dashed rgba(35, 27, 77, .28); border-radius: 10px; }
.scan[hidden] { display: none; }
.scan #qr-code { flex: 0 0 auto; width: 92px; height: 92px; }
.scan #qr-code svg { display: block; width: 100%; height: 100%; }
.scan small { color: var(--thermal-soft); font-size: 14px; }
details { border-top: 2px dashed rgba(35, 27, 77, .2); padding-top: 10px; }
summary { cursor: pointer; font: 600 15px/1.6 var(--text); color: var(--thermal); list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 500 22px/1 var(--display); color: var(--thermal-soft); transition: transform .2s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details ol { margin: 6px 0 4px; padding: 0; padding-inline-start: 1.2em; font-size: 15px; line-height: 1.85; color: #3B3463; }
/* the stamp a ticket gets when its download starts */
.stamp { position: absolute; top: 64px; inset-inline-end: 18px; padding: 6px 12px; border: 3px solid #0B8F7A; border-radius: 8px; color: #0B8F7A;
  font: 700 16px/1 var(--display); opacity: 0; transform: rotate(-9deg) scale(1.6); pointer-events: none; background: rgba(244, 242, 250, .92); }
.ticket.stamped .stamp { animation: stamp .45s var(--ease) forwards; }
/* they come in once the receipt has started */
.js .ticket { opacity: 0; transform: translateY(18px); }
.js .ticket.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }

/* ---- how it looks: the same shop on the phone and on the computer. A key of the counter for each page: the phone
   draws it first, from the top down as the receipt prints, and it goes over to the computer in the same moment. */
.show { padding: 56px 0 10px; }
.show h2 { margin: 0; font: 700 clamp(28px, 6vw, 40px)/1.2 var(--display); }
.show-say { margin: 8px 0 0; max-width: 34em; color: var(--soft); }
.show-body { display: grid; grid-template-areas: "keys" "cap" "stage"; margin-top: 26px; }
.keys { grid-area: keys; justify-self: center; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 620px; padding-bottom: 6px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 10px 6px 9px; border: 0; border-radius: 12px;
  background: var(--paper); color: var(--thermal); font: 600 14px/1.25 var(--text); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 5px 0 #9D94C4, 0 12px 18px -10px rgba(0, 0, 0, .7); transition: transform .09s var(--ease), box-shadow .09s var(--ease), background-color .2s, color .2s; }
.key svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* the key down: the page shown */
.key[aria-selected="true"] { background: var(--coral); color: #fff; transform: translateY(3px); box-shadow: 0 2px 0 var(--coral-deep), 0 6px 12px -8px rgba(0, 0, 0, .7); }
.key:active { transform: translateY(5px); box-shadow: 0 0 0 #9D94C4, 0 2px 6px -4px rgba(0, 0, 0, .7); }
@media (hover: hover) { .key:not([aria-selected="true"]):hover { background: #fff; } }
.cap { grid-area: cap; justify-self: center; max-width: 34em; min-height: 3.5em; margin: 16px 0 0; text-align: center; font-size: 16px; line-height: 1.75; }
.stage { grid-area: stage; display: flex; flex-direction: column; align-items: center; margin-top: 16px; }

/* the screens: dark glass until a page is drawn on them */
.screen { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(120% 80% at 30% 10%, #1D1640, #07060F 70%); }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; }
.screen img.on { opacity: 1; }
.screen img.front { z-index: 1; }
.screen img.wipe { animation: wipe .42s var(--ease) both; }
.screen::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 34%); }
html:not(.js) .screen img[data-k="home"] { opacity: 1; }

/* the phone */
.phone { position: relative; width: min(250px, 66vw); padding: 9px; border-radius: 42px; background: linear-gradient(150deg, #3A2E6E, #16112E 38%, #0E0B1F);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 0 0 3px rgba(0, 0, 0, .35), 0 34px 60px -32px rgba(0, 0, 0, .95); }
.phone::before, .phone::after { content: ''; position: absolute; right: -3px; width: 3px; border-radius: 0 2px 2px 0; background: #2C2356; }
.phone::before { top: 20%; height: 10%; }
.phone::after { top: 33%; height: 6%; }
.phone .screen { aspect-ratio: 390 / 844; border-radius: 33px; }
.cam { position: absolute; z-index: 3; top: 2%; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #05040B; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .07); }

/* between them: the page going over */
.link { position: relative; flex: 0 0 auto; width: 2px; height: 66px; margin: 6px 0;
  background: radial-gradient(circle, rgba(179, 170, 205, .75) 1px, transparent 1.6px) 0 0 / 2px 8px repeat-y; }
.link small { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); white-space: nowrap; color: var(--soft); font-size: 13px; line-height: 1.3; }
.pulse { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--coral); opacity: 0;
  box-shadow: 0 0 0 4px rgba(255, 107, 87, .2), 0 0 16px rgba(255, 107, 87, .85); }
.link.go .pulse { animation: down .5s cubic-bezier(.5, 0, .3, 1) both; }

/* the computer */
.monitor { width: 100%; max-width: 760px; }
.bezel { position: relative; padding: 2.2% 2.2% 4.6%; border-radius: 16px; background: linear-gradient(180deg, #2A2154, #120E26 30%, #0E0B1F);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 34px 60px -32px rgba(0, 0, 0, .95); }
.bezel::after { content: ''; position: absolute; bottom: 1.7%; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mint); opacity: .8;
  box-shadow: 0 0 8px rgba(52, 226, 198, .6); }
.monitor .screen { aspect-ratio: 16 / 10; border-radius: 5px; }
.neck { display: block; width: 16%; height: 44px; margin: 0 auto; background: linear-gradient(90deg, #16112E, #2E2560 50%, #16112E); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.base { display: block; width: 34%; height: 11px; margin: 0 auto; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #33296A, #16112E);
  box-shadow: 0 16px 24px -14px rgba(0, 0, 0, .9); }

/* ---- online or offline */
.compare { padding: 40px 0 10px; }
.compare h2 { margin: 0; font: 700 clamp(28px, 6vw, 40px)/1.2 var(--display); }
.compare > p { margin: 8px 0 22px; color: var(--soft); }
.cmp { border-top: 1px solid var(--line); }
.cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.6; }
.cmp-row > span:first-child { grid-column: 1 / -1; color: var(--soft); font-size: 14px; }
.cmp-cols { padding: 10px 0; }
.cmp-cols > span:first-child { display: none; }
.cmp-cols b { font: 700 16px/1.4 var(--display); display: inline-flex; align-items: center; gap: 8px; }
.cmp-cols b::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.c-on::before { background: var(--mint); box-shadow: 0 0 0 4px rgba(52, 226, 198, .18); }
.c-off::before { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 107, 87, .18); }

.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; max-width: 1140px; margin: 44px auto 0; padding: 26px 22px max(30px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--soft); font-size: 14.5px; }
.foot a { color: var(--soft); }

/* ---- a computer's window */
@media (min-width: 760px) {
  .tickets { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .cmp-row { grid-template-columns: 1.1fr 1.4fr 1.4fr; }
  .cmp-row > span:first-child { grid-column: auto; font-size: 15px; }
  .cmp-cols > span:first-child { display: block; }
  /* the phone beside the computer, the keys under them as on the counter */
  .show-body { grid-template-areas: "stage" "keys" "cap"; margin-top: 34px; }
  .stage { display: grid; grid-template-columns: 200px 76px minmax(0, 1fr); align-items: end; margin: 0 0 34px; }
  .phone { width: 200px; }
  .phone .screen { border-radius: 27px; }
  .link { align-self: center; width: auto; height: 2px; margin: 0 8px;
    background: radial-gradient(circle, rgba(179, 170, 205, .75) 1px, transparent 1.6px) 0 0 / 8px 2px repeat-x; }
  .link small { top: 14px; left: 0; right: 0; transform: none; white-space: normal; text-align: center; font-size: 12.5px; }
  .pulse { top: 50%; left: auto; right: -5px; margin: -5px 0 0; }
  .link.go .pulse { animation-name: across; }
  /* in French and English the phone stands on the left: the page goes over from left to right */
  [dir="ltr"] .pulse { right: auto; left: -5px; }
  [dir="ltr"] .link.go .pulse { animation-name: across-ltr; }
  .monitor { max-width: none; }
}
@media (min-width: 980px) {
  .hero { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; padding-top: 56px; }
  .printer { width: 320px; }
  .stage { grid-template-columns: 250px 100px minmax(0, 1fr); }
  .phone { width: 250px; }
  .phone .screen { border-radius: 33px; }
}

@keyframes feed { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20px 0); } }
@keyframes hang { 0% { transform: none; } 45% { transform: translateY(6px) rotate(-2.4deg); } 100% { transform: translateY(4px) rotate(-1.4deg); } }
@keyframes sway { from { transform: translateY(4px) rotate(-1.4deg); } to { transform: translateY(4px) rotate(-.5deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-9deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-9deg) scale(.94); } 100% { opacity: 1; transform: rotate(-9deg) scale(1); } }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes down { 0% { top: -5px; opacity: 0; } 18%, 82% { opacity: 1; } 100% { top: calc(100% - 5px); opacity: 0; } }
@keyframes across { 0% { right: -5px; opacity: 0; } 18%, 82% { opacity: 1; } 100% { right: calc(100% - 5px); opacity: 0; } }
@keyframes across-ltr { 0% { left: -5px; opacity: 0; } 18%, 82% { opacity: 1; } 100% { left: calc(100% - 5px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .js .paper { clip-path: none; }
  .printer.printing .paper, .printer.torn .paper { animation: none; }
  .printer.busy .led { animation: none; }
  .js .ticket { opacity: 1; transform: none; }
  .ticket.stamped .stamp { animation: none; opacity: 1; transform: rotate(-9deg); }
  .get, summary::after, .key { transition: none; }
  .screen img.wipe, .link.go .pulse { animation: none; }
}
