:root {
  --genesis-blue: #244b87;
  --genesis-blue-deep: #102a43;
  --genesis-yellow: #f6d45b;
  --genesis-yellow-soft: #fff8dc;
  --text: #17243a;
  --muted: #627087;
  --background: #f7f9fc;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

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

.landing-page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 28px clamp(22px, 4.5vw, 72px) 24px;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 255, 255, .96) 0,
      rgba(255, 255, 255, .70) 34%,
      transparent 64%
    ),
    linear-gradient(145deg, #fbfcfe 0%, #f4f7fb 100%);
}

.decoration {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.decoration-top {
  width: 430px;
  height: 430px;
  top: -190px;
  right: -235px;
  background: rgba(36, 75, 135, .065);
}

.decoration-bottom {
  width: 290px;
  height: 290px;
  left: -170px;
  bottom: -130px;
  background: rgba(246, 212, 91, .15);
}

.site-header,
.hero,
.access-options,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin-inline: auto;
}

.site-header {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  width: 280px;
  height: 82px;
  object-fit: contain;
  object-position: left center;
}

.security-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid #dfe6f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: #536277;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .04);
}

.security-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f9e68;
  box-shadow: 0 0 0 4px rgba(47, 158, 104, .12);
}

.hero {
  padding: clamp(26px, 4.2vh, 46px) 0
           clamp(30px, 4.7vh, 48px);
  text-align: center;
}

.hero h1 {
  margin: 0;
  color: var(--genesis-blue-deep);
  font-size: clamp(52px, 5.6vw, 78px);
  line-height: .98;
  letter-spacing: -.045em;
}

.hero h1::after {
  content: "";
  display: block;
  width: 58px;
  height: 5px;
  margin: 20px auto 18px;
  border-radius: 10px;
  background: var(--genesis-yellow);
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
}

.access-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}

.access-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(28px, 3vw, 42px);
  border-radius: 24px;
  transition:
    transform 180ms ease-out,
    box-shadow 180ms ease-out,
    border-color 180ms ease-out;
}

.access-card:hover {
  transform: translateY(-4px);
}

.access-card:focus-visible {
  outline: 3px solid var(--genesis-yellow);
  outline-offset: 4px;
}

.login-card {
  color: var(--white);
  background: linear-gradient(145deg, #0f3568, #244b87);
  box-shadow: 0 22px 52px rgba(16, 42, 67, .21);
}

.login-card:hover {
  box-shadow: 0 28px 62px rgba(16, 42, 67, .28);
}

.attendance-card {
  border: 1.5px solid rgba(36, 75, 135, .18);
  background:
    radial-gradient(
      circle at 85% 5%,
      rgba(246, 212, 91, .34),
      transparent 36%
    ),
    rgba(255, 255, 255, .94);
  box-shadow: 0 20px 48px rgba(16, 42, 67, .10);
}

.attendance-card:hover {
  border-color: rgba(36, 75, 135, .40);
  box-shadow: 0 26px 56px rgba(16, 42, 67, .15);
}

.card-icon {
  position: absolute;
  top: 34px;
  left: 38px;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
}

.card-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card .card-icon {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .13);
}

.attendance-card .card-icon {
  color: var(--genesis-blue);
  background: var(--genesis-yellow-soft);
  border: 1px solid rgba(246, 212, 91, .70);
}

.card-arrow {
  position: absolute;
  top: 39px;
  right: 34px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 27px;
  transition: transform 180ms ease-out;
}

.login-card .card-arrow {
  background: rgba(255, 255, 255, .10);
}

.attendance-card .card-arrow {
  color: var(--genesis-blue);
  background: #f0f4fa;
}

.access-card:hover .card-arrow {
  transform: translateX(4px);
}

.card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-kicker {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .72;
}

.card-title {
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 800;
}

.card-description {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
  opacity: .82;
}

.attendance-description {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.attendance-description i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--genesis-blue);
  opacity: .45;
}

.site-footer {
  margin-top: auto;
  padding-top: clamp(30px, 5vh, 50px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  color: #7a879a;
  font-size: 12px;
}

.site-footer i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--genesis-yellow);
}

@media (max-width: 760px) {
  .landing-page {
    padding: 20px 18px;
    overflow-y: auto;
  }

  .site-header {
    min-height: 76px;
  }

  .brand-logo {
    width: 215px;
    height: 68px;
  }

  .security-label {
    display: none;
  }

  .hero {
    padding: 30px 0 32px;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 62px);
  }

  .hero h1::after {
    height: 4px;
    margin: 16px auto 14px;
  }

  .hero p {
    max-width: 340px;
    margin-inline: auto;
    font-size: 15px;
  }

  .access-options {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .access-card {
    min-height: 218px;
    padding: 26px;
    border-radius: 20px;
  }

  .card-icon {
    top: 24px;
    left: 25px;
    width: 56px;
    height: 56px;
    border-radius: 17px;
  }

  .card-icon svg {
    width: 34px;
    height: 34px;
  }

  .card-arrow {
    top: 28px;
    right: 24px;
    width: 38px;
    height: 38px;
  }

  .card-title {
    font-size: 26px;
  }

  .card-description {
    margin-top: 10px;
    font-size: 13px;
  }

  .site-footer {
    padding-top: 28px;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .site-footer i {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-card,
  .card-arrow {
    transition: none;
  }

  .access-card:hover,
  .access-card:hover .card-arrow {
    transform: none;
  }
}

/* =========================================================
   LIGHT / DARK THEME SWITCHER
   ========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #dfe6f0;
  border-radius: 999px;
  color: #536277;
  background: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .04);
}

.theme-toggle:hover {
  border-color: rgba(36, 75, 135, .35);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--genesis-yellow);
  outline-offset: 3px;
}

.theme-symbol {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.sun-symbol,
.moon-symbol {
  grid-area: 1 / 1;
}

.sun-symbol {
  display: none;
}

html[data-theme="dark"] {
  --text: #edf3fb;
  --muted: #a2b0c3;
  --background: #071426;
}

html[data-theme="dark"] body {
  background: #071426;
}

html[data-theme="dark"] .landing-page {
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(36, 75, 135, .22) 0,
      rgba(11, 31, 55, .45) 35%,
      transparent 64%
    ),
    linear-gradient(145deg, #071426 0%, #0b1f37 100%);
}

html[data-theme="dark"] .decoration-top {
  background: rgba(246, 212, 91, .07);
}

html[data-theme="dark"] .decoration-bottom {
  background: rgba(36, 75, 135, .22);
}

html[data-theme="dark"] .brand-logo {
  padding: 7px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .95);
}

html[data-theme="dark"] .hero h1 {
  color: #f1f6fc;
}

html[data-theme="dark"] .hero p {
  color: #aab7c9;
}

html[data-theme="dark"] .security-label,
html[data-theme="dark"] .theme-toggle {
  color: #d9e3ef;
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .07);
}

html[data-theme="dark"] .attendance-card {
  color: #edf3fb;
  border-color: rgba(246, 212, 91, .25);
  background:
    radial-gradient(
      circle at 85% 5%,
      rgba(246, 212, 91, .13),
      transparent 36%
    ),
    #11263f;
  box-shadow: 0 22px 52px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] .attendance-card .card-arrow {
  color: var(--genesis-yellow);
  background: rgba(255, 255, 255, .07);
}

html[data-theme="dark"] .attendance-card .card-icon {
  color: var(--genesis-yellow);
  background: rgba(246, 212, 91, .10);
}

html[data-theme="dark"] .site-footer {
  color: #8494aa;
}

html[data-theme="dark"] .moon-symbol {
  display: none;
}

html[data-theme="dark"] .sun-symbol {
  display: block;
}

@media (max-width: 760px) {
  .header-actions {
    gap: 0;
  }

  .theme-toggle {
    min-width: 42px;
    padding: 0 11px;
  }

  .theme-toggle [data-theme-label] {
    display: none;
  }
}

/* =========================================================
   THEME SWITCHER REFINEMENT V2
   ========================================================= */

.theme-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
}

.theme-toggle [data-theme-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-symbol {
  width: 22px;
  height: 22px;
  font-size: 19px;
}

html[data-theme="dark"] .login-card {
  color: #ffffff;
}

html[data-theme="dark"] .login-card .card-kicker,
html[data-theme="dark"] .login-card .card-title,
html[data-theme="dark"] .login-card .card-description {
  color: #ffffff;
}

@media (max-width: 900px) {
  .security-label {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    gap: 14px;
  }

  .brand-logo {
    width: 185px;
    height: 62px;
  }

  .header-actions {
    margin-left: auto;
  }

  .theme-toggle {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
  }

  html[data-theme="dark"] .brand-logo {
    padding: 5px;
    border-radius: 12px;
  }
}

@media (max-width: 370px) {
  .brand-logo {
    width: 165px;
  }
}
