:root {
  --color-primary: #8c4799;
  --color-blue: #002855;
  --color-accent-blue: #73cde9;
  --color-accent-green: #97d700;
  --color-white: #f5f5f5;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --page-pad: clamp(12px, 4vw, 32px);
  --nav-h: clamp(60px, 10vh, 120px);
  --font: "Rubik", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: #f5f5f5;
  color: #111;
  overflow-x: hidden;
  /* Improve touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Pill header removed */

.hero {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 40px;
  background: url("./assets/bg.png") center/cover no-repeat;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.35)
  );
}
.hero > * {
  position: relative;
  z-index: 1;
}

/* Logo Section */
.logo-section {
  width: 100%;
  max-width: 300px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Bento Grid Styles */
.bento-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin-top: 0;
}

.bento-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

.bento-box {
  position: relative;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.bento-single {
  flex: 1;
  min-width: 0;
}

.bento-double {
  flex: 2;
  min-width: 0;
}

.bento-text {
  color: #333;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 12px;
  line-height: 1.2;
}

/* Bento box hover effects */
.bento-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(140, 71, 153, 0.3);
  border-color: rgba(140, 71, 153, 0.5);
  background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
}

.bento-box:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Color variants for different button types */
.bento-box[data-page="0"] {
  /* Home */
  background: linear-gradient(135deg, #8c4799 0%, #6a358a 100%);
}

.bento-box[data-page="0"] .bento-text {
  color: #fff;
}

.bento-box[data-page="2"] {
  /* FRESCO-2 */
  background: linear-gradient(135deg, #97d700 0%, #7bb800 100%);
}

.bento-box[data-page="2"] .bento-text {
  color: #333;
}

.bento-box[data-page="6"] {
  /* FRESCO-3 */
  background: linear-gradient(135deg, #73cde9 0%, #4fb3d9 100%);
}

.bento-box[data-page="6"] .bento-text {
  color: #333;
}

/* Other boxes use default white background */

/* Active state */
.bento-box.active {
  background: linear-gradient(135deg, #8c4799 0%, #6a358a 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(140, 71, 153, 0.4);
}

.bento-box.active .bento-text {
  font-weight: 700;
  color: #fff;
}

/* Responsive Bento Grid */
@media (max-width: 1024px) {
  .logo-section {
    max-width: 250px;
    height: 100px;
    margin-bottom: 30px;
  }

  .bento-grid {
    max-width: 900px;
    gap: 20px;
  }

  .bento-row {
    gap: 20px;
  }

  .bento-box {
    min-height: 130px;
  }

  .bento-text {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .logo-section {
    max-width: 200px;
    height: 80px;
    margin-bottom: 25px;
  }

  .bento-grid {
    max-width: 100%;
    gap: 16px;
    margin-top: 0;
  }

  .bento-row {
    gap: 16px;
  }

  .bento-box {
    min-height: 110px;
  }

  .bento-text {
    font-size: 11px;
    padding: 8px;
  }

  .hero {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .logo-section {
    max-width: 150px;
    height: 60px;
    margin-bottom: 20px;
  }

  .bento-grid {
    gap: 12px;
  }

  .bento-row {
    gap: 12px;
  }

  .bento-box {
    min-height: 100px;
  }

  .bento-text {
    font-size: 10px;
    padding: 6px;
  }

  .hero {
    padding: 15px;
  }
}
.hero-kicker {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}
.hero-title {
  margin: 0;
  font-size: clamp(28px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.arrows {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}
.arrow {
  width: 75px;
  height: 120px;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: #d9d9d9;
  border: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  z-index: 2;
}

.arrow-left {
  margin-right: auto;
}

.arrow-right {
  margin-left: auto;
  transform: scaleX(-1);
}

.arrow-chev {
  display: block;
  width: 23px;
  height: 23px;
  border-right: 3px solid var(--color-primary);
  border-bottom: 3px solid var(--color-primary);
  transform: rotate(135deg);
}

/* Arrow states based on Figma */
.arrow[data-state="hover"] {
  background: linear-gradient(
    180deg,
    var(--color-primary) 0%,
    var(--color-accent-blue) 100%
  );
  border-color: var(--color-primary);
}

.arrow[data-state="hover"] .arrow-chev {
  border-color: #f5f5f5;
}

.arrow[data-state="clicked"] {
  background: #f5f5f5;
  border-color: var(--color-primary);
}

.arrow[data-state="clicked"] .arrow-chev {
  border-color: var(--color-primary);
}

@media (max-width: 1024px) {
  .arrow {
    width: 56px;
    height: 90px;
  }
  .hero {
    min-height: 60vh;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 50vh;
    padding-left: clamp(8px, 2vw, 16px);
    padding-right: clamp(8px, 2vw, 16px);
    background-attachment: scroll;
  }
  .hero-title {
    font-size: clamp(24px, 8vw, 48px);
  }
  .hero-kicker {
    font-size: clamp(16px, 4vw, 20px);
  }
  .arrow {
    width: 48px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 40vh;
  }
  /* Pill styles removed */
}

/* Content Area - Template Layout */
.content-area {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  height: calc(100vh - var(--nav-h));
  background: #f5f5f5;
  padding: 0;
  display: block;
}

/* Content Header - Top Left (Purple Pill) - Exact Figma Shape */
.content-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 436px;
  height: 83px;
}

.header-info {
  background: #8c4799;
  width: 100%;
  height: 100%;
  border-radius: 0 0 106px 0; /* Only bottom-right corner rounded */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.header-info::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
  border-radius: 0 0 106px 0; /* Match the shape */
}

.header-text {
  font-family: var(--font);
  font-size: 36px; /* Restored to Figma size */
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Two Column Layout - Balanced positioning */
.content-layout {
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  height: calc(100vh - 120px - var(--nav-h));
  display: flex;
  gap: 40px; /* Add gap between columns */
  padding: 0 40px; /* Add padding to both sides */
  justify-content: center; /* Center the content */
}

/* Left Column - Content Bar (wider for better balance) */
.content-column {
  position: relative;
  left: 0;
  top: 0;
  width: 50%; /* Use percentage for better balance */
  max-width: 600px; /* Set max width */
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.content-title {
  font-family: var(--font);
  font-size: 28px; /* Even smaller title */
  font-weight: 500; /* Medium */
  line-height: 1;
  color: var(--color-blue);
  margin: 0 0 12px 0;
}

.content-subtitle {
  font-family: var(--font);
  font-size: 24px; /* Even smaller subtitle */
  font-weight: 700; /* Bold */
  line-height: 1;
  color: var(--color-primary);
  margin: 0 0 25px 0;
}

.content-image {
  width: 100%;
  height: 300px;
  margin: 0 0 15px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-text {
  font-family: var(--font);
  font-size: 16px; /* Even smaller text */
  font-weight: 400;
  line-height: 1.2;
  color: black;
  margin: 0;
}

/* Right Column - Balanced positioning */
.info-column {
  position: relative;
  left: 0;
  top: 0;
  width: 50%; /* Use percentage for better balance */
  max-width: 400px; /* Set max width */
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.logo-section {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-title {
  font-family: var(--font);
  font-size: 20px; /* Even smaller info title */
  font-weight: 700; /* Bold */
  line-height: 1;
  color: var(--color-primary);
  margin: 0 0 12px 0;
}

.info-text {
  font-family: var(--font);
  font-size: 18px; /* Even smaller info text */
  font-weight: 400; /* Regular */
  line-height: 1;
  color: var(--color-blue);
  margin: 0;
}

.info-details {
  display: none; /* Not shown in Figma design */
}

/* Responsive template layout */
@media (max-width: 1200px) {
  .content-layout {
    padding: 0 20px;
    gap: 30px;
  }

  .content-column {
    width: 55%; /* Slightly wider on medium screens */
    max-width: 500px;
  }

  .info-column {
    width: 45%; /* Slightly narrower on medium screens */
    max-width: 350px;
  }

  .content-header {
    width: 300px;
    height: 60px;
  }

  .header-text {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  /* Mobile layout - single column with scrolling */
  .content-area {
    min-height: auto;
    height: auto;
    padding-bottom: calc(
      var(--nav-h) + 120px
    ); /* Much more space for fixed nav and longer content */
    /* Improve touch scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .content-layout {
    position: relative;
    top: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 40px; /* Balanced horizontal padding */
    justify-content: flex-start; /* Reset justify-content for mobile */
  }

  .content-column {
    position: relative;
    left: 0;
    width: 100%;
    height: auto;
    order: 1; /* Main content first */
    max-width: none; /* Remove max-width constraint on mobile */
  }

  .info-column {
    position: relative;
    left: 0;
    width: 100%;
    height: auto;
    order: 2; /* Info column second */
    max-width: none; /* Remove max-width constraint on mobile */
  }

  .content-header {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 50px;
    margin-bottom: 20px;
  }

  .header-info {
    border-radius: 0 0 25px 0; /* Only bottom-right corner rounded */
  }

  .header-text {
    font-size: 16px;
  }

  .content-title {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .content-subtitle {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .content-image {
    height: 250px;
    margin-bottom: 15px;
  }

  .content-text {
    font-size: 14px;
    line-height: 1.4;
  }

  .info-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .info-text {
    font-size: 16px;
    line-height: 1.4;
  }

  .logo-section {
    height: 120px;
    margin-bottom: 20px;
  }

  /* Ensure navigation doesn't overlap content */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .content-area {
    padding-bottom: calc(
      var(--nav-h) + 140px
    ); /* Even more space for very small screens and longer content */
  }

  .content-layout {
    padding: 15px 30px; /* Balanced horizontal padding for small screens */
    gap: 25px;
  }

  .content-header {
    height: 45px;
    max-width: 250px;
  }

  .header-info {
    border-radius: 0 0 20px 0; /* Only bottom-right corner rounded for small screens */
  }

  .header-text {
    font-size: 14px;
  }

  .content-title {
    font-size: 20px;
  }

  .content-subtitle {
    font-size: 18px;
  }

  .content-image {
    height: 200px;
  }

  .content-text {
    font-size: 13px;
  }

  .info-title {
    font-size: 16px;
  }

  .info-text {
    font-size: 14px;
  }

  .logo-section {
    height: 100px;
  }
}

@media (max-width: 360px) {
  /* Very small screens - ensure second column is visible */
  .content-area {
    padding-bottom: calc(
      var(--nav-h) + 160px
    ); /* Maximum space for very small screens and longer content */
  }

  .content-layout {
    padding: 10px 20px; /* Balanced horizontal padding for very small screens */
    gap: 20px;
  }

  .content-header {
    height: 40px;
    max-width: 200px;
  }

  .header-text {
    font-size: 12px;
  }

  .content-title {
    font-size: 18px;
  }

  .content-subtitle {
    font-size: 16px;
  }

  .content-image {
    height: 150px;
  }

  .content-text {
    font-size: 12px;
  }

  .info-title {
    font-size: 14px;
  }

  .info-text {
    font-size: 12px;
  }

  .logo-section {
    height: 80px;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-white);
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  animation: slideIn 0.3s ease;
}

.modal-header {
  background: linear-gradient(135deg, #8c4799 0%, #6a358a 100%);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  color: white;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.modal-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.modal-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-text p {
  color: #333;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.modal-info {
  background: rgba(0, 0, 0, 0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-info h3 {
  color: #8c4799;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.modal-info p {
  color: #333;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Modal Navigation */
.modal-navigation {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
  z-index: 10;
  transform: translateY(-50%);
}

.modal-arrow {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: rgba(140, 71, 153, 0.9);
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-arrow-left {
  margin-right: -30px;
}

.modal-arrow-right {
  margin-left: -30px;
}

.modal-arrow:hover {
  background: rgba(140, 71, 153, 1);
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.modal-arrow:active {
  transform: scale(0.95);
}

.modal-arrow:disabled {
  background: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.arrow-icon {
  display: block;
  line-height: 1;
}

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
    gap: 20px;
  }

  .modal-image {
    height: 150px;
  }

  .modal-text p {
    font-size: 14px;
  }

  .modal-info h3 {
    font-size: 16px;
  }

  .modal-info p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    border-radius: 15px;
  }

  .modal-header {
    padding: 12px 15px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-body {
    padding: 15px;
    gap: 15px;
  }

  .modal-image {
    height: 120px;
  }

  .modal-text p {
    font-size: 13px;
  }

  .modal-info {
    padding: 15px;
  }

  .modal-info h3 {
    font-size: 15px;
  }

  .modal-info p {
    font-size: 12px;
  }

  .modal-arrow {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .modal-arrow-left {
    margin-right: -25px;
  }

  .modal-arrow-right {
    margin-left: -25px;
  }

  .modal-navigation {
    padding: 0 15px;
  }
}
