/* SKPI landing — Universitas Faletehan */
:root {
  --ink: #07131f;
  --navy: #0c2740;
  --teal: #1f8a7a;
  --teal-bright: #2bb5a0;
  --sand: #e8eef2;
  --mist: rgba(232, 238, 242, 0.78);
  --line: rgba(232, 238, 242, 0.22);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
  --pad-x: clamp(1.1rem, 5vw, 3rem);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--sand);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

/* Full-bleed media */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transform-origin: center center;
  animation: drift 28s ease-in-out infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(7, 19, 31, 0.92) 0%, rgba(7, 19, 31, 0.72) 42%, rgba(12, 39, 64, 0.45) 100%),
    linear-gradient(to top, rgba(7, 19, 31, 0.92) 0%, rgba(7, 19, 31, 0.55) 22%, transparent 48%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  from { transform: scale(1.04) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.2%, -1.5%); }
}

@media (pointer: coarse) and (hover: none) {
  .hero-video { display: none; }
  .hero-media {
    background: url("../img/bg-mobile-fallback.jpg") center / cover no-repeat;
  }

  .hero-veil {
    background:
      linear-gradient(180deg, rgba(7, 19, 31, 0.88) 0%, rgba(7, 19, 31, 0.78) 45%, rgba(7, 19, 31, 0.9) 100%);
  }
}

/* Top brand */
.topbar {
  position: relative;
  z-index: 2;
  padding: calc(1rem + var(--safe-t)) var(--pad-x) 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}

.brand img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: transparent;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-text small {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero content */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem var(--pad-x) 1.5rem;
  max-width: 42rem;
  width: 100%;
}

.brand-mark {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 14vw, 6.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f4f8fb 10%, var(--teal-bright) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.headline {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5.5vw, 2.55rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f7fafc;
  hyphens: auto;
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  font-size: clamp(0.92rem, 3.6vw, 1.08rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--mist);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  touch-action: manipulation;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--teal);
  color: #f4fffc;
}

.btn-primary:hover {
  background: var(--teal-bright);
  color: #04201c;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--sand);
}

.btn-ghost:hover {
  border-color: rgba(232, 238, 242, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

/* Footer */
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-top: auto;
  padding: 1rem var(--pad-x) calc(1.15rem + var(--safe-b));
  border-top: 1px solid rgba(232, 238, 242, 0.1);
  background: linear-gradient(
    to top,
    rgba(7, 19, 31, 0.88) 0%,
    rgba(7, 19, 31, 0.55) 65%,
    rgba(7, 19, 31, 0.15) 100%
  );
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.25rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mist);
  transition: color 0.2s ease;
}

.social a:hover,
.social a:focus-visible {
  color: var(--teal-bright);
}

.copy {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(232, 238, 242, 0.55);
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

body.is-ready .reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover { transform: none; }
}

/* —— Phone / narrow —— */
@media (max-width: 720px) {
  .page {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .hero {
    justify-content: flex-end;
    padding-bottom: 1.75rem;
  }

  .headline br {
    display: none; /* satu alur teks di layar sempit */
  }

  .cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    min-height: 3.15rem; /* tap target nyaman */
    font-size: 0.95rem;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .social {
    width: 100%;
    justify-content: flex-start;
    margin: 0 -0.55rem;
  }
}

/* HP sangat sempit */
@media (max-width: 380px) {
  .brand-mark {
    font-size: 2.5rem;
  }

  .headline {
    font-size: 1.28rem;
  }

  .lede {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }

  .brand-text small {
    letter-spacing: 0.03em;
  }
}

/* HP pendek / landscape */
@media (max-height: 560px) {
  .page {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .topbar {
    padding-top: calc(0.65rem + var(--safe-t));
    padding-bottom: 0.35rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .hero {
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
  }

  .brand-mark {
    font-size: clamp(2rem, 10vh, 3rem);
    margin-bottom: 0.35rem;
  }

  .headline {
    font-size: clamp(1.15rem, 4.5vh, 1.5rem);
    margin-bottom: 0.5rem;
  }

  .lede {
    margin-bottom: 0.9rem;
    font-size: 0.88rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cta {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn {
    width: auto;
    flex: 1 1 calc(50% - 0.35rem);
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
  }

  .foot {
    padding-top: 0.65rem;
    padding-bottom: calc(0.75rem + var(--safe-b));
  }
}

/* Tablet ke atas */
@media (min-width: 721px) {
  .brand img {
    width: 48px;
    height: 48px;
  }

  .brand-text strong {
    font-size: 1.15rem;
  }

  .brand-text small {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .hero {
    padding: clamp(1.5rem, 5vh, 3rem) var(--pad-x);
  }

  .cta {
    width: auto;
  }

  .btn {
    min-width: 10.5rem;
  }
}

@media (min-width: 960px) {
  .hero {
    max-width: 44rem;
  }
}
