/* =========================================================
   Cyber Defence Kit hero — responsive adjustments
   ========================================================= */

.cdk-hero {
  position: relative;
  overflow: hidden;
}

.cdk-hero__bg {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* =========================================================
   Cyber Defence Kit homepage content
   ========================================================= */

.cdk-home-section {
  margin-top: 4.5rem;
  scroll-margin-top: 5rem;
}

.cdk-home-section--about {
  margin-top: 0;
}

.cdk-home-section--about > h1 {
  margin: 0 0 1rem;
}

.cdk-home-section--about > p {
  max-width: 58rem;
  line-height: 1.7;
}

/* Sections reveal once as they enter the viewport. */

body.cdk-home-page .cdk-scroll-reveal {
  --cdk-reveal-duration: 520ms;
  opacity: 0;
  transform: translateY(1.4rem);
  transition:
    opacity var(--cdk-reveal-duration) ease,
    transform var(--cdk-reveal-duration) cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body.cdk-home-page .cdk-home-section--about.cdk-scroll-reveal {
  --cdk-reveal-duration: 600ms;
}

body.cdk-home-page .cdk-home-section--legal.cdk-scroll-reveal {
  --cdk-reveal-duration: 420ms;
  transform: translateY(1rem);
}

body.cdk-home-page .cdk-scroll-reveal.cdk-scroll-reveal--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.cdk-home-page .cdk-feature {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 480ms ease,
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
  transition-delay: var(--cdk-card-delay, 0ms);
}

body.cdk-home-page .cdk-scroll-reveal--visible .cdk-feature {
  opacity: 1;
  transform: translateY(0);
}

/* Welcome heading */

.cdk-home-section > h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.2rem, 3vw, 2.6rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* Section headings: Explore the Toolkit, Getting Started, etc. */

.cdk-home-section > h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.8rem, 2vw, 2.2rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cdk-section-introduction {
  max-width: 55rem;
  margin: 0 0 2.5rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.7;
}

/* =========================================================
   Feature grid
   ========================================================= */

.cdk-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: 3.25rem;
  margin-top: 2.5rem;
}

.cdk-feature {
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr);
  column-gap: 1.05rem;
  align-items: start;
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid rgba(105, 180, 235, 0.1);
  border-radius: 0.75rem;
  background: linear-gradient(
    145deg,
    rgba(17, 31, 48, 0.72),
    rgba(5, 12, 22, 0.45)
  );
  box-shadow: 0 0.65rem 2rem rgba(0, 0, 0, 0.12);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.cdk-feature__content {
  min-width: 0;
}

.cdk-feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: rgba(130, 150, 180, 0.18);
  color: var(--md-accent-fg-color);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.cdk-feature__icon svg {
  width: 1.35rem;
  height: 1.35rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cdk-feature h3 {
  margin: 0 0 0.55rem;
  color: var(--md-default-fg-color);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cdk-feature p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
  line-height: 1.65;
}

.cdk-feature p + p {
  margin-top: 0.65rem;
}

.cdk-feature .cdk-feature__tools {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
}

.cdk-feature__tools strong {
  color: rgba(255, 255, 255, 0.76);
}

/* Subtle hover effect without visible cards */

.cdk-feature:hover .cdk-feature__icon {
  transform: translateY(-0.1rem);
  background: rgba(70, 175, 255, 0.2);
  box-shadow: 0 0 1.25rem rgba(70, 175, 255, 0.12);
}

.cdk-feature:focus-within {
  border-color: rgba(70, 175, 255, 0.34);
  box-shadow: 0 0 0 0.12rem rgba(70, 175, 255, 0.16);
}

@media (hover: hover) {
  body.cdk-home-page
    .cdk-scroll-reveal--visible
    .cdk-feature:hover {
    transform: translateY(-0.18rem);
    border-color: rgba(70, 175, 255, 0.26);
    background: linear-gradient(
      145deg,
      rgba(19, 39, 61, 0.82),
      rgba(7, 17, 29, 0.58)
    );
    box-shadow: 0 0.9rem 2.3rem rgba(0, 0, 0, 0.2);
  }
}

/* =========================================================
   Getting Started
   ========================================================= */

.cdk-feature-grid--compact {
  margin-top: 2rem;
  row-gap: 2.5rem;
}

/* =========================================================
   Important Notes
   ========================================================= */

.cdk-feature-grid--notes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: 2.5rem;
  margin-top: 2rem;
}

.cdk-feature-grid--notes .cdk-feature {
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 0.95rem;
}

.cdk-feature-grid--notes .cdk-feature__icon {
  width: 2.6rem;
  height: 2.6rem;
}

/* =========================================================
   Copyright and licence
   ========================================================= */

.cdk-home-section--legal {
  margin-top: 4.75rem;
  padding-top: 2.25rem;
  border-top: 0.05rem solid var(--md-default-fg-color--lightest);
}

.cdk-home-section--legal a {
  text-underline-offset: 0.15em;
}

/* Give long-form homepage content depth without reducing readability. */

body.cdk-home-page .md-main {
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 115, 180, 0.08), transparent 30rem),
    radial-gradient(circle at 85% 55%, rgba(0, 80, 140, 0.06), transparent 34rem),
    #000;
}

body.cdk-home-page .md-content__inner {
  padding-bottom: 5rem;
}

body.cdk-home-page .md-content a:focus-visible,
body.cdk-home-page .cdk-learn-more:focus-visible {
  outline: 0.15rem solid var(--md-accent-fg-color);
  outline-offset: 0.2rem;
}

.cdk-home-section--legal > h2 {
  font-size: 1.35rem;
  font-weight: 400;
}

.cdk-home-section--legal p {
  max-width: 58rem;
  margin: 0 0 0.7rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.76rem;
  line-height: 1.65;
}

/* =========================================================
   Homepage introduction
   ========================================================= */

.md-content__inner > h1:first-of-type {
  margin-bottom: 1rem;
}

.md-content__inner > h1:first-of-type ~ p {
  max-width: 58rem;
  line-height: 1.7;
}

.md-content__inner > p > img[src*="cyber-defence-kit-logo3.png"] {
  display: block;
  width: 100%;
  height: auto;
  margin: 2rem auto 0;
}

/* =========================================================
   Responsive layout — tablets
   705px to 1088px
   ========================================================= */

@media screen and (min-width: 705px) and (max-width: 1088px) {
  /* Hero */

  .cdk-hero {
    position: relative;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
  }

  .cdk-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
  }

  .cdk-hero__content {
    margin-left: 0;
    left: clamp(2rem, 6vw, 4rem);
    right: clamp(2rem, 6vw, 4rem);
    width: auto;
    max-width: 34rem;
  }

  .cdk-hero__content h1 {
    margin-bottom: 0.9rem;
    font-size: clamp(2rem, 4.8vw, 3rem);
    line-height: 1.1;
    white-space: normal;
  }

  .cdk-hero__content p {
    max-width: 28rem;
    font-size: clamp(0.9rem, 1.7vw, 1.05rem);
    line-height: 1.4;
  }

  .cdk-learn-more {
    padding: 0.55rem 1.25rem;
    font-size: 0.82rem;
  }

  /* Content spacing */

  .md-content {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .md-content__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 58rem;
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
  }

  .cdk-home-section {
    margin-top: 3.75rem;
  }

  .md-content__inner > h1:first-of-type {
    font-size: 2rem;
  }

  .cdk-home-section--about > h1 {
    font-size: 2rem;
  }

  .cdk-home-section > h2 {
    font-size: 1.65rem;
  }

  .cdk-section-introduction {
    margin-bottom: 2.25rem;
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* Tablet grids */

  .cdk-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 2.75rem;
  }

  .cdk-feature-grid--notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 2.5rem;
  }

  .cdk-feature {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 0.9rem;
  }

  .cdk-feature__icon,
  .cdk-feature-grid--notes .cdk-feature__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .cdk-feature h3 {
    font-size: 0.98rem;
    line-height: 1.3;
  }

  .cdk-feature p {
    font-size: 0.8rem;
    line-height: 1.6;
  }
}

/* =========================================================
   Responsive layout — desktop
   1089px and above
   ========================================================= */

@media screen and (min-width: 1089px) {
  /* =======================================================
     Hero
     ======================================================= */

  .cdk-hero {
    position: relative;
    overflow: hidden;
  }

  .cdk-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .cdk-hero__content {
    left: clamp(7rem, 9vw, 10rem);
    right: auto;
    width: min(40rem, 42vw);
    max-width: 40rem;
    margin-left: 0;
  }

  .cdk-hero__content h1 {
    max-width: 100%;
    font-size: clamp(3rem, 4vw, 4.25rem);
    line-height: 1.08;
    white-space: nowrap;
  }

  .cdk-hero__content p {
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    line-height: 1.45;
  }

  .cdk-learn-more {
    padding: 0.65rem 1.6rem;
    font-size: 0.95rem;
  }

  /* =======================================================
     Homepage content
     ======================================================= */

  .md-content__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 76rem;
    margin-right: auto;
    margin-left: auto;
  }

  .cdk-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cdk-feature-grid--notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =========================================================
   Responsive layout — phones
   704px and below
   Keep this media query after the tablet query.
   ========================================================= */

@media screen and (max-width: 704px) {
  /* Hero */

  .cdk-hero {
    position: relative;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
  }

  .cdk-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
  }

  .cdk-hero__content {
    margin-left: 0;
    left: 1.25rem;
    right: 1.25rem;
    width: auto;
    max-width: none;
  }

  .cdk-hero__content h1 {
    max-width: 100%;
    margin: 0 0 0.7rem;
    font-size: clamp(1.35rem, 6.5vw, 1.85rem);
    line-height: 1.1;
    white-space: normal;
  }

  .cdk-hero__content p {
    max-width: 19rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .cdk-learn-more {
    padding: 0.45rem 1rem;
    font-size: 0.74rem;
  }

  /* Reset tablet/container spacing */

  .md-grid {
    padding-right: 0;
    padding-left: 0;
  }

  .md-content {
    padding-right: 0;
    padding-left: 0;
  }

  .md-content__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  /* Homepage content */

  .cdk-home-section {
    margin-top: 3.25rem;
  }

  .md-content__inner > h1:first-of-type {
    margin: 0 0 1rem;
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.2;
  }

  .cdk-home-section--about > h1 {
    margin: 0 0 1rem;
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.2;
  }

  .cdk-home-section > h2 {
    margin: 0 0 0.85rem;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.25;
  }

  .cdk-section-introduction {
    max-width: none;
    margin-bottom: 2rem;
    font-size: 0.88rem;
    line-height: 1.7;
  }

  /* Full-width introduction image */

  .md-content__inner > p > img[src*="cyber-defence-kit-logo3.png"] {
    display: block;
    width: calc(100% + 2.5rem);
    max-width: none;
    height: auto;
    margin: 1.75rem -1.25rem 0;
  }

  /* Force every phone grid to one column */

  .cdk-feature-grid,
  .cdk-feature-grid--compact,
  .cdk-feature-grid--notes {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 2.4rem;
    width: 100%;
    margin-top: 2rem;
  }

  .cdk-feature,
  .cdk-feature-grid--notes .cdk-feature {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 0.9rem;
    width: 100%;
    min-width: 0;
  }

  .cdk-feature__content {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .cdk-feature__icon,
  .cdk-feature-grid--notes .cdk-feature__icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .cdk-feature__icon svg {
    width: 1.2rem;
    height: 1.2rem;
  }

  .cdk-feature h3 {
    margin-bottom: 0.45rem;
    font-size: 0.98rem;
    line-height: 1.3;
    overflow-wrap: normal;
    word-break: normal;
  }

  .cdk-feature p {
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .cdk-feature .cdk-feature__tools {
    font-size: 0.74rem;
  }

  /* Legal section */

  .cdk-home-section--legal {
    margin-top: 3.75rem;
    padding-top: 1.75rem;
  }

  .cdk-home-section--legal > h2 {
    font-size: 1.15rem;
  }
}

/* Keep both homepage images pinned together during the scroll transition. */
.cdk-home-intro .cdk-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cdk-home-intro {
    height: 100vh;
  }

  .cdk-hero__bg,
  .cdk-hero__content,
  .cdk-hero__second,
  .cdk-hero__about,
  body.cdk-home-page .md-content {
    transition: none;
  }

  body.cdk-home-page .cdk-scroll-reveal,
  body.cdk-home-page .cdk-scroll-reveal.cdk-scroll-reveal--visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body.cdk-home-page .cdk-feature {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cdk-scroll-cue__line::after {
    animation: none;
  }
}

/* Responsive pacing and full-width second image. */
@media screen and (min-width: 705px) and (max-width: 1088px) {
  .cdk-home-intro {
    height: 130vh;
  }

  .cdk-hero__second {
    background-size: 100% auto;
  }

  .cdk-about-anchor {
    top: 30%;
  }
}

@media screen and (max-width: 704px) {
  .cdk-home-intro {
    height: 125vh;
  }

  .cdk-hero__second {
    background-size: 100% auto;
    background-position: center;
  }

  .cdk-hero__about {
    top: 53%;
    left: 50%;
    width: calc(100vw - 2.5rem);
  }

  .cdk-hero__about h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.45rem, 6vw, 1.9rem);
  }

  .cdk-hero__about p {
    margin-bottom: 0.55rem;
    font-size: clamp(0.76rem, 3.2vw, 0.88rem);
    line-height: 1.5;
  }

  .cdk-hero__radar {
    left: 78%;
    width: 9rem;
    opacity: 0.35;
  }

  .cdk-data-particle {
    width: 0.2rem;
    height: 0.2rem;
  }

  .cdk-about-anchor {
    top: 26%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cdk-home-intro {
    height: auto;
  }

  .cdk-home-intro__sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .cdk-home-intro .cdk-hero {
    position: relative;
    height: 100vh;
  }

  .cdk-hero__second {
    position: relative;
    height: min(80vh, 48rem);
    opacity: 0.48 !important;
    transform: none !important;
  }

  .cdk-hero__about {
    top: auto;
    bottom: clamp(2rem, 8vh, 5rem);
    opacity: 1 !important;
    transform: translateX(-50%) !important;
  }

  .cdk-scroll-cue,
  .cdk-about-anchor {
    display: none;
  }

  .cdk-hero__bg::before,
  .cdk-hero__bg::after {
    animation: none;
  }

  .cdk-hero__activity {
    transform: none;
    transition: none;
  }

  .cdk-data-particle,
  .cdk-hero__radar {
    display: none;
    animation: none;
  }
}

/* =========================================================
   Responsive hardening
   Small phones, short screens, zoom and large displays
   ========================================================= */

body.cdk-home-page {
  overflow-x: clip;
}

.cdk-home-intro__sticky,
.cdk-home-intro .cdk-hero {
  height: 100vh;
  height: 100svh;
}

.cdk-hero__content {
  box-sizing: border-box;
}

.cdk-hero__content h1 {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

.cdk-learn-more {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

@media screen and (min-width: 1600px) {
  .cdk-hero__content {
    left: max(8rem, calc((100vw - 92rem) / 2));
    width: min(44rem, 42vw);
  }

  .cdk-hero__about {
    width: min(52rem, calc(100vw - 8rem));
  }

  body.cdk-home-page .md-content__inner {
    max-width: 82rem;
  }
}

@media screen and (max-width: 360px) {
  .cdk-hero__content {
    right: 1rem;
    left: 1rem;
    max-width: calc(100vw - 2rem);
  }

  .cdk-hero__content h1 {
    font-size: clamp(1.2rem, 7vw, 1.55rem);
  }

  .cdk-hero__content p {
    max-width: 17rem;
    font-size: 0.74rem;
  }

  .cdk-learn-more {
    padding: 0.45rem 0.85rem;
    font-size: 0.7rem;
  }

  .cdk-hero__about {
    width: calc(100vw - 2rem);
  }

  .md-content__inner {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .cdk-feature,
  .cdk-feature-grid--notes .cdk-feature {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    column-gap: 0.75rem;
    padding: 1rem;
  }

  .cdk-feature__icon,
  .cdk-feature-grid--notes .cdk-feature__icon {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media screen and (max-height: 720px) {
  .cdk-hero__content h1 {
    margin-bottom: 0.65rem;
    font-size: clamp(1.65rem, 7vh, 3rem);
  }

  .cdk-hero__content p {
    margin-bottom: 0.8rem;
    font-size: clamp(0.78rem, 2.5vh, 1rem);
    line-height: 1.35;
  }

  .cdk-learn-more {
    min-height: 2.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.76rem;
  }

  .cdk-scroll-cue {
    bottom: 0.75rem;
    gap: 0.35rem;
  }

  .cdk-scroll-cue__line {
    height: 1.5rem;
  }

  .cdk-hero__about h2 {
    margin-bottom: 0.65rem;
    font-size: clamp(1.45rem, 5.5vh, 2.25rem);
  }

  .cdk-hero__about p {
    margin-bottom: 0.5rem;
    font-size: clamp(0.74rem, 2.2vh, 0.92rem);
    line-height: 1.45;
  }
}

@media screen and (max-height: 560px) and (orientation: landscape) {
  .cdk-home-intro {
    height: 190vh;
  }

  .cdk-hero__content {
    left: clamp(1.25rem, 5vw, 4rem);
    width: min(31rem, 58vw);
    margin-left: 0;
  }

  .cdk-hero__content h1 {
    font-size: clamp(1.4rem, 7vh, 2.15rem);
  }

  .cdk-hero__content p {
    font-size: clamp(0.72rem, 2.8vh, 0.88rem);
  }

  .cdk-hero__about {
    top: 50%;
    width: min(44rem, calc(100vw - 3rem));
  }

  .cdk-hero__about h2 {
    font-size: clamp(1.3rem, 6vh, 1.8rem);
  }

  .cdk-hero__about p {
    font-size: clamp(0.68rem, 2.6vh, 0.8rem);
    line-height: 1.35;
  }

  .cdk-scroll-cue {
    display: none;
  }
}

@media screen and (min-aspect-ratio: 21 / 9) {
  .cdk-hero__content {
    width: min(44rem, 38vw);
  }

  .cdk-hero__bg {
    background-position: center;
  }

  .cdk-hero__second {
    background-size: min(100%, 120rem) auto;
  }
}

@media (prefers-reduced-motion: reduce) and (max-height: 700px) {
  .cdk-hero__second {
    height: max(100svh, 26rem);
  }
}

/* Share Material's desktop grid with the header and primary navigation. */
@media screen and (min-width: 1089px) {
  .cdk-hero__content {
    left: max(1.5rem, calc((100vw - 61rem) / 2 + 0.6rem));
  }

  .cdk-hero__logo {
    right: max(1.5rem, calc((100vw - 61rem) / 2 + 0.6rem));
  }
}
