@font-face {
  font-family: "Abar Low FaNum";
  src: url("assets/AbarLowFaNum-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Abar Low";
  src: url("assets/AbarLowFaNum-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --muted: #cbc9be;
  --line: #aaa99d;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}
body {
  background: #f1e9de;
  font-family: "Abar Low FaNum", Tahoma, Arial, sans-serif;
  overflow: hidden;
}

/* The whole design is one 1440x899 artboard, like the supplied reference. */
.page-shell {
  position: relative;
  --canvas-w: min(100vw, calc(100vh * 1.60178));
  --canvas-h: min(100vh, calc(100vw / 1.60178));
  --offset-x: calc((100vw - var(--canvas-w)) / 2);
  --offset-y: calc((100vh - var(--canvas-h)) / 2);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: #f1e9de;
  direction: rtl;
}
.portrait-background {
  position: absolute;
  inset: 0;
  background: url("assets/borujerdi-hero-desktop.png") center/calc(var(--canvas-w) * 1.10) calc(var(--canvas-h) * 1.10) no-repeat;
}
.portrait-subject {
  position: absolute;
  z-index: -1;
  top: calc(var(--offset-y) + var(--canvas-h) * 0.137);
  right: calc(var(--offset-x) + var(--canvas-w) * 0.070);
  width: calc(var(--canvas-w) * 0.422);
  height: auto;
  display: none;
}

.interface {
  position: absolute;
  --grid-gap: 38px;
  --grid-column: calc((100% - var(--grid-gap)) / 2);
  left:10%;
  top: var(--offset-y);
  width: calc(var(--canvas-w) * 0.55);
  height: var(--canvas-h);
  container-type: size;
  /* background-color: red; */
}
.ui-column {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(84%, 680px);
  height: 100%;
  transform: translateX(-50%);
}
.topbar {
  position: absolute;
  right: 0;
  left: 0;
  top: 13.1%;
  width: 100%;
  height: 6.7cqh;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  direction: ltr;
}
.language {
  position: relative;
  height: 100%;
  min-height: 0;
  border: 1px solid #aaa79c;
  border-radius: 13px;
  background: rgba(246, 243, 236, 0.72);
  color: #8d8b82;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font:
    600 clamp(10px, 1.65cqh, 15px) "Abar Low FaNum",
    Tahoma,
    Arial,
    sans-serif;
  cursor: pointer;
  direction: rtl;
}
.language svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.language b {
  font-weight: 400;
}
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 150px;
  padding: 6px;
  border: 1px solid rgba(170, 167, 156, 0.75);
  border-radius: 12px;
  background: rgba(246, 243, 236, 0.96);
  box-shadow: 0 10px 30px rgba(55, 51, 43, 0.14);
  backdrop-filter: blur(8px);
  direction: ltr;
}
.language-menu[hidden] {
  display: none;
}
.language-menu button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: #77756d;
  font: 600 12px "Abar Low FaNum", Tahoma, Arial, sans-serif;
  cursor: pointer;
}
.language-menu button:hover,
.language-menu button:focus-visible,
.language-menu button.selected {
  outline: 0;
  background: #ded9ce;
  color: #242321;
}
.language-menu b {
  min-width: 27px;
  font-weight: 400;
  text-transform: uppercase;
}
.site-title {
  position: relative;
  right: auto;
  top: auto;
  width: var(--grid-column);
  height: auto;
  opacity: 1;
  filter: none;
}
.site-title-translated {
  display: none;
}
/* body[data-language="ar"] .site-title,
body[data-language="en"] .site-title {
  display: none;
} */
body[data-language="ar"] .site-title-translated,
body[data-language="en"] .site-title-translated {
  width: var(--grid-column);
  min-height: 100%;
  display: flex;
  align-items: center;
  color: #56554f;
  font-size: clamp(14px, 2.1cqh, 20px);
  font-weight: 700;
  line-height: 1.25;
  text-align: start;
  direction: var(--page-direction, rtl);
}

.entry-heading {
  position: absolute;
  top: 28.5%;
  left: 18%;
  width: 64%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #66645f;
  text-align: center;
  font-family: "Abar Low FaNum", Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  white-space: nowrap;
}
.entry-heading p {
  margin: 0;
}
.entry-heading .heading-side {
  width: 52px;
  height: 15px;
  position: relative;
  flex: 0 0 52px;
  background: url("svg/heading-side.svg") left center/11px 15px no-repeat;
}
.entry-heading .heading-side::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  width: 42px;
  height: 1px;
  background: var(--line);
}
.entry-heading .heading-side.left {
  transform: scaleX(-1);
}

.entry-grid {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  width: 100%;
  margin-top: 34.5cqh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: clamp(14px, 2.6cqh, 24px);
  column-gap: 24px;
  direction: rtl;
}
.entry {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  flex: 1 0 0;
  border-radius: 13px;
  background: #d3cec0;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.entry::before,
.entry::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 70%;
  z-index: -1;
  background: #d3cec0;
  -webkit-mask: url("svg/button-edge.svg") center/100% 100% no-repeat;
  mask: url("svg/button-edge.svg") center/100% 100% no-repeat;
}
.entry > * {
  position: relative;
  z-index: 1;
}
.entry::before {
  right: -12px;
  background: #d3cec0;
}
.entry::after {
  left: -14px;
  transform: translateY(-50%) scaleX(-1);
}
.entry::before {
  transform: translateY(-50%);
}
.entry.active::before {
  background: linear-gradient(180deg, #53524f 0%, #000 100%);
}
.entry.active::after {
  background: linear-gradient(180deg, #53524f 0%, #000 100%);
}
.edge-dot {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #fff;
}
.entry strong {
  color: #fff;
  text-align: right;
  font-family: "Abar Low FaNum", Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  min-width: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow-wrap: normal;
  flex: 0 0 auto;
}
.entry small {
  display: flex;
  position: static;
  margin: 0;
  margin-inline-start: auto;
  transform: none;
  padding: 0 8px;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  border-radius: 50px;
  background: #fff;
  color: #d3cec0;
  text-align: right;
  font-family: "Abar Low FaNum", Tahoma, Arial, sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.4px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.entry.khan-school-entry {
  height: auto;
  min-height: 58px;
}
.entry.khan-school-entry strong {
  flex: 1 1 auto;
  white-space: normal;
}
.entry:not(.active) {
  padding: 8px 18px 8px 8px;
}
.entry.institute-entry:not(.active) {
  gap: 6px;
  padding: 8px 12px 8px 10px;
}
.entry.institute-entry:not(.active) small {
  padding-inline: 5px;
}
.entry em {
  margin-right: auto;
  font-size: 18px;
  font-style: normal;
}
.entry-flourish {
  position: relative;
  width: 23px;
  height: 16px;
  margin-right: auto;
  display: block;
}
.entry-flourish::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 11px;
  height: 15px;
  transform: translateY(-50%);
  background: #fff;
  -webkit-mask: url("svg/heading-side.svg") center/contain no-repeat;
  mask: url("svg/heading-side.svg") center/contain no-repeat;
}
.entry-flourish::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 0;
  top: 50%;
  height: 1px;
  border-radius: 2px;
  transform: translateY(-50%);
  background: #fff;
}
.mobile-flourish {
  display: none;
}
.entry.active {
  background: linear-gradient(180deg, #53524f 0%, #000 100%);
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.15);
}
.icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  display: block;
}
.icon[src$="icon-mosque.svg"] {
  filter: invert(1);
}

.ornament {
  position: absolute;
  top: 77%;
  left: 18%;
  width: 64%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa99d;
  direction: ltr;
  /* background-color: red; */
}
.ornament span {
  height: 1px;
  background: #aaa99d;
  width: 44%;
}
.ornament img {
  width: 18px;
  height: 15px;
  flex: none;
}
.mobile-bottom-ornament {
  display: none;
}
.primary-call {
  position: absolute;
  right: 0;
  left: 0;
  top: 81%;
  width: 100%;
  height: 64px;
  min-height: 0;
  transform: none;
  background: linear-gradient(180deg, #53524f 0%, #000 100%);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.primary-call::before,
.primary-call::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 70%;
  z-index: -1;
  background: linear-gradient(180deg, #53524f 0%, #000 100%);
  -webkit-mask: url("svg/button-edge.svg") center/100% 100% no-repeat;
  mask: url("svg/button-edge.svg") center/100% 100% no-repeat;
}
.primary-call::before {
  right: -14px;
  transform: translateY(-50%);
}
.primary-call::after {
  left: -14px;
  transform: translateY(-50%) scaleX(-1);
}
.primary-call img {
  width: 54%;
  position: relative;
  z-index: 1;
}
.primary-call span {
  display: none;
  color: #fff;
  padding-inline: 20px;
  font-size: clamp(16px, 2.4cqh, 23px);
  font-weight: 700;
  text-align: center;
}
body[data-language="ar"] .primary-call img,
body[data-language="en"] .primary-call img {
  /* display: none; */
}
body[data-language="ar"] .primary-call span,
body[data-language="en"] .primary-call span {
  display: none;
}
body[data-language="en"] {
  --page-direction: ltr;
}
body[data-language="en"] .entry-grid,
body[data-language="en"] .entry,
body[data-language="en"] .language {
  direction: ltr;
}
body[data-language="en"] .entry strong {
  text-align: left;
  line-height: 1.25;
}
body[data-language="en"] .entry small {
  margin-inline-start: auto;
}
body[data-language="en"] .entry:not(.active) {
  padding: 8px 8px 8px 18px;
}
body[data-language="en"] .entry.institute-entry:not(.active) {
  padding: 8px 10px 8px 12px;
  gap: 6px;
}
body[data-language="ar"] .entry small,
body[data-language="en"] .entry small {
  padding-inline: 5px;
}
body[data-language="en"] .entry-flourish {
  margin-right: 0;
  margin-left: auto;
  transform: scaleX(-1);
}
body[data-language="en"] .edge-dot {
  right: auto;
  left: 5px;
}

@media (min-width: 1201px) {
  .entry-flourish {
    transform: translateX(-8px);
  }
  body[data-language="en"] .entry-flourish {
    transform: translateX(8px) scaleX(-1);
  }
}

.identity {
  position: absolute;
  right: calc(var(--offset-x) + var(--canvas-w) * 0.25 - 104.5px);
  left: auto;
  bottom: calc(var(--offset-y) + var(--canvas-h) * 0.11);
  width: 309px;
  transform: none;
  text-align: center;
  color: #050505;
}
.identity img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1px;
}
.identity .religious-title {
  width: 167px;
  margin: 0 auto 3px;
}
.identity > img:last-child {
  width: 309px;
  height: 46px;
}
footer {
  position: absolute;
  bottom: calc(var(--offset-y) + var(--canvas-h) * 0.026);
  left: var(--offset-x);
  width: var(--canvas-w);
  color: #928e81;
  text-align: center;
  font-family: "Abar Low", "Abar Low FaNum", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  /* letter-spacing: -0.48px; */
}

footer span {
  display: inline;
}

/* On wide and high-density monitors, keep the controls comfortably sized
   instead of allowing the original artboard proportions to shrink them. */
@media (min-width: 1600px) {
  .ui-column {
    width: min(72%, 680px);
  }
  .interface {
    --grid-gap: clamp(38px, 2.5vw, 54px);
  }
  .entry,
  .language {
    border-radius: 15px;
  }
  .entry strong {
    font-size: clamp(14px, 1.45cqh, 17px);
  }
  .entry small {
    font-size: clamp(10px, 1.05cqh, 12px);
  }
  .primary-call {
    border-radius: 19px;
  }
}

@media (max-width: 1200px) {
  body {
    overflow: auto;
    background: #d0ccc1;
  }
  .page-shell {
    width: 100%;
    height: max(100svh, calc(954px + 57vw));
    min-width: 0;
    min-height: calc(954px + 57vw);
    background: #d0ccc1;
  }
  .portrait-background {
    background-image: url("assets/portrait-mobile.png");
    background-position: top center;
    background-size: 100% auto;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 105vw, transparent 140vw);
    mask-image: linear-gradient(to bottom, #000 0, #000 105vw, transparent 140vw);
    inset: 0 !important;
  }
  .portrait-subject {
    display: none;
  }
  .interface {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
  }
  .ui-column {
    top: 0;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(calc(100% - 64px), 720px);
    height: 100%;
    transform: translateX(-50%);
  }
  .topbar {
    top: 17px;
    right: 0;
    left: 0;
    width: 100%;
    height: 36px;
  }
  .language {
    left: auto;
    width: auto;
    height: 25px;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 8px;
    gap: 4px;
  }
  .language svg {
    width: 11px;
  }
  .language-menu {
    top: 31px;
    width: 135px;
  }
  .site-title {
    right: auto;
    top: auto;
    width: 43%;
  }
  body[data-language="ar"] .site-title-translated,
  body[data-language="en"] .site-title-translated {
    width: 52%;
    font-size: 11px;
  }
  .entry-heading {
    top: calc(190px + 57vw);
    left: 15%;
    width: 70%;
    gap: 8px;
    font-size: 12px;
  }
  .entry-heading .heading-side {
    width: 38px;
    height: 15px;
    flex-basis: 38px;
    background-size: 11px 15px;
  }
  .entry-heading .heading-side::before {
    width: 28px;
  }
  .entry-grid {
    position: absolute;
    top: calc(238px + 57vw);
    right: 0;
    left: 0;
    width: 100%;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .entry {
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    flex: 1 0 0;
    border-radius: 10px;
    padding: 0 14px;
    gap: clamp(5px, 2vw, 9px);
    background: #f1eee9;
    color: #d0ccc1;
    border: 1px solid rgba(208, 204, 193, 0.25);
  }
  .entry::before,
  .entry::after {
    top: 50%;
    width: 28px;
    height: 80%;
  }
  .entry::before {
    right: -12px;
  }
  .entry::after {
    left: -14px;
  }
  .entry:not(.active)::before {
    background: #f1eee9;
  }
  .entry:not(.active)::after {
    background: #f1eee9;
  }
  .entry:not(.active) .edge-dot {
    background: #d0ccc1;
  }
  .entry small {
    margin: 0;
    margin-inline-start: auto;
  }
  .entry:not(.active) {
    padding-inline: 14px;
  }
  .entry.institute-entry:not(.active) {
    gap: clamp(5px, 2vw, 9px);
    padding-inline: 14px;
  }
  .entry.institute-entry:not(.active) small {
    padding-inline: 8px;
  }
  body[data-language="en"] .entry small {
    margin: 0;
    margin-inline-start: auto;
  }
  body[data-language="en"] .entry:not(.active) {
    padding-inline: 14px;
  }
  .entry strong {
    font-size: 14px;
  }
  body[data-language="en"] .entry strong {
    font-size: 14px;
  }
  .mobile-flourish {
    position: relative;
    order: 4;
    display: block;
    width: 23px;
    height: 16px;
  }
  .mobile-flourish::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 11px;
    height: 15px;
    transform: translateY(-50%);
    background: #d0ccc1;
    -webkit-mask: url("svg/heading-side.svg") center/contain no-repeat;
    mask: url("svg/heading-side.svg") center/contain no-repeat;
  }
  .mobile-flourish::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 0;
    top: 50%;
    height: 1px;
    border-radius: 2px;
    transform: translateY(-50%);
    background: #d0ccc1;
  }
  .entry em {
    font-size: 18px;
    color: inherit;
  }
  .entry.active {
    order: -1;
    color: #fff;
    background: linear-gradient(180deg, #53524f 0%, #000 100%);
    border: 0;
  }
  .entry:not(.active) strong {
    color: #d0ccc1;
  }
  .entry:not(.active) .icon {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(87%) sepia(8%) saturate(278%)
      hue-rotate(3deg) brightness(94%) contrast(89%);
  }
  .icon {
    width: 16px;
    min-width: 16px;
    height: 16px;
  }
  .ornament {
    top: calc(699px + 57vw);
    left: 8%;
    width: 84%;
  }
  .ornament span {
    width: 42%;
    opacity: 0.4;
  }
  .primary-call {
    right: 0;
    left: 0;
    top: calc(727px + 57vw);
    width: 100%;
    height: 85px;
    min-height: 85px;
    transform: none;
    border-radius: 20px;
  }
  .primary-call::before,
  .primary-call::after {
    top: 50%;
    width: 42px;
    height: 86%;
  }
  .primary-call::before {
    right: -22px;
  }
  .primary-call::after {
    left: -22px;
  }
  .primary-call img {
    width: min(80%, 360px);
    height: auto;
    display: block;
  }
  .mobile-bottom-ornament {
    display: flex;
    top: auto;
    bottom: 74px;
    left: 8%;
    width: 84%;
  }
  .identity {
    left: auto;
    bottom: auto;
    top: calc(170px + 42vw);
    right: 50%;
    width: min(68%, 367px);
    transform: translateX(50%);
  }
  .identity .religious-title {
    width: 55%;
    margin-bottom: 2px;
  }
  .identity > img:last-child {
    width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: auto;
  }
  footer {
    right: 0;
    bottom: 40px;
    left: 0;
    width: 100%;
    /* padding: 0 32px; */
    color: #928e81;
    text-align: center;
    font-family: "Abar Low", "Abar Low FaNum", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.9;
    letter-spacing: -0.4px;
  }
  footer span {
    display: block;
  }
}

@media (min-width: 541px) and (max-width: 1200px) {
  .identity {
    top: calc(89px + 57vw);
  }
}
