/* COCON — mobile/tablet overrides for the inline-styled pages.
   Loaded by every page after cocon-i18n.js. Targets inline styles via
   attribute selectors, so !important is required throughout. */

/* ---------- micro-interactions (all viewports) ---------- */
nav a,
footer a {
  transition: color .16s cubic-bezier(0.22, 1, 0.36, 1),
    background .16s cubic-bezier(0.22, 1, 0.36, 1),
    border-color .16s cubic-bezier(0.22, 1, 0.36, 1),
    transform .16s cubic-bezier(0.22, 1, 0.36, 1);
}
footer a {
  display: inline-block;
}
footer a:hover {
  transform: translateX(2px);
}
/* pill CTAs get a smooth hover + press */
a[style*="border-radius: 999px"] {
  transition: color .16s cubic-bezier(0.22, 1, 0.36, 1),
    background .16s cubic-bezier(0.22, 1, 0.36, 1),
    border-color .16s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow .16s cubic-bezier(0.22, 1, 0.36, 1),
    transform .16s cubic-bezier(0.22, 1, 0.36, 1);
}
button:active,
nav a:active,
a[style*="border-radius: 999px"]:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  nav a,
  footer a,
  a[style*="border-radius: 999px"] {
    transition: none !important;
  }
  footer a:hover,
  button:active,
  nav a:active,
  a[style*="border-radius: 999px"]:active {
    transform: none !important;
  }
  #cocon-scroll-hint span {
    animation: none !important;
  }
  #cocon-marquee {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  /* collapse every multi-column inline grid to a single column */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-column"] {
    grid-column: auto !important;
  }

  /* section side padding down from 40px */
  section[style*="padding"] {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }

  /* nav: hide desktop link row; hamburger (injected by cocon-i18n.js) takes over */
  nav > div:nth-of-type(1) {
    display: none !important;
  }
  .cocon-burger {
    display: inline-flex !important;
  }

  /* keep the news rows readable when their grid collapses */
  .cocon-news-row {
    padding: 18px 6px !important;
    gap: 6px !important;
  }
  .cocon-news-row span:last-child {
    display: none !important;
  }
}

@media (max-width: 600px) {
  section[style*="padding"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  /* nav pill breathing room; contact CTA lives inside the burger menu */
  nav[style] {
    padding: 8px 8px 8px 16px !important;
  }
  nav > div:last-of-type > a[href="/contact/"] {
    display: none !important;
  }
  /* footer columns stack */
  footer [style*="grid-template-columns"],
  footer [style*="display: flex"] {
    flex-wrap: wrap !important;
  }
}

@media (min-width: 901px) {
  .cocon-burger {
    display: none !important;
  }
}

/* full-screen mobile menu (markup injected by cocon-i18n.js) */
.cocon-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(7, 7, 7, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s cubic-bezier(0.22, 1, 0.36, 1);
}
.cocon-mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.cocon-mobile-menu a {
  color: #FFFAF5;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 250, 245, 0.12);
  text-decoration: none;
}
.cocon-mobile-menu a:active {
  color: #039FE6;
}
.cocon-mobile-menu .cocon-mobile-close {
  position: absolute;
  top: 26px;
  right: 26px;
  background: transparent;
  border: 1px solid rgba(255, 250, 245, 0.4);
  border-radius: 999px;
  color: #FFFAF5;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
}

/* stacked cards: drop desktop min-heights so single-column cards hug content */
@media (max-width: 900px) {
  [style*="min-height: 180px"],
  [style*="min-height: 190px"],
  [style*="min-height: 200px"],
  [style*="min-height: 210px"],
  [style*="min-height: 220px"],
  [style*="min-height: 230px"],
  [style*="min-height: 250px"] {
    min-height: 0 !important;
  }
}
