/*
PURPOSE OF THIS FILE:
This stylesheet controls the SHARED design used on every page of the website:
- colors and fonts
- header/navigation
- buttons
- reusable layout classes
- footer
- mobile navigation

EDIT THIS FILE when you want a site-wide change.
For page-only changes, edit that page's separate CSS file.
*/

:root {
  /* ===== EASY GLOBAL COLOR EDITS ===== */
  --dark-green: #153b36;
  --dark-green-2: #102f2b;
  --green: #62d5a7;
  --green-hover: #79e2b9;
  --green-pale: #d9f7e9;

  --ink: #14352f;
  --text: #506a63;
  --muted: #80928d;
  --white: #ffffff;
  --off-white: #f6f9f8;
  --line: #e2ebe8;

  --shadow: 0 24px 70px rgba(9, 46, 38, 0.14);
  --radius: 20px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(calc(100% - 44px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 100px 0;
}

.section-soft {
  background: var(--off-white);
}

.eyebrow {
  margin: 0 0 13px;
  color: #3ea97c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  max-width: 800px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.section-intro {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: 17px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #113a31;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--green-hover);
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: var(--white);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
}

.btn-dark {
  background: var(--dark-green);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--dark-green-2);
}

.text-link {
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 40px rgba(15, 56, 48, 0.05);
}

/* ================= HEADER ================= */
/* =========================================================
   NORMAL HEADER
   Used by default
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(21, 59, 54, 0.96);

    backdrop-filter: blur(10px);

    color: var(--white);

    border-bottom: 1px solid rgba(255,255,255,0.08);
}


/* =========================================================
   INTERNAL PAGE HEADER
   About / Services / Research / Projects / Contact
========================================================= */
.subpage .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    z-index: 1000;

    background: transparent;

    backdrop-filter: none;

    box-shadow: none;

    /* REMOVE NAVIGATION BOTTOM LINE */
    border-bottom: none;

    color: #071a34;
}

/* Brand text */

.subpage .brand {
    color: #071a34;
}


/* Navigation links */

.subpage .nav-links a {
    color: rgba(7, 26, 52, 0.72);
}

.subpage .nav-links a:hover,
.subpage .nav-links a.active {
    color: #071a34;
}

.subpage .nav-links a.active::after {
    background: #1479ff;
}


/* Mobile hamburger */

.subpage .menu-toggle span {
    background: #071a34;
}
/* =========================================================
   INTERNAL PAGE NAVIGATION COLORS
========================================================= */

.subpage .nav-links a {
    color: rgba(7, 26, 52, 0.72);
}

.subpage .nav-links a:hover,
.subpage .nav-links a.active {
    color: #071a34;
}

.subpage .nav-links a.active::after {
    background: #1479ff;
}





.navbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 42px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 27px;
}

.nav-links a {
  position: relative;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  background: var(--green);
  border-radius: 99px;
}

/* =========================================================
   HEADER — START A PROJECT BUTTON
   Uses the same blue-to-green gradient as "Try PrivAI Live"
   This shared class affects the header CTA on every page.
========================================================= */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 40px;
  padding: 0 15px;

  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 7px;

  background: linear-gradient(135deg, #0c78e8 0%, #16b995 100%);
  color: #ffffff;

  box-shadow:
    0 8px 22px rgba(12, 120, 232, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);

  font-size: 12px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.header-cta:hover {
  transform: translateY(-2px);

  box-shadow:
    0 12px 30px rgba(12, 120, 232, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);

  filter: brightness(1.07);
}

.menu-toggle {
  display: none;
  width: 43px;
  height: 43px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 23px;
  height: 2px;
  margin: 6px auto;
  background: var(--white);
}

/* ================= GENERIC PAGE HERO ================= */

/* =========================================================
   GENERIC INTERNAL PAGE HERO

   PURPOSE:
   Full background image for:
   About
   Services
   Research
   Projects
   Contact
========================================================= */

.page-hero {
    position: relative;

    overflow: hidden;

    /*
       Extra top padding because navigation now
       floats on top of this background.
    */
    padding: 155px 0 110px;

    min-height: 520px;

    color: #071a34;

    /*
       Backup colour
    */
    background-color: #eef7ff;

    /*
       Light overlay + new background image
    */
    background-image:

        linear-gradient(
            90deg,
            rgba(238, 247, 255, 0.10) 0%,
            rgba(255, 255, 255, 0.15) 45%,
            rgba(255, 255, 255, 0.35) 100%
        ),

        url("../images/page-background.png");

    background-repeat: no-repeat;

    background-size: cover;

    background-position: center center;
}


.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
    max-width: 850px;

    margin: 0;

    color: #071a34;

    font-size: clamp(48px, 7vw, 82px);

    line-height: 0.98;

    letter-spacing: -0.055em;
}
.page-hero p {
    max-width: 680px;

    margin: 24px 0 0;

    color: rgba(7, 26, 52, 0.68);

    font-size: 17px;
}

/* ================= COMMON CTA ================= */

.cta-band {
  margin-top: 70px;
  padding: 46px;
  border-radius: 24px;
  background: var(--dark-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-band h3 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

/* ================= FOOTER ================= */

.site-footer {
  padding: 70px 0 24px;
  background: #0f2e29;
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 0.7fr 0.7fr;
  gap: 60px;
  padding-bottom: 55px;
}

.footer-brand {
  margin-bottom: 18px;
}

.footer-copy {
  max-width: 430px;
  color: rgba(255,255,255,0.62);
  font-size: 14px;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 13px;
}

.footer-links strong {
  margin-bottom: 6px;
}

.footer-links a {
  color: rgba(255,255,255,0.62);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  min-height: 50px;
  border-top: 1px solid rgba(255,255,255,0.09);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255,255,255,0.48);
  font-size: 11px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  .navbar {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    padding: 20px 22px 26px;
    background: var(--dark-green-2);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .navbar.menu-open .nav-links {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .container {
    width: min(calc(100% - 30px), var(--container));
  }

  .section {
    padding: 72px 0;
  }

  .page-hero {
    padding: 72px 0 68px;
  }

  .cta-band {
    padding: 30px;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 22px;
  }
}

/* =========================================================
   SUBPAGE FULL BACKGROUND FIX
   IMPORTANT:
   assets/css/global.css expects the image at:
   assets/images/page-background.png

   The footer remains unchanged because .site-footer has its
   own solid background below.
   ========================================================= */

body.subpage {
  background-color: #eef7ff;
  background-image: url("../images/page-background.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

/* Every MAIN section must be transparent, otherwise the
   white/off-white section backgrounds hide the PNG. */
body.subpage main,
body.subpage main > section,
body.subpage .page-hero,
body.subpage .section,
body.subpage .section-soft,
body.subpage .team-section {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}


/* Mobile browsers often do not support fixed backgrounds well. */
@media (max-width: 900px) {
  body.subpage {
    background-attachment: scroll;
    background-position: left top;
    background-size: 100% auto;
    background-repeat: repeat-y;
  }
}

/* =========================================================
   FOOTER / BOTTOM NAVIGATION BACKGROUND FIX

   PURPOSE:
   - Keep the footer in its normal position at the bottom.
   - Do NOT make it sticky or fixed.
   - Remove the old dark-green footer background.
   - Let the same page-background.png continue behind the footer.
   - Change footer text/links to dark blue so they remain readable.
   ========================================================= */

body.subpage .site-footer {
  position: relative !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #071a34 !important;
}

/* Footer brand */
body.subpage .footer-brand,
body.subpage .footer-brand span {
  color: #071a34 !important;
}

/* Footer description */
body.subpage .footer-copy {
  color: rgba(7, 26, 52, 0.68) !important;
}

/* Footer section titles */
body.subpage .footer-links strong {
  color: #071a34 !important;
}

/* Footer navigation links */
body.subpage .footer-links a {
  color: rgba(7, 26, 52, 0.66) !important;
}

body.subpage .footer-links a:hover {
  color: #1479ff !important;
}

/* Bottom copyright/navigation row */
body.subpage .footer-bottom {
  color: rgba(7, 26, 52, 0.52) !important;
  border-top: 1px solid rgba(7, 26, 52, 0.14) !important;
}

/* Optional subtle glass layer behind the footer content without
   hiding the background image. */
body.subpage .site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
  z-index: 0;
}

body.subpage .site-footer > .container {
  position: relative;
  z-index: 1;
}

