/* Reset and full-height */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Deep purple/indigo gradient background */
body {
  background: linear-gradient(135deg, #1b053b 0%, #2f0470 100%);
  transition: background 2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fullscreen liquid glass effect */
.liquid-card {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(30px) saturate(150%);
  overflow: hidden;
}

/* Animated highlight "glint" */
.glint-effect {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.3),
    transparent 60%
  );
  filter: blur(60px);
  animation: glint 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glint {
  0%   { transform: translate(0%, 0%) scale(1); }
  50%  { transform: translate(20%, 10%) scale(1.1); }
  100% { transform: translate(40%, 30%) scale(1); }
}

/* Solutions container */
.solutions-container {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Solution card */
.solution-card {
  position: absolute;
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.solution-card.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Solution logo */
.solution-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40vmin;
  max-width: 300px;
  border-radius: 20%;
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              max-width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              scale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: logoBreath 8s ease-in-out infinite;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  object-fit: contain;
  display: block;
}

/* When UI is shown on desktop, move logo to left */
@media (min-width: 769px) {
  body.show-ui .solution-logo {
    left: calc(50% - 250px);
    width: 40vmin;
    max-width: 300px;
  }
}

@keyframes logoBreath {
  0%, 100% {
    scale: 1;
  }
  50% {
    scale: 1.02;
  }
}

/* Solution content */
.solution-content {
  position: absolute;
  color: white;
  opacity: 0;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  overflow-y: visible;
}

/* Desktop positioning */
@media (min-width: 769px) {
  .solution-content {
    left: calc(50% + 20px);
    right: 5%;
    top: 15%;
    bottom: 15%;
    transform: none;
    text-align: left;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .solution-content .content-inner {
    margin-top: auto;
    margin-bottom: auto;
  }

  .solution-description {
    flex-shrink: 1;
  }

  .description-wrapper.expanded .solution-description {
    flex-shrink: 0;
    overflow-y: visible;
  }
}

body.show-ui .solution-card.active .solution-content {
  opacity: 1;
  display: block;
}

@media (min-width: 769px) {
  body.show-ui .solution-card.active .solution-content {
    display: flex;
  }
}

.solution-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 0 0 10px 0;
  line-height: 1.2;
  flex-shrink: 0;
}

.solution-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0 0 15px 0;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

/* Description wrapper */
.description-wrapper {
  margin-bottom: 20px;
}

.solution-description {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.6;
  font-weight: 300;
  margin: 0 0 5px 0;
  color: rgba(255, 255, 255, 0.85);
  padding-right: 20px;
  letter-spacing: 0.01em;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.description-wrapper.expanded .solution-description {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
  overflow-y: visible;
}

/* See more indicator */
.see-more {
  display: inline-block;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 0.9em;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.see-more:hover {
  color: rgba(255, 255, 255, 1);
}

/* Format bullet points */
.solution-description ul {
  margin: 10px 0;
  padding-left: 20px;
  list-style: none;
}

.solution-description ul li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 8px;
}

.solution-description ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.5);
}

/* Invisible scrollbar */
.solution-description::-webkit-scrollbar {
  width: 4px;
}

.solution-description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.solution-description::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.solution-description::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Learn More Form */
.learn-more-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0 0 4px 0;
  color: white;
}

.form-subtitle {
  font-size: clamp(0.82rem, 1.2vw, 0.9rem);
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 16px 0;
  font-weight: 300;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.form-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: rgba(255, 255, 255, 0.8);
}

.form-checkbox label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
  line-height: 1.4;
  text-align: left;
}

.form-message {
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(42, 170, 110, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(42, 170, 110, 0.3);
}

.form-message.error-msg {
  display: block;
  background: rgba(239, 118, 84, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(239, 118, 84, 0.3);
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  margin-top: 8px;
}

.form-submit:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .liquid-card {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
  }

  .solutions-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
  }

  /* Center logo on mobile - initial state */
  .solution-logo {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 35vmin !important;
    max-width: 180px !important;
    height: 35vmin !important;
    max-height: 180px !important;
  }

  /* When UI shown on mobile */
  body.show-ui .solution-logo {
    position: fixed !important;
    top: 15% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 25vmin !important;
    max-width: 120px !important;
    height: 25vmin !important;
    max-height: 120px !important;
  }

  /* Mobile content positioning */
  .solution-content {
    position: fixed !important;
    left: 5% !important;
    right: 5% !important;
    top: calc(20% + 15vmin) !important;
    bottom: 30px !important;
    transform: none !important;
    text-align: center !important;
    overflow-y: auto !important;
    padding-bottom: 20px !important;
  }

  body.show-ui .solution-content {
    display: block !important;
  }

  .solution-title {
    font-size: 1.3rem;
  }

  .solution-subtitle {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .solution-description {
    font-size: 0.85rem;
    margin-bottom: 5px;
    line-height: 1.5;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }

  .description-wrapper.expanded .solution-description {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow-y: visible;
  }

  .description-wrapper {
    margin-bottom: 15px;
  }

  .see-more {
    display: block;
    text-align: center;
  }
}

/* Landscape mode on mobile */
@media (max-width: 812px) and (orientation: landscape) {
  .solution-logo {
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  body.show-ui .solution-logo {
    position: fixed !important;
    top: 50% !important;
    left: 15% !important;
    transform: translate(-50%, -50%) !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 15vmin !important;
    max-width: 80px !important;
    height: 15vmin !important;
    max-height: 80px !important;
  }

  body.show-ui .solution-content {
    position: fixed !important;
    left: 30% !important;
    right: 5% !important;
    top: 10% !important;
    bottom: 20px !important;
    transform: none !important;
    text-align: left !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .solution-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .description-wrapper.expanded .solution-description {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow-y: visible;
  }

  .see-more {
    text-align: left;
  }
}
