:root {
  --bg: #ffffff;
  --bg-alt: #ede2e7;
  --surface: #ffffff;
  --text: #4e5665;
  --muted: #4e5665;
  --accent: #bf1f2e;
  --accent-soft: #9f1b27;
  --line: #d6bec6;
  --header-bg: #272d42;
  --header-bg-scrolled: #272d42;
  --header-text: #f5edf1;
  --shadow: 0 14px 35px rgba(131, 29, 44, 0.16);
  --menu-font: "Montserrat", "Nunito Sans", Helvetica, Arial, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Manrope", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  position: fixed;
  top: -80px;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--header-bg-scrolled);
  border-bottom: none;
  transition: top 260ms ease;
  pointer-events: none;
}

.site-header.is-visible {
  top: 0;
  pointer-events: auto;
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
}

.header-inner {
  width: min(1360px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0 2.2rem;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo--text {
  display: none;
}

.brand-logo--icon {
  width: 48px;
  max-width: 15vw;
  display: block;
}

.menu {
  display: flex;
  margin-left: max(5rem, 8vw);
  gap: clamp(1rem, 1.8vw, 2.5rem);
  align-items: stretch;
}

.menu-close,
.menu-overlay-logo {
  display: none;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-family: var(--menu-font);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  position: relative;
  transition: color 200ms ease;
  padding: 1.6rem 0; /* Add padding to give space for the underline */
}

.menu a::after,
.hero-bottom-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.menu a:hover,
.hero-bottom-menu a:hover {
  color: rgba(255,255,255,0.8);
}

.menu a.is-active::after,
.hero-bottom-menu a.is-active::after {
  opacity: 1;
}

.hero-bottom-menu a {
  position: relative;
  display: inline-flex;
  padding: 0.5rem 0;
  border: none;
  color: #fff;
  text-decoration: none;
  font-family: var(--menu-font);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1px;
}


.menu-toggle {
  display: none;
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--header-text);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  line-height: 0;
}

.hero {
  width: 100%;
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  padding: 5.2rem 0 8rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(220, 30, 50, 0.55), transparent 70%),
    linear-gradient(160deg, #8e0e1c 0%, #bf1f2e 40%, #272d42 100%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-creature {
  width: min(85px, 20vw);
  margin-bottom: 2rem;
  animation: soft-bob 4.2s ease-in-out infinite;
}

.hero-title {
  margin: 0;
  line-height: 1;
}

.hero-logo-text {
  width: min(460px, 72vw);
  display: block;
}

.hero-subtitle {
  font-family: var(--menu-font);
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0.75rem 0 0;
}

.scroll-down {
  margin-top: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  animation: pulse 2s ease-in-out infinite;
  transition: color 200ms ease;
  border: none;
  width: auto;
  height: auto;
}

.scroll-down:hover {
  color: #ffffff;
}

.hero-bottom-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 2.5rem);
  padding: 0.7rem 1rem;
  background: transparent;
}

.hero-bottom-menu a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-family: var(--menu-font);
  font-size: clamp(0.8rem, 0.75vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.35rem;
  transition: color 180ms ease, border-color 180ms ease;
}

.hero-bottom-menu a:hover {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

.content-section {
  scroll-margin-top: 74px;
  width: min(1160px, 92vw);
  margin: 0 auto;
  min-height: 100svh;
  padding: 4.5rem 0 4rem;
  display: grid;
  align-content: start;
  border-top: 1px solid var(--line);
}

.content-section:first-of-type {
  border-top: none;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

h2 {
  font-family: "Source Serif 4", serif;
  margin: 0 0 0.25rem;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--header-bg);
  font-weight: 700;
}

h3 {
  margin: 0;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: 0.2px;
}

.grid {
  display: grid;
  gap: 2.1rem;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.section-illustration {
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

.cards-intro {
  margin: 3rem 0 1.2rem;
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

.cards {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
}

.tool-card img {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 0.5rem;
}

.tool-card h4 {
  margin: 0 0 0.4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.portrait {
  width: min(100%, 360px);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  justify-self: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
}

.site-footer {
  margin-top: 0;
  border-top: none;
  background: var(--header-bg);
  color: var(--header-text);
  padding-top: 4.5rem;
  position: relative;
}

.footer-inner {
  width: min(1160px, 92vw);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.3fr 1fr 1.1fr;
}

.footer-logo-img {
  width: min(260px, 70%);
  display: block;
}

.footer-company strong,
.footer-support strong {
  display: block;
  font-family: var(--menu-font);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.footer-company p,
.footer-support p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--header-text);
}

.mt-2 {
  margin-top: 1.5rem !important;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.footer-contact-list li svg {
  color: #ffffff;
  flex-shrink: 0;
}

.footer-contact-list a {
  color: var(--header-text);
  text-decoration: none;
  font-size: 1rem;
}

.footer-contact-list a:hover {
  text-decoration: underline;
  color: #ffffff;
}

.footer-bottom {
  width: min(1160px, 92vw);
  margin: 3.5rem auto 0;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copyright {
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 237, 241, 0.65);
}

.copyright a {
  color: rgba(245, 237, 241, 0.65);
  text-decoration: underline;
}

.copyright a:hover {
  color: #ffffff;
}

.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@keyframes soft-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

.menu-close,
.menu-overlay-logo {
  display: none;
}

@media (max-width: 980px) {
  /* Always show header on mobile */
  .site-header {
    top: 0;
    pointer-events: auto;
  }

  .brand-logo--icon {
    display: none;
  }

  .brand-logo--text {
    display: block;
    width: 140px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Full-screen overlay — inside <header> but top-based animation avoids transform containment */
  .menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--header-bg);
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
  }

  .menu.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-close {
    display: flex;
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 0;
  }

  .menu-overlay-logo {
    display: block;
    width: 52px;
    margin-bottom: 1.8rem;
  }

  .menu a {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    padding: 0.45rem 2rem;
    text-align: center;
    border-bottom: none;
    width: auto;
  }

  .menu a::after {
    display: none;
  }

  .menu a:hover {
    color: rgba(255, 255, 255, 0.7);
  }

  body.menu-open {
    overflow: hidden;
  }

  .header-inner {
    height: 52px;
    padding: 0 1.1rem;
  }

  .content-section {
    scroll-margin-top: 50px;
  }

  .hero {
    padding: 4.2rem 0 7rem;
  }

  .hero-bottom-menu {
    display: none;
  }

  .content-section {
    min-height: auto;
    padding: 3rem 1.4rem 2.4rem;
    display: grid;
  }

  .grid-2,
  .cards,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .grid-2 .section-illustration {
    order: -1;
  }
}
