/* Colours measured on the design image (image 21), homepage only: the red, navy and muted greys of the design.
   The site's own tokens in style.css are not changed. */
:root{
  --home-red:#d0243a;         /* the logo's red: buttons, sign-in, the red word, the eyebrow line, every icon */
  --home-red-deep:#b01e31;    /* hover: the site's own deeper red (AA on white) */
  --home-red-word:#d0243a;    /* the red word of the headline: the same red */
  --home-navy:#1e2330;        /* the logo's navy: headings, navigation, labels, outline button */
  --home-muted:#666b78;       /* the site's grey for the lead, the eyebrow and the card text */
}

/* The homepage as in the owner's design (image 21): the podium picture full width, under a glass header,
   the words on its right, four cards along its bottom edge, and the four labels on the steps. Everything
   inside the scene is sized from the scene's own width (cqw), so the labels and cards keep their places
   on every screen. Only the homepages load this file. */

/* header: the design's order, from the right: logo, links, then language and sign-in on the left */
.top .wrap{gap:24px}
.top nav{gap:clamp(20px,3.3vw,55px);font-size:clamp(15px,1.07vw,18px)}
.top nav a{color:var(--home-navy);font-weight:700}
.top nav a[aria-current=page]{font-weight:700;position:relative}
.top nav a[aria-current=page]::after{content:"";position:absolute;inset-inline:0;top:calc(100% + 18px);height:2px;background:var(--home-red)}
.lang{display:inline-flex;align-items:center;gap:9px;padding:9px 0;position:relative;top:-2px;border-color:transparent;color:var(--home-navy);font-size:clamp(15px,1.07vw,18px);font-weight:400}
.lang:hover{background:none;color:var(--home-red)}
.lang::before{content:"";width:21px;height:21px;flex:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300061f' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.6 3 2.6 15 0 18M12 3c-2.6 3-2.6 15 0 18'/%3E%3C/svg%3E") center/contain no-repeat}
.signin{display:inline-flex;align-items:center;gap:10px;height:52px;padding:0 35.5px;margin-top:-2px;border-radius:8px;background:var(--home-red);border-color:var(--home-red);color:#fff;font-size:clamp(15px,1.05vw,17px);font-weight:500}
.signin::before{content:"";width:18px;height:18px;flex:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='4.6' fill='%23ffffff'/%3E%3Cpath d='M3.2 21.5c.9-4.9 4.3-7.7 8.8-7.7s7.9 2.8 8.8 7.7z' fill='%23ffffff'/%3E%3C/svg%3E") center/contain no-repeat}
.signin:hover{background:var(--home-red-deep);border-color:var(--home-red-deep);color:#fff}

/* the pictures on this page are zoomed in while they wait to be seen: contained, so they cannot widen the page */
.bleed{contain:paint}

/* the scene: its proportions are the picture's, so the labels and cards keep their places */
.home-hero{background:var(--chalk)}
.home-scene{position:relative;container-type:inline-size;aspect-ratio:1909/941;width:100%;overflow:hidden;background:var(--chalk)}
/* the picture at the scene's full width: the owner's wider picture (1909 x 941) */
.scene-img{position:absolute;left:0;top:0;width:100%;height:auto}
/* the Arabic picture is placed at its own position: its steps and labels are where the owner drew them */

/* the words, on the right, over the picture's light */
.home-copy{position:absolute;inset-inline-start:3.9%;top:9.9cqw;width:36%;max-width:none}
/* English has its own mirrored picture (images/25: the words are baked in), so the words start on the left and the podium sits on the right */
.home-kline{display:flex;align-items:center;gap:.8cqw;font-size:max(14px,1.34cqw);color:var(--home-muted);margin:0}
.home-kline::after{content:"";order:-1;width:4.3cqw;height:2px;background:var(--home-red)}
.home-hero h1{font-size:max(36px,4.63cqw);font-weight:500;line-height:1.32;letter-spacing:-.01em;color:var(--home-navy);margin-top:1.14cqw;margin-inline-start:.55cqw}
.home-hero h1 .pen{position:relative;white-space:nowrap;color:var(--home-red-word)}
.home-hero h1 .stop{color:var(--home-red)}
.home-hero h1 .pen svg{position:absolute;inset-inline:-3%;bottom:-.12em;width:106%;height:.3em;overflow:visible}
.home-lead{margin-top:.74cqw;font-size:max(14px,1.5cqw);line-height:1.5;color:var(--home-muted);max-width:29.6cqw}
.home-actions{display:flex;flex-wrap:wrap;gap:1.1cqw;margin-top:1.66cqw}
.btn-red,.btn-line{display:inline-flex;align-items:center;gap:1.1cqw;height:3.6cqw;min-height:44px;padding:0 1.8cqw;border-radius:10px;font-size:max(14px,1.2cqw);font-weight:700;text-decoration:none;transition:background .3s,color .3s}
/* Arabic: the round icon sits at the start of the button, on the right, as in the design */
:lang(ar) .btn-red,:lang(ar) .btn-line{flex-direction:row-reverse}
.btn-red{background:var(--home-red);color:#fff;border:1px solid var(--home-red);font-weight:500;font-size:max(14px,1.244cqw)}
.btn-red:hover{background:var(--home-red-deep);border-color:var(--home-red-deep)}
.btn-line{background:#fff;color:var(--home-navy);border:1px solid var(--home-navy)}
.btn-line:hover{background:var(--home-navy);color:#fff;border-color:var(--home-navy)}
.btn-line:hover .arr circle:last-child{fill:#fff}
.arr{width:2.1cqw;height:2.1cqw;min-width:24px;min-height:24px;flex:none}

/* the labels on the steps: the word, then its icon */

/* the icon colours of the design */
/* the icons: one palette, the colours of the owner's picture (images/24, 25); the step words are in the pictures, not in the page */
.i-laptop,.i-people{color:#091027}
.i-bars{color:#df121d}
.i-trophy{color:#ca751a}
.i-trophy .tro-base{fill:#de150d}
/* the four step icons, in the colours of the design (sampled from images/21.webp) */
/* the words of the steps: the design's navy */

/* the four cards along the bottom edge of the scene, in the design's order from the left */
.home-cards{position:absolute;inset-inline:4.8%;bottom:1.8cqw;direction:ltr;display:grid;grid-template-columns:repeat(4,1fr);gap:.9cqw;list-style:none;margin:0;padding:0}
.home-cards li{background:rgba(255,255,255,.93);border-radius:1.2cqw;padding:1cqw 1.2cqw 1cqw;box-shadow:0 .6cqw 2.2cqw rgba(30,35,48,.08);text-align:center}
.home-cards li:lang(ar){direction:rtl}
.home-cards .ico{display:grid;place-items:center;width:5.9cqw;height:3.8cqw;min-width:44px;min-height:30px;margin:0 auto .3cqw;border-radius:50%;background:#fbe9ec}
.home-cards .ico svg{width:84%;height:84%;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.home-cards h3{font-size:max(14px,1.7cqw);font-weight:500;line-height:1.15;color:var(--home-navy);margin:0 0 .2cqw}
.home-cards p{font-size:max(12px,1.2cqw);line-height:1.45;color:var(--home-muted);max-width:18cqw;margin:0 auto}

/* the caption of the illustration, as on the other pictures */
.scene-cap{max-width:var(--wrap);margin:0 auto;padding:12px var(--pad) 0;font-size:13.5px;color:var(--muted)}

/* prices: honest until the plans are approved */
.sec-head-plain{margin-bottom:56px}
.sec-head-plain h2{font-size:clamp(32px,3.6vw,48px);font-weight:500;color:var(--ink);letter-spacing:-.01em}
.prices-note{margin-top:18px;font-size:18px;color:var(--muted);max-width:34em}


/* desktop: the header floats over the top of the picture, as in the design, and the picture is paler
   where the words are (the design's haze), so the grey lead reads well on it */
@media (min-width:1101px){
  .home-scene::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(to left,rgba(252,252,250,.95) 0%,rgba(252,252,250,0) 62%)}
  html[lang=en] .home-scene::after{background:linear-gradient(to right,rgba(252,252,250,.95) 0%,rgba(252,252,250,0) 62%)}
  .home-copy,.home-cards{z-index:1}
  /* the hero is the height of the window: the picture covers it and its bottom edge meets the window's bottom edge */
  .home-scene{aspect-ratio:auto;height:100svh;min-height:520px}
  .scene-img{width:100%;height:100%;object-fit:cover;object-position:50% 100%}
  /* the picture spans the window; the words and cards are 10% smaller than the picture's own scale (0.8759 x 0.9), so they keep their places on it */
  .home-copy,.home-cards{zoom:.7883}
  .home-copy{width:32.4%}
  /* the buttons keep the design's size on desktop; the phone keeps its minimum touch size */
  .btn-red,.btn-line{min-height:0;font-size:1.2cqw}
  .btn-red{font-size:1.244cqw}
  .top{position:fixed;top:0;inset-inline:0;background:rgba(255,255,255,.14);backdrop-filter:none;border-bottom:0}
  .top{container-type:inline-size}
  .top .wrap{--sw:90cqw;max-width:var(--sw);margin-inline:auto;height:calc(var(--sw) * .0499);min-height:0;padding-block:calc(var(--sw) * .0036) 0;padding-inline-start:calc(var(--sw) * .0245);padding-inline-end:calc(var(--sw) * .116)}
  .top .brand-logo{height:calc(var(--sw) * .0807)}
  .top nav{gap:calc(var(--sw) * .033);font-size:calc(var(--sw) * .0107);margin-inline:6.6% auto}
  .top nav a[aria-current=page]::after{top:calc(100% + var(--sw) * .0108)}
  .lang{gap:calc(var(--sw) * .0054);padding:calc(var(--sw) * .0054) 0;font-size:calc(var(--sw) * .0107)}
  .lang::before{width:calc(var(--sw) * .0126);height:calc(var(--sw) * .0126)}
  .signin{gap:calc(var(--sw) * .006);height:calc(var(--sw) * .0311);padding:0 calc(var(--sw) * .0212);font-size:calc(var(--sw) * .0105)}
  .signin::before{width:calc(var(--sw) * .0108);height:calc(var(--sw) * .0108)}
  .top .brand{align-self:flex-start}
}
@media (max-width:1100px){
  .top nav{display:none}
}
/* English on desktop: the same design, with Latin text set a little smaller and the copy a little wider */
@media (min-width:1101px){
  html[lang=en] .home-hero h1{font-size:max(34px,4cqw);line-height:1.15;margin-top:2.2cqw;font-weight:700}
  html[lang=en] .home-copy{width:39.6%;top:9cqw}
  html[lang=en] .home-lead{font-size:max(13px,1.2cqw);max-width:34cqw;margin-top:.8cqw}
  html[lang=en] .home-cards h3{font-size:max(13px,1.5cqw);font-weight:700}
}

/* phone: the scene becomes a column: the words, the picture, then the cards */
@media (max-width:1100px){
  .top nav{display:none}
  .home-scene{aspect-ratio:auto;overflow:visible;display:flex;flex-direction:column;container-type:normal}
  .home-copy{position:static;width:auto;padding:52px var(--pad) 28px;order:1}
  .scene-img{position:relative;inset:auto;order:2;height:auto;aspect-ratio:1909/941;width:100%;max-width:100%}
  .home-cards{position:static;order:3;inset:auto;grid-template-columns:1fr 1fr;gap:14px;padding:28px var(--pad) 40px}
  .home-cards li{padding:20px 14px 22px;border-radius:14px}
  .home-hero h1{font-size:clamp(38px,8vw,56px);line-height:1.3;margin-top:20px}
  .home-kline::after{width:44px}
  .home-lead{font-size:17px;margin-top:20px;max-width:none}
  .home-actions{margin-top:28px}
  .btn-red,.btn-line{height:auto;font-size:16px;padding:12px 22px}
  .arr{width:24px;height:24px}
  .home-cards .ico{width:44px;height:44px;min-width:0;min-height:0}
  .home-cards h3{font-size:17px}
  .home-cards p{font-size:14.5px;max-width:none}
  .scene-cap{padding-inline:var(--pad)}
}
@media (max-width:620px){
  /* the header on a phone: the logo, a globe for the language (its name is still read by screen readers), and sign-in */
  .lang-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .home-cards{grid-template-columns:1fr}
  .home-cards li{text-align:start;display:grid;grid-template-columns:44px 1fr;column-gap:14px;align-items:start}
  .home-cards .ico{grid-row:span 2;margin:0}
}
@media (prefers-reduced-motion:reduce){
  .btn-red,.btn-line{transition:none}
}

/* the picture's frame: on desktop it is the scene's own picture; on phones it shows the four steps close, so their words can be read */
.scene-frame{display:contents}
@media (max-width:1100px){
  .scene-frame{display:block;position:relative;order:2;width:100%;height:280px;overflow:hidden}
  .scene-frame .scene-img{position:absolute;width:220%;height:auto;max-width:none;left:-44.6%;top:-18%;aspect-ratio:auto;order:0}
  /* the English picture has its star and podium further right */
  html[lang=en] .scene-frame .scene-img{left:-92%}
}
