/* CSS Document */

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

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Fade-in overlay */
.page-fade {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* Main 2x2 grid */

.hero-grid {
  position: relative;
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  overflow: hidden;
}

/* Individual panels */

.panel {
  position: relative;
  overflow: hidden;
}

/* Stretch the background image, always centred */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  z-index: 0;
}

/* Attach background images */
.panel-1::before {
  background-image: url("img/adapt.jpg");
}

.panel-2::before {
  background-image: url("img/transform.jpg");
}

.panel-3::before {
  background-image: url("img/create.jpg");
}

.panel-4::before {
  background-image: url("img/imagine.jpg");
}

/* Overlay darkness system */

/* Base darkness for readability (resting state) */
.panel-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35); /* ~65% brightness */
  z-index: 1;
  transition: background-color 0.9s ease, filter 0.9s ease;
}

/* Deep dim (part of wave animation) */
.panel.dim .panel-overlay {
  background-color: rgba(0, 0, 0, 0.50);
}

/* Highlight for animation and hover */
.panel.highlight .panel-overlay,
.panel:hover .panel-overlay {
  background-color: rgba(0, 0, 0, 0.05); /* almost full brightness */
  filter: brightness(1.05);
}

/* Word PNGs */

.panel-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 800px;       /* desktop default */
  height: auto;
  pointer-events: none;
}

/* Central logo */

.cdv-logo {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cdv-logo img {
  max-width: 610px!important;
  max-height: 20vh;
  height: auto;
}

/* ------------------------------------------- */
/* RESPONSIVE TEXT PNG SCALING (perceptual)   */
/* ------------------------------------------- */

/* Tablets and large phones */
@media (max-width: 900px) {
  .panel-label {
    max-width: 600px;
  }
	.cdv-logo img {
  max-width: 500px!important;
  max-height: 20vh;
  height: auto; 
}

/* Mobile portrait */
@media (max-width: 600px) {
  .panel-label {
    max-width: 200%;
    transform: translate(-50%, -50%) scale(1.1);
  }

  .cdv-logo img {
    max-width: 420px !important;
    max-height: 20vh;
    height: auto;
}
}

/* Very small devices */
@media (max-width: 400px) {
  .panel-label {
    max-width: 110%;
    transform: translate(-50%, -50%) scale(1.2);
  }
.cdv-logo img {
    max-width: 380px !important;
    max-height: 20vh;
    height: auto;
}
}