/* =========================================================
   NEOSURA v3 — Premium Gallery / Editorial Magazine
   Palette: #663399 purple · #20b2aa teal · #faf8f5 paper · #1a1420 ink
   ========================================================= */

:root {
  --purple: #663399;
  --purple-600: #552b80;
  --purple-100: #efe8f6;
  --teal: #63DADE;
  --teal-ink: #1a8a8e;

  --ink: #1a1420;
  --ink-soft: #3d3547;
  --muted: #8a8194;
  --line: #e8e2db;
  --line-soft: #efeae3;

  --paper: #f9f5ff;
  --paper-2: #f3efe8;
  --white: #ffffff;

  --radius: 2px;
  --radius-lg: 6px;

  --shadow-card: 0 1px 0 rgba(26,20,32,.04), 0 24px 60px -24px rgba(26,20,32,.14);
  --transition: 500ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--paper); }

body {
  font-family: 'Arial Nova Light', 'Arial Nova', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html { overflow-x: hidden; }

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

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

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ============ Navigation ============ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  will-change: background, backdrop-filter;
  transition:
    background      650ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color    650ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    backdrop-filter 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow      650ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.navbar.scrolled {
  background: rgba(250, 248, 245, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 24px rgba(26, 20, 32, 0.07);
}
.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ---- Logo: white on hero, dark when scrolled ---- */
.logo {
  display: flex;
  align-items: center;
  width: 180px;
  height: 42px;
  position: relative;
  overflow: hidden;
}
.logo-mark {
  position: relative;
  display: block;
  width: 180px;
  height: 42px;
}
.logo-img {
  position: absolute;
  inset: 0;
  width: 130px;
  height: 45px;
  object-fit: contain;
  object-position: left center;
  transition: opacity 650ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.logo-white {
  opacity: 1;
}

.logo-color {
  opacity: 0;
}

/* after scroll */
.navbar.scrolled .logo-white {
  opacity: 0;
}

.navbar.scrolled .logo-color {
  opacity: 1;
}

.logo-mark-footer {
  width: 130px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.9);
  transition: color var(--transition);
  margin-bottom: 2rem;
}
.logo-mark svg { width: 100%; height: 100%; }
.logo-text {
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}
.logo-sub {
  display: none;
  font-size: .7rem;
  color: rgba(255,255,255,.48);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-left: .9rem;
  border-left: 1px solid rgba(255,255,255,.2);
  transition: color var(--transition), border-color var(--transition);
}
@media (min-width: 1100px) { .logo-sub { display: inline-block; } }

.navbar.scrolled .logo { color: var(--ink); }
.navbar.scrolled .logo-mark { color: var(--purple); }
.navbar.scrolled .logo-sub { color: var(--muted); border-left-color: var(--line); }

/* ---- Nav links: white on hero, dark when scrolled ---- */
.nav-links {
  display: none;
  gap: 2.2rem;
}
@media (min-width: 860px) { .nav-links { display: flex; } }
.nav-links a {
  position: relative;
  font-size: .88rem;
  color: rgba(255,255,255,.78);
  letter-spacing: .01em;
  padding: .4rem 0;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: rgba(255,255,255,.8);
  transition: right var(--transition);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { right: 0; }

.navbar.scrolled .nav-links a { color: var(--ink-soft); }
.navbar.scrolled .nav-links a::after { background: var(--purple); }
.navbar.scrolled .nav-links a:hover { color: var(--ink); }

/* ---- Nav CTA: white on hero, dark when scrolled ---- */
.nav-cta {
  display: none;
  align-items: center;
  gap: .55rem;
  font-size: .85rem;
  color: rgba(255,255,255,.9);
  padding: .7rem 1.25rem;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.nav-cta svg { width: 14px; height: 14px; transition: transform var(--transition); }
.nav-cta:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.7);
}
.nav-cta:hover svg { transform: translateX(3px); }
@media (min-width: 860px) { .nav-cta { display: inline-flex; } }

.navbar.scrolled .nav-cta { color: #663399; border-color: var(--ink); }
.navbar.scrolled .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---- Hamburger: white on hero, dark when scrolled ---- */
.mobile-menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px; height: 30px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 101;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(255,255,255,.9);
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 860px) { .mobile-menu-btn { display: none; } }

.navbar.scrolled .mobile-menu-btn span { background: var(--ink); }
/* When menu is open, keep hamburger/X and logo white regardless of scroll state */
body.menu-open #navbar .mobile-menu-btn span { background: rgba(255,255,255,.9); }
body.menu-open #navbar .logo-white { opacity: 1; }
body.menu-open #navbar .logo-color { opacity: 0; }

/* ---- Mobile menu: full-screen dark overlay ---- */
.mobile-menu {
  position: fixed;
  width: 100%;
  inset: 0;
  background: #14081f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 380ms cubic-bezier(.2,.7,.2,1), visibility 380ms;
  z-index: 99;
  overflow: hidden;
  height: 100vh;
  padding: 5rem 2rem 2.5rem;
  overflow-y: auto;
}
.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
  margin-bottom: 8rem;
}

.mobile-nav-links a {
  font-family: "Arial Nova Light", sans-serif;
  font-style: italic;
  font-size: 1.4rem;
  color: #ffffff;
  text-decoration: none;
}

/* CTA */
.mobile-cta {
  margin-top: 1.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.3);
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* title */
.contact-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}


/* When menu open: navbar becomes transparent so X button floats over dark menu */
body.menu-open #navbar {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  list-style: none;
}

.mobile-nav-links a {
  display: block;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,.82);
  letter-spacing: -.02em;
  line-height: 1.1;
  padding: .55rem 2rem;
  border-bottom: none;
  text-align: center;
  transition: color 250ms ease, opacity 250ms ease;
}
.mobile-nav-links a:hover { color: #fff; }

/* Contact details at bottom of mobile menu */
.mobile-menu-contact {
  position: absolute;
  bottom: clamp(1.75rem, 5vh, 3rem);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 0 2rem;
}
.mobile-menu-contact::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: rgba(255,255,255,.18);
  margin-bottom: .75rem;
}
.mobile-menu-contact a,
.mobile-menu-contact span {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
  font-style: normal;
  transition: color 200ms ease;
}
.mobile-menu-contact a:hover { color: rgba(255,255,255,.65); }

.mobile-menu-info {
  position: absolute;
  bottom: 5rem;
  left: 2rem;
  right: 2rem;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.15);

  font-size: 0.8rem;
  color: rgba(255,255,255,.7);
}

.mobile-info-left,
.mobile-info-right {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 48%;
}

.mobile-info-left strong {
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.mobile-info-right {
  text-align: right;
}

.mobile-info-right a {
  color: rgba(255,255,255,.85);
  word-break: break-word;
}

/* ============ Sticky section index ============ */
.section-index {
  position: fixed;
  left: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
}
@media (min-width: 1280px) { .section-index { display: block; } }
.section-index ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.section-index li {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  color: var(--muted);
  transition: color var(--transition);
}
.section-index li .idx {
  font-size: .72rem;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
}
.section-index li .lbl {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition), color var(--transition);
  white-space: nowrap;
}
.section-index li:hover,
.section-index li.is-active { color: var(--ink); }
.section-index li.is-active .lbl,
.section-index li:hover .lbl { opacity: 1; transform: translateX(0); }
.section-index li.is-active .idx { color: var(--purple); }

/* SECTION INDEX DEFAULT */
.section-index .idx,
.section-index .lbl {
  transition: color 0.3s ease;
}

/* WHEN FOOTER IS ACTIVE */
.section-index.footer-active .idx,
.section-index.footer-active .lbl {
  color: #fff;
}

/* ============ Hero ============ */
.hero {
  width: 100%;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--paper);
  overflow: hidden;
  background-image: url('images/bg-hero.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 100% 80%;
}
@media (max-width: 1024px) {
  .hero { background-position: 70% center; }
}
@media (max-width: 480px) {
  .hero { background-position: 77.5% center; }
}

@media (max-width: 480px) {
  .hero {
    min-height: 100svh;
    align-items: start;
  }

  .hero-content {
    min-height: 100svh;
    padding-top: 4.8rem;
    padding-bottom: 4.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: none;
  }

  .hero-top {
    margin-bottom: 1.6rem;
  }

  .hero-bottom {
    margin-top: 1.4rem;
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
     rgba(30, 25, 40, 0.65) 0%,   /* neutral dark (not purple) */
    rgba(30, 25, 40, 0.65) 30%,
    rgba(60, 50, 90, 0.35) 45%,
    rgba(102, 51, 153, 0.10) 65%,
    rgba(102, 51, 153, 0.00) 100%
  );
  z-index: 1;
  pointer-events: none;
}
@media (max-width: 480px) {
  .hero::before {
    background: linear-gradient(
      45deg,
      rgba(30, 25, 40, 0.65) 0%,
      rgba(30, 25, 40, 0.65) 30%,
      rgba(60, 50, 90, 0.42) 45%,
      rgba(26, 20, 32, 0.1) 65%,
      rgba(26, 20, 32, 0.4) 100%
    );
  }
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 5.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(26,20,32,.55) 0%, rgba(26,20,32,.35) 35%, rgba(26,20,32,.8) 100%),
    linear-gradient(90deg, rgba(26,20,32,.55) 0%, rgba(26,20,32,0) 60%);
}

.hero-top {
  margin-bottom: clamp(1.25rem, 5vh, 5rem);
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: rgba(255,255,255,.72);
  max-width: 520px;
}
.hero-topline .line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.3);
}
.hero-topline .label {
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.hero-main {
  display: flex;
  align-items: flex-start;
  margin-top: 0;
  padding-bottom: 0;
}

.hero-title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(4.4rem, 8vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--paper);
  max-width: 14ch;
}
.hero-word {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  animation: heroWord 900ms cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-word:nth-child(1) { animation-delay: 120ms; }
.hero-word:nth-child(2) { animation-delay: 260ms; }
.hero-word:nth-child(3) { animation-delay: 400ms; }
.hero-word.em {
  font-style: italic;
  font-weight: 300;
  color: #e7d7ff;
}
@keyframes heroWord {
  to { opacity: 1; transform: translateY(0); }
}

.hero-bottom {
  margin-top: clamp(1.5rem, 3vh, 2.25rem);
  padding-top: clamp(1.25rem, 2vh, 1.75rem);
  border-top: 1px solid rgba(255,255,255,.18);
} 

@media (min-width: 900px) {
  .hero-bottom { grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: end; }
}
.hero-description {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255,255,255,.88);
  max-width: 55ch;
  font-weight: 300;
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-icon { width: 15px; height: 15px; transition: transform var(--transition); }
.btn:hover .btn-icon { transform: translateX(3px); }
.btn-primary {
  background: var(--paper);
  color: var(--ink);
}
.btn-primary:hover { background: var(--purple); color: var(--paper); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255,255,255,.4);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--paper); }

.hero-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: .45rem;
  column-gap: 1.25rem;
  align-self: end;
  font-size: .78rem;
  color: rgba(255,255,255,.66);
}
.hero-meta .meta-k {
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
}
.hero-meta .meta-v {
  color: rgba(255,255,255,.88);
  font-weight: 400;
}

/* ============ Shared sectional typography ============ */
.section-head {
  max-width: 920px;
  margin-bottom: 4rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1.4rem;
}
.eyebrow .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  padding: .18rem .45rem;
  border: 1px solid var(--purple);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.section-title {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.028em;
  color: var(--ink);
  text-wrap: balance;
}

/* ============ Trust ============ */
.trust-section {
  padding: clamp(2.5rem, 9vw, 8rem) 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
}

/* Bear: hidden on mobile/tablet, top-right on desktop */
.trust-bear {
  display: none;
}
@media (min-width: 1100px) {
  .trust-bear {
    display: block;
    position: absolute;
    top: -1rem;
    right: 20rem;
    width: 37rem;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 12px 28px rgba(26,20,32,.13));
    z-index: 1;
  }
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 720px)  { .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

.trust-item {
  padding: 2.4rem 1.75rem;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.trust-item:last-child { border-right: 0; }
@media (min-width: 720px) and (max-width: 1099px) {
  .trust-item:nth-child(2n) { border-right: 0; }
}
@media (max-width: 719px) {
  .trust-item { border-right: 0; }
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102,51,153,.07);
  border: 1.5px solid rgba(102,51,153,.2);
  color: var(--purple);
  flex-shrink: 0;
}
.trust-icon svg {
  width: 22px;
  height: 22px;
}
.trust-body h3 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .5rem;
  letter-spacing: -.005em;
}
.trust-body p {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Bear in 4th item — mobile only */
.trust-item-bear { display: none; }

@media (max-width: 719px) {
  .trust-item {
    position: relative;
  }
  .trust-item--last {
    overflow: hidden;
    isolation: isolate; /* creates stacking context so z-index:-1 stays inside */
  }
  .trust-item-bear {
    display: block;
    position: absolute;
    bottom: -3rem;
    right: -5px;
    width: 18rem;
    height: auto;
    opacity: .3;
    pointer-events: none;
    user-select: none;
    z-index: -1; /* sits behind text, above card background */
  }
  .services-bear img {
    display: none;
  }
}

/* ============ About ============ */
.about-section {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1.05fr 1fr; gap: 5rem; }
}
.about-copy { max-width: 580px; }
.about-copy .section-title {
  margin-top: .9rem;
  line-height: 1.1;
}
.about-lead {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  margin-top: 1.75rem;
  font-weight: 400;
  letter-spacing: -.005em;
}
.about-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-top: 1.1rem;
}
.about-visual {
  position: relative;
  aspect-ratio: 1;
  width: 120%;
  max-width: 900px;
}
@media (max-width: 768px) {
  .about-section {
    padding: 2rem 0 1rem;
    overflow: hidden;
  }
  .about-grid {
    gap: 0.5rem;
  }
  .about-copy {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .about-text {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .about-visual {
    position: static;
    width: calc(100% + 2 * clamp(1.25rem, 4vw, 3rem));
    margin-left: calc(-1 * clamp(1.25rem, 4vw, 3rem));
    display: block;
    opacity: .97;
    overflow: hidden;
    aspect-ratio: 1;
  }
  .network-svg {
    width: 100%;
    height: 100%;
    transform: scale(1.28);
    transform-origin: center center;
  }
}
.network-svg {
  width: 100%;
  height: 100%;
  animation: gentleFloat 14s ease-in-out infinite;
}
@keyframes gentleFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============ Services ============ */
.services-section {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: relative;
}
.services-section .container { position: relative; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 980px) { .services-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }

/* Services bear — hidden on mobile, shown desktop only */
.services-bear { display: none; pointer-events: none; }
.services-bear img {
  width: 100%; height: auto; display: block;
  filter: brightness(.86) saturate(1.35) contrast(1.08) drop-shadow(0 14px 32px rgba(26,20,32,.28));
}

@media (max-width: 768px) {
  .services-section .section-head { margin-bottom: 10rem; }
}
@media (min-width: 980px) {
  .services-section .section-head { max-width: calc(100% - 380px); margin-bottom: 4rem; }
  .services-bear {
    display: block; position: absolute;
    top: -8.5rem; right: 2rem; width: 37rem; margin: 0; z-index: 2;
  }
  .services-bear img {
    width: 100%; height: auto;
    filter: brightness(.86) saturate(1.35) contrast(1.08) drop-shadow(0 22px 52px rgba(26,20,32,.28));
  }
}

/* ---- Column containers ---- */
.svc-col {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Thin left accent rail */
.svc-col-rail {
  position: absolute;
  top: 16px; left: 0; bottom: 16px;
  width: 3px;
  background: var(--purple);
  border-radius: 0 3px 3px 0;
  display: flex;
  align-items: flex-end;
  padding: 0;
}
.svc-col-rail.alt { background: var(--teal); }
.svc-col-rail span { display: none; }
.svc-col { padding-left: calc(3px + clamp(1.5rem, 2.5vw, 2rem)); }

/* Column head */
.svc-col-head h3 {
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .65rem;
}
.svc-col-head p {
  font-size: .875rem;
  line-height: 1.72;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

/* ---- Service items — elevated cards ---- */
.svc-list { display: flex; flex-direction: column; gap: 12px; }

/* ── Premium service cards ─────────────────────────────── */
.svc-item {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,.055);
  border-left: 3px solid transparent;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(26,20,32,.045), 0 1px 4px rgba(26,20,32,.04);
  transition: transform 350ms ease, box-shadow 350ms ease,
              border-color 350ms ease, background 350ms ease;
  cursor: pointer;
}
.svc-item:hover {
  background: rgba(255,255,255,.96);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(26,20,32,.08), 0 4px 12px rgba(26,20,32,.05);
  border-color: rgba(0,0,0,.08);
}

/* Privatkunden — purple left accent */
.svc-col:not(:has(.svc-col-rail.alt)) .svc-item[open] {
  background: #ffffff;
  border-left-color: var(--purple);
  border-color: rgba(102,51,153,.14);
  box-shadow: 0 12px 40px rgba(102,51,153,.1), 0 2px 8px rgba(102,51,153,.06);
  transform: none;
}
/* Unternehmenskunden — teal left accent */
.svc-col:has(.svc-col-rail.alt) .svc-item[open] {
  background: #ffffff;
  border-left-color: var(--teal);
  border-color: rgba(99,218,222,.22);
  box-shadow: 0 12px 40px rgba(99,218,222,.12), 0 2px 8px rgba(99,218,222,.08);
  transform: none;
}
.svc-item.is-closing {
  background: rgba(255,255,255,.78) !important;
  border-color: rgba(0,0,0,.055) !important;
  border-left-color: transparent !important;
  box-shadow: 0 8px 28px rgba(26,20,32,.045) !important;
  transform: none !important;
}

.svc-item summary {
  list-style: none;
  -webkit-user-select: none; user-select: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.2rem;
  color: var(--ink);
}
.svc-item summary::-webkit-details-marker { display: none; }

.svc-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 300ms ease, color 300ms ease;
  color: var(--purple);
  background: rgba(102,51,153,.08);
}
.svc-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.svc-col:has(.svc-col-rail.alt) .svc-icon {
  color: #1a9ea3;
  background: rgba(99,218,222,.12);
}
.svc-col:not(:has(.svc-col-rail.alt)) .svc-item[open] .svc-icon {
  background: rgba(102,51,153,.13);
  color: var(--purple);
}
.svc-col:has(.svc-col-rail.alt) .svc-item[open] .svc-icon {
  background: rgba(99,218,222,.18);
  color: #1a9ea3;
}

.svc-item summary .t {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
  transition: color 300ms ease;
}
.svc-col:not(:has(.svc-col-rail.alt)) .svc-item[open] summary .t { color: var(--purple); }
.svc-col:has(.svc-col-rail.alt) .svc-item[open] summary .t { color: #1a9ea3; }

/* Toggle — 34px circle, rotates to × on open */
.svc-item summary .tog {
  position: relative;
  width: 34px; height: 34px;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
  transition: transform 380ms cubic-bezier(.2,.8,.2,1),
              background 300ms ease, border-color 300ms ease;
}
.svc-col:not(:has(.svc-col-rail.alt)) .svc-item[open] summary .tog {
  transform: rotate(45deg);
  background: rgba(102,51,153,.08);
  border-color: rgba(102,51,153,.22);
}
.svc-col:has(.svc-col-rail.alt) .svc-item[open] summary .tog {
  transform: rotate(45deg);
  background: rgba(99,218,222,.1);
  border-color: rgba(99,218,222,.32);
}
.svc-item summary .tog::before,
.svc-item summary .tog::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  background: var(--ink-soft);
  transition: background 300ms ease;
}
.svc-item summary .tog::before {
  width: 12px; height: 1.5px;
  transform: translate(-50%, -50%);
}
.svc-item summary .tog::after {
  width: 1.5px; height: 12px;
  transform: translate(-50%, -50%);
}
.svc-col:not(:has(.svc-col-rail.alt)) .svc-item[open] summary .tog::before,
.svc-col:not(:has(.svc-col-rail.alt)) .svc-item[open] summary .tog::after {
  background: var(--purple);
}
.svc-col:has(.svc-col-rail.alt) .svc-item[open] summary .tog::before,
.svc-col:has(.svc-col-rail.alt) .svc-item[open] summary .tog::after {
  background: #1a9ea3;
}

/* Body expand */
.svc-item .body {
  display: grid !important;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows 440ms cubic-bezier(.4,0,.2,1),
              opacity 360ms ease;
}
.svc-item .body > p {
  min-height: 0;
  overflow: hidden;
  padding: 0 1.2rem 1.4rem calc(1.2rem + 38px + 1rem);
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.8;
  opacity: .78;
}
.svc-item[open] .body { grid-template-rows: 1fr; opacity: 1; }
.svc-item.is-closing .body { grid-template-rows: 0fr !important; opacity: 0 !important; }

/* Mobile bears */
.bear-top, .bear-bottom { display: none; }

@media (max-width: 768px) {
  .svc-col { overflow: visible; margin-bottom: 3rem; }
  .svc-col:first-child { margin-top: 80px; padding-top: 70px; }
  .svc-col:last-child { padding-bottom: 15rem; }

  .bear-top {
    display: block; position: absolute;
    top: 3.6em; left: 50%; transform: translateX(-50%);
    width: 16rem; height: auto; z-index: 3; pointer-events: none;
  }
  .bear-bottom {
    display: block; position: absolute;
    bottom: -6.5rem; right: -9.5rem; transform: translateX(-50%);
    width: 16rem; height: auto; z-index: 3; pointer-events: none;
  }
  /* Clip bears so they never cause horizontal scroll */
  .services-grid { overflow-x: hidden; }

  .svc-list { gap: 10px; }
  .svc-item { border-radius: 14px; }
  .svc-item summary { padding: 1rem; gap: .75rem; }
  .svc-item summary .tog { width: 30px; height: 30px; }
  .svc-item summary .t { font-size: .97rem; }
  .svc-item .body > p {
    padding: 0 1rem 1.2rem calc(1rem + 38px + .75rem);
    font-size: .9rem;
  }
}

/* ============ Approach ============ */
/* ============ Approach ============ */
.approach-section {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.approach-columns {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  counter-reset: approach;
  overflow: visible;
}
@media (min-width: 880px) {
  .approach-columns { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}
.approach-col {
  position: relative;
  padding-top: 2rem;
  border-top: 1px solid var(--ink);
}

/* Mobile: bears as subtle background illustrations */
@media (max-width: 879px) {
  .approach-col {
    padding-right: 0;
    padding-bottom: 3.5rem;
    overflow: hidden;
  }
  .approach-bear {
    position: absolute;
    bottom: 0;
    right: -2.5rem;
    height: clamp(200px, 62vw, 260px);
    width: auto;
    max-width: 72%;
    margin: 0;
    opacity: .11;
    object-fit: contain;
    object-position: right bottom;
    z-index: 0;
    pointer-events: none;
  }
  .step-num,
  .approach-col-title,
  .approach-col-text {
    position: relative;
    z-index: 1;
  }
}

/* Desktop: absolute bottom-right, column reserves right lane via padding */
@media (min-width: 880px) {
  .approach-col {
    overflow: visible;
    padding-right: clamp(130px, 14vw, 165px);
  }
  .approach-bear {
    position: absolute;
    right: -2.5rem;
    bottom: 0;
    height: clamp(165px, 14vw, 300px);
    width: auto;
    max-width: none;
    margin: 0;
    object-fit: contain;
    object-position: right bottom;
    z-index: 0;
    pointer-events: none;
  }
  .step-num,
  .approach-col-title,
  .approach-col-text {
    position: relative;
    z-index: 1;
  }
  .approach-col:nth-child(3) .approach-bear {
    height: clamp(165px, 14vw, 300px);
    right: -2.5rem;
  }
  .approach-col-title,
  .approach-col-text {
    max-width: none;
  }
}

.step-num {
  display: block;
  font-size: clamp(3.5rem, 6vw, 5rem);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ink);
  margin-bottom: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.step-num::after {
  content: '.';
  color: var(--purple);
}
.approach-line { display: none; }
.approach-col-title {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: .8rem;
}
.approach-col-text {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 38ch;
}

/* ============ Upload ============ */
.upload-section {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.bear-watermark {
  position: absolute;
  right: -60px;
  bottom: -40px;
  width: clamp(260px, 32vw, 460px);
  opacity: .14;
  pointer-events: none;
  filter: grayscale(.15);
  z-index: 0;
}
.bear-watermark img {
  width: 100%;
  height: auto;
  transform: rotate(-4deg);
}
.upload-section .container { position: relative; z-index: 1; }

.upload-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .upload-layout { grid-template-columns: 1fr 1.3fr; gap: 5rem; align-items: start; }
}

.upload-header { position: sticky; top: 6rem; }
.upload-subtitle {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 42ch;
}
.upload-trust-mark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.75rem;
  padding: .65rem 1rem;
  font-size: .78rem;
  color: var(--teal-ink);
  background: rgba(99,218,222,.1);
  border: 1px solid rgba(99,218,222,.28);
  border-radius: 999px;
}
.upload-trust-mark svg { width: 15px; height: 15px; stroke: currentColor; }

.form-with-bear {
  position: relative;
  overflow: visible;
}

/* Desktop side-peek bear */
.bear-docs {
  position: absolute;
  right: -15.8rem;
  bottom: 40px;
  width: 300px;
  height: auto;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 12px 28px rgba(26,20,32,.18));
}

/* Mobile top-peek bear: hidden on desktop */
.bear-docs-mobile {
  display: none;
}

@media (max-width: 1023px) {
  /* Hide desktop side bear */
  .bear-docs { display: none; }

  /* Reserve space above the card for the peeking bear */
  .form-with-bear {
    padding-top: 130px;
  }

  /* Bear peeks from above the card top edge */
  .bear-docs-mobile {
    display: block;
    position: absolute;
    top: -4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30rem;
    height: auto;
    z-index: 3;
    pointer-events: none;
  }

  /* Card sits behind the bear's lower body */
  .upload-card {
    position: relative;
    z-index: 1;
  }

  /* overflow handled by .upload-section which already has overflow: hidden */
}

.upload-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 32px rgba(26,20,32,.09), 0 1px 6px rgba(26,20,32,.05), 0 0 0 1px rgba(26,20,32,.03);
  overflow: hidden;
}
.upload-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(26,20,32,.08);
}
.upload-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.25rem 1rem;
  background: rgba(250,248,245,.6);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .005em;
  transition: background var(--transition), color var(--transition);
  border-bottom: 2px solid transparent;
}
.upload-tab .idx {
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.upload-tab.active {
  background: #ffffff;
  color: var(--ink);
  border-bottom-color: var(--purple);
}
.upload-tab.active .idx { color: var(--purple); }
.upload-tab:hover:not(.active) { background: rgba(255,255,255,.75); color: var(--ink); }

.upload-panel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.upload-panel[hidden] { display: none; }

.upload-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-field { display: flex; flex-direction: column; gap: .45rem; }
.form-field label {
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: transparent;
  padding: .85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--transition);
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); opacity: .7; }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--purple);
}

/* Field validation error */
.form-field input.field-error,
.form-field textarea.field-error {
  border-bottom-color: #c0392b;
}

/* Form status message */
.form-status {
  font-size: .85rem;
  min-height: 1.2em;
  border-radius: var(--radius);
  padding: .6rem .9rem;
  display: none;
}
.form-status--success {
  display: block;
  background: rgba(39,174,96,.1);
  color: #1e8449;
  border: 1px solid rgba(39,174,96,.25);
}
.form-status--error {
  display: block;
  background: rgba(192,57,43,.08);
  color: #c0392b;
  border: 1px solid rgba(192,57,43,.2);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 2.25rem 1rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.7);
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.dropzone svg {
  width: 26px; height: 26px;
  stroke: var(--purple);
  margin-bottom: .3rem;
}
.dropzone p { font-size: .92rem; }
.dropzone .link {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dropzone .drop-hint {
  font-size: .78rem;
  color: var(--muted);
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--purple);
  background: #ffffff;
  color: var(--ink);
}

.upload-form .btn-primary {
  align-self: flex-start;
  background: var(--purple);
  color: var(--paper);
  border-color: var(--purple);
  margin-top: .5rem;
}
.upload-form .btn-primary:hover { background: var(--purple-600); border-color: var(--purple-600); }

/* ============ Footer ============ */
.footer {
  position: relative;
  background: linear-gradient(135deg, #140D24 0%, #1D1235 100%);
  color: rgba(255,255,255,.82);
  overflow: hidden;
}

.footer-bear-mascot {
  position: absolute;
  bottom: -2.8rem;
  right: 10rem;
  width: 50rem;
  height: auto;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  opacity: .83;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.4));
}

/* Desktop bear: hidden on mobile */
@media (max-width: 768px) {
  .footer-bear-mascot { display: none; }
}

.footer-inner {
  position: relative;
  z-index: 1;
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}

/* TOP SECTION */
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
}
@media (min-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
}

/* ---- Trust block (4th nav column) ---- */
.footer-trust-title {
  color: var(--teal);
}

.footer-trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-trust-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.footer-trust-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,.35);
  margin-top: 2px;
}

.footer-trust-item div {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.footer-trust-item strong {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  letter-spacing: -.005em;
}

.footer-trust-item span {
  font-size: .78rem;
  color: rgba(255,255,255,.38);
  line-height: 1.5;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  margin-bottom: 1.75rem;
  text-decoration: none;
}
.footer-logo .logo-mark {
  width: 26px; height: 26px;
  color: rgba(255,255,255,.75);
}

.footer-headline {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 300;
  line-height: 1.38;
  color: rgba(255,255,255,.92);
  letter-spacing: -.01em;
  padding-top: 1rem;
}
.footer-headline em {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

/* CONTACT */
.footer-contact-label {
  font-size: .67rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.36);
  margin-bottom: 1rem;
}
.footer-email {
  display: block;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 300;
  color: rgba(255,255,255,.92);
  letter-spacing: -.01em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: .65rem;
  margin-bottom: .9rem;
  transition: color var(--transition), border-color var(--transition);
}
.footer-email:hover { color: #fff; border-bottom-color: rgba(255,255,255,.48); }

.footer-phone {
  display: block;
  font-size: .95rem;
  color: rgba(255,255,255,.48);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}
.footer-phone:hover { color: rgba(255,255,255,.85); }

.footer-social { display: flex; gap: .65rem; }
.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.48);
  transition: border-color var(--transition), color var(--transition);
}
.footer-social-btn svg { width: 15px; height: 15px; }
.footer-social-btn:hover { border-color: rgba(255,255,255,.48); color: rgba(255,255,255,.9); }

/* DIVIDER */
.footer-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
}

/* NAV COLUMNS */
.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1.5rem;
  padding: 2rem 0;
}
@media (min-width: 1025px) {
  .footer-nav { grid-template-columns: repeat(4, 1fr); gap: 20.5rem; }
}

.footer-col-title {
  font-size: .67rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(180,158,210,.55);
  font-weight: 400;
  margin-bottom: 1.25rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 5rem;
}
.footer-col ul a {
  font-size: .875rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: rgba(255,255,255,.88); }

.footer-col address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: .875rem;
  color: rgba(255,255,255,.5);
  line-height: 1.6;
}

/* BOTTOM BAR */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  padding-top: 1.5rem;
  font-size: .73rem;
  color: rgba(255,255,255,.28);
  letter-spacing: .01em;
}
.footer-finma {
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Mobile bear: hidden on desktop */
.footer-bear-mobile-wrap { display: none; }

@media (max-width: 768px) {
  .footer-bear-mobile-wrap {
    display: block;
    position: relative;
    text-align: center;
    margin: -1px 0;
    z-index: 2;
  }
  .footer-bear-mobile {
    display: inline-block;
    width: 50rem;
    height: auto;
    position: relative;
    margin: -44px auto -22px;
    bottom: -3rem;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,.35));
    pointer-events: none;
    user-select: none;
  }
  .footer-divider--below-bear {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 600px) {
  .footer-inner { padding-top: 3.5rem; }
  .footer-top { padding-bottom: 2.5rem; }
}

/* ============ Modals ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.modal.active { display: block; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,20,32,.6);
  backdrop-filter: blur(4px);
  animation: fade 300ms ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  position: relative;
  max-width: 720px;
  max-height: 86vh;
  margin: 5vh auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2.5rem clamp(1.5rem, 3vw, 2.75rem);
  overflow-y: auto;
  animation: slideUp 400ms cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.4);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 38px; height: 38px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--paper-2); color: var(--ink); }
.modal-content h2 {
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.modal-body h3 {
  font-size: .98rem;
  font-weight: 500;
  color: var(--purple);
  margin: 1.5rem 0 .5rem;
}
.modal-body p {
  font-size: .93rem;
  line-height: 1.68;
  color: var(--ink-soft);
}

/* ============ Scroll animations ============ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 700ms cubic-bezier(.2,.7,.2,1),
    transform 700ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* Stagger delays */
.animate-delay-1 { transition-delay: 100ms; }
.animate-delay-2 { transition-delay: 200ms; }
.animate-delay-3 { transition-delay: 300ms; }
.animate-delay-4 { transition-delay: 400ms; }

/* Mobile: reduce motion distance */
@media (max-width: 768px) {
  .animate-on-scroll { transform: translateY(22px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
  .svc-item .body { opacity: 1; grid-template-rows: 0fr; }
  .svc-item[open] .body { grid-template-rows: 1fr; }
}

/* ============ Mobile & Responsive Fixes ============ */

/* Body scroll lock when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Ensure navbar stays visible when menu is open */
body.menu-open #navbar {
  background: rgba(250,248,245,.98);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: var(--line);
}

/* Section index: already hidden below 1280px — reinforce */
@media (max-width: 1279px) {
  .section-index { display: none !important; }
}

/* ---- Hero mobile ---- */
@media (max-width: 768px) {

  .hero {
    min-height: 100vh;
    padding: 0;
  }

  .hero-content {
    justify-content: center;
    text-align: left;
  }

  .hero-title {
    font-size: clamp(2.25rem, 9.5vw, 3rem);
    line-height: 1.05;
  }

  .hero-bottom {
    margin-top: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: auto;               /* ❌ remove full width */
    min-width: 220px;          /* ✅ keeps it nice size */
    max-width: 260px;          /* ✅ prevents it getting too big */
    justify-content: center;
  }
  .hero-description {
    font-size: 1rem;
  }

}

/* ---- Services mobile (bears-only range) ---- */
@media (max-width: 768px) {
  .svc-col { overflow: hidden; }
}

/* ---- Upload section mobile ---- */
@media (max-width: 1023px) {
  /* Remove sticky so header doesn't overlap card */
  .upload-header {
    position: static;
  }
  /* Bear: convert from absolute overflow element to contained watermark */
  .bear-watermark {
    position: static;
    width: clamp(100px, 35vw, 200px);
    opacity: .07;
    margin: 0 auto 2rem;
    transform: none;
    filter: grayscale(.3);
    display: block;
    pointer-events: none;
  }
  .bear-watermark img {
    transform: none;
  }
  /* Trust mark: prevent overlap, ensure it flows naturally */
  .upload-trust-mark {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
  }
  /* Reduce gap in upload layout */
  .upload-layout {
    gap: 1.5rem;
  }
}

/* ---- Narrow mobile form rows ---- */
@media (max-width: 399px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---- General overflow prevention ---- */
html {
  max-width: 100%;
}
.about-section {
  overflow: hidden;
}

/* ============================================================
   TABLET — 769px to 1024px
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {

  /* ---- Global ---- */
  html, body { overflow-x: hidden; }

  /* ---- Hero ---- */
  .hero { background-position: 72% center; }
  .hero-content { padding-top: 8rem; padding-bottom: 4rem; }
  .hero-title { font-size: clamp(3rem, 6.5vw, 5rem); }
  .hero-description { font-size: .98rem; max-width: 50ch; }
  .hero-actions { gap: .7rem; }

  /* ---- Trust ---- */
  .trust-section { padding: clamp(1.5rem, 6vw, 5.5rem) 0; }
  .trust-item { padding: 2rem 1.5rem; }
  /* Bear in last trust-item — same treatment as mobile */
  .trust-item--last {
    overflow: hidden;
    isolation: isolate;
    position: relative;
  }
  .trust-item-bear {
    display: block;
    position: absolute;
    bottom: -3rem;
    right: -5px;
    width: 20rem;
    height: auto;
    opacity: .22;
    pointer-events: none;
    user-select: none;
    z-index: -1;
  }

  /* ---- About ---- */
  .about-section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
  .about-visual {
    position: static;
    width: clamp(320px, 65vw, 520px);
    max-width: 520px;
    margin: 0 auto;
    aspect-ratio: 1;
    overflow: hidden;
  }
  .network-svg {
    width: 100%;
    height: 100%;
    transform: scale(1.18);
    transform-origin: center center;
  }

  /* ---- Services ---- */
  .services-section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
  /* Reduce the massive 10rem gap — bears only show on mobile */
  .services-section .section-head { margin-bottom: 2.5rem; }
  /* Keep 2-col at 980px+; single col below. At 769-979px: single col */
  /* Tighten svc-col padding */
  .svc-col { padding: 1.5rem; }
  .svc-col { padding-left: calc(3px + 1.5rem); }
  .svc-col-head h3 { font-size: 1.25rem; }
  .svc-item { border-radius: 14px; }
  .svc-item summary { padding: .9rem 1rem; }
  .svc-list { gap: 10px; }
  /* At 980-1024px: 2 columns is workable but tighten gap — see standalone block below */

  /* ---- Approach ---- */
  .approach-section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
  .approach-columns { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
  .approach-col:nth-child(3) { grid-column: 1 / -1; max-width: 520px; }
  .approach-col { padding-right: clamp(80px, 10vw, 110px); }
  .approach-bear { height: clamp(110px, 11vw, 160px); right: -1.5rem; }
  .step-num { font-size: clamp(3rem, 5vw, 4rem); }

  /* ---- Upload ---- */
  .upload-section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
  .upload-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .upload-header { position: static; }
  .upload-subtitle { max-width: 52ch; }
  /* Side bear: hide on tablet (only visible when 2-col layout fits) */
  .bear-docs { display: none; }
  /* Peek-top mobile bear shown via the extended max-width: 1023px block above */
  /* Watermark: shrink so it doesn't fight the peeking bear */
  .bear-watermark {
    width: clamp(160px, 22vw, 240px);
    opacity: .09;
    right: -20px;
    bottom: -20px;
  }
  .bear-watermark img { transform: rotate(-4deg); }
  .form-row { grid-template-columns: 1fr 1fr; }

  /* ---- Footer ---- */
  .footer-inner { padding-top: 4rem; padding-bottom: 2rem; }
  .footer-top { padding-bottom: 2.5rem; gap: 2.5rem; }
  .footer-headline { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }
  /* Tablet: 2 col nav below 900px — see standalone block below */
  /* Footer: use mobile bear on tablet, hide desktop mascot */
  .footer-bear-mascot { display: none; }
  .footer-bear-mobile-wrap {
    display: block;
    position: relative;
    text-align: center;
    margin: -1px 0;
    z-index: 2;
  }
  .footer-bear-mobile {
    display: inline-block;
    width: clamp(380px, 52vw, 520px);
    height: auto;
    position: relative;
    margin: -44px auto -22px;
    bottom: -3rem;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,.35));
    pointer-events: none;
    user-select: none;
  }
  .footer-divider--below-bear { position: relative; z-index: 1; }
  .footer-bottom { font-size: .7rem; }

  /* ---- Services svc-col base tightening (applies all tablet widths) ---- */
  .services-bear { display: none; }

  /* ---- Mobile about-visual override: undo mobile bleed ---- */
  .about-visual {
    margin-left: auto;
    width: clamp(320px, 65vw, 520px);
  }

  /* ---- Mobile services section-head override ---- */
  .services-section .section-head { margin-bottom: 2.5rem !important; }
}

/* Services: single-col tablet (769–979px) — show mobile-style bears */
@media (min-width: 769px) and (max-width: 979px) {
  .services-section { position: relative; }
  .services-section .section-head { margin-bottom: 10rem !important; }
  .svc-col { overflow: visible; margin-bottom: 3rem; }
  .svc-col:first-child { margin-top: 80px; padding-top: 70px; }
  .svc-col:last-child { padding-bottom: 15rem; }
  .services-grid { overflow-x: hidden; }

  .bear-top {
    display: block;
    position: absolute;
    top: 3.6em;
    left: 50%;
    transform: translateX(-50%);
    width: 18rem;
    height: auto;
    z-index: 3;
    pointer-events: none;
  }
  .bear-bottom {
    display: block;
    position: absolute;
    bottom: -6.5rem;
    right: -9.5rem;
    transform: translateX(-50%);
    width: 18rem;
    height: auto;
    z-index: 3;
    pointer-events: none;
  }
}

/* Services: two-col tablet (980–1024px) — hide mobile bears, restore spacing */
@media (min-width: 980px) and (max-width: 1024px) {
  .bear-top, .bear-bottom { display: none; }
  .svc-col:first-child { margin-top: 0; padding-top: 1.5rem; }
  .svc-col:last-child { padding-bottom: 1.5rem; }
  .svc-col { overflow: hidden; margin-bottom: 0; }
  .services-grid { gap: 1.25rem; }
}

/* About: force single column at upper tablet range where 2-col is too tight */
@media (min-width: 960px) and (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-copy { max-width: 640px; }
}

/* Footer nav: 2-col at lower tablet range */
@media (min-width: 769px) and (max-width: 899px) {
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
}