/* ==========================================================================
   CLARITASK — KORE SHELL
   Header, mega menu, mobile drawer and skip link, ported from
   new_kore_website/assets/css/layout.css and adapted to Claritask's markup.

   Loaded after style.css, so the rules here win where both describe the same
   element (the old .header .wrapper measure, for instance).
   ========================================================================== */

.k-skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  background: var(--ct-ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: top var(--fx-t) var(--fx-ease);
}
.k-skip:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   Header bar
   -------------------------------------------------------------------------- */
.k-header {
  position: sticky;
  top: 0;
  z-index: 1100;
}
.k-header__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--header-h);
  width: 100%;
  max-width: calc(var(--ct-container) + var(--ct-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--ct-gutter);
}
.k-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.k-logo img {
  height: 38px;
  width: auto;
  display: block;
}
.k-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Nav bar
   -------------------------------------------------------------------------- */
.k-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.k-nav__link,
.k-nav__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 0;
  background: none;
  border-radius: var(--ct-r-pill);
  font-family: var(--ct-font-body);
  font-size: 0.836rem;
  font-weight: 500;
  color: var(--ct-ink);
  cursor: pointer;
  transition:
    background var(--fx-t) var(--fx-ease),
    color var(--fx-t) var(--fx-ease);
}
.k-nav__link:hover,
.k-nav__trigger:hover {
  background: var(--ct-grey);
}

.k-nav__link:is(:focus, :focus-visible),
.k-nav__trigger:is(:focus, :focus-visible) {
  outline: none;
}

.k-nav__link.is-current,
.k-nav__trigger.is-current {
  color: var(--ct-primary);
  font-weight: 600;
}
.k-nav__chev {
  transition: transform var(--fx-t) var(--fx-ease);
  opacity: 0.55;
}
.k-nav__group.is-open .k-nav__chev {
  transform: rotate(180deg);
}
.k-nav__group.is-open .k-nav__trigger {
  background: var(--ct-grey);
}

/* --------------------------------------------------------------------------
   Mega menu
   The panel is in the flow of a positioned group so it can be centred under
   the whole bar rather than under its own trigger, which is what stops a
   four-item menu hanging off the right edge on a 1280px screen.
   -------------------------------------------------------------------------- */
.k-nav__group {
  position: static;
}
.k-nav__group--compact {
  position: relative;
}
.k-mega {
  position: absolute;
  top: calc(var(--header-h) - 6px);
  left: 50%;
  transform: translate(-50%, 10px);
  width: min(980px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-r-lg);
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s var(--fx-ease),
    transform 0.3s var(--fx-ease),
    visibility 0s linear 0.3s;
  z-index: 1090;
}
.k-nav__group--compact .k-mega {
  left: 0;
  transform: translate(0, 10px);
  width: 320px;
  padding: 12px;
}
.k-nav__group.is-open .k-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
.k-nav__group--compact.is-open .k-mega {
  transform: translate(0, 0);
}
.k-mega__inner {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 26px;
}
.k-mega--compact .k-mega__inner {
  grid-template-columns: 1fr;
  gap: 0;
}
.k-mega__aside {
  border-right: 1px solid var(--ct-border);
  padding-right: 26px;
}
.k-mega__title {
  font-size: 1.144rem;
  font-weight: 700;
  margin: 6px 0 8px;
  line-height: 1.15;
}
.k-mega__text {
  margin: 0 0 16px;
  font-size: 0.81rem;
  line-height: 1.6;
  color: var(--ct-muted);
}
.k-mega__all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--ct-primary);
  transition: gap var(--fx-t) var(--fx-ease);
}
.k-mega__all:hover {
  gap: 11px;
}

.k-mega__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-content: start;
}
.k-mega--compact .k-mega__grid {
  grid-template-columns: 1fr;
}
/* Rows arrive in sequence as the panel opens; --d is set per item inline. */
.k-nav__group.is-open .k-mega__grid > li {
  animation: kMegaIn 0.4s var(--fx-ease-out) both;
  animation-delay: var(--d, 0ms);
}
@keyframes kMegaIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.k-mega__item {
  display: grid;
  grid-template-columns: 38px 1fr 16px;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--ct-r);
  transition: background var(--fx-t) var(--fx-ease);
}
.k-mega__item:hover,
.k-mega__item.is-current {
  background: color-mix(in srgb, var(--accent, var(--ct-viz)) 7%, #fff);
}
.k-mega__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--ct-r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, var(--ct-viz)) 12%, #fff);
  color: color-mix(in srgb, var(--accent, var(--ct-viz)) 82%, #000);
}
.k-mega__name {
  display: block;
  font-family: var(--ct-font-display);
  font-size: 0.836rem;
  font-weight: 700;
  line-height: 1.25;
}
.k-mega__blurb {
  display: block;
  font-size: 0.722rem;
  line-height: 1.45;
  color: var(--ct-muted);
  margin-top: 2px;
}
.k-mega__go {
  color: var(--ct-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity var(--fx-t) var(--fx-ease),
    transform var(--fx-t) var(--fx-ease);
}
.k-mega__item:hover .k-mega__go {
  opacity: 1;
  transform: none;
  color: color-mix(in srgb, var(--accent, var(--ct-viz)) 82%, #000);
}

/* --------------------------------------------------------------------------
   Mobile drawer accordions
   -------------------------------------------------------------------------- */
.mobile-dropdown-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s var(--fx-ease);
  overflow: hidden;
}
/* The single grid child. Without one wrapper the 0fr row only collapses the
   first link and the rest land in implicit auto rows, which is why a closed
   panel used to leak its contents. */
.mobile-dropdown-inner {
  min-height: 0;
  overflow: hidden;
}
.mobile-has-dropdown.is-open .mobile-dropdown-panel {
  grid-template-rows: 1fr;
}
.mobile-has-dropdown.is-open .mobile-dropdown-chevron {
  transform: rotate(180deg);
}
.mobile-dropdown-link {
  display: block;
  padding: 10px 12px 10px 26px;
  border-radius: var(--ct-r-sm);
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--ct-muted);
}
.mobile-dropdown-link:hover,
.mobile-dropdown-link.is-current {
  background: var(--ct-grey);
  color: var(--ct-primary);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .k-mega__inner {
    grid-template-columns: 1fr;
  }
  .k-mega__aside {
    border-right: 0;
    border-bottom: 1px solid var(--ct-border);
    padding: 0 0 16px;
  }
}

/* The desktop bar needs about 959px to lay out: logo + nav + the two actions
   + gutters, and nothing in the row can shrink. Swapping to the burger at 900
   left 901-958 overflowing the viewport, so the swap happens at 980 instead.
   The .hamburger reveal has to be repeated here because style.css hides it
   until 900 and this stylesheet loads later. */
@media (max-width: 980px) {
  .k-nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .k-header__inner {
    gap: 12px;
  }
  /* The logo sits between the burger and the actions rather than at the far
     left, so the bar reads as one centred group on a phone. */
  .k-logo {
    margin-right: auto;
  }
}

/* ==========================================================================
   FOOTER
   Ported from new_kore_website/assets/css/layout.css. A light paper band with
   a hairline top rule, not a filled navy block: the page ends by fading out
   rather than by dropping into a colour.
   ========================================================================== */
.k-footer {
  position: relative;
  background: var(--ct-paper);
  border-top: 1px solid var(--ct-border);
  padding: clamp(44.5px, 6vw, 72px) 0 0;
  overflow: hidden;
}
.k-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 54px;
}
.k-footer__logo {
  height: 38px;
  width: auto;
  display: block;
}
.k-footer__pitch {
  color: var(--ct-muted);
  font-size: 0.836rem;
  line-height: 1.65;
  max-width: 46ch;
  margin: 18px 0 22px;
}

.k-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.k-footer__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.k-footer__col h3 {
  /* Same floor as the eyebrow: these are uppercase column headings. */
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  /* #8593a6 came off the navy footer and is only 3.04:1 on paper, under the
     4.5:1 AA needs at this size. This clears it at 4.7:1. */
  color: #657386;
  font-family: var(--ct-font-body);
  font-weight: 600;
  margin: 0 0 4px;
}
.k-footer__col-h2 {
  margin-top: 22px !important;
}
.k-footer__col a {
  font-size: 0.81rem;
  color: #2a3a4f;
  width: fit-content;
  transition:
    color var(--fx-t) var(--fx-ease),
    transform var(--fx-t) var(--fx-ease);
}
.k-footer__col a:hover {
  color: var(--ct-primary);
  transform: translateX(3px);
}
.k-footer__addr {
  font-size: 0.774rem;
  color: var(--ct-muted);
  max-width: 30ch;
}

/* Subscribe, inline in the brand column. */
.k-subscribe {
  display: flex;
  gap: 8px;
  max-width: 420px;
}
.k-subscribe input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  border-radius: var(--ct-r-pill);
  border: 1px solid var(--ct-border);
  background: #fff;
  font-family: var(--ct-font-body);
  font-size: 16px;
  color: var(--ct-ink);
  transition: border-color var(--fx-t) var(--fx-ease);
}

.k-subscribe input::placeholder {
  font-size: 14px;
}

.k-subscribe input:focus {
  outline: none;
  border-color: var(--ct-viz);
}
.k-subscribe .subscribe-btn {
  flex: 0 0 auto;
}
/* The button swaps its label for a tick once the address is accepted.
   style.css still animates this span as an absolutely positioned overlay
   keyed on the old .subscribe-pill wrapper, so the positioning is neutralised
   here, otherwise the tick stays at opacity 0 outside an overflow-hidden
   button and the pill renders empty. */
.subscribe-btn__done {
  display: none;
  position: static;
  inset: auto;
  opacity: 1;
  transform: none;
}
.k-subscribe.is-success .subscribe-btn__label {
  display: none;
}
.k-subscribe.is-success .subscribe-btn__done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.k-subscribe.is-success .subscribe-btn {
  background: #16a34a;
}
/* The error state is carried by the form, not the old pill wrapper. */
.k-subscribe.is-error input {
  border-color: #c02626;
}
.k-subscribe__msg {
  font-size: 0.739rem;
  color: #c02626;
  min-height: 20px;
  margin: 8px 0 0;
}
.k-subscribe__msg.is-error {
  color: #c02626;
}

.k-footer__bottom {
  margin-top: clamp(32.5px, 4vw, 48px);
  padding: 22px 0;
  border-top: 1px solid var(--ct-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  font-size: 0.757rem;
  color: var(--ct-muted);
}
.k-footer__bottom p {
  margin: 0;
}
.k-footer__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.k-footer__social a {
  color: var(--ct-muted);
  transition: color var(--fx-t) var(--fx-ease);
}
.k-footer__social a:hover {
  color: var(--ct-primary);
}
.k-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.k-footer__legal a:hover {
  color: var(--ct-primary);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Collapse the brand/links split early. Above this the 1.35fr track squeezes
   the three columns to ~130px, where "hello@claritask.com" has no break
   opportunity and spills into the page gutter. */
@media (max-width: 1080px) {
  .k-footer__top {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}
/* Three columns are kept all the way down: two would strand the third on a
   row of its own with an empty half beside it. */
@media (max-width: 900px) {
  .k-footer__cols {
    gap: 24px;
  }
}
@media (max-width: 680px) {
  .k-footer__cols {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .k-subscribe {
    flex-direction: column;
  }
  .k-footer__social {
    margin-left: 0;
  }
}

/* The back-to-top button floats over the bottom-right corner. The reserve
   sits on the row rather than on the legal links: once the row wraps, those
   drop to a second line and the social icons become the rightmost item, so a
   reserve on one child protects the wrong one. */
@media (min-width: 561px) {
  .k-footer__bottom {
    padding-right: 62px;
  }
}

/* A menu item carrying a product's own mark: white tile, hairline, the logo
   at its natural colours instead of a tinted glyph. */
.k-mega__icon--logo {
  background: #fff;
  border: 1px solid var(--ct-border);
}
.k-mega__icon--logo img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}
