@import url("https://fonts.googleapis.com/css?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  box-sizing: border-box;
}

html {
  background-color: #000;
  accent-color: #5576;
}

body {
  margin: 0;
  color: #f0f0f0;
  font-family: Prompt, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  background: url("../img/xavibackground.jpg");
  background-attachment: fixed;
  background-size: cover;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* default: 2 cards per row */
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Stack cards on small screens (phones) */
@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr; /* 1 card per row */
  }
}

.statement {
  grid-column: 1 / -1; /* span full width */
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #f0f0f0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  min-width: 0;
  padding: 1rem 1.5rem; /* reduced padding inside card */
  border-radius: 0.6em;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255, 0.2);
  backdrop-filter: blur(4px) saturate(150%);
  -webkit-backdrop-filter: blur(4px) saturate(150%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: #f0f0f0;
}

/* Reset heading & paragraph spacing */
.card h2,
.card p {
  margin: 0;
}

.card h2 {
  margin-bottom: 0.25rem; /* tighter than before */
  font-size: 24px; /* optional: slightly smaller heading */
}

.card p {
  margin-top: 0.25rem;
  font-size: 0.95rem; /* optional: slightly smaller text */
}

/* CTA card styling */
.cta-card {
  text-align: center;
}

.cta-card .cta-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5em;
  background: #fff;
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.cta-card .cta-button:hover {
  background: #f0f0f0;
}


.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 182px;
  opacity: 0.12; /* subtle grain for texture */
  z-index: 0;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
  pointer-events: none;
  z-index: 0; /* adds soft reflection highlight */
}

.card > * {
  position: relative;
  z-index: 1;
}

.case-study-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical centering */
  align-items: flex-start; /* align text to left for readability */
  text-align: left;

  min-width: 0;
  padding: 1rem 1.5rem;
  border-radius: 0.6em;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255, 0.2);
  backdrop-filter: blur(3px) saturate(200%);
  -webkit-backdrop-filter: blur(3px) saturate(200%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: #f0f0f0;
  margin: 1rem auto;
  max-width: 700px; /* nice width for content-heavy cards */
}

.case-study-card h3 {
  position: relative; /* needed for the pseudo-element */
  margin-bottom: 0.5rem;
  font-size: 26px;
}

/* Add the line underneath the heading */
.case-study-card h3::after {
  content: "";
  position: absolute;
  left: 0; /* start aligned with heading text */
  bottom: -0.35rem; /* small gap below heading */
  width: 90%; /* 2/3 of the card width */
  height: 2px; /* thickness of the line */
  background-color: rgba(255, 255, 255, 0.3); /* subtle white line */
  border-radius: 1px; /* optional, slightly rounded ends */
}



/* Reset heading & paragraph spacing */
.case-study-card h3,
.case-study-card p {
  margin: 0;
}

.case-study-card h3 {
  margin-bottom: 0.5rem;
  font-size: 26px;
}

.case-study-card p {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Style unordered lists inside case-study cards */
.case-study-card ul {
  margin: 0.5rem 0 0.5rem 1.5rem;
  padding: 0;
  list-style-type: disc;
}

.case-study-card li {
  margin-bottom: 0.25rem;
}

/* Pseudo-elements for subtle frosted-glass texture */
.case-study-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 182px;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}

.case-study-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  pointer-events: none;
  z-index: 0;
}

.case-study-card > * {
  position: relative;
  z-index: 1;
}




canvas {
  z-index:1;
  height:100vh;
  width:100vw;
}

#case-studies-header {
  position:relative;
  width:100vw;
  font-size:24px;
  z-index:100;
}

#case-studies-header>h2 {
  font-weight:200;
  top: 30vh;
  width:100%;
  /*font-variant:small-caps;*/
  text-align:center;
}

#hero {
  position:relative;
  height:100vh; 
  width:100vw;
  font-size:48px;
  z-index:100;
}

#hero>h2 {
  font-weight:200;
  position:fixed;
  top: 30vh;
  width:100%;
  /*font-variant:small-caps;*/
  text-align:center;
  transition:opacity 250ms ease-out;
}

#hero>h2:not(.sticky-hero) {
  color:#ffff;
  opacity:100;
}

.sticky-hero {
    opacity:0;
}

main {
  padding: 5rem;
  min-height: 100vh;
}

@keyframes hover {
  from {transform:translate(0,3px) rotate(45deg) ;}
  to {transform: translate(0,-3px) rotate(45deg) ;}
}

.arrowClickArea {
  z-index:101;
  cursor:pointer;
  padding:3em;
  display:block;
  position:fixed;
  bottom:0px;
  right:0px;
  width:15vw;
  height:15vh;
}

.arrowClickArea:has(.arrow.disabled) {
  cursor:default;
}

.arrow {
  border: solid #fff5;
  border-width: 0 3px 3px 0;
  display:block;
  position:fixed;
  bottom:50px;
  right:50px;
  width:30px;
  height:30px;
  padding: 3px;
  transition:border-color 250ms;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  animation-duration: 1s;
  animation-name: hover;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.arrow.disabled {
  border-color:#fff0 !important;
}

.arrow:not(.disabled) {
  border-color:#fff5;
}

.main-nav {
  position: fixed;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  color: #ffff;
  width: 100%;
  z-index: 101;
}



.case-studies-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #aaa;
  width: 100%;
  z-index: 101;
}

#logo-container {
  height: min-content;
}

#contact-us {
  margin-right: 2rem;
}

.nav-item {
  padding: 1rem;
}

.card > h2 {
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: 32px;
  font-family: Prompt;
  font-weight: 400;
}

.case-study-card > h3 {
  margin-bottom: 0.5rem;
  margin-top: 1.3rem;
  padding: 0;
  font-size: 28px;
  text-align: center;
  font-family: Prompt;
  font-weight: 400;
}

.logo {
  display: block;
  width: auto;
  height: 5rem;
}

.fallback-logo {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.statement {
  font-size: 1.5rem;
}

footer {
  font-size: 0.75rem;
  color: #aaa;
  position: fixed;
  bottom: 0;
  padding: 0.5rem;
  width: 100%;
  background: #2224;
}

a {
  color: #ddd;
  font-size: 1rem;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#footer-link {
  color: #aaa !important;
  font-size: 0.75rem !important;
  text-decoration: none !important;
}

#footer-link:hover {
  text-decoration: underline;
}

@media (width <= 900px) {

  canvas {
    z-index:-1;
  }

  body {
    padding-top: 175px;
  }

  nav {
    position: relative;
    flex-direction: column;
    text-align:center;
	  border-radius: 0.6em;
	  background: rgba(255,255,255,0.03);
	  margin: auto;
	  border: 1px solid rgba(255,255,255, 0.2);
	  backdrop-filter: blur(4px) saturate(150%);
	  -webkit-backdrop-filter: blur(4px) saturate(150%);
	  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
	  color: #f0f0f0;
  }

  #contact-us {
    font-size:1.2em;
    margin-right:0;
  }

  #case-studies-header {
    height:auto; 
    width:100vw;
  }

  #case-studies-header>h2 {
    font-size:1em;
    font-weight:200;
    width:80%;
    margin:0 auto;
    display:block;
    text-align:center;
  }
    
  #hero {
    position:static;
    height:auto; 
    width:100vw;
    z-index:100;
  }

  #hero>h2 {
    position:static;
    font-size:1em;
    font-weight:200;
    width:80%;
    margin:0 auto;
    display:block;
    text-align:center;
    transition:opacity 250ms ease-out;
  }

  #hero>h2:not(.sticky-hero) {
    color:#ffff;
    opacity:100;
  }

  .sticky-hero {
      opacity:100;
  }

.main-nav.hide {
   transform: translateY(-100%);
}
}
