/* Landing — exam.aryan.ac.ir */
:root {
  --lp-ink: #0f1c24;
  --lp-cream: #f4efe6;
  --lp-sand: #d8c4a4;
  --lp-teal: #1a4a52;
  --lp-teal-deep: #0d2e34;
  --lp-glass: rgba(15, 28, 36, 0.42);
  --lp-glass-border: rgba(244, 239, 230, 0.22);
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  margin: 0;
  min-height: 100%;
}

body.lp {
  min-height: 100svh;
  font-family: "Vazirmatn", "IRANSansX", Tahoma, sans-serif;
  color: var(--lp-cream);
  background: var(--lp-ink);
  overflow-x: hidden;
  position: relative;
}

.lp-media {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.lp-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.06);
  animation: lp-ken 22s var(--lp-ease) both;
  filter: saturate(1.05) contrast(1.04);
}

.lp-media__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 18, 22, 0.78) 8%, rgba(8, 18, 22, 0.45) 48%, rgba(13, 46, 52, 0.55) 100%),
    linear-gradient(to top, rgba(8, 18, 22, 0.72) 0%, transparent 42%);
}

@keyframes lp-ken {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.2%, 0.6%, 0); }
}

.lp-top,
.lp-main,
.lp-foot {
  position: relative;
  z-index: 1;
}

.lp-top {
  padding: 28px clamp(20px, 4vw, 48px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: lp-rise 0.9s var(--lp-ease) both;
}

.lp-about-link {
  color: inherit;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, 0.28);
  background: rgba(15, 28, 36, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s var(--lp-ease), border-color 0.25s var(--lp-ease), transform 0.25s var(--lp-ease);
}

.lp-about-link:hover,
.lp-about-link:focus-visible {
  background: rgba(15, 28, 36, 0.55);
  border-color: rgba(216, 196, 164, 0.45);
  transform: translateY(-1px);
  outline: none;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.lp-brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  object-fit: contain;
}

.lp-brand strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lp-brand small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  opacity: 0.78;
  font-weight: 400;
}

.lp-main {
  min-height: calc(100svh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px clamp(20px, 4vw, 48px) 56px;
  max-width: 920px;
  margin: 0 auto;
}

.lp-kicker {
  margin: 0 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lp-sand);
  opacity: 0.9;
  animation: lp-rise 0.95s 0.08s var(--lp-ease) both;
}

.lp-title {
  margin: 0;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 40px rgba(0,0,0,0.35);
  animation: lp-rise 1s 0.12s var(--lp-ease) both;
}

.lp-lead {
  margin: 16px 0 0;
  max-width: 36ch;
  font-size: clamp(0.98rem, 1.7vw, 1.15rem);
  line-height: 1.85;
  font-weight: 400;
  color: rgba(244, 239, 230, 0.88);
  animation: lp-rise 1.05s 0.18s var(--lp-ease) both;
}

.lp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  width: 100%;
  animation: lp-rise 1.1s 0.26s var(--lp-ease) both;
}

/* RTL: first item (video) sits on the right, second (login) on the left */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: min(100%, 280px);
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--lp-glass-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s var(--lp-ease), background 0.35s var(--lp-ease), border-color 0.35s var(--lp-ease);
  font: inherit;
  text-align: right;
}

.lp-btn:hover,
.lp-btn:focus-visible {
  transform: translateY(-3px);
  outline: none;
}

.lp-btn--ghost {
  background: var(--lp-glass);
}

.lp-btn--ghost:hover,
.lp-btn--ghost:focus-visible {
  background: rgba(15, 28, 36, 0.58);
  border-color: rgba(244, 239, 230, 0.4);
}

.lp-btn--solid {
  background: linear-gradient(135deg, #1f5a63 0%, #123840 100%);
  border-color: rgba(216, 196, 164, 0.35);
}

.lp-btn--solid:hover,
.lp-btn--solid:focus-visible {
  background: linear-gradient(135deg, #256873 0%, #164650 100%);
  border-color: rgba(216, 196, 164, 0.55);
}

.lp-btn__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(244, 239, 230, 0.1);
  flex-shrink: 0;
  color: var(--lp-sand);
}

.lp-btn__txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lp-btn__txt strong {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.lp-btn__txt em {
  font-style: normal;
  font-size: 0.78rem;
  opacity: 0.72;
}

.lp-foot {
  padding: 0 24px 22px;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.65;
  animation: lp-rise 1.15s 0.32s var(--lp-ease) both;
}

.lp-foot p { margin: 0; }

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Video modal */
.lp-modal[hidden] { display: none !important; }

.lp-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.lp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.28s var(--lp-ease);
}

.lp-modal.is-open .lp-modal__backdrop { opacity: 1; }

.lp-modal__dialog {
  position: relative;
  width: min(960px, 100%);
  max-height: min(92svh, 920px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(28, 44, 50, 0.98) 0%, rgba(12, 22, 28, 0.98) 100%);
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 28px 90px rgba(0,0,0,0.5);
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition: transform 0.34s var(--lp-ease), opacity 0.34s var(--lp-ease);
}

.lp-modal.is-open .lp-modal__dialog {
  transform: none;
  opacity: 1;
}

.lp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 14px 18px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.1);
  flex-shrink: 0;
}

.lp-modal__head-text {
  text-align: right;
  min-width: 0;
}

.lp-modal__eyebrow {
  margin: 0 0 3px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--lp-sand);
  opacity: 0.85;
}

.lp-modal__head h2 {
  margin: 0;
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
  font-weight: 650;
  line-height: 1.35;
}

.lp-modal__close {
  border: 1px solid rgba(244, 239, 230, 0.14);
  background: rgba(255,255,255,0.04);
  color: var(--lp-cream);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.25s var(--lp-ease), border-color 0.25s var(--lp-ease);
}

.lp-modal__close:hover,
.lp-modal__close:focus-visible {
  background: rgba(255,255,255,0.1);
  border-color: rgba(244, 239, 230, 0.28);
  outline: none;
}

.lp-modal__stage {
  padding: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.lp-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(72svh, 560px);
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #05080a;
  border: 1px solid rgba(244, 239, 230, 0.08);
}

/* Keep 16:9 while respecting max-height on short screens */
@supports (height: 1svh) {
  .lp-modal__frame {
    width: min(100%, calc(min(72svh, 560px) * 16 / 9));
  }
}

.lp-modal__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05080a;
}

.lp-modal__loader,
.lp-modal__error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  background: rgba(5, 8, 10, 0.55);
  color: rgba(244, 239, 230, 0.92);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 2;
}

.lp-modal__loader[hidden],
.lp-modal__error[hidden],
.lp-modal__play[hidden] {
  display: none !important;
}

.lp-modal__spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(244, 239, 230, 0.2);
  border-top-color: var(--lp-sand);
  animation: lp-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes lp-spin {
  to { transform: rotate(360deg); }
}

.lp-modal__play {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  background: rgba(5, 8, 10, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lp-modal__play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--lp-cream);
  background: rgba(26, 74, 82, 0.92);
  border: 1px solid rgba(216, 196, 164, 0.35);
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  transition: transform 0.25s var(--lp-ease);
}

.lp-modal__play:hover .lp-modal__play-icon,
.lp-modal__play:focus-visible .lp-modal__play-icon {
  transform: scale(1.06);
}

.lp-modal__error {
  pointer-events: none;
  background: rgba(5, 8, 10, 0.72);
  color: #f0d0c8;
  font-size: 0.86rem;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .lp-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .lp-btn { min-width: 0; width: 100%; }
  .lp-main { min-height: calc(100svh - 160px); padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-media__img,
  .lp-top,
  .lp-kicker,
  .lp-title,
  .lp-lead,
  .lp-actions,
  .lp-foot,
  .lp-btn,
  .lp-modal__backdrop,
  .lp-modal__dialog,
  .lp-modal__spinner,
  .lp-modal__play-icon {
    animation: none !important;
    transition: none !important;
  }
  .lp-media__img { transform: none; }
  .lp-modal.is-open .lp-modal__dialog { opacity: 1; transform: none; }
  .lp-modal.is-open .lp-modal__backdrop { opacity: 1; }
}
