/* ============================================================
   SRA GROUP ERP | HOME PAGE | V3.4.0
   3 responsive versions only:
     Desktop : default (min-width: 1101px)
     Tablet  : 601px - 1100px
     Mobile  : max-width: 600px
   No duplicated selector overrides within the same version.
   ============================================================ */

:root {
  --primary-blue: #0b3d84;
  --primary-green: #159b3e;
  --white: #fff;
  --text-muted: #455b78;
  --shadow: 0 18px 38px rgba(7, 40, 92, 0.17);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  color: var(--primary-blue);
  background: #e7f1fc;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary-green);
  outline-offset: 3px;
}

/* ===== Desktop / shared base ===== */
.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 22px 0 16px;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      180deg,
      rgba(239, 247, 255, 0.1) 0%,
      rgba(239, 247, 255, 0.04) 47%,
      rgba(232, 242, 255, 0.45) 82%,
      rgba(236, 244, 255, 0.88) 100%
    ),
    url("assets/background.png") center center / cover no-repeat;
}

.app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 5%,
    rgba(255, 255, 255, 0.12),
    transparent 60%
  );
}

/* NAVBAR: logo is centered within a real clipping frame, not pushed by top/left offsets. */
.navbar {
  width: min(1400px, 91%);
  min-height: 112px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  animation: sraHomeFromTop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin-left: -20px;
}

.brand-logo-frame {
  position: relative;
  display: block;
  width: 218px;
  height: 94px;
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-logo {
  position: absolute;
  display: block;
  width: 208px;
  height: 208px;
  max-width: none;
  object-fit: contain;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.header-clock {
  flex: 0 0 auto;
  min-width: 210px;
  padding: 10px 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #fff;
  background: linear-gradient(160deg, #27344d, #17233a);
  border-radius: 17px;
  box-shadow: 0 9px 19px rgba(10, 25, 55, 0.2);
  text-align: center;
}

.clock-date {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.clock-time {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.clock-zone {
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 700;
}

/* HERO */
.main-content {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  padding: clamp(35px, 5vh, 76px) 18px 0;
  text-align: center;
  animation: sraHomeFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.13s both;
}

.hero h1 {
  margin: 0;
  color: var(--primary-green);
  font-size: clamp(44px, 5.4vw, 80px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.35);
}

.hero p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: clamp(16px, 1.65vw, 24px);
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.7);
}

.hero-line {
  width: 82px;
  height: 6px;
  margin: 22px auto 0;
  border-radius: 12px;
  background: var(--primary-green);
}

/* FIVE CARDS */
.company-section {
  width: min(1400px, 91%);
  margin: auto auto 0;
  padding-top: clamp(75px, 11vh, 145px);
  scroll-margin-top: 115px;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 20px;
}

.company-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: end;
  min-width: 0;
}

.company-card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 222px;
  min-height: 222px;
  padding: 16px 14px 18px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  text-align: center;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.company-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 42px rgba(7, 40, 92, 0.25);
}

.company-card::before,
.company-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -38px;
  width: 175px;
  height: 80px;
  border-radius: 50% 0 0 0;
  transform: rotate(-15deg);
  pointer-events: none;
  opacity: 0.3;
}

.company-card::after {
  right: -42px;
  bottom: -22px;
  width: 155px;
  height: 49px;
  opacity: 0.48;
}

.company-card.green::before,
.company-card.green::after {
  background: #51d951;
}

.company-card.blue::before,
.company-card.blue::after {
  background: #60bafd;
}

.company-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 60px;
  padding: 10px;
  border-radius: 17px;
  color: #078e34;
  background: linear-gradient(135deg, #ecfaee, #cbefd0);
  flex: 0 0 auto;
}

.company-icon svg {
  width: 48px;
  height: 48px;
}

.company-icon.company-logo {
  width: 130px;
  height: 60px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.company-icon.company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.ops-icon {
  color: #0a8c46;
}

.company-name {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  margin: 8px 0;
  padding: 0 2px;
  color: var(--primary-blue);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  overflow-wrap: break-word;
}

.company-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 205px);
  height: 38px;
  min-height: 38px;
  margin-top: auto;
  padding: 7px 12px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #2478cc, #113d87);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 0.2s,
    filter 0.2s;
}

.company-button:hover {
  transform: scale(1.035);
  filter: brightness(1.1);
}

.arrow-icon {
  font-size: 23px;
  line-height: 1;
}

.site-footer {
  width: min(94%, 1560px);
  margin: 18px auto 0;
  color: #29466b;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85);
  animation: sraHomeFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.58s both;
}

/* ENTER ANIMATIONS */
@keyframes sraHomeFromTop {
  from {
    opacity: 0;
    translate: 0 -18px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes sraHomeFadeUp {
  from {
    opacity: 0;
    translate: 0 18px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

.company-grid > .company-card,
.company-stack > .company-card {
  animation: sraHomeFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.company-grid > .company-card:nth-child(1) {
  animation-delay: 0.22s;
}

.company-grid > .company-card:nth-child(2) {
  animation-delay: 0.29s;
}

.company-grid > .company-card:nth-child(3) {
  animation-delay: 0.36s;
}

.company-stack > .company-card:nth-child(1) {
  animation-delay: 0.43s;
}

.company-stack > .company-card:nth-child(2) {
  animation-delay: 0.5s;
}

/* COMPANY MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s,
    visibility 0.25s;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: min(480px, 94vw);
  max-height: min(92vh, 650px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(35px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.show .modal {
  transform: none;
}

.modal-header {
  min-height: 76px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #edf2f7;
}

.modal-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 22px;
  font-weight: 700;
}

.modal-x {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #334155;
  background: #f4f6fa;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.modal-x:hover {
  background: #e7edf5;
}

.modal-body {
  padding: 27px 24px;
  text-align: center;
  background: #f8fafc;
}

.modal-symbol {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 18px;
  color: #0a8c46;
  background: #e4f6e9;
}

.modal-symbol svg {
  width: 42px;
  height: 42px;
}

.modal-body p {
  margin: 8px 0 15px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.selected-name {
  padding: 15px;
  border: 1px solid #d9e9fa;
  border-radius: 12px;
  background: #fff;
  color: #0b3d84;
  font-size: 16px;
  font-weight: 800;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #edf2f7;
}

.modal-close {
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #0b3d84;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.modal-close:hover {
  background: #1354aa;
}

/* ===== Tablet: 601px - 1100px ===== */
@media (min-width: 601px) and (max-width: 1100px) {
  .navbar {
    width: 94%;
    min-height: 102px;
  }

  .brand {
    margin-left: -14px;
  }

  .brand-logo-frame {
    width: 190px;
    height: 86px;
  }

  .brand-logo {
    width: 196px;
    height: 196px;
  }

  .header-clock {
    min-width: 170px;
  }

  .clock-time {
    font-size: 23px;
  }

  .company-section {
    width: 94%;
    padding-top: 70px;
  }

  .company-grid {
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .company-stack {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* ===== Mobile: up to 600px ===== */
@media (max-width: 600px) {
  .app-shell {
    padding-top: 12px;
    padding-bottom: 22px;
  }

  .navbar {
    width: min(92%, 400px);
    min-height: 78px;
    padding: 0;
  }

  .brand {
    margin-left: -8px;
  }

  .brand-logo-frame {
    width: 123px;
    height: 56px;
  }

  .brand-logo {
    width: 128px;
    height: 128px;
  }

  .header-clock {
    min-width: 135px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .clock-date {
    font-size: 9px;
  }

  .clock-time {
    font-size: 18px;
  }

  .hero {
    padding-top: 60px;
  }

  .hero h1 {
    font-size: clamp(34px, 9vw, 43px);
  }

  .hero p {
    font-size: 15px;
  }

  .company-section {
    width: min(92%, 400px);
    padding-top: 80px;
  }

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

  .company-stack {
    grid-column: auto;
    display: flex;
    gap: 16px;
  }

  .company-name {
    font-size: 15px;
  }

  .site-footer {
    font-size: 11px;
    line-height: 1.6;
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-body {
    padding: 22px 18px;
  }
}

/* Accessibility preference; not a responsive layout breakpoint. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .modal {
    transform: none;
  }
}
