/* ============================================================
   TABLE OF CONTENTS
   1. Design Tokens (brand colors)
   2. Reset / Base
   3. Accessibility Helpers
   4. Layout / Container
   5. Header + Logo
   6. Welcome (typing effect)
   7. Hero Banner
   8. CTA Row (Masuk / Daftar — split red/white)
   9. Disclaimer Box
   10. Footer
   11. Responsive
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  --color-purple: #213385;   /* Jacksons Purple */
  --color-navy: #090d5f;     /* Arapawa */
  --color-yellow: #f8f13e;   /* Golden Fizz */
  --color-white: #ffffff;
  --color-red: #c1272d;      /* Masuk / Daftar split buttons */

  --gradient-brand: linear-gradient(to bottom, var(--color-purple) 0%, var(--color-navy) 100%);

  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4);

  --transition-fast: 0.2s ease;
}

/* ---------- 2. Reset / Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-base);
  color: var(--color-white);
  background-color: var(--color-navy);
  background-image: radial-gradient(var(--color-purple) 5%, transparent 50%);
  background-size: 22px 22px;
  background-attachment: fixed;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  margin: 0;
}

p {
  margin: 0 0 12px;
}

/* ---------- 3. Accessibility Helpers ---------- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  background: var(--color-yellow);
  color: #111;
  padding: 10px 16px;
  z-index: 1000;
  font-weight: 700;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
}

/* ---------- 4. Layout / Container ---------- */
.container {
  width: 100%;
  max-width: 400px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- 5. Header + Logo ---------- */
.site-header {
  text-align: center;
  margin-bottom: 6px;
}

.logo-link {
  display: inline-block;
}

.logo-link__img {
  max-width: 220px;
  margin: 0 auto;
}

/* ---------- 6. Welcome (typing effect) ---------- */
.welcome {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
}

.welcome__text {
  width: 0;
  margin: 12px auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  overflow: hidden;
  white-space: nowrap;
  border-right: 0.15em solid var(--color-yellow);
  animation: typing 3.5s steps(31, end) forwards,
             blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 27ch; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--color-yellow); }
}

@keyframes shine {
  0% {
    left: -60%;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  35% {
    left: 60%;
    opacity: 1;
  }
  70% {
    left: -60%;
    opacity: 1;
  }
  82% {
    opacity: 0;
  }
  100% {
    left: -60%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome__text {
    animation: none;
    white-space: normal;
    border-right: none;
    width: 100%;
  }
}

/* ---------- 7. Hero Banner ---------- */
.hero-banner {
  margin: 10px 0;
}

.hero-banner img {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-fast);
}

.hero-banner img:hover {
  box-shadow: 0 0 0 2px var(--color-yellow), var(--shadow-md);
}

/* ---------- 8. CTA Row (Masuk / Daftar — split red/white) ---------- */
.cta-row {
  display: flex;
  width: 100%;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

#cta-top {
  position: relative;
  overflow: hidden;
}

#cta-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.75) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: shine 4s linear infinite;
  pointer-events: none;
  z-index: 10;
}

.cta-row__btn {
  flex: 1 1 50%;
  text-align: center;
  padding: 14px 10px;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.cta-row__btn--login {
  background-color: var(--color-red);
  color: var(--color-white);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.cta-row__btn--daftar {
  background-color: var(--color-white);
  color: var(--color-red);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1);
}

.cta-row__btn:hover,
.cta-row__btn:focus-visible {
  filter: brightness(1.08);
}

.cta-row__btn:active {
  transform: translateY(1px);
}

/* ---------- 9. Disclaimer Box ---------- */
.disclaimer-box {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-yellow);
  background: var(--gradient-brand);
  color: var(--color-white);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.disclaimer-box strong {
  color: var(--color-yellow);
  font-weight: 800;
}

/* ---------- 10. Footer ---------- */
.site-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  margin-top: 16px;
}

/* ---------- 11. Responsive ---------- */

/* Tablet */
@media (min-width: 768px) {
  .container {
    max-width: 480px;
    padding: 32px 20px;
  }

  .logo-link__img {
    max-width: 260px;
  }

  .welcome__text {
    font-size: 15px;
  }

  .cta-row__btn {
    padding: 18px 12px;
    font-size: 20px;
  }

  .disclaimer-box {
    font-size: 12px;
  }

  .site-footer {
    font-size: 12px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    max-width: 520px;
  }
}