@import './global.css';

:root {
  --purple-gradient-black: rgba(123, 44, 255, 0);
  --purple-gradient-light: rgba(123, 44, 255, 0.7);
  --purple-gradient-dark: rgba(123, 44, 255, 0.25);

  --green-gradient-black: rgba(46, 204, 113, 0);
  --green-gradeint-light: rgba(46, 204, 113, 0.7);
  --green-gradient-dark: rgba(46, 204, 113, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.home-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  background-color: var(--lab-black);
}

.background-effects {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 2.5rem;
  gap: 1.5rem;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding-top: 1rem;
}

.logo {
  width: 75%;
  max-width: 600px;
  display: block;
}

.tagline {
  text-align: center;
  width: 50%;
  font-size: 1.25rem;
  color: var(--lab-white);
  font-family: var(--font-display);
}

h2 {
  font-size: 2rem;
}

.cards-row {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  gap: 0;
  align-items: center;
  justify-content: center;
}

.upload-image,
.browse-template {
  flex: 0 0 485px;
  height: 500px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;

  padding: 2rem;

  gap: 1rem;

  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.upload-image {
  background: linear-gradient(to bottom, #754ded 0%, #180a3d 100%);
  box-shadow:
    0 0 30px rgba(117, 77, 237, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.25s ease;
}

.upload-image:hover {
  box-shadow:
    0 0 48px rgba(117, 77, 237, 0.55),
    0 14px 32px rgba(0, 0, 0, 0.5);
}

.browse-template {
  background: linear-gradient(to bottom, #4a8a1f 0%, #0b230e 100%);
  box-shadow:
    0 0 30px rgba(74, 138, 31, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.25s ease;
}

.browse-template:hover {
  box-shadow:
    0 0 48px rgba(74, 138, 31, 0.55),
    0 14px 32px rgba(0, 0, 0, 0.5);
}

.divider {
  position: relative;
  width: 120px;
  flex-shrink: 0;
  align-self: stretch;
  overflow: hidden;
  z-index: 10;
  background: transparent;
}

/* Portrait: stack cards vertically when height > width */
@media (orientation: portrait) {
  .content {
    height: auto;
    min-height: 100vh;
  }

  .cards-row {
    flex-direction: column;
    align-items: center;
    flex: none;
  }

  .upload-image,
  .browse-template {
    flex: none;
    width: min(90vw, 480px);
    height: auto;
    min-height: 220px;
  }

  .divider {
    width: min(90vw, 480px);
    height: 80px;
    align-self: center;
    flex-shrink: 0;
    display: block;
  }

  .logo {
    width: 85%;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* Small landscape screens — scale cards down to fit */
@media (orientation: landscape) and (max-width: 1090px) {
  .upload-image,
  .browse-template {
    flex: 1;
    height: auto;
    min-height: 260px;
  }
}

.particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.upload-btn,
.template-btn {
  width: 100%;
  max-width: 280px;

  min-height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 999px;

  padding: 0 1.5rem;

  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  color: var(--lab-white);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.upload-btn {
  background: linear-gradient(
    to right,
    rgba(117, 77, 237, 0.6),
    rgba(117, 77, 237, 1)
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 0 18px rgba(117, 77, 237, 0.3),
    0 6px 18px rgba(0, 0, 0, 0.4);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 28px rgba(117, 77, 237, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.5);
}

.template-btn {
  background: linear-gradient(
    to right,
    rgba(74, 138, 31, 0.6),
    rgba(74, 138, 31, 1)
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 0 18px rgba(74, 138, 31, 0.3),
    0 6px 18px rgba(0, 0, 0, 0.4);
}

.template-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 28px rgba(74, 138, 31, 0.6),
    0 10px 24px rgba(0, 0, 0, 0.5);
}

.home-hex {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  width: 340px;
}

.home-hex--tl {
  top: -5rem;
  left: -15rem;
  width: 550px;
  opacity: 0.75;
}

.home-hex--br {
  bottom: 0;
  right: 0;
  width: 250px;
}

.lattice-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  opacity: 0.38;
}

.lattice-bg img {
  width: 100%;
  height: 100%;
  object-fit: none;

  transform: scale(0.6);
  transform-origin: center;

  filter: drop-shadow(0 0 12px rgba(123, 44, 255, 0.25))
    drop-shadow(0 0 12px rgba(46, 204, 113, 0.2));
}
