/* ==========================================================================
   Global Invest — main stylesheet
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */

:root {
  /* Colors */
  --color-primary: #328dd1;
  --color-accent: #dc3e42;
  --color-text: #333d44;
  --color-text-dark: #282e3f;
  --color-text-muted: #464855;
  --color-white: #fff;
  --color-bg-light: #f0f2f5;
  --color-footer-bg: #151e24;
  --color-grey: #bbb;

  /* Typography */
  --font-heading: "Google Sans", "Segoe UI", sans-serif;
  --font-body: "Noto Sans", "Segoe UI", sans-serif;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-body: 1.6;
  --lh-lead: 1.5;
  --lh-heading: 1.25;
  --lh-tight: 1.3;

  --text-base: 1rem;
  --text-lead: 1.25rem;
  --text-h2: clamp(1.5625rem, 3vw, 2.75rem);
  --text-h3: 1.5rem;
  --text-h4: 1.125rem;

  /* Hero wordmark scale */
  --hero-invest-size: clamp(2.75rem, 7.2vw, 6.5rem);
  --hero-global-size: calc(var(--hero-invest-size) * 0.78);
  --lh-hero-global: 0.95;
  --lh-hero-invest: 0.9;

  /* Layout */
  --container-max: 75rem;
  --container-padding: 0.9375rem;
  --section-gap: 5.625rem;
  --section-gap-sm: 2.5rem;

  /* Effects */
  --shadow-card: 0 1px 1px rgb(0 0 0 / 10%);
  --shadow-card-hover: 0 22px 43px rgb(0 0 0 / 15%);
  --transition: 0.3s ease;
}

/* --- Reset & base --------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary);
}

/* --- Layout --------------------------------------------------------------- */

.page {
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--section-gap);
}

.section--pattern {
  background-color: var(--color-bg-light);
  background-image: url("../images/dotted.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
  background-attachment: fixed;
}

/* --- Typography ----------------------------------------------------------- */

.heading {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--color-text-dark);
}

.heading--section {
  font-size: var(--text-h2);
  margin-bottom: 0.5rem;
}

.heading--accent {
  color: var(--color-accent);
}

.heading--center {
  text-align: center;
  margin-bottom: 1.875rem;
}

.lead {
  font-size: var(--text-lead);
  font-weight: var(--fw-medium);
  line-height: var(--lh-lead);
  font-style: normal;
  color: var(--color-text);
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 100svh;
  padding-block: 2rem;
  background: url("../images/back.jpg") center / cover no-repeat;
  color: var(--color-white);
}

.hero__inner {
  width: 100%;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 0.625rem;
  padding: 0.3125rem 1.875rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  line-height: 2.125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-accent);
  transform: skewX(-15deg);
}

.hero__badge-text {
  display: inline-block;
  transform: skewX(15deg);
}

.hero__wordmark {
  display: flex;
  flex-direction: column;
  margin: 0 0 1.125rem;
  font-family: var(--font-heading);
  font-weight: inherit;
  line-height: 1;
}

.hero__wordmark-line {
  display: block;
  color: var(--color-white);
}

.hero__wordmark-line--global {
  font-size: var(--hero-global-size);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-hero-global);
  letter-spacing: -0.02em;
}

.hero__wordmark-line--invest {
  font-size: var(--hero-invest-size);
  font-weight: var(--fw-bold);
  line-height: var(--lh-hero-invest);
  letter-spacing: -0.03em;
  margin-top: -0.04em;
}

.hero__tagline {
  max-width: min(50%, 36rem);
  margin: 0;
  font-size: var(--text-lead);
  font-weight: var(--fw-medium);
  line-height: var(--lh-lead);
  color: var(--color-white);
}

/* --- Intro ---------------------------------------------------------------- */

.intro {
  padding-block: clamp(2.5rem, 6vw, 5.625rem) 2.5rem;
}

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3.5fr);
  gap: 2rem;
  align-items: center;
}

.intro__media img {
  margin-inline: auto;
}

.intro__content {
  padding-top: clamp(0, 4vw, 5rem);
}

.intro__content .heading {
  margin-bottom: 0;
}

.intro__content .lead {
  margin-top: 0.125rem;
}

/* --- Services ------------------------------------------------------------- */

.services {
  padding-top: 0;
  padding-bottom: var(--section-gap);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.875rem 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.9375rem;
  padding: 3.125rem 2.5rem;
  text-align: center;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.125rem;
  font-size: 4.0625rem;
  line-height: 1;
  color: var(--color-accent);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-text-dark);
}

/* --- Advantages ----------------------------------------------------------- */

.advantages__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.advantages__media img {
  margin-inline: auto;
}

.advantages__content {
  padding-block: clamp(1.875rem, 6vw, 6.25rem) 5rem;
}

.advantages__content .heading {
  margin-bottom: 1.875rem;
}

.advantages__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 1.875rem;
}

.feature__icon {
  display: flex;
  margin-bottom: 1.25rem;
  font-size: 3rem;
  line-height: 1;
  color: var(--color-accent);
}

.feature__title {
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--color-text-dark);
}

.feature__text {
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--color-text);
}

/* --- About ---------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.about__lead {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--color-text);
}

.about__text p {
  margin-bottom: 1.25rem;
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--color-text-muted);
}

.about__text p:last-child {
  margin-bottom: 0;
}

/* --- Clients -------------------------------------------------------------- */

.clients {
  padding-block: var(--section-gap);
}

.clients__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  align-items: center;
}

.clients__logo {
  height: 6.25rem;
  margin-inline: auto;
  object-fit: contain;
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  background: var(--color-footer-bg);
  color: var(--color-grey);
}

.footer__inner {
  padding-block: 2.5rem 1.875rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
  margin-bottom: 1.75rem;
}

.footer__title {
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-white);
}

.footer__text {
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  line-height: var(--lh-body);
}

.footer__text:last-child {
  margin-bottom: 0;
}

.footer__col a {
  color: var(--color-white);
}

.footer__col a:hover {
  color: var(--color-primary);
}

.footer__copyright {
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 10%);
  font-size: 0.8125rem;
  line-height: var(--lh-body);
  text-align: center;
}

/* --- Cookie banner -------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__content {
  pointer-events: auto;
  width: 100%;
  padding: 1.1875rem 1.5rem;
  background: rgb(37 47 55);
  color: var(--color-white);
  font-size: 0.875rem;
  line-height: var(--lh-lead);
  animation: cookie-slide-up 0.3s ease;
}

.cookie-banner a {
  color: var(--color-primary);
}

.cookie-banner__btn,
.cookie-banner__close {
  border: 0;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  font: inherit;
}

.cookie-banner__btn {
  margin-left: 0.375rem;
  text-decoration: underline;
}

.cookie-banner__close {
  display: none;
}

@keyframes cookie-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1199px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card {
    text-align: left;
    align-items: flex-start;
  }

  .advantages__media {
    margin-left: 0;
  }
}

@media (max-width: 991px) {
  .intro__grid {
    grid-template-columns: 1fr;
  }

  .intro__media {
    display: none;
  }

  .intro__content {
    padding-top: 0;
  }

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

  .advantages__media {
    order: -1;
  }

  .advantages__content {
    padding-block: 1.875rem 2.5rem;
  }

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

  .footer__col:last-child {
    grid-column: 1 / -1;
  }

  .clients__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .clients__logo {
    height: 5rem;
  }
}

@media (max-width: 767px) {
  .section {
    padding-block: var(--section-gap-sm);
  }

  .section--pattern {
    background-attachment: scroll;
  }

  .hero {
    min-height: auto;
    padding-block: 6.25rem;
  }

  .hero__badge {
    font-size: 0.875rem;
    line-height: 1.5rem;
  }

  .hero__tagline {
    max-width: 100%;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .service-card {
    margin: 0.625rem 0;
    padding: 1.875rem 1.25rem;
  }

  .service-card__icon {
    font-size: 3rem;
  }

  .service-card__title {
    font-size: 1rem;
    line-height: 1.125;
  }

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

  .feature {
    padding-top: 0.9375rem;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .clients__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .clients__logo {
    height: 3.75rem;
  }
}

@media (max-width: 575px) {
  .services__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer__col:last-child {
    grid-column: auto;
  }

  .footer__inner {
    padding-block: 2rem 1.5rem;
  }

  .cookie-banner__content {
    padding: 1rem 1.125rem;
    font-size: 0.8125rem;
  }
}

@media (min-width: 992px) {
  .advantages__media {
    margin-left: -9.375rem;
  }
}

@media (min-width: 1400px) {
  :root {
    --container-max: 82.5rem;
  }
}
