/* ==========================================================================
   sections.css  |  Page sections, top to bottom
   Layout = Bootstrap grid (.container / .row / .col-*), details = classes below.
   Breakpoints: sm 640 | md 768 | lg 1024. These are the breakpoints of the original
   design; assets/css/bootstrap.min.css is built with the same values, so Bootstrap's
   .col-sm-* / .col-lg-* / .navbar-expand-lg switch at exactly the same widths as the
   media queries in this file.
   ========================================================================== */


/* 0. SHARED --------------------------------------------------------------- */

/* every content section: 6rem top + bottom */
.section-padding {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* A .row with a top offset: Bootstrap rows already pull up by the gutter, so
   the gutter is subtracted to land exactly on 3.5rem below the heading.      */
.mt-grid {
  margin-top: calc(3.5rem - var(--bs-gutter-y));
}

/* Section heading block: eyebrow chip + title + intro text */
.section-title {
  margin-top: 1.25rem;
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--foreground);
}
.section-intro {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}
@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; }
  .section-intro { font-size: 1.125rem; }
}
@media (min-width: 1024px) {
  .section-title { font-size: 3rem; }
}
@media (max-width: 767px){
    .section-padding { padding-top: 4rem; padding-bottom: 4rem; }
}
/* narrower centred heading block (Why Fancivo + Stories) */
.section-heading-narrow {
  max-width: 48rem;
}

/* body copy: relaxed leading, muted colour */
.copy {
  line-height: 1.625;
  color: var(--muted-foreground);
}


/* 1. AURORA BACKGROUND (fixed, behind everything) --------------------------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
}
.aurora-bg__base {
  position: absolute;
  inset: 0;
  background-color: var(--background);
}
.aurora-blob {
  position: absolute;
  border-radius: 9999px;
}
.aurora-blob--1 {
  top: -10rem;
  left: -8rem;
  width: 38rem;
  height: 38rem;
  opacity: .4;
  filter: blur(140px);
  background: radial-gradient(circle at center, var(--aurora-1), transparent 70%);
}
.aurora-blob--2 {
  top: 33.333333%;
  right: -10rem;
  width: 42rem;
  height: 42rem;
  opacity: .35;
  filter: blur(150px);
  background: radial-gradient(circle at center, var(--aurora-2), transparent 70%);
}
.aurora-blob--3 {
  bottom: -10rem;
  left: 25%;
  width: 36rem;
  height: 36rem;
  opacity: .25;
  filter: blur(140px);
  background: radial-gradient(circle at center, var(--aurora-4), transparent 70%);
}
.aurora-blob--4 {
  top: 66.666667%;
  right: 25%;
  width: 28rem;
  height: 28rem;
  opacity: .2;
  filter: blur(120px);
  background: radial-gradient(circle at center, var(--aurora-3), transparent 70%);
}
.aurora-grid {
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image:
    linear-gradient(to right, #fff 1px, transparent 1px),
    linear-gradient(to bottom, #fff 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}


/* 2. HEADER / NAVBAR (floating glass pill) ---------------------------------- */
.nav-pill {
  --bs-navbar-padding-x: 0;
  --bs-navbar-padding-y: 0;
  --bs-navbar-brand-padding-y: 0;
  --bs-navbar-brand-margin-end: 0;
  --bs-navbar-color: var(--muted-foreground);
  --bs-navbar-hover-color: var(--muted-foreground);   /* Bootstrap applies this on :hover AND :focus; the real hover look is below */
  --bs-navbar-active-color: var(--foreground);
  --bs-navbar-nav-link-padding-x: 1rem;

  position: relative;
  isolation: isolate;                 /* own stacking context, so the glass layer below can sit at z-index -1 */
  border: 1px solid transparent;      /* the visible glass border is drawn by ::before */
  max-width: 72rem;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: .625rem .625rem .625rem 1.25rem;
}

/* The glass look (blur, fill, border, shadow: see .glass in components.css) is painted by this
   layer and NOT by the <nav> itself: an element with backdrop-filter becomes the containing block
   of its position:fixed children, and the side menu (position: fixed) lives inside this <nav>. */
.nav-pill::before {
  content: "";
  position: absolute;
  inset: -1px;                        /* cover the 1px border box */
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.nav-pill .navbar-brand {
  min-width: 0;
}

.nav-pill .nav-link {
  border-radius: 9999px;
  font-size: .875rem;
  line-height: 1.4285714;
  font-weight: 600;
  transition: color .15s var(--ease-standard),
              background-color .15s var(--ease-standard);
}
@media (hover: hover) {
  .nav-pill .nav-link:hover {
    color: var(--foreground);
    background-color: rgba(255, 255, 255, .05);
  }
}


/* 2b. SIDE MENU (Bootstrap offcanvas, #siteMenu) -------------------------------
   One markup, two layouts:
     lg and up : Bootstrap's .navbar-expand-lg turns it into the inline nav of the pill (links + CTA)
     below lg  : a panel that slides in from the right when the hamburger is pressed            */
.site-menu {
  --bs-offcanvas-box-shadow: none;      /* Bootstrap keeps a faint shadow on the inline version */
}
.site-menu__title {
  font-size: .75rem;
  line-height: 1.3333333;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* dimmed page behind the open menu */
.offcanvas-backdrop {
  background-color: #050613;
}
.offcanvas-backdrop.show {
  opacity: .72;
}

@media (min-width: 1024px) {
  .site-menu .offcanvas-body {
    align-items: center;
    gap: 1rem;                          /* links (centred) | CTA: same 1rem gap as the rest of the pill */
  }
}

@media (max-width: 1023.98px) {
  .site-menu {
    --bs-offcanvas-width: min(88vw, 22rem);
    --bs-offcanvas-color: var(--foreground);
    --bs-offcanvas-bg: var(--background);
    --bs-offcanvas-border-color: rgba(255, 255, 255, .12);
    --bs-offcanvas-box-shadow: -32px 0 80px -24px rgba(0, 0, 0, .7);
    --bs-offcanvas-transition: transform .35s var(--ease-standard);

    border-radius: 2rem 0 0 2rem;
    /* the page's aurora colours as a soft glow (the dark veil on top keeps it subtle) */
    background-image:
      linear-gradient(rgba(5, 6, 19, .84), rgba(5, 6, 19, .84)),
      radial-gradient(circle at 100% 0%, var(--aurora-1), transparent 60%),
      radial-gradient(circle at 0% 100%, var(--aurora-2), transparent 60%);
  }

  .site-menu .offcanvas-header {
    justify-content: space-between;
    /* right + top: the close button lands exactly where the hamburger was (the pill sits 1rem from the
       edges, +1px border, +.625rem padding); left: "Menu" lines up with the link text below */
    padding: 2.25rem 1.6875rem .5rem 2.5rem;
  }
  @media (min-width: 640px) {
    .site-menu .offcanvas-header {
      padding-top: 2.375rem;            /* the logo (and so the pill) is 4px taller from sm up */
    }
  }
  .site-menu .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: .5rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  }
  .site-menu .navbar-nav {
    width: 100%;
  }
  .site-menu .nav-link {
    padding: .875rem 1.25rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    line-height: 1.5555556;
    color: var(--foreground);
  }
  .site-menu .nav-link:active {
    background-color: rgba(255, 255, 255, .08);
  }
  @media (hover: hover) {
    .site-menu .nav-link:hover {
      background-color: rgba(255, 255, 255, .06);
    }
  }

  /* "Apply for Funding": full-width button at the bottom of the panel */
  .site-menu .btn-aurora {
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-padding-y: 1rem;
    --bs-btn-font-size: 1rem;
    width: 100%;
    margin-top: auto;
    justify-content: center;
  }

  /* short screens (phone in landscape): tighter rows, so the button is not pushed below the fold */
  @media (max-height: 520px) {
    .site-menu .offcanvas-body {
      gap: 1rem;
      padding-bottom: 1rem;
    }
    .site-menu .nav-link {
      padding-block: .5rem;
      font-size: 1rem;
      line-height: 1.5;
    }
    .site-menu .btn-aurora {
      --bs-btn-padding-y: .75rem;
    }
  }
}

/* 3. HERO ------------------------------------------------------------------- */
.hero-section {
  padding-top: 9rem;
  padding-bottom: 5rem;
}
@media (min-width: 640px) { .hero-section { padding-top: 10rem; } }
@media (min-width: 1024px) { .hero-section { padding-top: 11rem; } }

.hero-title {
  margin-top: 1.5rem;
  font-size: 3rem;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.025em;
}
@media (min-width: 640px) { .hero-title { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4.5rem; } }

.hero-lead {
  max-width: 36rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}
.hero-copy {
  max-width: 36rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}
.hero-actions { margin-top: 2.25rem; }
.hero-tags    { margin-top: 2.5rem; }

/* Bootstrap's 12-col grid can't express the original 1.05fr / .95fr split,
   so these two columns get exact widths (gutter-aware) from lg up. */
@media (min-width: 1024px) {
  .hero-col-text  { flex: 0 0 auto; width: calc(52.5% - .05 * var(--bs-gutter-x)); }
  .hero-col-media { flex: 0 0 auto; width: calc(47.5% + .05 * var(--bs-gutter-x)); }
}

/* hero picture + glow + the two floating chips */
.hero-media__glow {
  position: absolute;
  inset: -2rem;
  border-radius: 3rem;
  opacity: .5;
  filter: blur(64px);
  background: linear-gradient(120deg, var(--aurora-1), var(--aurora-2) 55%, var(--aurora-3));
}
.hero-media__frame {
  border-radius: 2rem;
  padding: .625rem;
}
.hero-media__frame img {
  aspect-ratio: 4 / 4.4;
  border-radius: 1.6rem;
}
.hero-stat {
  padding: .875rem 1.25rem;
  border-radius: var(--radius-2xl);
}
.hero-stat--top    { top: -1.25rem; left: -1.25rem; }
.hero-stat--bottom { right: -1rem; bottom: -1.25rem; }
.hero-stat__value {
  font-size: 1.5rem;
  line-height: 1.3333333;
  font-weight: 700;
}
.hero-stat__label {
  font-size: .75rem;
  line-height: 1.3333333;
  font-weight: 600;
  color: var(--muted-foreground);
}


/* 4. ABOUT ------------------------------------------------------------------ */
.about-media__glow {
  position: absolute;
  inset: -2rem;
  border-radius: 3rem;
  opacity: .4;
  filter: blur(64px);
  background: linear-gradient(120deg, var(--aurora-3), var(--aurora-2) 60%, var(--aurora-1));
}
.about-media__frame {
  border-radius: 2rem;
  padding: .625rem;
}
.about-media__frame img {
  aspect-ratio: 4 / 3;
  border-radius: 1.6rem;
}
.about-tags { margin-top: 2rem; }


/* 5. SERVICES ----------------------------------------------------------------- */
.service-card {
  --bs-card-spacer-x: 2rem;
  --bs-card-spacer-y: 2rem;
  --bs-card-border-radius: var(--radius-3xl);
  transition: transform .3s var(--ease-standard);
}
@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-.25rem);
  }
}

/* soft violet glow in the corner, visible on hover only */
.service-card__glow {
  position: absolute;
  top: -6rem;
  right: -6rem;
  width: 12rem;
  height: 12rem;
  border-radius: 9999px;
  opacity: 0;
  filter: blur(64px);
  background: radial-gradient(circle at center, var(--aurora-1), transparent 70%);
  transition: opacity .5s var(--ease-standard);
}
@media (hover: hover) {
  .service-card:hover .service-card__glow {
    opacity: .4;
  }
}

.service-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-2xl);
}
.service-card__title {
  margin-top: 1.25rem;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--foreground);
}
.service-card__text {
  margin-top: .75rem;
  font-size: .875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}


/* 6. WHY FANCIVO ---------------------------------------------------------------- */
.why-extra {
  max-width: 42rem;
}

.feature-card {
  --bs-card-spacer-x: 1.25rem;
  --bs-card-spacer-y: 1.25rem;
  --bs-card-border-radius: var(--radius-2xl);
}
.feature-card__check {
  width: 1.75rem;
  height: 1.75rem;
  margin-top: .125rem;
  color: var(--primary-foreground);
  background-image: linear-gradient(to bottom right, var(--aurora-2), var(--aurora-1));
}
@supports (background-image: linear-gradient(to bottom right in oklab, red, blue)) {
  .feature-card__check {
    background-image: linear-gradient(to bottom right in oklab, var(--aurora-2), var(--aurora-1));
  }
}
.feature-card__text {
  font-size: .875rem;
  line-height: 1.625;
  font-weight: 500;
  color: var(--foreground);
}


/* 7. STORIES (auto-scrolling photo strip) ----------------------------------------- */
/* original: the wrapper is 72rem wide *including* its side padding (the photo
   strip below needs the section itself to stay full-bleed) */
.stories-section .container {
  max-width: 72rem;
}
.stories-quote {
  max-width: 42rem;
}

.stories-marquee {
  margin-top: 3.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12% 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12% 88%, transparent);
}
.marquee-track {
  width: max-content;
  /* Same as the original design. When the 45s loop restarts the strip jumps by 12px (half of
     the last gap). For a perfectly seamless loop add:  padding-right: 1.5rem;  */
}
.story-card {
  border-radius: 1.75rem;
  padding: .5rem;
}
.story-card img {
  display: block;
  width: 24rem;
  height: 18rem;
  border-radius: 1.4rem;
  object-fit: cover;
}


/* 8. CAREERS ------------------------------------------------------------------------ */
.careers-card {
  padding: 2rem;
  border-radius: 2.5rem;
}
@media (min-width: 640px) {
  .careers-card { padding: 3rem; }
}

.careers-card__glow {
  position: absolute;
  width: 20rem;
  height: 20rem;
  border-radius: 9999px;
  filter: blur(64px);
}
.careers-card__glow--top {
  top: -8rem;
  right: -6rem;
  opacity: .3;
  background: radial-gradient(circle at center, var(--aurora-4), transparent 70%);
}
.careers-card__glow--bottom {
  bottom: -8rem;
  left: -6rem;
  opacity: .25;
  background: radial-gradient(circle at center, var(--aurora-3), transparent 70%);
}

.careers-card .row {
  --bs-gutter-x: 2.5rem;
  --bs-gutter-y: 2.5rem;
}
@media (min-width: 1024px) {
  .careers-col-text  { flex: 0 0 auto; width: calc(55% - .1 * var(--bs-gutter-x)); }
  .careers-col-media { flex: 0 0 auto; width: calc(45% + .1 * var(--bs-gutter-x)); }
}

.careers-title {
  margin-top: 1.25rem;
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.025em;
}
@media (min-width: 640px) {
  .careers-title { font-size: 2.25rem; }
}
.careers-cta { margin-top: 2rem; }

.careers-photo {
  border-radius: 1.75rem;
  padding: .5rem;
}
.careers-photo img {
  aspect-ratio: 4 / 3;
  border-radius: 1.4rem;
}


/* 9. CONTACT -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .contact-aside { padding-top: 6rem; }

  /* form spans both columns, centred, max 48rem */
  .contact-form {
    width: 100%;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.contact-form {
  padding: 2rem;
  border-radius: 2rem;
}

/* Inline label on purpose (like the original): the label sits on its own
   24px line, the control starts right below it. */
.contact-form .form-label {
  display: inline;
  margin-bottom: 0;
}
/* the original <textarea> was inline-block, which leaves a 7px descender gap under it */
.contact-form textarea {
  margin-bottom: 7px;
}

.contact-submit { margin-top: 1.75rem; }

/* live region: always in the DOM (so screen readers announce it), takes no space until filled */
.form-status:empty {
  margin-top: 0;
}
.form-status {
  margin-top: 1rem;
  font-size: .875rem;
  line-height: 1.4285714;
  font-weight: 600;
  color: var(--accent);
}


/* 10. FOOTER --------------------------------------------------------------------------- */
.site-footer {
  --bs-border-color: rgba(255, 255, 255, .1);
  margin-top: 6rem;
}
.site-footer__inner {
  gap: 2rem;
}
.site-footer__logo {
  width: 15rem;       /* original footer logo sits left inside a 15rem box */
}
.site-footer__logo a {
  min-width: 0;
}
.site-footer__link {
  text-decoration: none;     /* Bootstrap underlines every plain <a> */
  font-size: .875rem;
  line-height: 1.4285714;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: color .15s var(--ease-standard);
}
@media (max-width: 767px){
    .site-footer { margin-top: 4rem; }
}
@media (hover: hover) {
  .site-footer__link:hover {
    color: var(--foreground);
  }
}
.site-footer__copy {
  font-size: .75rem;
  line-height: 1.3333333;
  color: var(--muted-foreground);
}
