: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 {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.pill {
  position: relative;
  margin: 0 auto;
  max-width: 600px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  padding: 12px calc(24px + 2em);
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
  background: linear-gradient(135deg, #3a1d59 0%, #4f2567 40%, #6a358a 100%);
}

.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-left: var(--page-pad);
  padding-right: var(--page-pad);
  background-color: #4a90e2; /* Fallback color */
  background-image: url("./assets/bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.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;
}
.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);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #3a1d59, #4f2567, #5e2b74);
  height: var(--nav-h);
  z-index: 20; /* ensure above hero */
}
.bottom-nav-list {
  list-style: none;
  margin: 0;
  padding: 0; /* tight to edges */
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr)); /* ensure 13 slots */
  grid-auto-flow: row dense;
  grid-auto-rows: 1fr;
  height: 100%;
  gap: 0;
}
.bottom-nav-list > li {
  height: 100%;
  display: flex;
}
.nav-btn {
  display: flex;
  text-align: center;
  color: transparent; /* hide original text */
  text-decoration: none;
  padding: 0 clamp(8px, 1vw, 12px); /* horizontal only to keep equal top/bottom */
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  font-size: clamp(11px, 0.9vw, 13px);
  position: relative;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease, outline-color 0.15s ease;
}

/* Text content layer - separate from gradient */
.nav-btn::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3; /* above gradient */
  pointer-events: none;
  color: #fff;
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: inherit;
}
/* Base states */
.nav-btn:hover {
  filter: brightness(1.05);
}
.nav-btn:active {
  transform: translateY(1px);
}

/* Variants mapped to Figma */
.nav-btn--normal {
  background: var(--color-primary);
}
.nav-btn--blue {
  background: var(--color-accent-blue);
  color: #03293d;
}
.nav-btn--green {
  background: var(--color-accent-green);
  color: #002855;
}
.nav-btn--home {
  background: var(--color-primary);
}

/* Active state */
.nav-btn[data-state="active"] {
  font-weight: 700;
}

/* Shadow overlay like figma (multiply) - using box-shadow instead of ::after */
.nav-btn {
  box-shadow: inset 0 0 0 1000px rgba(0, 40, 85, 0.4);
}

/* Hide shadow overlay on hover/clicked per Figma */
.nav-btn[data-state="hover"],
.nav-btn[data-state="clicked"] {
  box-shadow: none;
}

/* State visuals per component spec */
.nav-btn[data-variant="normal"][data-state="default"] {
  filter: none;
}
.nav-btn[data-variant="normal"][data-state="hover"] {
  filter: brightness(1.12);
}
.nav-btn[data-variant="normal"][data-state="clicked"] {
  transform: translateY(1px);
  background: #97d700;
  color: #002855;
}
.nav-btn[data-variant="normal"][data-state="active"] {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: -2px;
}

.nav-btn[data-variant="blue"][data-state="hover"] {
  filter: brightness(1.08) saturate(1.03);
}
.nav-btn[data-variant="blue"][data-state="clicked"] {
  transform: translateY(1px);
  background: #97d700;
  color: #002855;
}
.nav-btn[data-variant="blue"][data-state="active"] {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: -2px;
}

.nav-btn[data-variant="green"][data-state="hover"] {
  filter: brightness(1.08);
}
.nav-btn[data-variant="green"][data-state="clicked"] {
  transform: translateY(1px);
  background: #8c4799;
  color: #fff;
}
.nav-btn[data-variant="green"][data-state="active"] {
  outline: 2px solid rgba(0, 40, 85, 0.25);
  outline-offset: -2px;
}

.nav-btn[data-variant="home"][data-state="hover"] {
  filter: brightness(1.08);
}
.nav-btn[data-variant="home"][data-state="clicked"] {
  transform: translateY(1px);
}
.nav-btn[data-variant="home"][data-state="active"] {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: -2px;
}

/* Active caret indicator (small triangle) */
.nav-btn[data-state="active"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #73cde9;
  z-index: 4; /* above text */
}

/* Fallback :hover behavior (in case JS doesn't set data-state) */
.nav-btn:not([data-state="active"]):hover::after {
  opacity: 0;
}
.nav-btn:not([data-state="active"]):hover {
  filter: brightness(1.06);
}
.nav-btn[data-variant="normal"]:not([data-state="active"]):hover {
  filter: brightness(1.06);
}
.nav-btn[data-variant="blue"]:not([data-state="active"]):hover {
  filter: brightness(1.05) saturate(1.02);
}
.nav-btn[data-variant="green"]:not([data-state="active"]):hover {
  filter: brightness(1.05);
}
.nav-btn[data-variant="home"]:not([data-state="active"]):hover {
  filter: brightness(1.05);
}

/* Home is current page */
.is-home.is-active {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: -2px;
}

@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 {
    font-size: clamp(14px, 4vw, 18px);
    padding: 8px calc(16px + 1em);
  }
}

/* Multi-row grid system for better readability */
@media (max-width: 1400px) {
  .nav-btn {
    font-size: clamp(10px, 1.2vw, 13px);
    padding: 0 clamp(4px, 1vw, 8px);
  }
}
@media (max-width: 1200px) {
  .nav-btn {
    font-size: clamp(9px, 1.4vw, 12px);
    padding: 0 clamp(3px, 0.8vw, 6px);
  }
}
@media (max-width: 1000px) {
  .bottom-nav-list {
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
  .bottom-nav {
    height: 120px;
  }
  .nav-btn {
    font-size: clamp(10px, 1.8vw, 12px);
    padding: 0 clamp(4px, 1vw, 8px);
  }
}
@media (max-width: 800px) {
  .bottom-nav-list {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
  .bottom-nav {
    height: 150px;
  }
  .nav-btn {
    font-size: clamp(9px, 2vw, 11px);
    padding: 0 clamp(3px, 0.8vw, 6px);
  }
}
@media (max-width: 600px) {
  .bottom-nav-list {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
  .bottom-nav {
    height: 160px;
  }
  .nav-btn {
    font-size: clamp(8px, 2.2vw, 10px);
    padding: 0 clamp(2px, 0.6vw, 4px);
  }
}
@media (max-width: 480px) {
  .bottom-nav-list {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
  }
  .bottom-nav {
    height: 200px;
  }
  .nav-btn {
    font-size: clamp(7px, 2.4vw, 9px);
    padding: 0 clamp(2px, 0.5vw, 3px);
  }
}
@media (max-width: 360px) {
  .bottom-nav-list {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(7, 1fr);
  }
  .bottom-nav {
    height: 240px;
  }
  .nav-btn {
    font-size: clamp(6px, 2.6vw, 8px);
    padding: 0 clamp(1px, 0.4vw, 2px);
  }
}

/* Responsive triangle for all screen sizes */
.nav-btn[data-state="active"]::after {
  border-top-width: clamp(6px, 1.5vw, 12px);
  border-left-width: clamp(6px, 1.5vw, 12px);
  border-right-width: clamp(6px, 1.5vw, 12px);
}

/* 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;
  }
}
