/* Company profile (views/pages/profile/index.php). The page opens on the
   night, with the header floating over it: the offer and its form side by
   side, and under the offer the profile itself, a sheet lifted off the page,
   red bands behind it as on the profile's own cover. Then what the profile
   holds, on the night lifted a step, with four of its pages. */

/* ------------------------------------------------------------ the dark ground
   The page's tokens turned over, as Contact turns them for its enquiry: the
   shared parts that read them (the heads, the form, the links) follow. */
.cp,
.cp-inside {
  --eme-bg: var(--eme-night);
  --eme-text: #f3f5f6;
  --eme-text-muted: #a3a9ae;
  --eme-line: rgb(255 255 255 / 0.1);
  --eme-line-strong: rgb(255 255 255 / 0.18);
  --cp-well: #0a0b0c;
  --cp-card: #121517;
  --cp-indent: calc(clamp(0.5rem, 0.35rem + 0.4vw, 0.8rem) + clamp(1rem, 0.6rem + 1.2vw, 1.75rem));
  color-scheme: dark;
  color: var(--eme-text);
}

.cp {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: calc(var(--eme-over-pad) + clamp(68px, 3.5rem + 1vw, 88px) + clamp(1.5rem, 4vw, 3.5rem)) clamp(3rem, 6vw, 5.5rem);
  background: var(--eme-night);
}
/* The cover's red, drawn out in bands toward the far edge. */
.cp::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-end: 0;
  inline-size: min(60rem, 70%);
  background:
    repeating-linear-gradient(180deg, rgb(0 0 0 / 0) 0 46px, rgb(0 0 0 / 0.28) 46px 54px),
    radial-gradient(80% 70% at 100% 30%, rgb(218 33 39 / 0.55), rgb(124 27 30 / 0.22) 45%, transparent 75%);
  filter: blur(6px);
  opacity: 0.75;
  pointer-events: none;
}
html[dir="rtl"] .cp::before {
  background:
    repeating-linear-gradient(180deg, rgb(0 0 0 / 0) 0 46px, rgb(0 0 0 / 0.28) 46px 54px),
    radial-gradient(80% 70% at 0% 30%, rgb(218 33 39 / 0.55), rgb(124 27 30 / 0.22) 45%, transparent 75%);
}

/* Offer, form, sheet: one column on a phone, in that order, so the form is
   reached before the picture; side by side once the form has its own column. */
.cp__grid {
  display: grid;
  grid-template-areas: "story" "card" "doc";
  gap: clamp(2.25rem, 6vw, 3.5rem);
}
.cp__story { grid-area: story; min-inline-size: 0; }
.cp__card { grid-area: card; min-inline-size: 0; }
.cp__doc { grid-area: doc; min-inline-size: 0; margin: 0; }

@media (min-width: 62rem) {
  .cp__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(23rem, 0.8fr);
    grid-template-areas: "story card" "doc card";
    grid-template-rows: auto 1fr;
    column-gap: clamp(3rem, 6vw, 7.5rem);
    row-gap: clamp(2rem, 4vw, 3.25rem);
    align-items: start;
  }
}

/* ------------------------------------------------------------------ the offer */
.cp__intro {
  max-inline-size: 54ch;
  margin: clamp(1.25rem, 2.5vw, 1.75rem) 0 0;
  padding-inline-start: var(--cp-indent);
  font-size: var(--eme-step-1);
  line-height: 1.75;
  color: rgb(255 255 255 / 0.74);
}
.cp__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: clamp(1.25rem, 2.5vw, 1.75rem) 0 0;
  padding: 0 0 0 var(--cp-indent);
  list-style: none;
}
html[dir="rtl"] .cp__facts {
  padding: 0 var(--cp-indent) 0 0;
}
.cp__facts li {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--eme-line-strong);
  font-size: var(--eme-step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.86);
  font-variant-numeric: tabular-nums;
}
.cp__facts li:first-child {
  border-color: var(--eme-red);
  background: var(--eme-red);
  color: var(--eme-white);
}
html[lang="ar"] .cp__facts li {
  letter-spacing: 0;
  text-transform: none;
}

/* The sheet: the cover, lifted, with two pages showing under it. */
.cp__sheet {
  position: relative;
  margin-inline-end: 22px;
  margin-block-end: 22px;
}
.cp__sheet::before,
.cp__sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgb(255 255 255 / 0.08);
  background: #16191b;
}
.cp__sheet::before {
  translate: 11px 11px;
}
.cp__sheet::after {
  translate: 22px 22px;
  background: #101214;
}
html[dir="rtl"] .cp__sheet {
  margin-inline-end: 0;
  margin-inline-start: 22px;
}
html[dir="rtl"] .cp__sheet::before { translate: -11px 11px; }
html[dir="rtl"] .cp__sheet::after { translate: -22px 22px; }
.cp__sheet .eme-img,
.cp__sheet picture,
.cp__sheet img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.cp__sheet img {
  box-shadow: 0 30px 70px rgb(0 0 0 / 0.55), 0 0 0 1px rgb(255 255 255 / 0.08);
}

/* ------------------------------------------------------------------- the card */
.cp__card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--eme-line);
  border-block-start: 3px solid var(--eme-red);
  background: var(--cp-card);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.35);
}
.cp__card:focus {
  outline: none;
}
.cp__card:focus-visible {
  outline: 2px solid var(--eme-red);
  outline-offset: 4px;
}

.cp-form {
  gap: clamp(1rem, 0.85rem + 0.4vw, 1.3rem);
}
.cp-form__title {
  margin: 0;
  font-size: var(--eme-step-3);
  font-weight: 600;
  line-height: 1.25;
  color: var(--eme-white);
}
.cp .field__label {
  color: rgb(255 255 255 / 0.72);
}
.cp .field__input {
  border-color: var(--eme-line-strong);
  background-color: var(--cp-well);
  color: var(--eme-text);
  transition:
    border-color var(--eme-fast) var(--eme-ease),
    background-color var(--eme-fast) var(--eme-ease);
}
.cp .field__input:hover {
  border-color: rgb(255 255 255 / 0.32);
}
.cp .field__input:focus {
  border-color: var(--eme-red);
  background-color: #060707;
}
.cp .field__input[aria-invalid="true"] {
  border-color: var(--eme-red);
  background-color: rgb(218 33 39 / 0.08);
}
.cp .field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--eme-text);
  caret-color: var(--eme-text);
  box-shadow: inset 0 0 0 100px var(--cp-well);
}
.cp .field__input:-webkit-autofill:focus {
  box-shadow:
    inset 0 -2px 0 var(--eme-red),
    inset 0 0 0 100px #060707;
}
/* A number or an address reads left to right in the Arabic form too, but
   starts on the side the label does. */
html[dir="rtl"] .cp .field__input[dir="ltr"] {
  text-align: right;
}
.cp .field__error {
  color: #ff8a8e;
}
.cp .form-alert {
  border-color: rgb(218 33 39 / 0.6);
  background: rgb(218 33 39 / 0.1);
  color: #ffb3b6;
}
.field__hint {
  font-size: var(--eme-step--1);
  line-height: 1.5;
  color: var(--eme-text-muted);
}

.cp-form__consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  font-size: var(--eme-step--1);
  line-height: 1.6;
  color: rgb(255 255 255 / 0.74);
  cursor: pointer;
}
.cp-form__consent input {
  inline-size: 18px;
  block-size: 18px;
  margin: 0.15em 0 0;
  accent-color: var(--eme-red);
  cursor: pointer;
}

.cp-form__actions {
  display: grid;
  gap: 0.25rem;
  margin-block-start: var(--eme-space-2);
}
.cp-form__actions .btn {
  padding-block: 1.05em;
  font-size: var(--eme-step-0);
}
/* The way out, there without competing with the form. */
.cp-form__skip {
  justify-self: center;
  padding: 0.7rem 0.75rem;
  border: 0;
  background: none;
  color: var(--eme-text-muted);
  font: inherit;
  font-size: var(--eme-step--1);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgb(255 255 255 / 0.3);
  cursor: pointer;
  transition: color var(--eme-fast) var(--eme-ease);
}
.cp-form__skip:hover {
  color: var(--eme-white);
  text-decoration-color: var(--eme-red);
}
.cp-form__skip:focus-visible {
  outline: 2px solid var(--eme-red);
  outline-offset: 2px;
}
.cp-form__skip[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}
.cp-form__note {
  margin: 0;
  line-height: 1.6;
}

/* ------------------------------------------------------------ the copy is ready */
.cp-ready {
  display: grid;
  gap: 1.1rem;
}
.cp-ready__mark {
  color: var(--eme-red);
}
.cp-ready__mark svg {
  display: block;
}
.cp-ready__title {
  margin: 0;
  color: var(--eme-white);
}
.cp-ready__lead {
  display: block;
  font-size: var(--eme-step-2);
  font-weight: 300;
  line-height: 1.3;
  color: rgb(255 255 255 / 0.8);
}
.cp-ready__main {
  display: block;
  font-size: var(--eme-step-4);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
html[lang="ar"] .cp-ready__main {
  line-height: 1.45;
}
.cp-ready__body {
  margin: 0;
  line-height: 1.7;
  color: rgb(255 255 255 / 0.74);
  overflow-wrap: anywhere;
}
.cp-ready__download {
  gap: 0.75rem;
  padding-block: 1.1em;
  margin-block-start: 0.25rem;
  font-size: var(--eme-step-0);
}
.cp-ready__download svg {
  flex: none;
}
.cp-ready__size {
  margin: -0.35rem 0 0;
  font-size: var(--eme-step--1);
  line-height: 1.6;
  color: var(--eme-text-muted);
}
.cp-ready__next {
  margin-block-start: 0.5rem;
}
.cp-ready__label {
  margin: 0 0 0.25rem;
  font-size: var(--eme-step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eme-text-muted);
}
html[lang="ar"] .cp-ready__label {
  letter-spacing: 0;
  text-transform: none;
}
.cp-ready__next ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-ready__link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-block-size: 3.25rem;
  padding-block: 0.6rem;
  border-block-end: 1px solid var(--eme-line);
  color: var(--eme-white);
  font-weight: 500;
  transition: color var(--eme-fast) var(--eme-ease);
}
.cp-ready__link > svg:first-child {
  flex: none;
  color: var(--eme-text-muted);
  transition: color var(--eme-fast) var(--eme-ease);
}
.cp-ready__link > svg:last-child {
  flex: none;
  margin-inline-start: auto;
  color: var(--eme-text-muted);
  transition: transform 320ms var(--eme-ease-out), color var(--eme-fast) var(--eme-ease);
}
html[dir="rtl"] .cp-ready__link > svg:last-child {
  transform: scaleX(-1);
}
.cp-ready__link:hover,
.cp-ready__link:hover > svg {
  color: var(--eme-red);
}
.cp-ready__link:hover > svg:last-child {
  transform: translateX(4px);
}
html[dir="rtl"] .cp-ready__link:hover > svg:last-child {
  transform: scaleX(-1) translateX(4px);
}
.cp-ready__link:focus-visible {
  outline: 2px solid var(--eme-red);
  outline-offset: 2px;
}
.cp-ready__again {
  margin: 0.25rem 0 0;
  font-size: var(--eme-step--1);
}
.cp-ready__again a {
  color: var(--eme-text-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgb(255 255 255 / 0.3);
}
.cp-ready__again a:hover {
  color: var(--eme-white);
}

/* ---------------------------------------------------------- what is inside */
.cp-inside {
  padding-block: var(--eme-section);
  background: var(--cp-card);
  border-block-start: 1px solid var(--eme-line);
}
.cp-inside__head {
  margin-block-end: clamp(2rem, 4.5vw, 3.5rem);
}
.cp-inside .home-head__main {
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.625rem);
}
.cp-inside .home-head__lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.5rem);
}

.cp-inside__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-inside__list li {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding-block-start: 1.1rem;
  border-block-start: 1px solid var(--eme-line-strong);
}
.cp-inside__n {
  font-size: var(--eme-step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--eme-red);
  font-variant-numeric: tabular-nums;
}
.cp-inside__list h3 {
  margin: 0;
  font-size: var(--eme-step-2);
  font-weight: 600;
  line-height: 1.3;
  color: var(--eme-white);
}
.cp-inside__list p {
  margin: 0;
  max-inline-size: 42ch;
  line-height: 1.7;
  color: var(--eme-text-muted);
}

.cp-inside__pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: clamp(2.75rem, 5vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 62rem) {
  .cp-inside__pages {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Two abreast on a phone: four pages one under another ran a screen and a half. */
@media (max-width: 35.99rem) {
  .cp-inside__pages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}
.cp-inside__pages li {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.08);
  background: #0d0f10;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}
.cp-inside__pages .eme-img,
.cp-inside__pages picture,
.cp-inside__pages img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.cp-inside__cta {
  margin: clamp(2.25rem, 4vw, 3.25rem) 0 0;
}
.cp-inside .line-link {
  --link: rgb(255 255 255 / 0.86);
  --link-hover: var(--eme-white);
}
