:root {
  --bg: #030201;
  --bone: #e7ddd0;
  --bone-soft: rgba(231, 221, 208, 0.78);
  --muted: #9b8f82;
  --muted-soft: rgba(155, 143, 130, 0.72);

  --red: #5f0b0b;
  --red-soft: rgba(95, 11, 11, 0.72);
  --red-dim: rgba(95, 11, 11, 0.28);

  --line: rgba(231, 221, 208, 0.12);
  --line-soft: rgba(231, 221, 208, 0.08);

  --panel: rgba(3, 2, 1, 0.76);
  --panel-deep: rgba(3, 2, 1, 0.92);

  --serif: georgia, "times new roman", serif;
  --arabic: "noto naskh arabic", "noto nastaliq urdu", "segoe ui", tahoma, arial, sans-serif;
  --mono: ui-monospace, sfmono-regular, menlo, monaco, consolas, "liberation mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--serif);
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(95, 11, 11, 0.42);
  color: var(--bone);
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 64px);
  background:
    linear-gradient(rgba(3, 2, 1, 0.78), rgba(3, 2, 1, 0.95)),
    url("./media/images/background.jpg"),
    var(--bg);
  background-size: cover;
  background-position: center;
}

.page::before {
  content: "";
  position: absolute;
  inset: clamp(14px, 1.7vw, 26px);
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 0;
}

.content-grid {
  width: min(1220px, 100%);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  align-items: center;
  gap: clamp(48px, 6vw, 92px);
}

.title-card {
  min-width: 0;
  display: grid;
  justify-items: start;
  align-content: center;
}

.pashto {
  margin: 0 0 clamp(10px, 1.4vw, 16px);
  color: var(--muted);
  font-family: var(--arabic);
  font-size: clamp(42px, 6.2vw, 86px);
  font-weight: 400;
  line-height: 1.1;
}

h1 {
  margin: 0;
  color: var(--bone);
  font-size: clamp(82px, 11.5vw, 178px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-transform: lowercase;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.meaning {
  margin-top: clamp(28px, 3.4vw, 40px);
  padding-left: clamp(12px, 1.2vw, 18px);
  border-left: 1px solid var(--red-soft);
  display: grid;
  gap: 8px;
}

.meaning p {
  margin: 0;
}

.meaning p:first-child {
  color: var(--bone-soft);
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.15;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}

.meaning p:last-child {
  color: var(--muted);
  font-family: var(--arabic);
  font-size: clamp(21px, 2.5vw, 32px);
  line-height: 1.35;
}

.warning {
  margin: clamp(48px, 6vw, 72px) 0 0;
  color: var(--red-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.info-box {
  width: 100%;
  position: relative;
  padding: clamp(24px, 2.2vw, 30px);
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(3, 2, 1, 0.62), rgba(3, 2, 1, 0.9)),
    var(--panel);
  color: var(--muted);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.info-box::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--red-dim);
  pointer-events: none;
}

.info-label {
  margin: 0 0 18px;
  color: var(--red-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.info-box h2 {
  margin: 0 0 16px;
  color: var(--bone);
  font-size: clamp(30px, 2.7vw, 42px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-transform: lowercase;
}

.info-box p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.info-box dl {
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
}

.info-box dl div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

.info-box dt {
  color: var(--red-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.info-box dd {
  margin: 0;
  color: var(--muted-soft);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 1040px) {
  .page {
    min-height: 100vh;
    min-height: 100svh;
    place-items: start center;
    overflow-x: hidden;
    overflow-y: auto;
    padding:
      max(56px, env(safe-area-inset-top))
      max(28px, env(safe-area-inset-right))
      max(42px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
  }

  .content-grid {
    width: min(760px, 100%);
    grid-template-columns: 1fr;
    gap: clamp(40px, 7vw, 58px);
  }

  .title-card {
    justify-items: center;
    text-align: center;
  }

  h1 {
    font-size: clamp(76px, 18vw, 146px);
  }

  .meaning {
    padding-left: 0;
    padding-top: 22px;
    border-left: 0;
    border-top: 1px solid var(--red-soft);
    justify-items: center;
  }

  .info-box {
    width: min(100%, 540px);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .page {
    padding:
      max(44px, env(safe-area-inset-top))
      max(22px, env(safe-area-inset-right))
      max(34px, env(safe-area-inset-bottom))
      max(22px, env(safe-area-inset-left));
  }

  .page::before {
    inset: 14px;
  }

  .content-grid {
    gap: 38px;
  }

  .pashto {
    margin-bottom: 14px;
    font-size: clamp(36px, 13vw, 58px);
  }

  h1 {
    font-size: clamp(64px, 22vw, 106px);
    line-height: 0.96;
    letter-spacing: -0.048em;
  }

  .meaning {
    margin-top: 28px;
  }

  .meaning p:first-child {
    font-size: clamp(19px, 7vw, 28px);
    letter-spacing: 0.12em;
  }

  .meaning p:last-child {
    font-size: clamp(20px, 7vw, 30px);
  }

  .warning {
    margin-top: 48px;
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .info-box {
    padding: 22px;
  }

  .info-box::before {
    inset: 8px;
  }

  .info-box h2 {
    font-size: 32px;
  }

  .info-box p {
    font-size: 14px;
    line-height: 1.7;
  }

  .info-box dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: clamp(58px, 21vw, 84px);
  }

  .info-box {
    padding: 20px;
  }
}

@supports not ((backdrop-filter: blur(7px)) or (-webkit-backdrop-filter: blur(7px))) {
  .info-box {
    background: var(--panel-deep);
  }
}
