/**
 * ABIMS docs — index landing only (Observe-inspired)
 * Load AFTER docs.css on index.html only. Does not apply to admin.html.
 */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500;1,600&display=swap");

/* --- Isolate from stationery body.docs --- */

body.docs-home {
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(15px, 0.3vw + 14px, 17px);
  line-height: 1.5;
  letter-spacing: normal;
}

body.docs-home a {
  color: inherit;
  border-bottom: none;
}

/* --- Viewport stack (video → content → chrome) --- */

.docs-home-viewport {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
}

.docs-home__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
}

.docs-home-nav {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  padding: clamp(16px, 3vw, 24px) var(--docs-page-pad, clamp(20px, 4vw, 48px));
}

.docs-home-nav__row {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px clamp(12px, 2.5vw, 20px);
}

.docs-home-hero {
  position: relative;
  z-index: 20;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(16px, 4vw, 32px) var(--docs-page-pad, clamp(20px, 4vw, 48px))
    clamp(80px, 12vh, 120px);
  margin-top: -4vh;
}

.docs-home-scroll-hint {
  position: absolute;
  z-index: 25;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: clamp(12px, 0.3vw + 11px, 14px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.docs-home-scroll-hint:hover {
  color: rgba(255, 255, 255, 0.8);
}

.docs-home-social {
  position: absolute;
  z-index: 25;
  bottom: clamp(20px, 4vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Liquid glass --- */

.docs-home .liquid-glass {
  background: rgba(0, 0, 0, 0.1);
  background-blend-mode: luminosity;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.docs-home .liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%,
    rgba(255, 255, 255, 0.45) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.docs-home .liquid-glass-circle {
  background-blend-mode: luminosity;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.docs-home .liquid-glass-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.22) 30%,
    rgba(255, 255, 255, 0.16) 50%,
    rgba(255, 255, 255, 0.22) 70%,
    rgba(255, 255, 255, 0.45) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* --- Nav pill --- */

.docs-home-nav__pill {
  flex: 1 1 16rem;
  max-width: 72rem;
  margin: 0;
  padding: 12px clamp(16px, 3vw, 24px);
  border-radius: 9999px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  text-align: center;
}

.docs-home-nav__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(1rem, 0.3vw + 0.95rem, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.docs-home-nav__brand svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.docs-home-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.docs-home-nav__links a {
  font-size: clamp(0.875rem, 0.25vw + 0.82rem, 1rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.docs-home-nav__links a:hover {
  color: #fff;
}

.docs-home-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.docs-home-nav__text {
  font-size: clamp(0.875rem, 0.25vw + 0.82rem, 1rem);
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  padding: 8px 4px;
}

.docs-home-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 9999px;
  background: #fff;
  color: #000 !important;
  font-size: clamp(0.875rem, 0.25vw + 0.82rem, 1rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.docs-home-nav__cta:hover {
  opacity: 0.92;
}

button.docs-home-nav__cta {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.docs-home-nav__cta--outside {
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

@media (min-width: 900px) {
  .docs-home-nav__row {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .docs-home-nav__links {
    width: auto;
  }

  .docs-home-nav__brand {
    width: auto;
  }

  .docs-home-nav__cta--outside {
    margin-left: auto;
  }
}

/* --- Hero type (override global .docs h1) --- */

.docs-home-viewport .docs-home-hero__title {
  font-family: "Cormorant Garamond", "Instrument Serif", Georgia, serif;
  font-size: clamp(2.75rem, 7.5vw + 0.35rem, 6rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin: 0 0 1rem;
  color: #fff;
  text-shadow:
    0 0 72px rgba(0, 0, 0, 0.42),
    0 4px 28px rgba(0, 0, 0, 0.28);
}

.docs-home-viewport .docs-home-hero__title em {
  font-style: italic;
  font-weight: 600;
  color: #fff;
}

.docs-home-hero__sub {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 1vw + 0.85rem, 1.35rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  text-shadow:
    0 0 30px rgba(0, 0, 0, 0.32),
    0 1px 10px rgba(0, 0, 0, 0.2);
}

/* --- CTA pill --- */

.docs-home-cta {
  width: min(100%, 42rem);
  margin: 0 auto;
  padding: 6px 6px 6px clamp(16px, 4vw, 28px);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 520px) {
  .docs-home-cta {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
}

.docs-home-cta__hint {
  flex: 1;
  min-width: 140px;
  text-align: left;
  font-size: clamp(0.875rem, 0.25vw + 0.8rem, 1rem);
  color: rgba(255, 255, 255, 0.88);
}

.docs-home-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 9999px;
  background: #fff;
  color: #000 !important;
  font-size: clamp(0.875rem, 0.25vw + 0.82rem, 1rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s ease;
}

.docs-home-cta__btn:hover {
  transform: scale(1.03);
}

.docs-home-cta__btn--ghost {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.docs-home-cta__btn--ghost:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.6);
}

/* --- Social circles --- */

.docs-home-social a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: clamp(12px, 0.3vw + 11px, 14px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.docs-home-social a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* --- Reveal in viewport only (not stationery) --- */

html.docs-motion .docs-home-viewport .docs-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.docs-motion .docs-home-viewport .docs-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Index: stationery block below fold --- */

body.docs-home .docs-main--stationery {
  position: relative;
  z-index: 40;
  padding-top: 0;
  margin-top: 0;
  background: var(--docs-ground, #efe9dd);
  color: var(--docs-ink, #141c2b);
}

/* --- Portal login SweetAlert (corner card) --- */

.docs-portal-swal-container {
  align-items: flex-end !important;
  justify-content: flex-end !important;
  padding: clamp(12px, 3vw, 28px) clamp(12px, 3vw, 32px) !important;
}

.docs-portal-swal {
  margin: 0 !important;
  border-radius: 20px !important;
  overflow: hidden;
  background: linear-gradient(165deg, #141414 0%, #0a0a0a 55%, #111 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: "Sarabun", system-ui, sans-serif;
}

.docs-portal-swal__title {
  padding: 1.1rem 1.25rem 0.35rem !important;
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem) !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  color: #f8fafc !important;
}

.docs-portal-swal__image {
  margin: 0.5rem auto 0.25rem !important;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  max-width: calc(100% - 2rem);
}

.docs-portal-swal__close {
  color: rgba(255, 255, 255, 0.55) !important;
}

.docs-portal-swal__close:hover {
  color: #fff !important;
}

.docs-portal-swal__actions {
  width: 100%;
  padding: 0.85rem 1.15rem 1.15rem !important;
  gap: 10px !important;
  flex-direction: row-reverse !important;
  justify-content: stretch !important;
}

.docs-portal-swal__confirm,
.docs-portal-swal__cancel {
  flex: 1 1 auto;
  margin: 0 !important;
  padding: 0.65rem 1rem !important;
  border-radius: 999px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.docs-portal-swal__confirm {
  background: #fff !important;
  color: #0a0a0a !important;
}

.docs-portal-swal__confirm:hover {
  background: #f1f5f9 !important;
  color: #0a0a0a !important;
}

.docs-portal-swal__cancel {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.docs-portal-swal__cancel:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

@media (max-width: 520px) {
  .docs-portal-swal-container {
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .docs-portal-swal__actions {
    flex-direction: column !important;
  }
}
