/* ===========================================================
   BioVisionary — shared stylesheet
   Single source of truth for all pages.
   =========================================================== */

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Kumbh Sans', sans-serif;
}

html, body{
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #01042c;
}

body{
  min-height: 100vh;
  overflow-x: hidden;
}

img{ max-width: 100%; }

/* ======================= NAVBAR ======================= */
.navbar {
    background: #01042c;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar__container{
    display: flex;
    justify-content: space-between;
    height: 80px;
    z-index: 1;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
}
#navbar__logo {
    color: #eaf1ff;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.35rem;
}

.navbar__logo-img {
  height: 1.15em;
  width: auto;
  margin-right: 0.55em;
  display: block;
}

.navbar__menu {
    display: flex;
    align-items: center;
    list-style: none;
    text-align: center;
}

.navbar__item{ height: 80px; }

.navbar__links {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 1rem;
    height: 100%;
    white-space: nowrap;
}

.navbar__links.active-page{ color: #9ddef8; }

.navbar__btn{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
}

.button{
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 10px 20px;
    height: 100%;
    width: 100%;
    border: none;
    outline: none;
    border-radius: 4px;
    background: linear-gradient(to top,#5659ff 0%,  #5fa0ff 60%, #9ddef8 100%);
    color: #fff;
    transition: all 0.3s ease;
}

.button:hover {
    background:linear-gradient(to top, #0233bb 0%, #5fa0ff 80%);
    transition: all 0.3s ease;
}

.navbar__links:hover{ color: #4b75e7; }

.navbar__toggle .bar{ display: none; }

@media screen and (max-width: 1010px) {
    .navbar__container {
        display: flex;
        justify-content: space-between;
        height: 80px;
        z-index: 1;
        width: 100%;
        max-width: 1300px;
        padding: 0;
        position: relative;
    }

    .navbar__menu{
        display: grid;
        grid-template-columns: auto;
        margin: 0;
        width: 100%;
        position: absolute;
        top: -1000px;
        left: 0;
        opacity: 0;
        transition: all 0.5s ease;
        height: auto;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 998;
        background: rgba(1, 4, 44, 0.96);
        backdrop-filter: blur(6px);
    }

    .navbar__menu.active{
        background: #01042c;
        top: 100%;
        opacity: 1;
        pointer-events: auto;
        transition: all 0.5s ease;
        z-index: 99;
        height: auto;
        max-height: calc(100vh - 80px);
        font-size: 1.6rem;
    }

    #navbar__logo {
        font-size: 1.3rem;
        padding-left: 25px;
    }

    .navbar__logo-img { height: 1.15em; margin-right: 8px; }

    .navbar__toggle .bar {
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background: #fff;
        display: block;
        cursor: pointer;
    }

    .navbar__item{ width: 100%; }

    .navbar__links{
        text-align: center;
        padding: 1.2rem 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #mobile-menu {
        position: absolute;
        top: 20%;
        right: 5%;
        transform: translate(5%, 20%);
    }

    .navbar__btn { padding-bottom: 2rem; }

    .button{
        display: flex;
        justify-content: center;
        align-items: center;
        height: 56px;
        width: min(85%, 420px);
        margin: 0;
    }

    #mobile-menu.is-active .bar:nth-child(2){ opacity: 0; }
    #mobile-menu.is-active .bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
    #mobile-menu.is-active .bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }
}

@media screen and (max-width: 1010px) and (max-height: 650px){
  .navbar__links{ padding: 0.9rem 0; }
  .button{ height: 48px; }
  .navbar__btn{ padding-bottom: 1rem; }
}

/* ======================= HOME HERO ======================= */
.main{
  background-color: #020d25;
  background-image: url("images/background.png?v=5");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% auto;
  height: calc(100vw * 0.6665);
  min-height: calc(100vw * 0.6665);
}

.main__container{
    display: block;
    align-items: center;
    margin: 0 auto;
    height: 90vh;
    width: 90%;
    max-width: 1300px;
    padding: 0 50px;
}

.main__content{
  max-width: 650px;
  padding: 10rem 1.5rem;
  border-radius: 14px;
  background: none;
  backdrop-filter: none;
}

.main__content h1{
    font-size: clamp(1.1rem, 1vw + 0.7rem, 1.7rem);
    line-height: 1.5;
    background-color:  #2b58d6;
    background-image: linear-gradient(to top, #0026ffa6 10%, #9ddef8 70%);
    background-size: 100%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: #4f93ff;
    -moz-text-fill-color: #4f93ff;
}

.main__content h2{
    font-size: clamp(1.8rem, 2.2vw + 0.6rem, 3.2rem);
    line-height: 1.0;
    background-color: #2b58d6;
    background-image: linear-gradient(to top, #b721ff 10%, #21d4ff 70%);
    background-size: 100%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: #4f93ff;
    -moz-text-fill-color: #4f93ff;
}

.main__content p{
    margin-top: 0.8rem;
    font-size: clamp(1rem, 1vw + 0.5rem, 1.4rem);
    line-height: 1.2;
    font-weight: 700;
    color:#fff;
}

.main__btn {
    font-size: 1rem;
    background: #243a86;
    padding: 14px 32px;
    border: none;
    border-radius: 4px;
    color: #fff;
    margin-top: 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.35s;
    outline: none;
}

.main__btn a { position: relative; z-index: 2; color: #fff; text-decoration:none; }

.main__btn:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #31489e;
    transition: all 0.35s;
    border-radius: 4px;
    z-index:1;
}

.main__btn:hover { color: #fff; }
.main__btn:hover:after { width: 100%; }

@media screen and (min-width: 1200px){
  .main{
    background-image: url("images/background_wider_fade.jpg?v=5");
    background-repeat: no-repeat;
    background-color: #020d25;
    background-position: center top;
    height: min(calc(100vw * 0.515625), 990px);
    min-height: min(calc(100vw * 0.515625), 990px);
  }
}

@media screen and (max-width: 1000px){
  .main__container{
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 2.25rem 18px 0 18px;
    height: auto;
    display: block;
    text-align: left;
  }
  .main__content{ max-width: 650px; margin: 0; padding: 50px 30px; }
  .main__content h1{ font-size: 1.6rem; }
  .main__content h2{ font-size: 3.0rem; }
  .main__content p{ font-size: 1.5rem; }
}

@media screen and (max-width: 700px){
    .main{
    background-image: url("images/background_mobile2.png?v=5");
    background-repeat: no-repeat;
    /* matches the image's top edge, so the gap left by shifting it down doesn't show */
    background-color: #030a1d;
    /* push the dog/cow down below the Get Started button: the dog's head starts ~66% of the
       width down the image and the button ends ~340px down, so shift by the difference */
    background-position: center max(0px, calc(340px - 66.4vw));
    background-size: 100% auto;
    min-height: calc(100vw * (2048 / 1365) + max(0px, calc(340px - 66.4vw)));
  }
  .main__container{
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    height: auto;
    padding: 2.25rem 18px 4rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .main__content{ max-width: 650px; padding: 0; margin: 0; text-align: center; }
  .main__content h1{ font-size: 1.6rem; margin-top: 0; }
  .main__content h2{ font-size: 2.9rem; }
  .main__content p{ font-size: 1.7rem; margin-top: 0.8rem; }
}

/* ======================= GENERIC BUTTON ======================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 28px;
  border-radius:6px;
  border:none;
  cursor:pointer;
  font-size:1rem;
  font-family:inherit;
  text-decoration:none;
  color:#fff;
  background:#243a86;
  transition:all .3s ease;
}
.btn:hover{ background:#2f459a; }
.btn--ghost{ background:transparent; border:1px solid #3a56d4; }
.btn--ghost:hover{ background:#15225c; }

/* ======================= INNER-PAGE LAYOUT ======================= */
.page-hero{
  max-width:1200px;
  margin:0 auto;
  padding:5rem 50px 1.5rem;
}
.page-hero h1{
  font-size:clamp(2.2rem, 3vw + 1rem, 3.6rem);
  line-height:1.1;
  background-image:linear-gradient(to top,#b721ff 10%,#21d4ff 70%);
  background-size:100%;
  -webkit-background-clip:text;
  -moz-background-clip:text;
  -webkit-text-fill-color:#4f93ff;
  -moz-text-fill-color:#4f93ff;
}
.page-hero .lead{
  color:#c3cff5;
  max-width:780px;
  margin-top:1.1rem;
  font-size:clamp(1rem,0.5vw + 0.95rem,1.25rem);
  line-height:1.65;
}

.section{
  max-width:1200px;
  margin:0 auto;
  padding:3rem 50px 4rem;
}
.section__title{
  color:#fff;
  font-size:clamp(1.6rem,1.5vw + 1rem,2.2rem);
  margin-bottom:.6rem;
}
.section__sub{
  color:#9fb0e8;
  max-width:760px;
  line-height:1.65;
  margin-bottom:2.5rem;
}

/* ======================= CARDS ======================= */
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
  gap:1.5rem;
}
.card{
  background:#0a1142;
  border:1px solid #1b2a6b;
  border-radius:14px;
  padding:2rem;
  color:#dfe6ff;
  transition:transform .2s ease, border-color .2s ease;
}
.card:hover{ transform:translateY(-6px); border-color:#3a56d4; }
.card__tag{
  display:inline-block;
  font-size:.72rem;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#9ddef8;
  background:#10205e;
  padding:.3rem .7rem;
  border-radius:999px;
  margin-bottom:1rem;
}
.card h3{ color:#fff; font-size:1.35rem; margin-bottom:.7rem; }
.card p{ color:#aeb9e6; line-height:1.6; }
.card ul{ margin:.75rem 0 0 1.1rem; color:#aeb9e6; line-height:1.7; }

/* ======================= FEATURED PRODUCT ======================= */
.product--featured{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:2.5rem;
  align-items:center;
  background:linear-gradient(135deg,#0a1142 0%,#13205e 100%);
  border:1px solid #2a3f9e;
  border-radius:16px;
  padding:2.5rem;
}
.product--featured .product__body h3{
  color:#fff; font-size:2rem; margin-bottom:.8rem;
}
.product--featured .product__body p{ color:#c3cff5; line-height:1.7; margin-bottom:1.5rem; }
.product__visual{
  border-radius:12px;
  min-height:230px;
  background:linear-gradient(135deg,#22d3ee 0%,#2f6bed 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.6rem;
  font-weight:700;
  letter-spacing:.02em;
  text-align:center;
  padding:1.5rem;
}
.product__actions{ display:flex; gap:1rem; flex-wrap:wrap; }

/* ======================= CONTACT ======================= */
.contact{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:3rem;
  align-items:start;
}
.form-group{ margin-bottom:1.25rem; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
label{ display:block; color:#c7d2fe; margin-bottom:.4rem; font-size:.95rem; }
input, textarea, select{
  width:100%;
  padding:.8rem 1rem;
  border-radius:8px;
  border:1px solid #27356f;
  background:#0a1142;
  color:#fff;
  font-size:1rem;
  font-family:inherit;
}
input::placeholder, textarea::placeholder{ color:#6f7bb0; }
input:focus, textarea:focus, select:focus{
  outline:none;
  border-color:#5fa0ff;
  box-shadow:0 0 0 3px rgba(95,160,255,.2);
}
textarea{ min-height:160px; resize:vertical; }
.contact__info{
  background:#0a1142;
  border:1px solid #1b2a6b;
  border-radius:14px;
  padding:2rem;
}
.contact__info h3{ color:#fff; margin-bottom:1rem; }
.contact__info p{ color:#aeb9e6; line-height:1.7; margin-bottom:1rem; }
.contact__info a{ color:#9ddef8; text-decoration:none; }
.contact__info a:hover{ text-decoration:underline; }
.form-note{ color:#8a95c9; font-size:.85rem; margin-top:1rem; }

/* ======================= ABOUT ======================= */
.about__lead{ color:#c3cff5; line-height:1.8; font-size:1.1rem; max-width:820px; }
.about__lead + .about__lead{ margin-top:1.2rem; }

/* ======================= FOOTER ======================= */
.footer__container{
    background-color: #01042c;
    padding: 3rem 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#footer__logo{
    color: #fff;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.35rem;
}

.footer__links {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 30px;
}

.footer__link--items{
    display:flex;
    flex-direction:column;
    align-items: flex-start;
    margin: 16px;
    text-align: left;
    box-sizing: border-box;
}

.footer__link--items h2 { color:#fff; margin-bottom:16px; font-size:1.1rem; }

.footer__link--items a {
    color: #c3cff5;
    text-decoration: none;
    margin-bottom: 0.6rem;
}
.footer__link--items a:hover { color:#90abf7; transition: 0.3s ease-out; }

.social__media { max-width: 1000px; width: 100%; }

.social__media--wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1000px;
    margin: 40px auto 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.social__icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100px;
}

.social__icon-img { width: 28px; height: 28px; object-fit: contain; display: block; }

.footer__logo {
    display: flex;
    align-items: center;
    margin-left: 20px;
    cursor: pointer;
    margin-bottom: 16px;
}

.website__rights{ color: #fff; }

@media screen and (max-width: 1010px){
    .footer__container { padding: 2rem 0 1.5rem; }
    #footer__logo { margin-bottom: 0.3rem; padding: 0.2rem; }
    .website__rights { margin-bottom: 1.2rem; }
    .social__media--wrap { flex-direction: column; text-align:center; }
    .social__media--wrap .footer__logo{ margin-left:0; }
}

/* ======================= RESPONSIVE: INNER PAGES ======================= */
@media screen and (max-width: 900px){
  .product--featured{ grid-template-columns:1fr; gap:1.5rem; padding:1.75rem; }
  .product__visual{ min-height:160px; font-size:1.3rem; order:-1; }
  .contact{ grid-template-columns:1fr; gap:2rem; }
}

@media screen and (max-width: 760px){
  .page-hero{ padding:3rem 24px 1rem; }
  .section{ padding:2rem 24px 3rem; }
  .form-row{ grid-template-columns:1fr; }
  .footer__links{ justify-content:flex-start; }
}

@media screen and (max-width: 480px){
  .page-hero{ padding:2.5rem 18px 1rem; }
  .section{ padding:1.5rem 18px 2.5rem; }
  .card{ padding:1.5rem; }
  .footer__link--items{ margin:10px; }
}

/* --- horizontal footer nav + card link (added) --- */
.footer__links{ align-items:center; }
.footer__links a{ color:#c3cff5; text-decoration:none; font-size:1rem; }
.footer__links a:hover{ color:#90abf7; transition:0.3s ease-out; }
.card__link{ display:inline-block; margin-top:1rem; color:#9ddef8; text-decoration:none; }
.card__link:hover{ text-decoration:underline; }
@media screen and (max-width:760px){ .footer__links{ gap:1.2rem; } }

/* ============================================================
   Option 3: blue -> cyan gradient headers with 3D extrude,
   unified gradient buttons. (added)
   ============================================================ */
.main__content h1{
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #ffffff;
  -moz-text-fill-color: #ffffff;
  color: #ffffff;
  font-weight: 800;
  filter: none;
  text-shadow: none;
}
.main__content h1 .hl{
  background-image: linear-gradient(to bottom, #2b55cf 0%, #86b0f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
}
.main__content h2,
.page-hero h1{
  background-color: transparent;
  background-image: linear-gradient(to bottom, #2b55cf 0%, #86b0f5 100%);
  background-size: 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  font-weight: 800;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
}
.main__content p{
  color: #ffffff;
  text-shadow: none;
}
.section__title{
  text-shadow: none;
}

/* unified buttons: same blue -> cyan gradient, all matching */
.btn,
.main__btn,
.button{
  background: #2f5fd6 !important;
  color: #fff !important;
  border: none !important;
  box-shadow: none;
}
.btn:hover,
.main__btn:hover,
.button:hover{
  background: #2f5fd6 !important;
  filter: brightness(1.1);
}
.main__btn:after{ display: none !important; }

/* keep the outlined button outlined */
.btn--ghost{
  background: transparent !important;
  border: 1px solid #3a56d4 !important;
  box-shadow: none !important;
}
.btn--ghost:hover{
  background: #15225c !important;
  filter: none;
}

/* match reference font on the hero only (added) */
.main__content h1,
.main__content h2,
.main__content p{
  font-family: 'Montserrat', 'Kumbh Sans', sans-serif;
}

/* clickable cards (added) */
a.card{ text-decoration:none; display:block; color:#dfe6ff; }
a.card:hover .card__link{ text-decoration:underline; }
a.card:focus-visible{ outline:2px solid #86b0f5; outline-offset:3px; }

/* ======================= FOOTER: one line (logo | links | rights) ======================= */
.footer__container{
  flex-direction:row; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:.8rem 2rem; padding:1.25rem clamp(18px, 4vw, 64px);
  border-top:1px solid rgba(134,176,245,.14);
}
.footer__container .social__media,
.footer__container .social__media--wrap{ display:contents; }
.footer__container .footer__logo{ order:1; margin:0; }
.footer__container #footer__logo{ font-size:1.05rem; margin:0; padding:0; }
.footer__container .footer__links{ order:2; flex:1; width:auto; max-width:none; padding:0; gap:1.75rem; justify-content:center; }
.footer__container .footer__links a{ font-size:.92rem; }
.footer__container .website__rights{ order:3; margin:0; color:#8f9cc8; font-size:.82rem; }
@media screen and (max-width:760px){
  .footer__container{ flex-direction:column; text-align:center; padding:1.5rem 18px; }
  .footer__container .footer__links{ justify-content:center; gap:1.1rem; }
}

/* ======================= LAYOUT SYSTEM (one width + gutter for every page) ======================= */
:root{
  --page-max: 1600px;                      /* centred content width on large / wide screens */
  --gutter: clamp(18px, 4vw, 64px);        /* side margin, scales with the screen */
}
/* Slightly larger type on very wide screens so the page doesn't look sparse */
@media screen and (min-width:1800px){ html{ font-size:17px; } }
@media screen and (min-width:2400px){ html{ font-size:18px; } }

/* Full-height page: the footer sits at the bottom of the screen on short pages */
body{ display:flex; flex-direction:column; min-height:100vh; min-height:100dvh; }
.footer__container{ margin-top:auto; }

.navbar__container,
.main__container,
.page-hero,
.section{
  width:100%;
  max-width:var(--page-max);
  margin-left:auto;
  margin-right:auto;
  padding-left:var(--gutter);
  padding-right:var(--gutter);
}
.footer__container{ padding-left:max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter)));
                    padding-right:max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter))); }
.cards{ grid-template-columns:repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap:clamp(1.25rem, 1.5vw, 2rem); }

/* Logo + wordmark: a touch larger, still understated */
#navbar__logo{ font-size:1.5rem; font-weight:600; letter-spacing:.01em; }
.navbar__logo-img{ height:1.25em; }

@media screen and (max-width:1010px){
  .navbar__container{ padding-left:var(--gutter); padding-right:var(--gutter); }
  #navbar__logo{ padding-left:0; font-size:1.35rem; }
  #mobile-menu{ right:var(--gutter); transform:translateY(20%); }
}
@media screen and (max-width:1000px){
  .main__container{ padding-left:var(--gutter); padding-right:var(--gutter); }
}


/* Home hero: each little light-blue dot twinkles on its own (drawn by twinkle.js on a canvas
   lined up exactly over the hero image). Still for reduced motion. */
.main{ position: relative; }
.main > *{ position: relative; z-index: 1; }
.main > canvas.bv-twinkle{ position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; }
/* The light-blue outlines of the animals and plant slowly brighten and settle back
   (rim_*.webp are made from the hero images, so they line up exactly). Still for reduced motion. */
.main > .bv-rim{ position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("images/rim_desktop.webp?v=2"); background-repeat: no-repeat;
  background-position: inherit; background-size: inherit;
  opacity: 0; animation: bv-rim 6s ease-in-out infinite; }
@media screen and (min-width: 1200px){ .main > .bv-rim{ background-image: url("images/rim_wide.webp?v=2"); } }
@media screen and (max-width: 700px){ .main > .bv-rim{ background-image: url("images/rim_mobile.webp?v=2"); } }
@keyframes bv-rim{ 0%, 100%{ opacity: 0; } 50%{ opacity: .61; } }
@media (prefers-reduced-motion: reduce){ .main > .bv-rim{ animation: none; } }

/* Navbar spans the whole screen: logo at the far left, links at the far right (gutter scales with screen) */
.navbar__container{ max-width: none; }

/* ======================= MOTION + PICTURE FRAMES (Phase 3) ======================= */
/* On load: the top of each page fades and rises in, one line after another. */
@keyframes bv-rise{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
.page-hero > *, .main__content > *{ animation:bv-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.page-hero > :nth-child(2), .main__content > :nth-child(2){ animation-delay:.1s; }
.page-hero > :nth-child(3), .main__content > :nth-child(3){ animation-delay:.2s; }
.page-hero > :nth-child(4), .main__content > :nth-child(4){ animation-delay:.3s; }

/* On scroll: blocks in each section fade up as they come into view (app.js adds .in).
   Only when the head script set .js-rv; .rv-all is a failsafe that shows everything. */
.js-rv .section > :not(style):not(.cards),
.js-rv .cards > *{ opacity:0; transform:translateY(18px); }
.js-rv .section > .in:not(style):not(.cards),
.js-rv .cards > .in,
.js-rv.rv-all .section > :not(style):not(.cards),
.js-rv.rv-all .cards > *{ opacity:1; transform:none;
  transition:opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), border-color .2s ease, box-shadow .25s ease; }
.js-rv .cards > .in.rv-done{ transition:transform .2s ease, border-color .2s ease, box-shadow .25s ease; }
.js-rv .cards > .in.rv-done:hover{ transform:translateY(-6px); }

/* Cards: a soft glow joins the existing lift on hover */
.card{ transition:transform .2s ease, border-color .2s ease, box-shadow .25s ease; }
.card:hover{ box-shadow:0 14px 36px rgba(0,0,0,.35), 0 0 28px rgba(79,147,255,.14); }

/* Demo pictures: thin frame with a light that travels smoothly round and round it, brighter glow on hover.
   The light is a rotating conic gradient (an animated angle), so it never jumps or jitters at the loop.
   Browsers without @property just show the frame still. */
@property --bv-orbit{ syntax:'<angle>'; inherits:false; initial-value:0deg; }
@keyframes bv-orbit{ to{ --bv-orbit:360deg; } }
.shot{
  display:block; width:100%; margin:.2rem 0 1rem; padding:2px; border:0; border-radius:12px;
  background:conic-gradient(from var(--bv-orbit), #1b2a6b 0deg, #1b2a6b 220deg, #2b55cf 290deg, #86b0f5 330deg, #2b55cf 350deg, #1b2a6b 360deg);
  animation:bv-orbit 8s linear infinite;
  box-shadow:0 8px 22px rgba(0,0,0,.35), 0 0 18px rgba(79,147,255,.08);
  transition:box-shadow .3s ease;
}
a.card:hover .shot{ box-shadow:0 12px 30px rgba(0,0,0,.4), 0 0 32px rgba(79,147,255,.32); }

/* Live demo window: same gradient frame (static) and a soft glow */
.frame-wrap{
  padding:2px; border-radius:14px;
  background:linear-gradient(160deg, #2b55cf 0%, #1b2a6b 45%, #1b2a6b 70%, #5d8ae8 100%);
  box-shadow:0 12px 34px rgba(0,0,0,.4), 0 0 30px rgba(79,147,255,.12);
}
.frame-wrap > .demo-frame{ border:0; border-radius:12px; }
.frame-wrap > .frame-load{ inset:2px; }

/* Buttons: a small lift and glow on hover */
.btn, .button{ transition:transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.btn:hover, .button:hover{ transform:translateY(-2px); box-shadow:0 8px 20px rgba(47,95,214,.35) !important; }

@media (prefers-reduced-motion: reduce){
  .page-hero > *, .main__content > *, .shot{ animation:none; }
  .card, .card:hover, .btn:hover, .button:hover{ transform:none; }
}

/* ======================= POLISH (Phase 5) ======================= */
/* Clearer edges: form fields reach 3:1 against the page, cards a little crisper */
input, textarea, select{ border-color:#4a5fae; }
.card{ border-color:#22337a; }

/* One visible keyboard focus ring everywhere (mouse clicks don't show it) */
a:focus-visible, button:focus-visible, .button:focus-visible, .btn:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible{
  outline:2px solid #86b0f5; outline-offset:3px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible{ outline-offset:1px; }

/* Wide screens: the home hero and page headings grow with the extra space */
@media screen and (min-width:1800px){
  .main__content{ max-width:880px; }
  .main__content h1{ font-size:2.1rem; }
  .main__content h2{ font-size:4.4rem; }
  .main__content p{ font-size:1.6rem; }
  .page-hero h1{ font-size:4.2rem; }
  .page-hero .lead{ max-width:900px; }
}

/* Home hero fills exactly one screen (below the 80px navbar) at every size: the picture
   covers the area, cropping a little rather than making the page scroll. twinkle.js and
   the outline glow follow the same cover sizing, so they stay lined up. */
.main{
  height: calc(100vh - 80px);
  height: calc(100svh - 80px);
  min-height: 480px;
  background-size: cover;
  background-position: center center;
}
.main__container{ height: 100%; }
@media screen and (min-width: 1200px){
  .main{ height: calc(100vh - 80px); height: calc(100svh - 80px); min-height: 480px; background-position: center top; }
}
@media screen and (max-width: 700px){
  .main{ height: calc(100vh - 80px); height: calc(100svh - 80px); min-height: 560px; background-position: center bottom; }
}

/* "Biology" uses the same font as the rest of its line (the site-wide * rule gave it Kumbh Sans) */
.main__content h1 .hl{ font-family: inherit; font-size: inherit; font-weight: inherit; }

/* "Data-driven solutions": a touch smaller than before (about 85%) at every size */
.main__content p{ font-size: clamp(0.9rem, 0.85vw + 0.43rem, 1.2rem); }
@media screen and (max-width: 1000px){ .main__content p{ font-size: 1.3rem; } }
@media screen and (max-width: 700px){ .main__content p{ font-size: 1.45rem; } }
@media screen and (min-width: 1800px){ .main__content p{ font-size: 1.35rem; } }
/* Shorter phones: covering the screen would put the dog/cow behind Get Started, so keep the
   picture full-width and pushed below the button, trimming a little off the bottom instead */
@media screen and (max-width: 700px) and (max-height: 780px){
  .main{ background-size: 100% auto; background-position: center max(0px, calc(340px - 66.4vw)); }
}
