/* Direction A: the mark as monument. Almarai only. */
@font-face { font-family: "Almarai"; src: url("fonts/Almarai-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("fonts/Almarai-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Almarai"; src: url("fonts/Almarai-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "SDGA Twotone"; src: url("fonts/SDGAIconsTwotone-subset.woff2") format("woff2"); font-display: block; }

:root {
  color-scheme: light dark;
  --canvas: #f5f8f5;
  --ink: #0d1f16;
  --ink-2: #3a4b42;
  --rule: #d6e2da;
  --accent-text: #067c44;
  --dot: #04bc64;
  --slab: #042f1b;
  --slab-glow: #0a6a3c;
  --slab-tag: #a7f3c9;
  --btn: #042f1b;
  --btn-ink: #ffffff;
  --btn-hover: #067c44;
  --btn-addr: #a7f3c9;
  --icon-a: #059c54;
  --icon-b: #c9a84c;
  --focus: #04bc64;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0b130f;
    --ink: #eef5f0;
    --ink-2: #b4c3ba;
    --rule: #22322a;
    --accent-text: #34d483;
    --slab: #06341f;
    --slab-glow: #0c7a45;
    --slab-tag: #a7f3c9;
    --btn: #04bc64;
    --btn-ink: #042f1b;
    --btn-hover: #34d483;
    --btn-addr: #042f1b;
    --icon-a: #34d483;
    --icon-b: #deb44a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { accent-color: var(--dot); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Almarai", system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--dot); color: #042f1b; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.page {
  display: grid;
  grid-template-columns: minmax(360px, 40fr) 60fr;
  min-height: 100dvh;
}

/* the slab: full-bleed brand field holding the oversized mark */
.slab {
  position: relative;
  overflow: hidden;
  background: var(--slab);
  isolation: isolate;
}
.slab__glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(closest-side, var(--slab-glow), transparent 70%);
  opacity: 0.55;
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}
.slab__mark {
  position: absolute;
  inline-size: 128%;
  block-size: auto;
  inset-block-end: -16%;
  inset-inline-end: -30%;
  animation: mark-in 1200ms var(--ease) both, sway 16s ease-in-out 1200ms infinite alternate;
}
.slab__tag {
  position: absolute;
  inset-block-start: 48px;
  inset-inline-start: 48px;
  margin: 0;
  color: var(--slab-tag);
  font-size: 16px;
  font-weight: 700;
  animation: fade 900ms var(--ease) 500ms both;
}

/* content column */
.body {
  display: flex;
  flex-direction: column;
  padding: 48px clamp(16px, 7vw, 112px);
  min-inline-size: 0;
}
.wordmark { display: block; block-size: 46px; inline-size: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lang {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: 18px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.lang:hover { background: var(--slab); border-color: var(--slab); color: #ffffff; }

/* Latin display needs tighter leading than Arabic; Arabic keeps 1.32 */
:lang(en) .lead { line-height: 1.6; }
:lang(en) .title { line-height: 1.12; letter-spacing: -0.015em; }
:lang(en) .title em { display: inline-block; margin-block-start: 0.12em; }
:lang(en) .title__l1 { white-space: normal; }
/* the logo artwork never mirrors, so in LTR it bleeds off the OUTER edge instead, keeping the hand in view */
:lang(en) .slab__mark { inset-inline-end: auto; inset-inline-start: -34%; }
@media (max-width: 860px) { :lang(en) .slab__mark { inset-inline-start: -8%; } }
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 48px;
  max-inline-size: 720px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 700;
}
.status__dot {
  inline-size: 10px; block-size: 10px; border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--dot) 55%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
.title {
  margin: 0;
  font-size: clamp(38px, 4.5vw, 70px);
  font-weight: 800;
  line-height: 1.32;
  text-wrap: balance;
}
.title em { font-style: normal; color: var(--accent-text); }
.title__l1 { white-space: nowrap; }
.lead {
  margin: 28px 0 0;
  font-size: clamp(17px, 1.35vw, 20px);
  color: var(--ink-2);
  max-inline-size: 36em;
  text-wrap: pretty;
}

.parties {
  list-style: none;
  margin: 36px 0 0;
  padding: 18px 0 0;
  border-block-start: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-size: 16px;
  font-weight: 700;
}
.parties li { display: inline-flex; align-items: center; gap: 10px; }

/* SDGA two-tone glyph: two stacked layers */
.ic { position: relative; display: inline-block; inline-size: 1.4em; block-size: 1.4em; font-family: "SDGA Twotone"; font-size: 22px; line-height: 1.4em; text-align: center; font-weight: 400; }
.ic::before, .ic::after { position: absolute; inset: 0; }
.ic::before { color: var(--icon-a); }
.ic::after { color: var(--icon-b); }
.ic--store::before { content: "\F9EB"; } .ic--store::after { content: "\F9EC"; }
.ic--brief::before { content: "\E3DF"; } .ic--brief::after { content: "\E3E0"; }
.ic--factory::before { content: "\EA1D"; } .ic--factory::after { content: "\EA1E"; }
.ic--mail::before { content: "\EFFA"; color: currentColor; } .ic--mail::after { content: "\EFFB"; color: currentColor; opacity: 0.5; }

.mail {
  align-self: flex-start;
  margin-block-start: 40px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-block-size: 56px;
  padding-block: 10px;
  padding-inline: 22px 24px;
  border-radius: 16px;
  background: var(--btn);
  color: var(--btn-ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}
.mail:hover { background: var(--btn-hover); transform: translateY(-2px); }
.mail:active { transform: scale(0.97); }
.mail__label { display: inline-flex; align-items: center; gap: 8px; }
.mail__addr {
  color: var(--btn-addr);
  font-weight: 400;
  padding-inline-start: 18px;
  border-inline-start: 1px solid color-mix(in oklab, currentColor 35%, transparent);
  transition: color 160ms ease;
}
.mail:hover .mail__addr { color: var(--btn-ink); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-2);
  font-size: 14px;
  border-block-start: 1px solid var(--rule);
  padding-block-start: 20px;
}
.foot__latin { font-weight: 700; }

/* entrance */
.rise { animation: rise 800ms var(--ease) both; }
.r1 { animation-delay: 80ms; } .r2 { animation-delay: 200ms; } .r3 { animation-delay: 300ms; }
.r4 { animation-delay: 420ms; } .r5 { animation-delay: 520ms; } .r6 { animation-delay: 620ms; } .r7 { animation-delay: 720ms; }

/* the headline paints at once (first paint never waits on an animation); it settles by transform only */
.title.rise { animation-name: settle; }
@keyframes settle { from { transform: translateY(14px); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mark-in { from { opacity: 0; transform: translateY(8%) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes sway { from { transform: rotate(0deg); } to { transform: rotate(-2.5deg) translateY(-1.5%); } }
@keyframes drift { from { transform: translate(-12%, 10%); } to { transform: translate(14%, -8%); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--dot) 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 10px transparent; }
}

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .slab { block-size: 300px; }
  .slab__mark { inline-size: 92%; max-inline-size: 460px; inset-block-end: -26%; inset-inline-end: -10%; }
  .slab__tag { inset-block-start: 20px; inset-inline-start: 16px; }
  .body { padding: 28px 16px 24px; }
  .wordmark { block-size: 38px; }
  .content { padding-block: 28px 36px; }
  .mail { align-self: stretch; justify-content: space-between; }
  .title__l1 { white-space: normal; }
  .parties { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
  .parties li { flex-direction: column; gap: 4px; font-size: 15px; }
}
@media (max-width: 380px) {
  .mail { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
