/* ------------------------------------------------------------------
   Canada Defence Aerospace & Security Network — registration page
   ------------------------------------------------------------------ */

:root {
  --navy:        #0d2f4b;
  --navy-deep:   #0a233a;
  --navy-ink:    #122e48;
  --teal:        #1f8a76;
  --teal-bright: #2da38c;
  --cream:       #f5f1e8;
  --paper:       #fbf8f1;
  --ink:         #131b27;
  --ink-soft:    #3a4756;
  --rule:        #d8d1c1;
  --rule-soft:   #ece6d6;
  --white:       #ffffff;

  --font-serif: "Outfit", system-ui, sans-serif;
  --font-sans:  "Inter", system-ui, sans-serif;

  --max:  1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

::selection { background: var(--navy); color: #fff; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 100;
  font-family: var(--font-sans); font-size: 13px; letter-spacing: .04em;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------ */

.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero__top {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(10px, 1.4vw, 18px) var(--gutter);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 0 4px rgba(45,163,140,.18);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(45,163,140,.18); }
  50%     { box-shadow: 0 0 0 7px rgba(45,163,140,0); }
}

.hero__locale { opacity: .72; }

/* Banner image — the brand banner with camo + logo + wordmark */
.banner {
  flex: 1 1 0;
  min-height: 460px;
  display: block;
  width: 100%;
  position: relative;
  background: var(--navy);
  overflow: hidden;
}
.banner__picture {
  position: absolute;
  inset: 0;
  display: block;
}
.banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* CTA — overlaid on the banner, near the bottom, solid white */
.hero__cta {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 5vh, 56px);
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy);
  background: #fff;
  padding: 18px 32px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.55),
              0 4px 12px -4px rgba(0,0,0,.25);
  transition: background .3s ease, color .3s ease,
              transform .3s ease, box-shadow .3s ease;
}
.hero__cta:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 24px 48px -16px rgba(0,0,0,.6),
              0 6px 16px -4px rgba(0,0,0,.3);
  background: var(--cream);
}
.hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.hero__cta svg {
  animation: bob 2.4s ease-in-out infinite;
  color: var(--navy);
}
@keyframes bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(3px); }
}

/* Topics ribbon */
.topics {
  flex: 0 0 auto;
  position: relative;
  padding: 0 var(--gutter) clamp(22px, 3vh, 36px);
  color: rgba(255,255,255,.86);
}
.topics__rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.25) 20%,
    rgba(255,255,255,.25) 80%, transparent 100%);
  margin-bottom: clamp(14px, 1.8vh, 22px);
}
.topics__list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(13px, 1.05vw, 15px);
  letter-spacing: .005em;
}
.topics__list li {
  position: relative;
  padding-right: 28px;
}
.topics__list li::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--teal-bright);
  opacity: .6;
  transform: translateY(-50%);
}
.topics__list li:last-child { padding-right: 0; }
.topics__list li:last-child::after { display: none; }

/* ------------------------------------------------------------------
   REGISTER
   ------------------------------------------------------------------ */

.register {
  background: var(--paper);
  position: relative;
}

.register__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 140px) var(--gutter);
}

.register__head {
  max-width: 780px;
  margin-bottom: clamp(48px, 7vh, 80px);
}

.register__num {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.register__head h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 18px;
}
.register__head h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
}

.register__sub {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vh, 42px);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
}

.form__row--submit {
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
}
.form__row--submit .submit {
  justify-self: end;
  width: auto;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.field label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--navy);
  margin-bottom: 4px;
}

.field input,
.field textarea {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 0 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
  border-radius: 0;
  outline: none;
}

.field input::placeholder { color: rgba(0,0,0,.3); }

.field__rule {
  height: 1.5px;
  background: var(--navy);
  width: 100%;
  position: relative;
  overflow: hidden;
}
.field__rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.field input:focus ~ .field__rule::after,
.field input:not(:placeholder-shown) ~ .field__rule::after { transform: scaleX(1); }

.field:has(input:focus) label { color: var(--teal); }

/* Submit button */
.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 18px 40px;
  min-width: 220px;
  height: 56px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
  box-shadow: 0 8px 18px -10px rgba(13,47,75,.6);
}
.submit:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -12px rgba(13,47,75,.55);
}
.submit:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}
.submit svg { transition: transform .3s ease; }
.submit:hover svg { transform: translateX(3px); }
.submit:disabled,
.submit[aria-busy="true"] {
  cursor: progress;
  opacity: .72;
  transform: none;
}

.form__note {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: .015em;
  max-width: 60ch;
  margin: 4px 0 0;
  opacity: .8;
}

.form__success {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(31,138,118,.08);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--navy);
}
.form__success[hidden] { display: none; }
.form.is-sent .form__success { display: flex; }
.form.is-sent .form__row,
.form.is-sent .form__note { opacity: .35; pointer-events: none; }
.form__success svg { color: var(--teal); flex-shrink: 0; }
.form__success strong { font-weight: 600; }
.form__success span { color: var(--ink-soft); }

.form__error {
  margin: 4px 0 0;
  padding: 14px 18px;
  background: rgba(176, 56, 56, .06);
  border-left: 3px solid #b03838;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #7a1f1f;
}
.form__error[hidden] { display: none; }

/* ------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------ */

.foot {
  background: var(--navy);
  color: rgba(255,255,255,.78);
  padding: clamp(40px, 6vh, 68px) var(--gutter);
}
.foot__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.foot__mark {
  display: block;
  width: clamp(54px, 5vw, 68px);
  height: auto;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
  opacity: .95;
}
.foot__brand-text strong {
  font-family: var(--font-serif);
  font-weight: 400;
  color: #fff;
  font-size: 15px;
  letter-spacing: .005em;
  display: block;
}
.foot__brand-text em {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-top: 3px;
  display: block;
}
.foot__meta {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .04em;
  margin: 0;
  color: rgba(255,255,255,.55);
}

/* ------------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22,.61,.36,1);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .eyebrow__dot, .hero__cta svg { animation: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 820px) {
  /* Hero is a normal block on mobile so banner can take an explicit height. */
  .hero {
    display: block;
    min-height: 0;
  }

  /* Top bar — fixed height for predictable banner math */
  .hero__top {
    height: 48px;
    padding: 0 var(--gutter);
    font-size: 11px;
  }
  .hero__locale { font-size: 11px; }

  /* Banner fills the rest of the viewport on first load. */
  .banner {
    display: block;
    flex: none;
    width: 100%;
    height: calc(100svh - 48px);
    min-height: 0;
    position: relative;
    background: var(--navy);
    overflow: hidden;
    padding: 0;
  }
  .banner__picture {
    position: absolute;
    inset: 0;
    display: block;
  }
  .banner__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
  }

  /* CTA overlaid on the banner, anchored to the bottom, centered. */
  .hero__cta {
    position: absolute;
    left: 50%;
    bottom: clamp(28px, 5vh, 56px);
    transform: translateX(-50%);
    display: inline-flex;
    margin: 0;
    padding: 14px 28px;
    font-size: 12px;
    letter-spacing: .14em;
    white-space: nowrap;
  }
  .hero__cta:hover {
    transform: translateX(-50%) translateY(-2px);
  }

  /* Topics ribbon — each item on its own centered line. */
  .topics {
    padding: 36px var(--gutter) 32px;
    background: var(--navy);
  }
  .topics__rule {
    max-width: 240px;
    margin: 0 auto clamp(20px, 3vh, 28px);
  }
  .topics__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.3;
    color: rgba(255,255,255,.9);
  }
  .topics__list li {
    padding: 0;
    text-align: center;
  }
  .topics__list li::after { display: none; }

  /* Form collapses to single column */
  .form__row,
  .form__row--submit {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .submit { width: 100%; min-width: 0; }

  /* Footer stacks centered on mobile */
  .foot__inner {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
  .foot__brand { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .hero__top { height: 44px; }
  .hero__locale { font-size: 10px; letter-spacing: .12em; }
  .banner { height: calc(100svh - 44px); }

  .hero__cta {
    padding: 12px 22px;
    font-size: 11px;
    letter-spacing: .12em;
  }

  .topics__list { font-size: 14px; gap: 12px; }

  .register__inner { padding-block: clamp(56px, 9vh, 96px); }
  .register__head h2 { font-size: clamp(26px, 7vw, 36px); }
}
