/* ==========================================================================
   Powerline — components
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------- */

.btn {
  --btn-bg: var(--navy);
  --btn-fg: var(--white);
  --btn-bd: var(--navy);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 0.9rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: var(--sh-lg);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.btn--primary {
  --btn-bg: var(--red-fill);
  --btn-bd: var(--red-fill);
}

.btn--primary:hover {
  --btn-bg: var(--red-700);
  --btn-bd: var(--red-700);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  --btn-bd: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bd: var(--navy);
  --btn-fg: var(--navy);
}

.btn--on-navy {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-bd: rgb(255 255 255 / 0.32);
}

.btn--on-navy:hover {
  --btn-bg: var(--white);
  --btn-fg: var(--navy);
  --btn-bd: var(--white);
}

.btn--wa {
  --btn-bg: var(--wa);
  --btn-bd: var(--wa);
}

.btn--wa:hover {
  --btn-bg: var(--wa-dark);
  --btn-bd: var(--wa-dark);
}

.btn--lg {
  padding: 1.05rem 2rem;
  font-size: var(--fs-base);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* Text link with a sliding arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform var(--dur-mid) var(--ease-out);
}

.link-arrow:hover svg {
  transform: translateX(5px);
}

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition:
    box-shadow var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out);
}

.site-header.is-stuck {
  box-shadow: var(--sh-md);
  border-bottom-color: transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: none;
  margin-right: auto;
}

.brand img {
  height: 38px;
  width: auto;
}

.brand__mark {
  height: 34px;
}

@media (max-width: 900px) {
  .brand img {
    height: 30px;
  }
  .brand__mark {
    height: 28px;
  }
}

/* --- Navigation ---------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav a {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: color var(--dur-fast) var(--ease-out);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-out);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--navy);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

@media (max-width: 1080px) {
  .nav,
  .header-cta .btn {
    display: none;
  }
}

/* Mobile drawer */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--navy);
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur-mid) var(--ease-out);
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-7px) rotate(-45deg);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-columns: 1fr min(88vw, 380px);
  visibility: hidden;
}

/* Author `display: grid` would otherwise beat the UA rule for [hidden], leaving
   a full-viewport overlay in the layout while the drawer is closed. */
.drawer[hidden] {
  display: none;
}

.drawer.is-open {
  visibility: visible;
}

.drawer__scrim {
  background: rgb(22 26 69 / 0.45);
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-out);
  border: 0;
  cursor: pointer;
}

.drawer.is-open .drawer__scrim {
  opacity: 1;
}

.drawer__panel {
  background: var(--white);
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.drawer.is-open .drawer__panel {
  transform: none;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.drawer__close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1;
}

.drawer__nav {
  display: flex;
  flex-direction: column;
}

.drawer__nav a {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}

.drawer__nav a[aria-current="page"] {
  color: var(--red);
}

.drawer__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* --- Cards --------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition:
    transform var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--sh-lg);
}

.card__num {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--red-ink);
}

.card h3 {
  font-size: var(--fs-lg);
}

.card p {
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-2);
  border-radius: var(--r-md);
  background: var(--navy-100);
  color: var(--navy);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card--link {
  text-decoration: none;
}

.card--link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* --- Media slot ---------------------------------------------------------
   Placeholder for photography that has not been supplied yet. Renders as a
   technical blueprint panel while empty; drop an <img> inside to replace.
   See assets/img/README.md for the shot list.
   ------------------------------------------------------------------------ */

.media-slot {
  position: relative;
  aspect-ratio: var(--slot-ratio, 4 / 3);
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--mist) 0%, var(--mist-deep) 100%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.media-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.55;
  z-index: -1;
}

.media-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slots holding a real photograph: the source images are letterboxed onto white
   at exactly 4:3, so `contain` shows them whole and the blueprint grid behind
   would only muddy them. */
.media-slot--filled {
  background: var(--white);
}

.media-slot--filled::before {
  display: none;
}

.media-slot--filled img {
  object-fit: contain;
}

.media-slot__label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--slate-light);
  text-align: center;
  padding: var(--sp-4);
}

.media-slot svg {
  width: 54px;
  height: 54px;
  color: var(--navy-300);
  opacity: 0.5;
}

/* --- Stats --------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--sp-6);
}

.stat__value {
  display: flex;
  align-items: baseline;
  gap: 0.1em;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
}

.section--navy .stat__value {
  color: var(--white);
}

.stat__value span {
  color: var(--red);
}

.stat__label {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

/* --- Client logo wall ---------------------------------------------------
   Source logos come from the corporate profile and are small; they are shown
   at ~44px tall where even the smallest still covers a 2x display.
   ------------------------------------------------------------------------ */

.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.logo-wall li {
  display: grid;
  place-items: center;
  padding: var(--sp-6) var(--sp-4);
  background: var(--white);
  transition: background-color var(--dur-mid) var(--ease-out);
}

.logo-wall img {
  max-height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* Pale marks vanish under plain greyscale, so darken them a little too. */
  filter: grayscale(1) contrast(1.1) brightness(0.82);
  opacity: 0.75;
  transition:
    filter var(--dur-mid) var(--ease-out),
    opacity var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out);
}

.logo-wall li:hover {
  background: var(--mist);
}

.logo-wall li:hover img {
  filter: none;
  opacity: 1;
  transform: scale(1.06);
}

/* Compact marquee strip used on the home page */
.logo-strip {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.logo-strip__track {
  display: flex;
  align-items: center;
  gap: var(--sp-9);
  width: max-content;
  animation: marquee 46s linear infinite;
}

.logo-strip:hover .logo-strip__track {
  animation-play-state: paused;
}

.logo-strip img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter var(--dur-mid), opacity var(--dur-mid);
}

.logo-strip img:hover {
  filter: none;
  opacity: 1;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-strip__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: var(--sp-6);
  }
}

/* --- Forms --------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.field label .req {
  color: var(--red-ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  color: var(--ink);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.field textarea {
  min-height: 148px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6180' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 14%, transparent);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--red);
}

.field__error {
  font-size: var(--fs-xs);
  color: var(--red-ink);
  min-height: 1em;
}

.field--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(2, 1fr);
}

.form-grid .field--full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-status {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  display: none;
}

.form-status.is-shown {
  display: block;
}

.form-status--ok {
  background: #e8f6ed;
  border: 1px solid #a8ddbc;
  color: #15703c;
}

.form-status--err {
  background: var(--red-100);
  border: 1px solid #f3aeb1;
  color: var(--red-700);
}

.btn[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.72;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--navy-900);
  color: var(--on-navy-dim);
  font-size: var(--fs-sm);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: var(--sp-8) var(--sp-6);
  padding-block: var(--sp-9);
}

@media (max-width: 980px) {
  .site-footer__top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }
}

.site-footer h4 {
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-eyebrow);
  color: var(--white);
  margin-bottom: var(--sp-4);
}

.site-footer a {
  color: var(--on-navy-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer li + li {
  margin-top: var(--sp-3);
}

.site-footer__brand img {
  height: 42px;
  width: auto;
  margin-bottom: var(--sp-4);
  filter: brightness(0) invert(1);
}

.site-footer__brand p {
  max-width: 34ch;
  line-height: 1.65;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--sp-5);
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: var(--fs-xs);
  color: var(--slate-light);
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  line-height: 1.55;
}

.contact-line svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 3px;
  /* Lifted from brand red, which is too dark against the navy footer. */
  color: #ff6b70;
}

/* --- Floating actions ---------------------------------------------------- */

.fab-stack {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.fab {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  box-shadow: var(--sh-lg);
  transition:
    transform var(--dur-mid) var(--ease-out),
    opacity var(--dur-mid) var(--ease-out),
    visibility var(--dur-mid);
}

.fab:hover {
  transform: translateY(-3px) scale(1.05);
  color: var(--white);
}

.fab svg {
  width: 24px;
  height: 24px;
}

.fab--wa {
  background: var(--wa);
}

.fab--top {
  background: var(--navy);
  opacity: 0;
  visibility: hidden;
}

.fab--top.is-shown {
  opacity: 1;
  visibility: visible;
}
