/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background-color: #000000;
  color: #ffffff;
  overflow-x: hidden;
}

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

/* Page Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Card Component */
.card {
  display: flex;
  gap: 4rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-wrap: nowrap;
}

.card:hover .cell-inner {
  transform: scale(1.05);
}

.card:hover .card-button-arrow svg {
  transform: translateX(5px);
}

/* Image Grid */
.image-grid {
  width: 45%;
  min-width: 380px;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.grid-row {
  display: flex;
  gap: 8px;
  height: 140px;
}

/* Grid Cells with different sizes */
.grid-cell {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(60, 60, 60, 0.5);
  transition: border-color 0.3s ease;
}

.grid-cell:hover {
  border-color: rgba(100, 100, 100, 0.7);
}

.grid-cell.small {
  flex: 0.8;
}

.grid-cell.medium {
  flex: 1.5;
}

.grid-cell.large {
  flex: 2.5;
}

.cell-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

/* Card Content */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card-text h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

.number {
  display: block;
  font-size: 2.5rem;
  font-weight: 400;
  color: #555555;
  margin-bottom: 0.25rem;
}

.card-paragraph {
  font-size: 1rem;
  line-height: 1.6;
  color: #888888;
  margin-top: 1.5rem;
  max-width: 350px;
}

/* Card Button/CTA */
.card-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  margin-top: 1rem;
}

.card-button-arrow {
  display: flex;
  align-items: center;
}

.card-button-arrow svg {
  transition: transform 0.3s ease;
}

/* Credits Section */
.credits {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
}

.btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.x-fixed {
  background-color: #fdb51e;
  color: #000000;
}

.btn.x-fixed:hover {
  background-color: #e5a31b;
  transform: translateY(-2px);
}

.btn.x-custom-colors {
  background-color: #fdb51e;
  color: #000000;
  display: inline-block;
  margin-top: 1rem;
}

.btn.x-custom-colors:hover {
  background-color: #e5a31b;
}

/* Credits Modal */
.credits-mask-outer {
  position: fixed;
  bottom: 70px;
  left: 20px;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.credits-mask-outer.is-visible {
  display: block;
  opacity: 1;
}

.credits-mask {
  transform: translateY(1rem);
  transition: transform 0.3s ease;
}

.credits-mask-outer.is-visible .credits-mask {
  transform: translateY(0);
}

.credits-mask-inner {
  background-color: #ffffff;
  color: #000000;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  position: relative;
}

.credits-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.credits-references {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.credits-group {
  font-size: 0.875rem;
  line-height: 1.5;
}

.credits-title {
  font-weight: 600;
  color: #666666;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.credits-group a {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.credits-group a:hover {
  color: #fdb51e;
}

.credits-group.x-color {
  margin-top: 0.5rem;
}

.credits-color-list {
  display: flex;
  gap: 1rem;
}

.credit-color {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.credit-color-square {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.credit-color-square.x-orange {
  background-color: #fdb51e;
}

.credits-cta {
  font-size: 0.875rem;
  line-height: 1.5;
  padding-top: 1rem;
  border-top: 1px solid #eeeeee;
}

/* Close Button */
.credits-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.close {
  position: relative;
  width: 100%;
  height: 100%;
}

.plus-horizontal,
.plus-vertical {
  position: absolute;
  background-color: #000000;
  transition: background-color 0.2s ease;
}

.plus-horizontal {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%) rotate(45deg);
}

.plus-vertical {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

.credits-close:hover .plus-horizontal,
.credits-close:hover .plus-vertical {
  background-color: #fdb51e;
}

/* Responsive Design */
@media (max-width: 850px) {
  .card {
    flex-direction: column;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .image-grid {
    width: 100%;
    max-width: 100%;
    min-width: auto;
  }

  .card-text h1 {
    font-size: 2.5rem;
  }

  .number {
    font-size: 2rem;
  }
}

@media (max-width: 479px) {
  .page {
    padding: 1rem;
  }

  .grid-row {
    height: 100px;
  }

  .card-text h1 {
    font-size: 2rem;
  }

  .number {
    font-size: 1.5rem;
  }

  .card-paragraph {
    font-size: 0.875rem;
  }

  .credits-mask-inner {
    max-width: 300px;
    padding: 1.5rem;
  }
}
