:root {
  --ufl-red: #e63946;
  --ufl-green: #2a9d8f;
  --primary: #1f2937;
  --secondary: #6b7280;
  --light-bg: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--white);
  color: var(--primary);
  line-height: 1.6;
}

/* Prevent viewport dragging on touch devices while preserving normal scrolling
   - `touch-action: pan-y` allows vertical scrolling but prevents accidental
     horizontal panning on mobile.
   - `overscroll-behavior: contain` prevents scroll chaining / rubber-band
     effects from pushing the viewport out of this document.
   - Hide horizontal overflow to avoid accidental horizontal pan.
*/
html, body {
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.nav-left {
  font-size: 1.5rem;
  font-weight: 700;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Cooper Black', 'Cooper', sans-serif;
  color: #000000;
}

.nav-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.apps-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  color: var(--secondary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apps-menu-btn:hover {
  background: var(--light-bg);
  color: var(--primary);
}

.pointer-hint {
  color: var(--ufl-red);
  animation: pointingGesture 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  margin-right: -0.5rem;
}

@keyframes pointingGesture {
  0%, 100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-8px) scale(1.1);
    opacity: 0.7;
  }
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ufl-red), var(--ufl-green));
  cursor: pointer;
  transition: transform 0.3s ease;
}

.avatar:hover {
  transform: scale(1.1);
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem;
  text-align: center;
}

.hero-content {
  animation: fadeInUp 0.8s ease 0.1s both;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1400px;
  width: 100%;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-logo {
  margin-bottom: 2rem;
}

.logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.hero-title {
  font-size: 5.5rem;
  font-weight: 300;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: -2px;
}

.hero-subtitle-container {
  position: relative;
  height: 2.5em;
  overflow: hidden;
  margin-top: 1.5rem;
}

.hero-subtitle {
  position: absolute;
  animation: slideInOut 25s ease-in-out infinite;
  font-size: 1.4rem;
  color: var(--ufl-red);
  margin: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  font-weight: 500;
}

.hero-subtitle:nth-child(1) {
  animation-delay: 0s;
}

.hero-subtitle:nth-child(2) {
  animation-delay: 5s;
}

.hero-subtitle:nth-child(3) {
  animation-delay: 10s;
}

.hero-subtitle:nth-child(4) {
  animation-delay: 15s;
}

.hero-subtitle:nth-child(5) {
  animation-delay: 20s;
}

.hero-subtitle.active {
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
}

.banner-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  text-align: left;
}

.banner-title .highlight {
  background: linear-gradient(135deg, var(--ufl-red), var(--ufl-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner-description {
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.8;
  margin-bottom: 0;
  text-align: left;
}

/* Apps Modal */
.apps-modal {
  position: fixed;
  top: 60px;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
  background: var(--white);
  border-radius: 1rem 0 0 1rem;
  box-shadow: -5px 0 40px rgba(0, 0, 0, 0.16);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 380px;
  width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.apps-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.apps-modal-content {
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.close-modal-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary);
  transition: color 0.3s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal-btn:hover {
  background: var(--light-bg);
  color: var(--primary);
}

.apps-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.6rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  color: var(--primary);
}

.app-item:hover {
  background: var(--light-bg);
  transform: translateY(-4px);
}

.app-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: visible;
}

.app-item-icon::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 6px 8px;
  font-size: 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.app-item-icon::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(17, 24, 39, 0.92) transparent transparent transparent;
  opacity: 0;
  z-index: 300;
  transition: opacity 0.12s ease;
}

.app-item-icon:hover::after,
.app-item-icon:hover::before {
  opacity: 1;
}

.app-item:hover .app-item-icon {
  transform: scale(1.15);
}

.icon-gpt {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.05));
}

.icon-form {
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.15), rgba(42, 157, 143, 0.05));
}

.icon-gift {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.05));
}

.icon-doc {
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.15), rgba(42, 157, 143, 0.05));
}

.icon-analytics {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.05));
}

.icon-hr {
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.15), rgba(42, 157, 143, 0.05));
}

.app-item-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  color: var(--secondary);
  display: -webkit-box;
  line-clamp: 2;            /* standard property */
  -webkit-line-clamp: 2;    /* safari/chrome fallback */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}


/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInOut {
  0% {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
  }
  2% {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  18% {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  20% {
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
  }
}

/* Banner Section */
.banner-image img {
  width: 100%;
  height: auto;
}

.banner-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.banner-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
  text-align: left;
}

.banner-title .highlight {
  background: linear-gradient(135deg, var(--ufl-red), var(--ufl-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner-description {
  font-size: 0.95rem;
  color: var(--secondary);
  line-height: 1.8;
  margin: 0;
  text-align: left;
}

/* Responsive Banner */
@media (max-width: 768px) {
  .hero {
    padding: 1.25rem;
    min-height: calc(100vh - 56px);
    text-align: left;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .logo-img {
    height: 72px;
  }

  .hero-title {
    font-size: 3rem;
    text-align: left;
  }

  .hero-subtitle-container {
    height: auto;
    margin-top: 0.5rem;
    overflow: visible;
  }

  .hero-subtitle {
    position: relative;
    animation: none;
    opacity: 1;
    visibility: visible;
    font-size: 1rem;
    color: var(--secondary);
    margin: 0.25rem 0 0 0;
    display: block;
    width: auto;
  }

  /* On small screens show only the primary subtitle to avoid vertical jumpiness */
  .hero-subtitle:not(.active) {
    display: none;
  }

  .pointer-hint {
    display: none;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .banner-title {
    font-size: 1.5rem;
    text-align: left;
  }

  .banner-description {
    text-align: left;
  }

  .apps-modal {
    max-width: 100vw;
    width: 100vw;
    border-radius: 0;
    top: 56px;
    right: 0;
    box-shadow: none;
  }

  .apps-modal-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .logo-img {
    height: 64px;
  }

  .apps-modal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }
}

