/*
 * Retavera: "One motif" (design-taste-frontend, seed 244305695). The one shape is the circle around a shop the rep
 * visits. It is the hero's giant cropped disc, every picture's mask, the button's ends, the route's stops, the coupon's
 * notches, the footer's mark and the background's drifting discs.
 * Blush and aubergine alternate as whole fields and serve as each other's text; no third colour. One face (Chillax),
 * five sizes. No rules, gradients or shadows: space and a change of ground separate things.
 * The product screens (data-ui) follow the app style "Accent ladder": the full hue only on small marks, its pale tints
 * on areas.
 */
:root {
    --bg: #edccbe;
    --surface: #e8c2b2;
    --ink: #351a2b;
    --muted: #6c4857;
    --plum: #4d2a3e;

    --ui-ground: #fbf6f7;
    --ui-sheet: #ffffff;
    --ui-tint: #f3e6eb;
    --ui-tint-2: #e8d0da;
    --ui-rule: #efe3e8;

    --face: "Chillax", system-ui, -apple-system, "Segoe UI", sans-serif;
    --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
    --step-body: clamp(1.125rem, 1rem + 0.25vw, 1.1875rem);
    --step-lead: clamp(1.25rem, 1rem + 1vw, 1.875rem);
    --step-head: clamp(1.75rem, 1rem + 2vw, 2.75rem);
    --step-display: clamp(2.5rem, 0.8rem + 3.4vw, 3.75rem);

    --m: clamp(16px, 1.8vw, 28px);
    --gap: 12px;
    --sec: clamp(104px, 11vw, 192px);
    --ease: cubic-bezier(.22, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    color: var(--ink);
    font: 400 var(--step-body)/1.5 var(--face);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ol, ul, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
a:hover { text-underline-offset: .34em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
/* Parked above the page, not to one side: a side offset would scroll sideways on the right-to-left page. */
.skip { position: absolute; inset-inline-start: var(--m); top: -200px; background: var(--ink); color: var(--bg); padding: 12px 18px; z-index: 10; }
.skip:focus { top: var(--m); }
/* The background (assets/js/background.js): a fixed canvas under everything, in the ground's own tones. */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.has-bg .bg { opacity: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.h-head { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }

/* The button takes the motif's ends: a pill, one solid block of the colour that is not the ground. */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--bg); text-decoration: none;
    font-weight: 500; padding: 15px 28px; border-radius: 999px; white-space: nowrap;
    transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: var(--plum); }
.btn:active { transform: scale(.97); }
.btn--small { padding: 10px 20px; font-size: var(--step-small); }

/* ---------- hero: the card beside the circle ---------- */
.hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap);
    padding: var(--m); min-height: 100svh;
}
.hero__card {
    background: var(--surface); display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 0 clamp(24px, 3vw, 48px) 32px;
}
.stops { display: flex; justify-content: space-between; gap: 6px; height: 56px; align-items: center; align-self: stretch; overflow: hidden; }
.stops i { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.stops i:nth-child(even) { background: transparent; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-top: clamp(40px, 8vh, 96px); text-decoration: none; }
.brand__mark { width: 44px; height: 44px; fill: var(--ink); }
.brand__mark .dot { fill: var(--bg); }
.brand__name { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; }
.hero__title { margin-top: clamp(32px, 6vh, 64px); font-size: var(--step-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1; max-width: 12ch; }
.hero__lead { margin-top: 24px; max-width: 36ch; }
.hero__card .btn { margin-top: 32px; }
.hero__links { margin-top: auto; padding-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }

/* The language switcher: the current language's name at the card's end; its list opens as one ink block. */
.lang { align-self: flex-end; position: relative; z-index: 5; font-size: var(--step-small); font-weight: 500; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transition: transform .2s var(--ease); }
.lang details[open] summary::before { transform: scale(1.4); }
.lang ul { position: absolute; inset-inline-end: 0; top: 100%; min-width: 180px; padding: 8px 0; background: var(--ink); color: var(--bg); text-align: start; }
.lang ul a { display: flex; align-items: center; min-height: 44px; padding: 0 20px; text-decoration: none; }
.lang ul a:hover, .lang ul a[aria-current] { text-decoration: underline; }

.hero__stage { position: relative; background: var(--ink); overflow: hidden; min-height: 520px; }
.circle { position: absolute; width: 120vh; height: 120vh; border-radius: 50%; overflow: hidden; top: 50%; left: 18%; transform: translateY(-50%); }
.circle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.circle img.is-on { opacity: 1; animation: drift 12s var(--ease) both; }
@keyframes drift { from { transform: scale(1.08) translateX(-1.5%); } to { transform: none; } }
.hero__caption { position: absolute; inset-inline-start: 24px; bottom: 24px; max-width: 30ch; color: var(--bg); font-size: var(--step-body); line-height: 1.4; }

/* ---------- the rep's day: tiles that grow ---------- */
.day { position: relative; padding: var(--sec) var(--m) 0; }
.day__tiles { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 10px; align-items: end; }
.day__title { position: absolute; top: var(--sec); inset-inline-start: var(--m); max-width: 40%; }
.tile--1 { grid-column: 1 / 4; }
.tile--2 { grid-column: 4 / 7; }
.tile--3 { grid-column: 7 / 10; }
.tile--4 { grid-column: 10 / 13; }
.tile__fill { display: flex; align-items: flex-end; justify-content: center; overflow: hidden; padding: 20px 16px 0; }
.tile--1 .tile__fill { height: 34vh; min-height: 280px; background: var(--surface); }
.tile--2 .tile__fill { height: 44vh; min-height: 340px; background: var(--muted); }
.tile--3 .tile__fill { height: 54vh; min-height: 420px; background: var(--plum); }
.tile--4 .tile__fill { height: 64vh; min-height: 480px; background: var(--ink); }
.tile__name { margin-top: 18px; font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.015em; }
.tile__text { margin-top: 6px; max-width: 34ch; }

/* ---------- roles: the screen on the disc ---------- */
.roles { padding: var(--sec) var(--m) 0; }
.roles__title { margin-bottom: 40px; }
.roles__pick { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: 1fr repeat(6, auto) 1fr; column-gap: 16px; }
.roles__pick input { position: absolute; opacity: 0; pointer-events: none; }
.roles__pick label { grid-column: 1; justify-self: start; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; color: var(--muted); cursor: pointer; transition: color .2s; }
.roles__pick label:nth-of-type(1) { grid-row: 2; }
.roles__pick label:nth-of-type(2) { grid-row: 3; }
.roles__pick label:nth-of-type(3) { grid-row: 4; }
.roles__pick label:nth-of-type(4) { grid-row: 5; }
.roles__pick label:nth-of-type(5) { grid-row: 6; }
.roles__pick label:hover { color: var(--plum); }
.roles__pick input:checked + label { color: var(--ink); }
.roles__pick input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 4px; }
.roles__facts { grid-column: 1; grid-row: 7; display: grid; margin-top: 28px; max-width: 34ch; }
.fact { grid-area: 1 / 1; opacity: 0; transition: opacity .3s; }
.roles__screens { grid-column: 2; grid-row: 1 / -1; position: relative; height: min(72vh, 640px, 56vw); }
.roles__disc { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); background: var(--ink); transition: background .3s; }
.role { position: absolute; left: 50%; top: 50%; width: min(78%, 440px); transform: translate(-50%, -50%); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; display: grid; justify-items: center; }
#rol-1:checked ~ .roles__screens .role--1,
#rol-2:checked ~ .roles__screens .role--2,
#rol-3:checked ~ .roles__screens .role--3,
#rol-4:checked ~ .roles__screens .role--4,
#rol-5:checked ~ .roles__screens .role--5 { opacity: 1; visibility: visible; }
#rol-1:checked ~ .roles__facts .fact--1,
#rol-2:checked ~ .roles__facts .fact--2,
#rol-3:checked ~ .roles__facts .fact--3,
#rol-4:checked ~ .roles__facts .fact--4,
#rol-5:checked ~ .roles__facts .fact--5 { opacity: 1; }
.roles:has(#rol-2:checked) .roles__disc,
.roles:has(#rol-4:checked) .roles__disc { background: var(--muted); }
.roles:has(#rol-3:checked) .roles__disc,
.roles:has(#rol-5:checked) .roles__disc { background: var(--plum); }

/* ---------- field: one paragraph with the interface inside the words ---------- */
.field { padding: var(--sec) var(--m) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; }
.field__say { grid-column: 1 / 12; font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; max-width: 40ch; }
.slot {
    display: inline-flex; align-items: center; height: 1.2em; padding: 0 .55em; margin: 0 .1em; vertical-align: -0.16em;
    border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .62em; font-weight: 500; letter-spacing: 0; white-space: nowrap;
}
.field__more { grid-column: 7 / 13; margin-top: 72px; display: grid; gap: 24px; justify-items: start; max-width: 60ch; }

/* ---------- the coupon ---------- */
.coupon-wrap { padding: var(--sec) var(--m) 96px; }
.coupon {
    position: relative; overflow: hidden;
    margin: 0 auto; max-width: 1180px; min-height: 480px;
    display: grid; grid-template-columns: 46fr 54fr;
    background: var(--ink); color: var(--bg);
}
/* The notches are the motif again: two discs of the ground bitten out of the edges, joined by the perforation. */
.coupon::before, .coupon::after { content: ""; position: absolute; inset-inline-start: 46%; width: 56px; height: 56px; margin-inline-start: -28px; border-radius: 50%; background: var(--bg); }
.coupon::before { top: -28px; }
.coupon::after { bottom: -28px; }
.coupon__head { padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-inline-end: 5px dotted var(--bg); }
.coupon__title { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; max-width: 14ch; }
.coupon__fields { padding: 48px; display: grid; gap: 10px; align-content: center; }
.coupon__fields input { height: 54px; border: 0; border-radius: 999px; background: var(--plum); color: var(--bg); padding: 0 22px; font: inherit; }
.coupon__fields input::placeholder { color: #d6b3bf; opacity: 1; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.coupon__send { height: 56px; border: 0; border-radius: 999px; background: var(--bg); color: var(--ink); font: 500 var(--step-body) var(--face); cursor: pointer; margin-top: 6px; transition: transform .2s var(--ease); }
.coupon__send:hover { background: var(--surface); }
.coupon__send:active { transform: scale(.98); }

/* ---------- footer: the name and the promise, then the links ---------- */
.foot { position: relative; background: var(--ink); color: var(--bg); padding: clamp(72px, 8vw, 120px) var(--m) var(--m); }
.foot__top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; align-items: end; }
.foot__brand { grid-column: 1 / 7; display: inline-flex; align-items: center; gap: 16px; font-size: var(--step-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.foot__brand .brand__mark { width: 1em; height: 1em; fill: var(--bg); }
.foot__brand .brand__mark .dot { fill: var(--ink); }
.foot__say { grid-column: 9 / 13; font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; max-width: 24ch; }
.foot__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; margin-top: clamp(56px, 6vw, 96px); }
.foot__col { grid-column: span 3; display: grid; gap: 6px; align-content: start; justify-items: start; }
.foot__head { font-size: var(--step-body); font-weight: 600; margin-bottom: 4px; }
.foot__col a, .foot__contact a { text-decoration: none; }
.foot__col a:hover, .foot__contact a:hover { text-decoration: underline; }
.foot__contact { grid-column: 9 / 13; display: grid; gap: 6px; align-content: start; font-size: var(--step-lead); font-weight: 500; }
.foot__credits { margin-top: 56px; font-size: var(--step-small); max-width: 60ch; }
.foot__last { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--step-small); }
.foot .btn { background: var(--bg); color: var(--ink); }

/* ---------- product screens (data-ui): "Tint ladder" ---------- */
.ui { background: var(--ui-ground); color: var(--ink); font-size: var(--step-small); line-height: 1.35; text-align: start; width: 100%; max-width: 340px; }
.ui--wide { max-width: 440px; }
.ui__top { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: var(--ui-tint); }
.ui__top b { font-weight: 600; font-size: var(--step-body); }
.ui__top span { color: var(--muted); }
.ui__body { padding: 16px; display: grid; gap: 12px; background: var(--ui-sheet); }
.ui__big { font-size: var(--step-body); }
.ui__big b { font-size: var(--step-lead); font-weight: 600; }
.ui__track { height: 8px; border-radius: 999px; background: var(--ui-tint); overflow: hidden; }
.ui__track i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.ui__list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.ui__list li + li { margin-top: 2px; }
.ui__list em, .ui__lines em { font-style: normal; color: var(--muted); }
.ui__list li.is-on { background: var(--ui-tint); }
.ui__list li.is-done em { color: var(--ink); }
.ui__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.ui__lines li + li { border-top: 1px solid var(--ui-rule); } /* taste-skill-ignore: rows of a real order table */
.ui__lines b, .ui__row b { font-weight: 600; white-space: nowrap; }
.ui__row { display: flex; justify-content: space-between; gap: 12px; }
.ui__row--total { padding-top: 10px; border-top: 1px solid var(--ui-rule); font-weight: 500; } /* taste-skill-ignore: the order table's total */
.ui__note { color: var(--muted); }
.ui__badge { justify-self: start; background: var(--ui-tint-2); padding: 4px 12px; border-radius: 999px; font-weight: 500; }
.ui__btn { display: block; text-align: center; background: var(--ink); color: var(--ui-sheet); border-radius: 999px; padding: 11px 16px; font-weight: 500; }
.ui__geo { display: flex; align-items: center; gap: 16px; }
.ui__ring { flex: 0 0 76px; height: 76px; border-radius: 50%; background: var(--ui-tint-2); display: grid; place-items: center; }
.ui__ring i { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transform: translate(9px, -6px); }
.ui__alert { background: var(--ui-tint); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }

/* ---------- motion: entrances, feedback, the circle's slow crossfade ---------- */
.js [data-rise] { opacity: 0; transform: translateY(22px); }
.js [data-rise].is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.shown [data-rise] { opacity: 1; transform: none; }
.js .tile, .js .role .ui { transition: transform .9s var(--ease), opacity .9s var(--ease); }
.js .day:not(.is-in) .tile { transform: translateY(40px); opacity: 0; }
.js .day.is-in .tile:nth-child(2) { transition-delay: 90ms; }
.js .day.is-in .tile:nth-child(3) { transition-delay: 180ms; }
.js .day.is-in .tile:nth-child(4) { transition-delay: 270ms; }
.shown .day .tile { transform: none; opacity: 1; }

/* ---------- 1100px ---------- */
@media (max-width: 1100px) {
    .roles__pick { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
    .foot__contact { grid-column: 7 / 13; }
    .foot__say { grid-column: 7 / 13; }
    .day__tiles { row-gap: 40px; }
    .tile--1, .tile--3 { grid-column: 1 / 7; }
    .tile--2, .tile--4 { grid-column: 7 / 13; }
}

/* ---------- 760px: one column, the circle first ---------- */
@media (max-width: 760px) {
    .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    /* On a phone the stage shows the bottom of the circle; the caption sits on the dark ground below its edge. */
    .hero__stage { order: -1; min-height: 0; padding-top: 92vw; }
    .circle { width: 150vw; height: 150vw; left: -5%; top: -58vw; transform: none; }
    .hero__caption { position: static; padding: 20px 20px 48px; }
    .hero__card { margin-top: -24px; position: relative; padding-bottom: 28px; }
    .stops { height: 40px; }
    .stops i { flex-basis: 16px; height: 16px; }
    .stops i:nth-child(n + 13) { display: none; }
    .brand { margin-top: 28px; }
    .hero__title { font-size: 9vw; }
    .day__title { position: static; max-width: none; margin-bottom: 28px; font-size: 8vw; }
    .day__tiles { grid-template-columns: 1fr; row-gap: 28px; }
    .tile--1, .tile--2, .tile--3, .tile--4 { grid-column: 1; }
    .tile--1 .tile__fill { height: auto; min-height: 0; padding-top: 24px; }
    .tile--2 .tile__fill, .tile--3 .tile__fill, .tile--4 .tile__fill { height: auto; min-height: 0; padding-top: 32px; }
    .roles__title { font-size: 8vw; margin-bottom: 24px; }
    .roles__pick { display: flex; flex-wrap: wrap; gap: 6px 20px; }
    .roles { overflow: clip; }
    .roles__screens { order: -1; flex: 1 1 100%; height: 118vw; margin-bottom: 20px; }
    .roles__pick label { font-size: var(--step-lead); }
    .roles__facts { flex: 1 1 100%; margin-top: 16px; }
    .role { width: 82%; }
    .field { grid-template-columns: 1fr; }
    .field__say, .field__more { grid-column: 1; }
    .field__say { font-size: 21px; }
    .coupon-wrap { padding: 96px var(--m); }
    .coupon { grid-template-columns: 1fr; min-height: 0; }
    .coupon::before, .coupon::after { inset-inline-start: auto; top: var(--cut, 50%); margin: -28px 0 0; }
    .coupon::before { left: -28px; }
    .coupon::after { right: -28px; bottom: auto; }
    .coupon__head { padding: 32px 24px 40px; border-inline-end: 0; border-bottom: 5px dotted var(--bg); }
    .coupon__fields { padding: 32px 24px; }
    .foot__top { grid-template-columns: 1fr; row-gap: 20px; }
    .foot__brand, .foot__say { grid-column: 1; }
    .foot__grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
    .foot__col { grid-column: span 1; }
    .foot__contact { grid-column: 1 / 3; }
}

/* Right to left (ar): the grids mirror by themselves and the rest uses logical properties. Arabic letters join: no tracking on any text. */
html[lang="ar"] body * { letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js [data-rise], .js .day .tile { opacity: 1 !important; transform: none !important; }
}

/* ---------- 404: the dot outside its circle ---------- */
.lost { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--m); padding: var(--m); }
.lost__disc { position: relative; justify-self: center; width: min(70vh, 40vw); aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.lost__disc i { position: absolute; right: -14%; top: -6%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--muted); }
.lost__text { display: grid; gap: 24px; justify-items: start; max-width: 30ch; }
@media (max-width: 760px) {
    .lost { grid-template-columns: minmax(0, 1fr); align-content: center; }
    .lost__disc { width: 62vw; }
}
