/* Markety — home page */

:root { --poster: clamp(76px, 12.6vw, 230px); }

/* ---------- Hero: the sentence with the Golden Horn in it ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px var(--m) 40px;
}
.hero__line {
  --size: 16.4vw;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .1em;
  font-size: var(--size);
  margin-top: auto;
}
.hero__word { white-space: nowrap; }
.hero__word--wide { flex-basis: 100%; }
.hero__strip {
  flex: 1 1 0;
  min-width: 2em;
  height: .72em;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  align-self: baseline;
  clip-path: inset(0 0 0 0 round 14px);
}
.hero__strip img {
  position: absolute; inset: -10% -6%;
  width: 112%; height: 120%; max-width: none;
  object-fit: cover; object-position: 50% 52%;
}
html[lang="ar"] .hero__line { --size: 13vw; column-gap: .18em; }
html[lang="ar"] .hero__strip { height: .62em; align-self: center; }

.hero__action { margin-top: clamp(40px, 6vw, 88px); display: flex; justify-content: center; }
.hero__sub {
  margin: auto auto 0;
  padding-top: 48px;
  max-width: 46ch;
  text-align: center;
  font-size: var(--step-lead);
  line-height: 1.4;
}

.js .hero__strip { animation: shutter 1.1s var(--ease) .15s both; }
.js .hero__strip img { animation: settle 1.4s var(--ease) .15s both, drift 26s ease-in-out 1.6s infinite alternate; }
.js .hero__word, .js .hero__action, .js .hero__sub { animation: rise .9s var(--ease) both; }
.js .hero__word--wide { animation-delay: .1s; }
.js .hero__action { animation-delay: .45s; }
.js .hero__sub { animation-delay: .6s; }
@keyframes shutter { from { clip-path: inset(0 100% 0 0 round 14px); } to { clip-path: inset(0 0 0 0 round 14px); } }
@keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-4%); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
html.js[dir="rtl"] .hero__strip { animation-name: shutter-rtl; }
@keyframes shutter-rtl { from { clip-path: inset(0 0 0 100% round 14px); } to { clip-path: inset(0 0 0 0 round 14px); } }

@media (max-width: 760px) {
  .hero { padding-top: 96px; }
  .hero__line { --size: 16vw; }
  html[lang="ar"] .hero__line { --size: 15vw; }
  .hero__word { flex-basis: 100%; }
  .hero__strip, html[lang="ar"] .hero__strip {
    flex: none; order: 1; width: 100%; height: auto; aspect-ratio: 2 / 1;
    margin: .12em 0 .16em;
  }
  .hero__word--wide { order: 2; }
  .hero__action { margin-top: 32px; }
  .hero__sub { font-size: 1rem; padding-top: 32px; }
}

/* ---------- Services: colour fields ---------- */
.field {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  column-gap: var(--m);
  min-height: 78svh;
  padding: clamp(28px, 4vw, 56px) var(--m) var(--m);
}
.field__text {
  grid-column: 8 / span 4;
  grid-row: 1;
  max-width: 34ch;
  font-size: var(--step-body);
  line-height: 1.5;
}
.field__phrase {
  grid-column: 1 / -1;
  grid-row: 3;
  font-size: var(--poster);
  max-width: 9em;
}
.field--mirror .field__text { grid-column: 2 / span 4; }
.field--mirror .field__phrase { justify-self: end; text-align: end; }
.field--red { background: var(--red); color: var(--ink); }
.field--grey { background: var(--muted); color: var(--paper); }
.field--stone { background: var(--surface); color: var(--ink); }
.field--ink { background: var(--ink); color: var(--paper); }
html[lang="ar"] .field__phrase { font-size: clamp(56px, 9vw, 160px); }

@media (max-width: 900px) {
  .field { min-height: 64svh; }
  .field__text, .field--mirror .field__text { grid-column: 1 / span 11; }
  .field--mirror .field__text { grid-column: 2 / -1; text-align: end; }
  .field__phrase, .field--mirror .field__phrase { justify-self: start; text-align: start; font-size: 17vw; }
  html[lang="ar"] .field__phrase { font-size: 12.5vw; }
}

/* ---------- WhatsApp ---------- */
.wa { padding-block: var(--gap-section); row-gap: 56px; align-items: start; }
.wa__copy { grid-column: 1 / span 7; }
.wa__title { font-size: var(--step-head); }
.wa__lead { margin-top: 32px; font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; }
.wa__rules { margin-top: 40px; display: grid; gap: 18px; max-width: 52ch; }
.wa__rules strong { font-weight: 600; }
.wa__demo { grid-column: 8 / span 5; position: sticky; top: 32px; }
.wa__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wa__tabs button {
  font: 600 var(--step-small)/1 var(--text);
  padding: .8em 1.15em;
  border: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.wa__tabs button:hover { background: #d9d8d4; }
.wa__tabs button:active { transform: scale(.96); }
.wa__tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.wa__note { margin-top: 14px; font-size: var(--step-small); color: var(--muted); max-width: 46ch; }

/* The WhatsApp interface fragment keeps WhatsApp's own colours */
.phone {
  border-radius: 28px;
  overflow: hidden;
  background: #e9e7e3;
  font-family: var(--text);
  height: 480px;
  display: flex; flex-direction: column;
}
.phone__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #075e54; color: #fff;
  font-size: 15px; line-height: 1.25;
}
.phone__head small { display: block; opacity: .85; font-size: 14px; }
.phone__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #073b34; font-weight: 600; font-size: 14px;
}
.phone__chat {
  flex: 1;
  padding: 20px 16px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  overflow: hidden;
}
.msg {
  max-width: 82%;
  padding: 8px 12px 6px;
  border-radius: 10px;
  font-size: 15px; line-height: 1.4;
  color: #111b21;
  animation: msg-in .45s var(--ease) both;
}
.msg time { display: block; text-align: end; font-size: 14px; color: #667781; margin-top: 2px; }
.msg--in { align-self: flex-start; background: #fff; border-start-start-radius: 2px; }
.msg--out { align-self: flex-end; background: #d9fdd3; border-start-end-radius: 2px; }
.msg__btns { align-self: flex-start; width: 82%; display: grid; gap: 4px; animation: msg-in .45s var(--ease) both; }
.msg__btns span {
  display: block; text-align: center;
  background: #fff; color: #027eb5; border-radius: 10px;
  padding: 9px; font-size: 15px; font-weight: 600;
}
.msg:nth-child(2), .msg__btns:nth-child(2) { animation-delay: .35s; }
.msg:nth-child(3), .msg__btns:nth-child(3) { animation-delay: .7s; }
@keyframes msg-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .wa__copy, .wa__demo { grid-column: 1 / -1; }
  .wa__demo { position: static; }
  .phone { height: 440px; }
}

/* ---------- How we work: one verb at a time ---------- */
.verb { position: relative; height: 100svh; min-height: 560px; overflow: clip; color: var(--paper); background: var(--ink); }
.verb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.verb::after { content: ""; position: absolute; inset: 0; background: rgba(20, 20, 22, .42); }
.verb__stick {
  position: relative; z-index: 1;
  height: 100%;
  display: grid; place-items: center;
}
.verb__word { font-size: var(--poster); }
.js .verb__word { transform: scale(.94); opacity: 0; transition: transform 1s var(--ease), opacity .8s var(--ease); }
.js .verb.is-in .verb__word { transform: none; opacity: 1; }
.verb__img { transform: scale(1.06); transition: transform 2.4s var(--ease); }
.verb.is-in .verb__img { transform: none; }
html[lang="ar"] .verb__word { font-size: clamp(80px, 16vw, 260px); }
.verb__text {
  position: absolute; z-index: 1;
  inset-inline-start: var(--m); bottom: var(--m);
  max-width: 40ch;
  padding: 18px 22px;
  background: rgba(20, 20, 22, .78);
  font-size: var(--step-body);
}
@media (max-width: 760px) {
  .verb { height: 86svh; }
  .verb__word { font-size: 25vw; }
  html[lang="ar"] .verb__word { font-size: 19vw; }
  .verb__text { inset-inline: var(--m); max-width: none; font-size: 1rem; }
}

/* ---------- About ---------- */
.about { padding-block: var(--gap-section); align-items: start; }
.about__facts {
  grid-column: 1 / span 2;
  display: grid; gap: 20px;
  font-size: var(--step-small);
  padding-top: .4em;
}
.about__facts span { display: block; color: var(--muted); }
.about__facts strong { font-weight: 600; }
.about__text { grid-column: 3 / -1; }
.about__p { font-size: var(--step-statement); line-height: 1.22; max-width: 40em; }
.about__p strong { font-weight: 600; }
.about__body { margin-top: 32px; max-width: 60ch; }
.about__map { grid-column: 3 / -1; margin-top: clamp(56px, 7vw, 104px); }
.about__map figcaption { margin-top: 16px; font-size: var(--step-small); color: var(--muted); }
.map { position: relative; }
.map img { width: 100%; }
.map__routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map__routes path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.map__dots circle { fill: var(--red); }
.map__hub { fill: var(--ink); }
.js .map__routes path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.js .map__dots circle, .js .map__hub { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); transition: opacity .4s, transform .6s var(--ease); }
.js .about__map.is-in .map__routes path { stroke-dashoffset: 0; }
.js .about__map.is-in .map__dots circle, .js .about__map.is-in .map__hub { opacity: 1; transform: none; }
.js .about__map.is-in .map__hub { transition-delay: .1s; }
.js .about__map.is-in .map__dots circle { transition-delay: 1.2s; }
.about__img {
  float: inline-start;
  width: 3.66em; height: 3.66em;
  object-fit: cover;
  margin-inline-end: .5em; margin-top: .14em;
}
@media (max-width: 900px) {
  .about__text { grid-column: 1 / -1; grid-row: 1; }
  .about__facts { grid-column: 1 / -1; grid-row: 2; margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px 32px; }
  .about__p { font-size: var(--step-body); line-height: 1.45; }
  .about__map { grid-column: 1 / -1; grid-row: 3; }
  .about__img { width: 4.9em; height: 4.9em; }
}

/* ---------- Contact ---------- */
.contact { padding-bottom: var(--gap-section); row-gap: 40px; align-items: start; }
.contact__lead { grid-column: 1 / span 6; font-size: var(--step-statement); line-height: 1.18; }
.contact__img { grid-column: 8 / span 2; width: 100%; aspect-ratio: 1; object-fit: cover; max-width: 180px; }
.contact__links { grid-column: 10 / span 3; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.contact__q { font-weight: 600; margin-bottom: 10px; }
.contact__meta { margin-top: 10px; font-size: var(--step-small); color: var(--muted); }

.company { grid-column: 1 / -1; margin-top: clamp(48px, 7vw, 110px); background: var(--surface); padding: clamp(24px, 3.5vw, 48px); }
.company__title { font: 600 var(--step-lead)/1.2 var(--text); margin-bottom: 28px; }
.company__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px var(--m); }
.company__list dt { font-size: var(--step-small); color: var(--muted); margin-bottom: 4px; }
.company__list dd { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .contact__lead { grid-column: 1 / -1; font-size: 1.5rem; }
  .contact__img { grid-column: 1 / span 4; max-width: 110px; }
  .contact__links { grid-column: 5 / -1; font-size: 1rem; }
  .company__list { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .company__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Footer ---------- */
.foot {
  background: var(--ink); color: var(--paper);
  padding: clamp(64px, 8vw, 120px) var(--m) 28px;
}
.foot__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--m); row-gap: 48px;
}
.foot__brand { grid-column: 1 / span 4; }
.foot__mark { display: inline-block; margin-bottom: 24px; transition: opacity .2s; }
.foot__mark:hover { opacity: .8; }
.foot__mark img { width: clamp(150px, 13vw, 190px); height: auto; }
.foot__desc { font-size: var(--step-lead); line-height: 1.35; max-width: 24ch; }
.foot__col { grid-column: span 2; }
.foot__col:first-of-type { grid-column: 7 / span 2; }
.foot__col h2 { font: 400 var(--step-small)/1.4 var(--text); color: #a9a9ad; margin-bottom: 16px; }
.foot__col ul { display: grid; gap: 10px; }
.foot__col a { position: relative; text-decoration: none; transition: color .2s; }
.foot__col a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -3px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
html[dir="rtl"] .foot__col a::after { transform-origin: right; }
.foot__col a:hover { color: var(--red); }
.foot__col a:hover::after { transform: scaleX(1); }
.foot__meta {
  margin-top: clamp(64px, 8vw, 112px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 40px;
  font-size: var(--step-small); color: #a9a9ad;
}
.foot__credits { max-width: 60ch; }
.foot__credits summary { cursor: pointer; text-decoration: underline; text-underline-offset: .22em; }
.foot__credits summary:hover, .foot__up:hover { color: var(--paper); }
.foot__credits p { margin-top: 8px; }
.foot__up { text-decoration: underline; text-underline-offset: .22em; transition: color .2s; }
@media (max-width: 900px) {
  .foot__brand { grid-column: 1 / -1; }
  .foot__col, .foot__col:first-of-type { grid-column: span 4; }
}
@media (max-width: 560px) {
  .foot__col, .foot__col:first-of-type { grid-column: span 6; }
  .foot__meta { flex-direction: column; }
}
