/* ==========================================================================
   SE·CURE-RNA – shared styles for every page
   ========================================================================== */

@font-face { font-family: "Chivo"; font-weight: 100; font-style: normal; font-display: swap;
  src: url("../fonts/chivo-latin-100-normal.woff2") format("woff2"); }
@font-face { font-family: "Chivo"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/chivo-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Chivo"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("../fonts/chivo-latin-800-normal.woff2") format("woff2"); }

:root {
  --blue: #3f6fd0;          /* deep blue from the video background */
  --blue-light: #a4c5f8;
  --navy: #14244a;          /* body text on light sections */
  --navy-deep: #0f1c3d;     /* footer */
  --accent: #BBD37D;        /* accent green from the pitch deck */
  --paper: #f6f8fc;
  --ink: #ffffff;
  --muted: #55627f;
  --t: clamp(2.05rem, 6vw, 5.6rem);         /* hero wordmark size */
  --gutter: clamp(16px, 5vw, 84px);
  --measure: 44rem;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: "Chivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
}
body > main { flex: 1; }
img, video { max-width: 100%; }
a { color: inherit; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px;
  background: #fff; color: var(--navy); border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Header and menu ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  color: #fff;
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.is-solid {
  background: rgba(20, 36, 74, .78);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.header-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 800; font-size: 1.05rem; letter-spacing: .01em; white-space: nowrap;
  transition: opacity .3s, visibility .3s;
}
.header-brand img { height: 34px; width: auto; display: block; }
.header-brand .thin { font-weight: 100; }
/* On the home page the big hero logo is visible, so the small one waits until you scroll */
.home .site-header:not(.is-solid) .header-brand { opacity: 0; visibility: hidden; }

.menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; color: inherit; padding: 8px; cursor: pointer;
}
.menu-toggle svg { display: block; width: 26px; height: 26px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(18px, 2.6vw, 36px); }
.site-nav a {
  text-decoration: none; font-weight: 300; font-size: 1rem; letter-spacing: .02em;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s;
}
.site-nav a:hover, .site-nav a:focus-visible { border-color: var(--accent); outline: none; }
.site-nav a[aria-current="page"] { border-color: var(--accent); }

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #14244a;
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 0; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.1); }
  .site-nav a[aria-current="page"] { color: var(--accent); border-color: rgba(255,255,255,.1); }
  .site-header.menu-open { background: #14244a; }
  .home .site-header.menu-open .header-brand { opacity: 1; visibility: visible; }
}

/* ---------- Home: full-screen video hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  overflow: hidden; color: var(--ink);
  background: linear-gradient(90deg, #9dbcf2 0%, #6f97e3 45%, #4573d3 100%);
  display: flex; flex-direction: column;
}
.hero-media, .hero-media video, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 64% center;
}
.hero-media img { opacity: 0; transition: opacity .4s; }
.hero.is-static .hero-media img { opacity: 1; }
.hero.is-static .hero-media video { visibility: hidden; }
/* Shade on the left so white text stays readable; the molecule on the right stays vivid */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(38, 50, 92, .50) 0%, rgba(38, 50, 92, .34) 38%, rgba(38, 50, 92, .08) 70%, rgba(38, 50, 92, 0) 100%),
    linear-gradient(180deg, rgba(20, 36, 74, .25) 0%, rgba(20, 36, 74, 0) 22%);
}
.hero-content {
  position: relative; z-index: 1; flex: 1;
  padding: calc(var(--header-h) + clamp(16px, 7vh, 72px)) var(--gutter) 96px;
  text-shadow: 0 1px 22px rgba(25, 35, 80, .25);
}

.brand {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto;
  column-gap: calc(var(--t) * 0.16); align-items: end; justify-content: start; margin: 0;
}
.brand picture { grid-row: 1 / span 2; align-self: end; display: block; }
.brand img {
  display: block; height: calc(var(--t) * 1.36); width: auto;
  filter: drop-shadow(0 2px 14px rgba(20, 30, 70, .18));
}
.wordmark {
  margin: 0; font-size: var(--t); line-height: .92; letter-spacing: .005em;
  font-weight: 800; white-space: nowrap;
}
.wordmark .thin { font-weight: 100; }
.tagline {
  margin: calc(var(--t) * 0.09) 0 0; font-weight: 300;
  font-size: max(0.78rem, calc(var(--t) * 0.272)); line-height: 1.15; letter-spacing: .01em;
}

.soon { margin-top: clamp(56px, 17vh, 210px); }
.soon::before {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 2px;
  background: var(--accent); margin-bottom: clamp(16px, 2.4vh, 26px);
}
.soon p { margin: 0; font-weight: 300; font-size: clamp(1.3rem, 2.5vw, 2.2rem); letter-spacing: .01em; line-height: 1.3; }
.soon .contact { margin-top: .7em; font-size: clamp(1rem, 1.45vw, 1.3rem); opacity: .95; }
.link-accent {
  color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 1px; transition: color .2s;
}
.link-accent:hover, .link-accent:focus-visible { color: var(--accent); outline: none; }

/* Bottom bar inside the hero: scroll cue (left), note and pause button (right) */
.hero-bottom {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 22px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; opacity: .9;
}
.scroll-cue svg { width: 18px; height: 18px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }
.media-controls { display: flex; align-items: center; gap: 14px; }
.media-note { margin: 0; font-size: .72rem; line-height: 1.4; opacity: .75; text-align: right; max-width: 22rem; }
.motion-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(20, 36, 74, .35); border: 1px solid rgba(255, 255, 255, .45);
  transition: background-color .2s;
}
.motion-toggle:hover { background: rgba(20, 36, 74, .6); }
.motion-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.motion-toggle svg { width: 16px; height: 16px; }
.motion-toggle .icon-play { display: none; }
.hero.is-static .motion-toggle .icon-play, .hero.is-paused .motion-toggle .icon-play { display: block; }
.hero.is-static .motion-toggle .icon-pause, .hero.is-paused .motion-toggle .icon-pause { display: none; }

@media (max-width: 720px) {
  :root { --t: clamp(1.7rem, 9.2vw, 2.4rem); }
  .hero-media video, .hero-media img { object-position: 68% center; }
  .hero::after {
    background: linear-gradient(180deg, rgba(38, 50, 92, .55) 0%, rgba(38, 50, 92, .35) 45%, rgba(38, 50, 92, .05) 75%, rgba(38, 50, 92, .15) 100%);
  }
  .soon { margin-top: clamp(40px, 9vh, 90px); }
  .media-note { display: none; }
}

/* Tall phone screens: show the whole molecule below the text instead of a giant crop */
@media (max-aspect-ratio: 4/5) {
  .hero { background: linear-gradient(90deg, #86a9ea 0%, #5f88dc 55%, #4a78d6 100%); }
  .hero-media video, .hero-media img {
    inset: auto; bottom: 0; top: auto;
    height: 64%; width: auto; max-width: none; aspect-ratio: 16 / 9;
    left: calc(56vw - 0.66 * 64svh * 16 / 9);
    object-fit: cover;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 28%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 28%);
  }
  .hero::after {
    background: linear-gradient(180deg, rgba(38, 50, 92, .42) 0%, rgba(38, 50, 92, .28) 45%, rgba(38, 50, 92, .06) 80%, rgba(38, 50, 92, .12) 100%);
  }
}

/* ---------- Content sections (below the hero, and on sub-pages) ---------- */
.section { padding: clamp(56px, 10vw, 120px) var(--gutter); }
.section + .section { padding-top: 0; }
.section-inner { max-width: var(--measure); }
.section h2 {
  margin: 0 0 .6em; font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: .005em;
}
.section h2::before {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px;
  background: var(--accent); margin-bottom: 18px;
}
.section h3 { margin: 1.6em 0 .4em; font-weight: 800; font-size: 1.2rem; }
.section p, .section li { font-size: clamp(1.02rem, 1.2vw, 1.15rem); }
.section p { margin: 0 0 1em; }
.section a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.section a:hover { color: var(--navy); }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.35rem) !important; color: var(--navy); }

/* ---------- Sub-page banner (uses a still frame from the video) ---------- */
.page-banner {
  position: relative; color: #fff; overflow: hidden;
  padding: calc(var(--header-h) + clamp(40px, 9vw, 110px)) var(--gutter) clamp(40px, 6vw, 72px);
  background: #4f7bd6 url("../video/poster.jpg") 70% 45% / cover no-repeat;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(38, 50, 92, .62) 0%, rgba(38, 50, 92, .35) 55%, rgba(38, 50, 92, .1) 100%);
}
.page-banner > * { position: relative; z-index: 1; }
.page-banner h1 {
  margin: 0; font-weight: 800; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05;
  text-shadow: 0 1px 22px rgba(25, 35, 80, .25);
}
.page-banner p { margin: .5em 0 0; font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep); color: #c9d3ea;
  padding: 40px var(--gutter); font-size: .95rem;
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; }
.footer-brand img { height: 30px; width: auto; }
.footer-brand .thin { font-weight: 100; }
.site-footer a { color: #fff; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.site-footer p { margin: 0; }
