/* ==========================================================================
   Pupa Advisory Initiative — website
   Palette derived from the Pupa logo: royal blue #0050c0 on warm white,
   deep-navy ink, Inter (heavy), grain texture, real photography.
   ========================================================================== */

/* ----- Design tokens ---------------------------------------------------- */
:root {
  --ink:        #12294a;   /* deep navy — headings, text */
  --ink-2:      #1d3a63;
  --body:       #4b5772;   /* muted body copy */
  --muted:      #8991a6;
  --line:       #e5e8f0;
  --cream:      #fafbfd;   /* warm-white ground */
  --cream-2:    #eef2f9;   /* section band */
  --cream-3:    #e7ecf6;
  --blue:       #0050c0;   /* Pupa brand blue (accent) */
  --blue-2:     #0040a0;
  --blue-soft:  #e2ecfb;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pad-x: clamp(20px, 5vw, 84px);
  --sect:  clamp(72px, 10vw, 150px);
  --radius: 20px;
  --radius-lg: 32px;
  --radius-xl: 44px;
  --shadow: 0 30px 70px -34px rgba(18,41,74,.42);
  --shadow-sm: 0 16px 40px -24px rgba(18,41,74,.4);
  --maxw: 1240px;
}

/* ----- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--body);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("../assets/images/grain.png");
  background-size: 260px; opacity: .4; mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 2; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.03; font-weight: 800; letter-spacing: -.035em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ----- Layout helpers --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--sect); }
.band { background: var(--cream-2); }
.ink-band { background: var(--ink); color: rgba(255,255,255,.82); }
.ink-band h1, .ink-band h2, .ink-band h3, .ink-band h4 { color: #fff; }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before { content: ""; width: 30px; height: 2px; border-radius: 2px; background: var(--blue); }
.eyebrow.center-line { justify-content: center; }
.ink-band .eyebrow { color: #7fb0ff; }
.ink-band .eyebrow::before { background: #7fb0ff; }

h1 { font-size: clamp(2.9rem, 8vw, 6rem); font-weight: 900; }
h2 { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--muted); }

/* ----- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .9em 2em; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
  transition: transform .25s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-2); transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(0,80,192,.7); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); background: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(18,41,74,.22); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn--sm { padding: .62em 1.4em; font-size: .95rem; }
.arrow { transition: transform .25s ease; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }

.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--blue); padding-bottom: 2px; }
.link-arrow:hover { color: var(--blue); }

/* ----- Navigation ------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 60; transition: background .3s ease, box-shadow .3s ease; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 14px; }
.nav.is-stuck { background: rgba(250,251,253,.86); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: .6em; font-weight: 900; color: var(--ink); letter-spacing: -.03em; font-size: 1.18rem; line-height: 1; }
.brand img { height: 42px; width: auto; }
.brand .brand__txt { display: flex; flex-direction: column; }
.brand small { font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav__links { display: flex; align-items: center; gap: 2.1rem; }
.nav__links a { font-weight: 500; font-size: .98rem; color: var(--ink); position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--blue); transition: width .25s ease; }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }
.nav__cta { display: flex; align-items: center; gap: .8rem; }
.nav__burger { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; }
.nav__burger i { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }
.nav__burger i:nth-child(1) { top: 15px; } .nav__burger i:nth-child(2) { top: 21px; } .nav__burger i:nth-child(3) { top: 27px; }
body.menu-open .nav__burger i:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.menu-open .nav__burger i:nth-child(2) { opacity: 0; }
body.menu-open .nav__burger i:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ----- Hero ------------------------------------------------------------- */
.hero { padding-top: clamp(28px, 5vw, 64px); }
.hero__head { max-width: 1000px; }
.hero__title { font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 900; letter-spacing: -.045em; line-height: .95; }
.hero__title .accent { color: var(--blue); }
.hero__text { max-width: 56ch; margin-top: 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.hero__banner { position: relative; margin-top: clamp(36px, 5vw, 64px); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/7; min-height: 320px; }
.hero__banner img { width: 100%; height: 100%; object-fit: cover; }
.hero__banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(18,41,74,.58)); }
.hero__banner-card { position: absolute; z-index: 2; left: clamp(20px,3vw,36px); bottom: clamp(20px,3vw,36px); right: clamp(20px,3vw,36px); display: flex; flex-wrap: wrap; gap: 1.6rem 2.6rem; align-items: center; justify-content: space-between; background: rgba(250,251,253,.93); backdrop-filter: blur(10px); border-radius: 22px; padding: 22px 28px; }
.hero__banner-card .hb-stat b { display: block; font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 900; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.hero__banner-card .hb-stat span { font-size: .85rem; color: var(--body); }

/* Trust / partners */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px,5vw,54px); justify-content: center; }
.trust span { font-weight: 800; color: var(--ink); opacity: .34; letter-spacing: -.02em; font-size: 1.1rem; }
.trust img { height: clamp(38px, 5.5vw, 60px); width: auto; object-fit: contain; opacity: .92; transition: opacity .25s ease, transform .25s ease; }
.trust img:hover { opacity: 1; transform: translateY(-3px); }

/* ----- Section heading -------------------------------------------------- */
.head { max-width: 780px; }
.head.center { margin-inline: auto; }
.head p { margin-top: 1.1rem; }
.head h2 + p { color: var(--body); }

/* ----- Pillars (numbered) ----------------------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 3.2rem; }
.pillars.three { grid-template-columns: repeat(3, 1fr); }
.pillar { padding: 32px 28px; border-radius: var(--radius); background: var(--cream); border: 1px solid var(--line); transition: transform .3s ease, box-shadow .3s ease; }
.band .pillar { background: #fff; }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pillar__num { font-size: 2.6rem; font-weight: 900; letter-spacing: -.04em; color: var(--blue); line-height: 1; }
.pillar h3 { margin-top: .7rem; font-size: 1.2rem; }
.pillar p { margin-top: .55rem; font-size: .96rem; }

/* ----- Alternating feature rows ----------------------------------------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 120px); }
.feature.reverse .feature__media { order: 2; }
.feature__media { border-radius: var(--radius-lg); box-shadow: var(--shadow); position: relative; overflow: hidden; aspect-ratio: 4/3.2; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.feature__media:hover img { transform: scale(1.05); }
.feature__media .tag { position: absolute; left: 18px; top: 18px; background: var(--blue); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .82rem; z-index: 2; }
.feature ul.ticks { margin-top: 1.4rem; display: grid; gap: .8rem; }
.feature ul.ticks li { display: flex; gap: .7em; align-items: flex-start; color: var(--ink-2); }
.feature ul.ticks svg { flex: none; margin-top: 3px; }

/* ----- Big statement ---------------------------------------------------- */
.statement { position: relative; border-radius: var(--radius-xl); overflow: hidden; padding: clamp(48px,8vw,120px) clamp(28px,6vw,90px); color: #fff; }
.statement img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.statement::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(18,41,74,.78), rgba(0,80,192,.35)); z-index: 1; }
.statement > * { position: relative; z-index: 2; }
.statement h2 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 4.4rem); max-width: 20ch; }
.statement .accent { color: #9dc2ff; }

/* ----- Stats ------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.stat { padding: 44px 34px; border-radius: var(--radius-lg); background: var(--cream); border: 1px solid var(--line); }
.ink-band .stat { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.stat b { display: block; font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -.045em; color: var(--ink); line-height: 1; }
.ink-band .stat b { color: #fff; }
.stat b .accent { color: var(--blue); }
.ink-band .stat b .accent { color: #7fb0ff; }
.stat span { display: block; margin-top: .7rem; color: var(--body); font-weight: 500; }
.ink-band .stat span { color: rgba(255,255,255,.72); }

/* ----- Cards ------------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; margin-top: 3.2rem; }
.cards.two { grid-template-columns: repeat(2, 1fr); max-width: 880px; margin-inline: auto; }
.card { border-radius: var(--radius-lg); overflow: hidden; background: var(--cream); border: 1px solid var(--line); transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 5/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 24px 26px 28px; }
.card__body h3 { font-size: 1.25rem; }
.card__role { color: var(--blue); font-weight: 700; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; }
.card__body p { margin-top: .6rem; font-size: .96rem; }
.pcard .card__media { aspect-ratio: 16/10; }
.pcard .badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-2); font-weight: 700; font-size: .78rem; }

/* ----- Quote ------------------------------------------------------------ */
.quote { max-width: 940px; margin-inline: auto; text-align: center; }
.quote p { font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.28; color: var(--ink); font-weight: 800; letter-spacing: -.025em; }
.quote footer { margin-top: 1.8rem; color: var(--muted); font-weight: 600; }

/* ----- CTA banner ------------------------------------------------------- */
.cta { position: relative; overflow: hidden; border-radius: var(--radius-xl); color: #fff; padding: clamp(48px, 7vw, 100px); text-align: center; }
.cta img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(18,41,74,.86), rgba(0,80,192,.55)); z-index: 1; }
.cta > * { position: relative; z-index: 2; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.9); max-width: 58ch; margin: 1.1rem auto 0; }
.cta .hero__actions { justify-content: center; }

/* ----- Newsletter ------------------------------------------------------- */
.news { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.news form { display: flex; gap: .6rem; margin-top: 1.6rem; flex-wrap: wrap; }
.field { flex: 1 1 240px; padding: 1em 1.3em; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,80,192,.14); }
.form-note { font-size: .82rem; color: var(--muted); margin-top: .7rem; }

/* ----- Forms ------------------------------------------------------------ */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { font-weight: 600; color: var(--ink); font-size: .9rem; display: block; margin-bottom: .4rem; }
.form input, .form textarea, .form select { width: 100%; padding: .9em 1.1em; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,80,192,.14); }
.form textarea { min-height: 150px; resize: vertical; }

/* ----- Interior page hero ---------------------------------------------- */
.phero { padding-top: clamp(30px, 5vw, 64px); }
.phero .head { max-width: 900px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--blue); }

/* ----- Accordion -------------------------------------------------------- */
.accordion { max-width: 860px; margin-inline: auto; }
.acc { border-bottom: 1px solid var(--line); }
.acc__q { width: 100%; text-align: left; background: none; border: 0; padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-weight: 700; color: var(--ink); font-size: 1.12rem; letter-spacing: -.02em; }
.acc__q .plus { flex: none; width: 24px; height: 24px; position: relative; }
.acc__q .plus::before, .acc__q .plus::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; transition: transform .3s; }
.acc__q .plus::before { left: 0; right: 0; top: 11px; height: 2px; }
.acc__q .plus::after { top: 0; bottom: 0; left: 11px; width: 2px; }
.acc.is-open .plus::after { transform: scaleY(0); }
.acc__a { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.acc__a p { padding-bottom: 1.4rem; }

/* ----- Footer (compact, small logo — no oversized wordmark) ------------- */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding-top: clamp(64px, 9vw, 110px); }
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.footer .brand { color: #fff; }
.footer .brand img { height: 40px; background: #fff; border-radius: 10px; padding: 5px; }
.footer .brand small { color: rgba(255,255,255,.55); }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { display: grid; gap: .7rem; }
.footer__note { max-width: 36ch; margin-top: 1.1rem; font-size: .95rem; }
.socials { display: flex; gap: .7rem; margin-top: 1.5rem; }
.socials a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; transition: .25s; }
.socials a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.footer__bottom { padding-block: 26px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .88rem; margin-top: clamp(40px,6vw,72px); }

/* ----- Mobile drawer chrome (built in JS; hidden on desktop) ------------ */
.nav__backdrop { position: fixed; inset: 0; background: rgba(18,41,74,.5); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease; z-index: 54; }
.nav__backdrop[hidden] { display: block; }         /* keep it in flow so it can transition */
body.menu-open .nav__backdrop { opacity: 1; visibility: visible; }
.nav__drawer-head { display: none; align-items: center; justify-content: space-between; padding-bottom: 1rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line); }
.nav__drawer-title { font-weight: 800; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: .74rem; }
.nav__close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; display: grid; place-items: center; }
.nav__close:hover { border-color: var(--blue); color: var(--blue); }
.drawer-cta { display: none; }

/* ----- Scroll reveal (gated on .js) ------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .09s; }
.reveal.d2 { transition-delay: .18s; }
.reveal.d3 { transition-delay: .27s; }

/* ----- Responsive ------------------------------------------------------- */
@media (max-width: 980px) {
  .nav__links, .nav__cta .btn--primary { display: none; }
  .nav__burger { display: block; }
  .pillars, .pillars.three { grid-template-columns: repeat(2, 1fr); }
  .feature, .news { grid-template-columns: 1fr; }
  .feature.reverse .feature__media { order: -1; }
  .feature__media { max-height: 440px; }
  .stats { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .hero__banner { aspect-ratio: 4/3; }

  /* Full-height slide-in drawer */
  .nav__links {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    width: min(86vw, 360px); height: 100vh; height: 100dvh; overflow-y: auto;
    background: var(--cream);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 18px 24px 28px; gap: 0; transform: translateX(100%); transition: transform .35s ease;
    box-shadow: -24px 0 60px -30px rgba(0,0,0,.35); z-index: 56;
  }
  body.menu-open .nav__links { display: flex; transform: translateX(0); }
  body.menu-open { overflow: hidden; }              /* scroll-lock the page behind */
  .nav__drawer-head { display: flex; }
  .nav__links a:not(.btn) {
    font-size: 1.18rem; font-weight: 600; color: var(--ink);
    padding: 1rem .2rem; border-bottom: 1px solid var(--line);
  }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links a:not(.btn)[aria-current="page"] { color: var(--blue); }
  .drawer-cta { display: inline-flex; justify-content: center; margin-top: 1.5rem; }
}
@media (max-width: 580px) {
  .pillars, .pillars.three, .cards, .cards.two { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .hero__banner-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .feature__media img, .card__media img { transition: none; }
}
