:root {
  /* Colors */
  --color-accent: #EB0C0C;
  --color-accent-darkened: #B61111;
  --color-optima-black: #262524;
  --color-pure-white: #FFFFFF;
  --color-pure-black: #0b0b0b;
  --color-white: #f1f1f0;
  --color-gray-light: #d1d1d1;
  --color-gray-mid-light: #9b9b9b;
  --color-gray-mid: #7c7977;
  --color-gray-mid-dark: #424242;
  --color-gray-dark: #181817;
  --color-success: #00cc66;

/* Fonts */

  --font-headings: neue-haas-grotesk-display, sans-serif;
  --font-ui: neue-haas-grotesk-display, sans-serif;
  --font-text: source-sans-3, sans-serif;

  

  /* Sizes */
  --size-max-width: 1424px;
  --size-max-image-width: 1584px;
  --cubic-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}



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

body {
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-white);
  background-color: var(--color-pure-black);
  line-height: 140%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: var(--color-pure-black);
}

body {
  background-color: var(--color-pure-black);
}

main, .detail-wrapper {
  background-color: var(--color-pure-black);
}

img {
  display: block;
}

ul, ol {
  list-style: none; /* Remove default list bullets */
}

a {
  text-decoration: none; /* Remove underlines from links */
  color: inherit;
}

.simple-link {
  color: var(--color-accent);
}

.simple-link:hover {
  text-decoration: underline;
}

.white-link {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.black-link {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.white-link:hover , .black-link:hover {
  color: var(--color-accent);
}

p {
  line-height: 140%;
  display: block;
}

button {
  background: none; /* Remove background from buttons */
  border: none; /* Remove border from buttons */
  cursor: pointer; /* Pointer cursor for buttons */
}

input,
textarea {
  border: none; /* Remove border from input fields */
  outline: none; /* Remove outline on focus */
  font: inherit; /* Inherit font styles */
}

table {
  border-collapse: collapse; /* Collapse table borders */
}

caption {
  text-align: left; /* Align table captions to the left */
}

html {
  font-size: 100%; /* Set base font size */
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  margin-top: 112px; /* make sure content isn't under the fixed menu*/
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-headings);
  font-weight: 600;
}

h5, h6 {
  font-family: var(--font-ui);
  font-weight: 400;
}

h1 {
  line-height: 120%;
  color: var(--color-white);
  font-size: 48px;
}

h2 {
  font-size: 32px;
}

h3 {font-size: 28px;}

h4 {font-size: 22px;}

h5 {font-size: 18px;}

h4 button {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 22px;
}

.btm-100 {padding-bottom: 100px;}

.btm-80 {padding-bottom: 80px !important;}

.btm-64 {padding-bottom: 64px;}

.btm-56 {padding-bottom: 56px;}

.btm-48 {padding-bottom: 48px;}

.btm-40 {padding-bottom: 40px;}

.btm-32 {padding-bottom: 32px !important;}

.btm-24 {padding-bottom: 24px !important;}

.btm-16 {padding-bottom: 16px;}

.btm-12 {padding-bottom: 12px;}

.btm-8 {padding-bottom: 8px;}

.btm-4 {padding-bottom: 4px;}

.btm-0 {padding-bottom: 0px !important;}

.calm {
  color: var(--color-gray-mid);
}

.calm-on-dark {
  color: var(--color-gray-mid-light);
}

.text-accent {
  color: var(--color-accent);
}

.center-text {
  text-align: center;
}

.border-btm {
  border-bottom: var(--color-gray-mid) solid 1px;
}

.detail-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-pure-black);
}

.breaker-wrapper {
  background-color: var(--color-gray-dark);
}

.framed-content {
  border-top: 1px solid var(--color-gray-mid);
  border-bottom: 1px solid var(--color-gray-mid);
}

.detail-content {
  max-width: var(--size-max-width);
  width:100%;
  margin-left: 24px;
  margin-right: 24px;
  padding: 80px 0px;
  display: flex;
  flex-direction: column;
}

.contact-content {
  padding-top: 24px !important;
}

.portfolio-grid {
  padding-top: 0px;
}

.subtext-description {
  font-size: 40px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-gray-mid-light);
  line-height: 120%;
  margin-top: -4px;
}

.copyright-wrapper {
  background-color: var(--color-pure-black);
}

.copyright-and-legal {
  display: flex;
  justify-content: space-between;
  padding-top: 0px;
  padding-bottom: 24px;
  width: 100%;
}

.company-details {
  text-align: right;
  color: var(--color-gray-mid-dark);
  grid-column: span 8;
}

.copyright {
  text-align: left;
  grid-column: span 4;
  color: var(--color-gray-mid-dark);
}

.image-content {
  max-width: var(--size-max-image-width);
  width:100%;
}

.image-content img {
  width: 100%;
  height: auto;
  display: block;
}

.image-content-narrow {
  max-width: var(--size-max-width);
  width:100%;
  margin-left: 24px;
  margin-right: 24px;
}

.image-content-narrow img {
  width: 100%;
  height: auto;
  display: block;
}

.page-title , .page-title-portfolio {
  display: flex;
  flex-direction: column;
  padding: 56px 60px 40px 0px;
}

.page-title-portfolio {
  padding-top:56px;
}

.page-title p, .page-title-portfolio p {
  font-family: var(--font-headings);
  font-weight: 600;
  color: var(--color-gray-mid);
  padding-top: 6px;
}

.page-title-portfolio p {
  font-weight: 400;
}

.page-title-portfolio {
  padding-bottom: 0px;
}

.page-title-portfolio h1 {
  line-height: 120%;
}

p.discrete-details {
  font-family: var(--font-headings);
  font-weight: 400;
  font-size: 18px;
  padding-top: 8px;
  color: var(--color-gray-mid);
}


/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
}

.accordion-item {
  margin-bottom: 16px;
  border-radius: 12px;
  background-color: var(--color-gray-dark);
  padding: 0;
}

.accordion-item h4 {
  margin: 0;
}

.accordion-item h4 button {
  padding: 20px 24px;
}

.accordion-trigger {
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.accordion-trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms var(--cubic-smooth);
}

.accordion-panel-inner {
  padding: 6px 24px 24px 24px;
}

.accordion-panel p {
  margin: 0;
  color: var(--color-gray-mid-light);
  padding-right: 32px;
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.accordion-trigger::after {
  content: "";
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background-image: url("/images/icon-chevrons-open.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.accordion-trigger[aria-expanded="true"]::after {
  background-image: url("/images/icon-chevrons-close.svg");
}

/* Mobile */
@media (max-width: 768px) {
  .accordion-trigger::after {
    width: 18px;
    height: 18px;
  }
}






/* Header */
.header-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-pure-black);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s var(--cubic-smooth);
  }

.header-content {
    max-width: var(--size-max-width);
    width:100%;
    max-height:128px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 24px;
    margin-right: 24px;
    padding: 32px 0px;
    overflow: hidden;
    transition: max-height 0.3s var(--cubic-smooth), padding 0.3s var(--cubic-smooth);
  }

  .optimacad-logo-darkmode, .optimacad-logo-header {
    height: auto;
    width: auto;
  }

  /* Default (desktop) */
.logo-mobile {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
  }
}

  .logo {
    position: relative;
    height: 28px;
    width: auto;
    transform: scale(1);
    transition: transform 0.3s var(--cubic-smooth);
    transform-origin: left center;
  }
  
  .optimacad-logo-header,
  .optimacad-logo-symbol {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: auto; /* keeps left-aligned */
    transition: opacity 0.3s var(--cubic-smooth), transform 0.3s var(--cubic-smooth);
  }
  
  .shrink .optimacad-logo-header {
    opacity: 0;
  }





  /* Loader Logo */

  #animationCard {
    width: 128px;
    height: 128px;
  }

  .fade-out {
    opacity: 0;
  }

  .loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 128vh;
    transition: opacity 0.3s ease-out;
  }

  .loader-body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

    /* End Loader Logo */

.back-link {
  color: var(--color-gray-mid-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.back-link .back-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.header-nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.header-nav ul li {
  font-family: var(--font-ui);
  color: var(--color-gray-light);
  font-weight: 400;
  font-size: 15px;
  margin-left: 36px; 
  height: 48px;
  padding-top: 3px;
  transition: font-size 0.3s var(--cubic-smooth); 
}

.header-nav ul li a {
  text-decoration: none;
  padding: 10px 0px;
  display: block;
}

.header-nav ul li {
  position: relative;
}

.header-nav ul li a {
  position: relative;
}

/* base line (hidden) */
.header-nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-gray-mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--cubic-smooth);
}

/* hover animation */
.header-nav ul li:not(.active):hover a::after {
  transform: scaleX(1);
}

.header-nav ul li.active a::after {
  transform: scaleX(1);
  background-color: var(--color-accent);
}

/* Footer */
.footer-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-pure-black);
}

.footer-content {
  max-width: var(--size-max-width);
  width:100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 24px;
  margin-right: 24px;
  padding: 48px 0px; /* Larger padding when expanded */
  overflow: hidden; /* Prevents content overflow when transitioning */
}

.footer-logo, .footer-logo img {
  height: 28px;
  width: auto;
 }

.footer-nav ul {
  list-style-type: none;      /* Removes bullets */
  padding: 0;                 /* Removes default padding */
  margin: 0;                  /* Removes default margin */
  display: flex;              /* Makes the list items display in a row */
}

.footer-nav ul li {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 15px;
  margin-left: 36px; 
  transition: font-size 0.3s ease; 
}

.footer-nav ul li a {
  text-decoration: none;      /* Removes underline */
  padding: 10px 0px;         /* Padding around the links */
  display: block;             /* Makes the link block-level to fill the li */
  color: var(--color-gray-light);
}

.parameter-table {
  padding-bottom: 4px;
}

.parameter-table li {
  border-top: 1px solid var(--color-gray-mid);
  padding-top: 12px;
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}

.parameter-table .value {
  text-align: right;
  color: var(--color-gray-mid);
}

.testimonial cite span {
  display: block;
  color: var(--color-gray-mid);
}



/* Cookie toast */
#cookie-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  color: var(--color-gray-dark);
  z-index: 9999;
  max-width: 550px;
  font-size: 15px;
  padding: 24px 32px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(187, 187, 187, 0.7); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#cookie-toast h5 {
  margin-bottom: 16px;
  font-family: var(--font-headings);
  font-weight: 600;
}

#cookie-toast .buttons {
  margin-top: 24px;
  display: flex;
  justify-content:flex-end;
  gap: 16px;
}

#cookie-toast button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px 12px 32px;
  background:transparent;
  color: var(--color-gray-dark);
  font-family: var(--font-ui);
  font-weight: 400;
  text-decoration: none;
  border: 1px solid var(--color-gray-dark);
  border-radius: 9999px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#accept-cookies {
  background-color: var(--color-accent);
}

#accept-cookies:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: scale(1.02);
}

#decline-cookies {
  background-color: var(--color-gray-mid-dark);
}

#decline-cookies:hover {
  background-color: var(--color-gray-dark)
}



#cookie-toast .cookie-content {
  display: flex;
  flex-direction: column; /* default: stacked on mobile */
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

@media (min-width: 768px) {
  #cookie-toast .cookie-content {
    flex-direction: row; /* horizontal layout on desktop */
    align-items: center;
  }

  #cookie-toast p {
    flex: 1; /* allow text to take available space */
    margin: 0;
  }

  #cookie-toast .buttons {
    margin-top: 0;
  }
}
/* End Cookie toast */



/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}

.stat-block {
  text-align: left;
  background-color: var(--color-gray-dark);
  padding: 20px;
  border-radius: 12px;
  /*padding-bottom: 48px;*/
}

.stat-value {
  font-family: var(--font-headings);
  font-size: 60px;
  line-height: 100%;
  font-weight: 400;
  margin-left: -2px;
  color: var(--color-white);
}

.stat-label {
  font-family: var(--font-headings);
  margin-top: 6px;
  font-weight: 600;
}

.stat-subtext {
  font-family: var(--font-headings);
  color: var(--color-gray-mid);
  line-height: 120%;
}



/* Desktop breakpoint */
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* intermediary breakpoint */
@media (min-width: 600px) and (max-width: 767px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}








/* Vertical List */

.vertical-list-block {
  /*border-top: 1px solid var(--color-gray-mid);*/
  padding: 40px 0px 24px 0px;
}

.vertical-list-block h4 {
  padding-bottom: 24px;
}

.vertical-list-block li {
  color: var(--color-gray-mid);
}

.vertical-list-copy {
  padding-left: 8px;
  padding-right: 8px;
}

/* Quick action block */

.quick-action-block {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--color-gray-mid);
  padding: 24px 0;
  transition: background-color 0.3s ease;
}

.quick-action-block:hover {
  background-color: var(--color-gray-dark);
}

.quick-action-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-action-block h4 {
  font-family: var(--font-text);
  margin: 0;
}

.quick-action-block span {
  color: var(--color-gray-mid);
  font-size: 16px;
}

.quick-action-copy {
  padding-left: 8px;
}

.quick-action-icon {
  margin: 8px;
}

.quick-action-icon img {
  display: block;
}

.icon-arrow-forward {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}



/* Portfolio item block */

.portfolio-item-block {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative; /* required */
  z-index: 0;
}

/* the expanding background */
.portfolio-item-block::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  background-color: var(--color-gray-dark);
  border-radius: 16px; 
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.portfolio-item-block:hover::before {
  opacity: 1;
  box-shadow: 
  0 8px 20px rgba(0,0,0,0.06),
  0 2px 6px rgba(0,0,0,0.04);
}

.portfolio-item-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portfolio-item-block h4 {
  font-size: 18px;
  margin: 0;
  line-height: 110%;
  font-weight: 700;
}

.portfolio-item-block span {
  color: var(--color-gray-mid);
  font-size: 18px;
}

.portfolio-image-container {
  border-radius: 12px;
  overflow: hidden; 
}

.portfolio-image-container img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s var(--cubic-smooth);
}

.portfolio-item-block:hover .portfolio-image-container img {
  transform: scale(1.03);
}

.portfolio-item-copy {
  padding:12px 0px 12px 2px;
  transition: padding-left 0.3s var(--cubic-smooth);
}

.portfolio-item-block:hover .portfolio-item-copy {
  padding-left: 8px;
}




/* Contact Banner */

.contact-banner-wrapper {
  background-color: var(--color-gray-dark);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.contact-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items:stretch;
  gap: 0px;
  width: 100%;
  padding: 16px;
  border-radius: 24px;
  background-color: var(--color-pure-black);
}

.contact-left {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.contact-left h3 {
  line-height: 120%;
}

.contact-left h3 span.calm {display: block;}

.contact-right {
  position: relative;
  overflow: hidden;
  background-color: var(--color-gray-dark);
  color: var(--color-pure-white);
  padding: 40px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--color-black);
  box-shadow: none;
}

.contact-banner-list {
  list-style: none;
  padding: 0;
}

.contact-banner-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-banner-list li + li {
  margin-top: 12px;
}

.list-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-right p.calm-on-dark {
  color: var(--color-gray-mid-light);
}






/* Mobile */
@media (max-width: 768px) {
  .contact-banner {
    grid-template-columns: 1fr;
    align-items: initial;
  }
  
  .contact-left {
    padding: 20px;
  }

  .contact-left h3 {
    font-size: 23px;
  }

  .contact-right {
    margin-top: 16px;
    padding: 24px;
    box-shadow: none;
  }

  .contact-right p.calm-on-dark {
    color: var(--color-gray-mid-light);
  }
}




/* Button - Generic */

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 16px 24px;
  color: var(--color-optima-black);
  font-family: var(--font-headings);
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  min-width: 250px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  justify-content: space-between;
}

.btn-arrow-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

/* Primary Button */

.primary-button {
  background-color: var(--color-white);
  color:  var(--color-pure-black);
}

.primary-button:hover {
  background-color: var(--color-pure-white);
  transform: scale(1.02);
}

.primary-button:active {
  background-color: var(--color-gray-light);
}



/* Primary Button Outline */

.primary-button-outline {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 16px 27px 16px 32px;
  background:transparent;
  color: var(--color-optima-black);
  font-family: var(--font-headings);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-optima-black);
  border-radius: 9999px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.primary-button-outline:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.02);
}

.primary-button-outline:active {
  background-color: rgba(255, 255, 255, 1);
}


/* Menu scroll styles */
.shrink .header-content {
  padding: 16px 0px; /* Smaller padding */
  max-height: 80px; /* Smaller max-height when scrolled */
}

.shrink .burger {
  width: 24px;
  height: 24px;
}


.header-wrapper.hide {
  transform: translateY(-100%);
}

/* End menu scroll styles */


.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  transition: width 0.3s ease, height 0.3s ease;
}

.burger img {
  width: 100%;
  height: 100%;
  display: block;
}

.top-item {
  position: relative;
}




/* Only on desktop */
@media (min-width: 1025px) {
  .portfolio-image-container {
    cursor: none;
    position: relative;
  }

  .cursor-disc {
    position: fixed;
    width: 64px;
    height: 64px;
    pointer-events: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow:
      inset 0 0 6px rgba(255, 255, 255, 0.15),  /* inner glow */
      0 2px 16px rgba(0, 0, 0, 0.1);             /* soft outer shadow */
    border: 1px solid rgba(255, 255, 255, 0.15);  /* subtle edge */
  }

  .cursor-disc img {
    width: 28px;
    height: 28px;
    opacity: 1;
  }

  .portfolio-image-container:hover ~ .cursor-disc {
    display: flex;
  }
}



/* Close project button */

.close-project {
  position: fixed;
  top: 150px;
  right: 50%;
  transform: translateX(calc(50% + 60px));
  max-width: var(--size-max-width);
  width: 40px;
  height: 40px;
  padding: 8px;
  background-color: rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.25s var(--cubic-smooth), transform 0.3s var(--cubic-smooth), opacity 0.2s var(--cubic-smooth);
  z-index: 1000;
  pointer-events: auto;
}

/* When scrolled down 80px, shift it up */
.close-project.scrolled-up {
  transform: translateX(calc(50% + 60px)) translateY(-50px);
}

/* Hide near bottom of mobile/tablet */
.close-project.hide-close {
  opacity: 0;
  pointer-events: none;
}

.close-project img {
  width: 100%;
  height: 100%;
}

.close-project:hover {
  background-color: rgba(0, 0, 0, 0.4); 
}

/* Fullscreen overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--color-pure-black);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align menu items to the left */
  justify-content: center; /* Keep the menu vertically centered */
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

/* Initially hide the menu items */
.mobile-menu li {
  margin: 48px 0;
  width: 100%;
  opacity: 0; /* Hide items initially */
  transition: opacity 0.4s ease; /* Smooth fade-in transition */
}

/* When menu is active */
.mobile-menu-overlay.active .mobile-menu li {
  opacity: 1; /* Fade in menu items when menu is active */
}

/* When menu is active */
.mobile-menu-overlay.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Close button */
.close-menu {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.close-menu img {
  width: 100%;
  height: 100%;
}

/* Vertical menu styling */
.mobile-menu {
  list-style: none;
  padding: 10px 40px;
  margin: 0;
  width: 100%; /* Ensure the menu takes full width */
}

.mobile-menu li {
  margin: 48px 0;
  width: 100%; /* Ensure each item takes the full width of the container */
}

/* Active state for menu item */
.mobile-menu li.active {
  border-left: var(--color-accent) 3px solid;
}

/* Styling links */
.mobile-menu a {
  padding-left: 16px;
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 18px;
  display: block; /* Ensure each link is a block-level element */
}



/* Default grid (Desktop) */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr); /* 12 equal-width columns */
  gap: 16px; /* Adjust the gap between columns */
}

/* Grid addon - no gap */
.grid-no-gap {
  gap: 0px !important;
}

/* Define how many columns each content block should occupy */
.full-width-col {
  grid-column: span 12;
}

.col1of3 {
  grid-column: span 4;
}

.col1of2 {
  grid-column: span 6;
}

.left-col {
  grid-column: span 4;
  color: var(--color-white);
}
.right-col {
  grid-column: span 8; 
  color: var(--color-white);
  padding-top: 4px;
}

.work-item-small {
  grid-column: span 3;
}

.contact-copy {
  padding-top: 48px;
}


/* TABLET (max-width: 1024px) */


@media (max-width: 1024px) {

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 30px;
  }
    

  .grid {
    grid-template-columns: repeat(12, 1fr); /* 6 columns for tablet */
  }

  .full-width-col {
    grid-column: span 12;
  }
  
  .col1of3 {
    grid-column: span 4;
  }

  .col1of2 {
    grid-column: span 6;
  }

  .left-col {
    grid-column: span 4; /* Example: spans 3 columns on tablet */
  }

  .right-col {
    grid-column: span 8; /* Example: spans 3 columns on tablet */
  }

  .work-item-small {
    grid-column: span 4;
  }

  .contact-copy {
    padding-top: 48px;
  }

}


/* Medium-Screens (max-width: 1400px) */

@media (max-width: 1424px) {
  .close-project {
    left: auto;
    right: 20px;
    margin-right: 0;
    transform: translateX(calc(50% + 8px));
  }

  .close-project.scrolled-up {
    transform: translateX(calc(50% + 8px)) translateY(-50px);
  }
}

/* LARGE TABLET (max-width: 1170px) */

@media (max-width: 1170px) {

  .desktop-only {
    display: none;
  }
  
  }


/* TABLET (max-width: 900px) */

@media (max-width: 900px) {
.page-title {padding-right: 0px;}

.close-project.scrolled-up {
  transform: translateX(calc(50% + 12px)) translateY(-50px);
}

}

/* MOBILE (max-width: 768px) */

@media (max-width: 768px) {

  #contactForm {
    padding: 24px !important;
  }

  main {
    margin-top:92px;
  }

  .desktop-only {
    display: none;
  }

  .logo {
    height: 28px;
    width: auto;
    }

  .logo img {
      height: 28px;
      width: auto;
      }

  .detail-content {
    padding: 80px 0px;
    margin-left: 16px;
    margin-right: 16px;
  }

  .header-content  , .image-content-narrow {
    margin-left: 16px;
    margin-right: 16px;
  }

  .page-title {
    padding: 48px 0px 24px 0px;
  }

  .page-title-portfolio {
    padding-bottom: 0px;
  }

  .portfolio-grid {
    padding-top: 16px;
  }

  h1 {font-size: 32px;}
  
  h2 {font-size: 25px;}
  
  h3 {font-size: 20px;}
  
  h4 , h4 button {font-size: 18px;}
  
  h5 {font-size: 16px;
  font-weight: 600;}

  .button {
    width: 100%;
    justify-content: space-between;
    font-weight: 600;
  }

  .grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columns for mobile */
  }

  body {
    font-size: 17px;
  }

  .full-width-col {
    grid-column: span 4;
  }
  
  .col1of3 {
    grid-column: span 4;
  }

  .col1of2 {
    grid-column: span 4;
  }

  .work-item-small {
    grid-column: span 2;
  }

  .burger {
    display: block;
  }

  .header-nav {
    display: none;
  }

  .left-col, .right-col {
    grid-column: span 4;
  }

  .left-col {padding-bottom: 4px;}

  .footer-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer-logo, .footer-logo img {
    height: 64px;
   }

  .footer-nav ul {
    margin-top: 32px;
  }

  .footer-nav ul li {
    margin: 0px 16px 0px 16px;
  }

  .copyright-and-legal {
    flex-direction: column; 
    text-align: center; 
    padding-top: 0px;
    padding-bottom: 32px;
  }

  .copyright,
  .company-details {
    grid-column: span 4; /* Make both items take 100% width */
    text-align: center; /* Center-align text */
  }

  .empty-col {display: none;}

  .page-title-portfolio h1 {
    line-height: 120%;
  }

  .subtext-description {
    padding-top: 6px;
    font-size: 28px;
    line-height: 120%;
  }

  .back-link {
    margin-top:-42px;
  }

  .contact-copy {
    padding-top: 32px;
  }

  .footer-content {
    padding: 48px 0 16px 0;
  }

  .stat-value {
    font-size: 46px;
  }


/* cookie toast for mobile */

#cookie-toast {
  left: 24px;
  right: 24px;
  bottom: 20px;
  max-width: none;
  padding: 24px;
  border-radius: 16px;
}

#cookie-toast .cookie-toast-inner {
  flex-direction: column;
  gap: 24px;
}

#cookie-toast .buttons {
  width: 100%;
  margin-top: 0px;
}

#cookie-toast button {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.close-project {
  top: 120px;
}



}
/* Contact form */

#contactForm {
  /*background-color: var(--color-gray-dark);
  padding: 32px 48px; */
  border-radius: 12px; 
  width: 100%;
  margin: 24px 0 48px;
}

#contactForm label {
  font-size: 16px;
  color: var(--color-gray-mid-light);
  display: block;
  padding-bottom: 6px;
}

.form-element {
  margin-bottom: 12px;
}

#contactForm textarea {
  margin:0;
  resize: vertical;
  display: block;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  background-color: var(--color-gray-dark);
  color: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
}

#contactForm input:focus,
#contactForm textarea:focus {
  outline: 2px solid var(--color-gray-mid-light);
  outline-offset: 2px;
}

#contactForm .input-invalid,
#contactForm input.input-invalid:focus,
#contactForm textarea.input-invalid:focus {
  outline: 2px solid #ff4444;
  outline-offset: 2px;
  box-shadow: none;
}

#contactForm .field-error {
  color: var(--color-white);
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 15px;
}

#contactForm .field-error::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  background-image: url('/images/icon-alert-circle.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#contactForm .field-error.visible {
  display: flex;
}

.form-success {
  display: flex;
  align-items: center;
  align-self: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background-color: #0a1f0a;
  border: 1px solid #105231;
  border-radius: 4px;
  padding: 14px 16px;
  color: var(--color-success);
  font-size: 16px;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.form-success-close {
  background: none;
  border: none;
  color: var(--color-success);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.form-success-close:hover {
  opacity: 0.7;
}

#contactForm .form-error {
  color: var(--color-accent);
  font-weight: bold;
}

#submitBtn {
  margin-bottom: 24px;
}

.cf-turnstile {
  margin:32px 0;
}

button.primary-button {
  font-size: inherit;
  font-family: inherit;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(235, 12, 12, 0.3);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-optima-black);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid rgba(241, 241, 240, 0.12);
  white-space: nowrap;
}

.list-bullets {
  list-style: disc;
  padding-left: 20px;
}

.list-bullets li {
  padding-left: 8px;
  padding-bottom: 8px;
}

#contactForm .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: var(--color-white);
  font-size: 15px;
  line-height: 1.5;
  justify-content: flex-start;
}

#contactForm input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 3px;
  cursor: pointer;
  accent-color: #00cc66;
}

#contactForm .form-element {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#privacyConsent.input-invalid {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: none;
}
