/* ============================================================
   Resources Technology Showcase — Landing page
   Design tokens sourced from Figma (Seven West — Landing Page)
   ============================================================ */

:root {
  /* Brand */
  --brand-red: #e8272a;
  --brand-red-dark: #c81e21;
  --text-primary: #13122a;
  --bg-grey: #f5f5f6;
  --white: #ffffff;
  --black: #000000;

  /* Logo colours */
  --rts-blue: #116397;
  --rts-cyan: #6ebedf;

  /* Type */
  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1728px;
  --pad-x: clamp(20px, 4.63vw, 80px);   /* 80px @ 1728 */
  --nav-h: 112px;

  /* Effects */
  --shadow-nav: 0 4.66px 8.06px rgba(0, 0, 0, .04),
                0 10.83px 18.75px rgba(0, 0, 0, .03),
                0 19.45px 33.67px rgba(0, 0, 0, .03);
  --radius-lg: 24px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, figure { margin: 0; }

/* Ensure [hidden] always wins over later display rules (.form, .form-success, .modal) */
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--white);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn--primary {
  background: var(--brand-red);
  color: var(--white);
}
.btn--primary:hover { background: var(--brand-red-dark); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary:focus-visible {
  outline: 3px solid rgba(232, 39, 42, .4);
  outline-offset: 2px;
}
.btn--sm { height: 44px; font-size: 15px; }
.btn--block { width: 100%; height: 52px; font-size: 17px; }

/* ============================================================
   Logo lockup
   Composed from Figma parts in a 275 x 56 box
   ============================================================ */
.logo-lockup {
  display: inline-block;
  text-decoration: none;
  border-radius: 6px;
}
.logo-lockup:focus-visible { outline: 3px solid rgba(110, 190, 223, .7); outline-offset: 4px; }

.logo {
  position: relative;
  display: block;
  width: 275px;
  height: 56px;
}
/* Heights are set explicitly: the SVGs are exported with width/height="100%" +
   preserveAspectRatio="none" and no intrinsic ratio, so height:auto would fall
   back to the 150px replaced-element default and stretch the wordmark. Each
   height matches its viewBox ratio so nothing distorts. */
.logo__emblem { position: absolute; left: 0;      top: 0;      width: 56px;     height: 56px; }
.logo__rts    { position: absolute; left: 66.76px; top: 2.58px; width: 115.66px; height: 50.84px; }
.logo__sub    { position: absolute; left: 190.68px; top: 2.88px; width: 83.82px; height: 50.24px; }

/* Two stacked variants cross-faded by nav state.
   flex-shrink:0 keeps the reserved box matched to the (transform-scaled) art —
   without it flex squashes this box while the absolutely-positioned lockup keeps
   its painted width, so the logo overflows under the nav button on narrow screens. */
.nav__logo { position: relative; display: block; flex-shrink: 0; width: 275px; height: 56px; }
.nav__logo .logo { position: absolute; inset: 0; transition: opacity .25s ease; }
.nav__logo .logo--dark { opacity: 0; }
.nav.is-solid .nav__logo .logo--light { opacity: 0; }
.nav.is-solid .nav__logo .logo--dark  { opacity: 1; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.nav.is-solid {
  background: var(--white);
  box-shadow: var(--shadow-nav);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: 28px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__actions { display: flex; align-items: center; gap: 28px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  background: #0b1b3a;
  color: var(--white);
  overflow: hidden;
}
/* Rotating banner slides — cross-faded by script.js every 4s */
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 28%;
  opacity: 0;
  transition: opacity 1.1s ease;
  will-change: opacity;
}
.hero__slide.is-active { opacity: 1; }
/* bottom-up dark gradient (per design) + subtle top scrim for nav legibility */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 30%),
    linear-gradient(to top, rgba(0,0,0,.9) 6%, rgba(0,0,0,.4) 48%, rgba(0,0,0,.12) 100%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 24px) var(--pad-x) clamp(40px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(40px, 6vw, 96px);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}

.hero__headline { max-width: 944px; }
.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.25rem, 5.2vw, 64px);
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
}
.hero__title-line { line-height: 1.3; }
.hero__title-line--accent { color: var(--brand-red); line-height: 1.12; }
.hero__date {
  margin-top: 24px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.125rem, 2.4vw, 32px);
  line-height: 1.33;
}

.hero__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.hero__intro {
  max-width: 603px;
  margin-left: auto;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.4;
  text-align: left;
}

.play-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 16px;
}
.play-link__icon { flex: none; transition: transform .15s ease; }
.play-link__label { text-decoration: underline; text-underline-offset: 3px; }
.play-link:hover .play-link__icon { transform: scale(1.08); }
.play-link:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }

/* ============================================================
   Highlight section
   ============================================================ */
.highlight {
  background: var(--bg-grey);
}
.highlight__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 128px) var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 80px);
}
.highlight__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 80px);
}
.highlight__title {
  flex: 1 1 0;
  max-width: 745px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 48px);
  line-height: 1.35;
  color: var(--text-primary);
}
.highlight__detail {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.highlight__list {
  list-style: disc;
  padding-left: 26px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.4;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   Inline video (reel)
   ============================================================ */
/* Inline video sits inside the highlight section, below the heading —
   full width of the container so it reads large on wide screens. */
.reel {
  width: 100%;
  /* offset the fixed nav when "See video" anchors to #video */
  scroll-margin-top: var(--nav-h);
}
.reel__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
}
.reel__poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px; height: 88px;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .45));
  transition: transform .15s ease;
}
.reel__play:hover { transform: scale(1.06); }
.reel__play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 50%; }
/* the injected YouTube iframe fills the frame exactly */
.reel__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, .82);
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--pad-x) 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__logo .logo { width: 240px; height: 49px; }
.footer__logo .logo__emblem { width: 49px; height: 49px; }
.footer__logo .logo__rts { left: 58.4px; top: 2.31px; width: 101px; height: 44.39px; }
.footer__logo .logo__sub { left: 166.8px; top: 2.53px; width: 73.3px; height: 43.94px; }
.footer__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__event { font-size: 15px; }
.footer__copy {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--pad-x);
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
}
.footer__privacy {
  color: rgba(255, 255, 255, .75);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__privacy:hover { color: #fff; }

/* ============================================================
   Modal (shared)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 26, .6);
  backdrop-filter: blur(2px);
  animation: fade .2s ease;
}
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(88vh, 760px);
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 16px;
  border-bottom: 1px solid #eee;
}
.modal__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  color: var(--text-primary);
}
.modal__desc { margin-top: 6px; font-size: 14px; line-height: 1.45; color: #565666; }
.modal__close {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: #f1f1f3; color: var(--text-primary);
  transition: background-color .15s ease;
}
.modal__close:hover { background: #e4e4e8; }
.modal__close:focus-visible { outline: 3px solid rgba(232,39,42,.4); outline-offset: 2px; }

.modal__body {
  position: relative;
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.modal__scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--text-primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 9999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.modal__scroll-hint.is-visible { opacity: 1; }
.modal__scroll-hint svg { animation: nudge 1.3s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ============================================================
   Form
   ============================================================ */
.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; flex-direction: column; gap: 18px; }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__field { display: flex; flex-direction: column; gap: 7px; }
.form__field label,
.form__fieldset legend {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0;
}
.req { color: var(--brand-red); }

.form input,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: #fafafb;
  border: 1.5px solid #e2e2e8;
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(232, 39, 42, .12);
}
.form textarea { resize: vertical; min-height: 76px; }
.form input:invalid:not(:placeholder-shown):not(:focus) { border-color: #e2e2e8; }
.form .is-error { border-color: var(--brand-red) !important; box-shadow: 0 0 0 3px rgba(232,39,42,.12); }

.form__fieldset { border: none; margin: 0; padding: 0; }
.form__checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-top: 4px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--brand-red); flex: none; }
.check--consent {
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  background: var(--bg-grey);
  border-radius: 10px;
  line-height: 1.5;
}
.check--consent input { margin-top: 1px; }

.form__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.form__note { font-size: 12px; line-height: 1.45; color: #595967; text-align: center; }

/* honeypot — kept out of the visual + a11y tree, still in the DOM for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  background: #fdecec;
  border: 1px solid #f3b9ba;
  border-radius: 10px;
  color: #b41d20;
  font-size: 14px;
  line-height: 1.45;
}

/* Success state */
.form-success {
  text-align: center;
  padding: 24px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.form-success h3 { font-family: var(--font-heading); font-size: 22px; color: var(--text-primary); }
.form-success p { font-size: 15px; line-height: 1.5; color: #565666; max-width: 380px; }
.form-success .btn { margin-top: 8px; }

/* ============================================================
   Register modal — two column (photo + form)
   ============================================================ */
.modal--register { padding: clamp(12px, 3vw, 44px); }
.modal__dialog--register {
  display: block;
  width: 100%;
  max-width: 880px;
  max-height: min(90vh, 700px);
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .4);
  overflow: visible;               /* let the "Close" link sit above the card */
  animation: slideFadeUp .42s cubic-bezier(.2, .8, .2, 1);
}
/* Appear from the bottom, fading up */
@keyframes slideFadeUp {
  from { opacity: 0; transform: translateY(56px); }
  to   { opacity: 1; transform: none; }
}

.modal__close-link {
  position: absolute;
  top: -30px; right: 2px;
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 2px;
}
.modal__close-link:hover { opacity: .82; }
.modal__close-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.reg {
  display: flex;
  align-items: stretch;
  max-height: min(90vh, 700px);
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;                /* clip the photo to the rounded corners */
}
.reg__media {
  flex: 0 0 40%;
  background: #0b1b3a;
}
.reg__media img { width: 100%; height: 100%; object-fit: cover; }
.reg__panel {
  flex: 1 1 60%;
  min-width: 0;
  padding: clamp(24px, 3vw, 40px);
  overflow-y: auto;
}
.reg__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 22px;
}

/* ---------- Select + radios ---------- */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid #80808f;
  border-bottom: 2px solid #80808f;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.form select {
  width: 100%;
  padding: 12px 38px 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: #fafafb;
  border: 1.5px solid #e2e2e8;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form select:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(232, 39, 42, .12);
}
.form__radios { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 9px; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--text-primary);
  cursor: pointer;
}
.radio input { width: 18px; height: 18px; accent-color: var(--brand-red); flex: none; }

/* ---------- Data-collection consent checkbox ---------- */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary, #565666);
  cursor: pointer;
}
.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--brand-red);
  flex: none;
  cursor: pointer;
}
.checkbox input.is-error { outline: 2px solid var(--brand-red); outline-offset: 1px; border-radius: 3px; }
.checkbox a { color: inherit; text-decoration: underline; }
.checkbox a:hover { color: var(--brand-red); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .highlight__heading { flex-direction: column; align-items: flex-start; }
  .highlight__title { max-width: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  :root { --nav-h: 84px; }
  .nav__inner { padding: 18px var(--pad-x); gap: 14px; }
  .nav__logo { width: 200px; height: 41px; }
  .nav__logo .logo { transform: scale(.727); transform-origin: left center; }

  .hero__footer { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero__intro { margin-left: 0; max-width: 100%; }

  .form__row--2 { grid-template-columns: 1fr; }
  .btn { padding: 0 18px; }

  /* Register modal: stack the photo above the form */
  .modal__dialog--register { max-height: 92vh; }
  .reg { flex-direction: column; max-height: 92vh; }
  .reg__media { flex: 0 0 150px; }
  .reg__panel { flex: 1 1 auto; min-height: 0; }
}

/* Phones: a full-size 200px lockup + the long CTA won't fit, so scale both
   down enough to sit side by side without the button overlapping the logo. */
@media (max-width: 460px) {
  .nav__inner { gap: 10px; }
  .nav__logo { width: 150px; height: 31px; }
  .nav__logo .logo { transform: scale(.545); transform-origin: left center; }
  .nav .btn--primary { font-size: 13px; padding: 0 13px; height: 42px; }
}

/* Very narrow phones (~320px): trim a little more so the CTA stays on-screen. */
@media (max-width: 360px) {
  .nav__inner { padding-left: 16px; padding-right: 16px; gap: 8px; }
  .nav__logo { width: 129px; height: 27px; }
  .nav__logo .logo { transform: scale(.47); transform-origin: left center; }
  .nav .btn--primary { font-size: 12px; padding: 0 11px; height: 40px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
