/* ── Services hero ── */
.srv-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0d1b2a;
}
.srv-hero__svg {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.srv-hero__inner {
  position: relative; z-index: 1;
  max-width: 720px; width: 100%;
  margin: 0 auto;
  padding: 7rem var(--gutter) 3.5rem;
}
.srv-hero .eyebrow { color: rgba(255,255,255,.65); }
.srv-hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: #fff; letter-spacing: -0.02em;
  margin: .5rem 0 1rem; line-height: 1.1;
}
.srv-hero p.sub {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: rgba(255,255,255,.82);
  max-width: 32rem; margin: 0 0 1.75rem;
  line-height: 1.55;
}

/* Animated wavefronts */
@keyframes wf {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: .15; }
  100% { opacity: 0; }
}
.wf { animation: wf 3.2s ease-out infinite; }
.wf1 { animation-delay: 0s; }
.wf2 { animation-delay: .42s; }
.wf3 { animation-delay: .84s; }
.wf4 { animation-delay: 1.26s; }
.wf5 { animation-delay: 1.68s; }
.wf6 { animation-delay: 2.10s; }
.wf7 { animation-delay: 2.52s; }

/* ── Service cards ── */
.service-icon {
  width: 1.65rem; height: 1.65rem;
  color: var(--accent); flex-shrink: 0;
}
.service-subhead {
  font-family: var(--mono); font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 400;
  margin: 1.5rem 0 .6rem;
}
.service-list {
  margin: 0; padding: 0;
  list-style: none;
  color: var(--ink-soft); font-size: .96rem; line-height: 1.7;
}
.service-list li {
  padding-left: 1.25rem; position: relative;
  margin-bottom: .3rem;
}
.service-list li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--accent); font-size: .82rem; top: .15em;
}

/* ── Reference logos ── */
.ref-logos {
  display: flex; align-items: center; gap: 2rem;
  flex-wrap: wrap; margin-top: 1.5rem;
  padding-top: 1.25rem; border-top: 1px solid var(--rule);
}
.ref-logos__label {
  font-family: var(--mono); font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.ref-logos img, .ref-logos svg { height: 40px; width: auto; opacity: .85; }
.ref-logos img[alt="Monash University"] { height: 32px; }
.ref-logos img:hover, .ref-logos svg:hover { opacity: 1; }

/* ── Video embed ── */
.video-wrap {
  position: relative; width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin: 1.5rem 0;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: none;
}

/* ── Award badges ── */
.award-badges {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  margin-top: 1.75rem; margin-bottom: .75rem; align-items: flex-start;
  justify-content: center;
}
.award-badge {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; text-align: center;
}
.award-badge img {
  height: 56px; width: auto;
}
.award-badge__prize {
  font-family: var(--serif); font-size: 1.1rem;
  font-weight: 600; color: var(--ink);
  letter-spacing: -.01em;
}
.award-badge__name {
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; line-height: 1.5;
}

/* ── Capability chips ── */
.cap-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.cap-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .85rem .4rem .65rem;
  border: 1px solid rgba(45,74,110,.15);
  border-radius: 100px;
  background: var(--bg);
  font-size: .84rem; color: var(--ink-soft); line-height: 1.3;
}
.cap-chip svg { width: 1rem; height: 1rem; color: var(--accent); flex-shrink: 0; }

/* ── Project bullets ── */
.project-item {
  display: flex; flex-direction: column;
  gap: .15rem; margin-bottom: .9rem;
}
.project-item:last-child { margin-bottom: 0; }
.project-item__title { font-weight: 600; color: var(--ink); font-size: .96rem; }
.project-item__note { font-size: .88rem; color: var(--ink-soft); }

/* ── Click-to-load video (nothing is loaded from YouTube before the click) ── */
.video-consent img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.video-consent::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(13, 27, 42, .35);
  pointer-events: none;
}
.video-consent__play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem .8rem 1.1rem;
  background: rgba(255, 255, 255, .95); color: var(--ink);
  border: none; border-radius: 999px;
  font-family: var(--sans); font-size: .95rem; font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  transition: transform .15s ease, background .15s ease;
}
.video-consent__play:hover { background: #fff; transform: translate(-50%, -50%) scale(1.04); }
.video-consent__play svg { width: 1.2rem; height: 1.2rem; color: var(--accent); }
.video-consent__note {
  margin: -.75rem 0 1.5rem;
  font-size: .8rem; color: var(--muted);
}

/* ── Services: three cards in a fixed row; the clicked one widens, the others narrow ── */
.svc {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  scroll-margin-top: 6rem;
  transition: grid-template-columns .5s cubic-bezier(.22, 1, .36, 1);
}
.svc[data-active="1"] { grid-template-columns: 2.2fr 1fr 1fr; }
.svc[data-active="2"] { grid-template-columns: 1fr 2.2fr 1fr; }
.svc[data-active="3"] { grid-template-columns: 1fr 1fr 2.2fr; }

.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  min-width: 0;
  padding: 1.6rem 1.5rem 1.4rem;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg);
  scroll-margin-top: 6rem;
  container-type: inline-size;
  transition: box-shadow .25s ease, background .25s ease;
}
.svc.is-interactive .svc-card:not(.is-active) { cursor: pointer; }
.svc.is-interactive .svc-card:not(.is-active):hover { box-shadow: var(--shadow); }
.svc-card .service-icon { width: 1.6rem; height: 1.6rem; }
.svc .svc-card__heading {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  margin: .25rem 0 0; padding: 0; line-height: 1.2;
  hyphens: manual;
}
.svc-card__heading::after { display: none; }
.svc-card__toggle { all: unset; cursor: pointer; color: var(--accent); }
.svc-card__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.svc-card__text { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; flex: 1; }
.svc-card__more { margin-top: .4rem; font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--accent); }
.svc-card__more::after { content: ' +'; }
.svc-card__close { display: none; }

/* Details: always visible without JavaScript, otherwise only in the open card */
.svc-card__details {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.25rem clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.svc-card__details .service-enquire { grid-column: 1 / -1; margin: .25rem 0 .5rem; }
.svc-card--wide .svc-card__main { grid-column: 1 / -1; }
.svc:not(.is-interactive) { grid-template-columns: 1fr; }
.svc.is-interactive .svc-card__details { display: none; }

/* Open card */
.svc.is-interactive .svc-card.is-active { background: var(--bg-soft); padding: clamp(1.5rem, 3vw, 2.25rem); }
.svc.is-interactive .svc-card.is-active .svc-card__more { display: none; }
.svc.is-interactive .svc-card.is-active .svc-card__text { flex: none; max-width: 42rem; font-size: 1rem; }
.svc.is-interactive .svc-card.is-active .svc-card__heading { padding-right: 2.75rem; }
.svc.is-interactive .svc-card.is-active .svc-card__details {
  display: grid;
  margin-top: .75rem;
  animation: svc-in .45s .15s both ease;
}
.svc.is-interactive .svc-card.is-active .svc-card__close {
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: .9rem; right: .9rem;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--bg); color: var(--ink-soft);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.svc.is-interactive .svc-card.is-active .svc-card__close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
@keyframes svc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Narrowed cards keep their title and first sentence, a bit smaller */
.svc.is-interactive .svc-card.is-min { padding: 1.4rem 1.25rem 1.2rem; }
.svc.is-interactive .svc-card.is-min .svc-card__heading { font-size: 1.1rem; }
.svc.is-interactive .svc-card.is-min .svc-card__text { font-size: .88rem; flex: none; }

/* The open card lays out its details in one column until it is wide enough for two */
@container (max-width: 640px) {
  .svc-card__details { grid-template-columns: 1fr; }
}

.svc-card__main > .service-subhead:first-child,
.svc-card__side > .service-subhead:first-child { margin-top: 0; }
.svc-card__side .ref-logos { margin-top: 0; padding-top: 0; border-top: none; gap: 1rem 1.5rem; }
.svc-card__side .ref-logos img { height: 32px; }
.svc-card__side .ref-logos img[alt="Monash University"] { height: 26px; }
.svc-card__side .award-badges { justify-content: flex-start; gap: 1.5rem; margin-top: 1.5rem; }
.svc-card__side .award-badge img { height: 44px; }
.svc-card__side .award-badge__name { white-space: normal; }
.svc-card__main .video-wrap { margin: 0 0 .5rem; }
.svc-card__main .video-consent__note { margin: 0; }
.service-enquire a { font-weight: 500; }
.service-enquire .arrow { display: inline-block; margin-left: .4rem; transition: transform .25s ease; }
.service-enquire a:hover .arrow { transform: translateX(3px); }

/* Smaller screens: cards stack; the open one expands downward, the others become slim rows */
@media (max-width: 760px) {
  .svc,
  .svc[data-active] { grid-template-columns: 1fr; gap: .75rem; }
  .svc-card__details { grid-template-columns: 1fr; }
  .svc.is-interactive .svc-card.is-min {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-top-width: 1px;
  }
  .svc.is-interactive .svc-card.is-min .service-icon { width: 1.3rem; height: 1.3rem; }
  .svc.is-interactive .svc-card.is-min .svc-card__heading { flex: 1; margin: 0; font-size: 1rem; }
  .svc.is-interactive .svc-card.is-min .svc-card__text { display: none; }
  .svc.is-interactive .svc-card.is-min .svc-card__more { margin: 0; font-size: 0; }
  .svc.is-interactive .svc-card.is-min .svc-card__more::after { content: '+'; font-size: 1.4rem; font-weight: 400; }
}
