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

:root {
  --color-bg: #ffe987;
  --color-text: #474d96;
  --color-surface: #e6e7ef;
}

body {
  background: var(--color-bg);
  font-family:
    "Karla", ui-rounded, "Hiragino Maru Gothic ProN", Quicksand, Comfortaa,
    Manjari, "Arial Rounded MT", "Arial Rounded MT Bold", Calibri,
    source-sans-pro, sans-serif;
  color: var(--color-text);
}

/* ── Hero section ── */

body > section:first-of-type {
  padding: 40px 34px 0;

  & header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;

    & svg {
      flex-shrink: 0;
      max-width: 100px; /* Adjust based on desired size alongside title */
      height: auto;
      display: block;
    }
  }

  & > section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
  }
}

/* .arrow-line {
  position: absolute;
  top: -470px;
  left: 50%;
  transform: translateX(-50%);
  width: min(108%, 448px);
  height: auto;
  display: block;
  z-index: 1;
  pointer-events: none;
} */

/* ── Title ── */

h1 {
  font-size: 3em;
  letter-spacing: -2px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

/* ── Subtitle ── */

h2 {
  font-size: 1.2em;
  line-height: normal;
  color: var(--color-text);
}

/* ── Good Practice badge ── */

.badge-wrapper {
  display: flex;
  align-items: center;
  height: 50px;

  & .badge {
    font-weight: 600;
    font-size: 1.2em;
    line-height: 1;
    color: var(--color-text);
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 5px;
  }
}

/* ── Municipality text ── */

.municipality-text {
  line-height: normal;
  color: var(--color-text);
  margin-block-end: 20px;
}

/* ── Link box ── */

.link-box {
  background: var(--color-surface);
  border: 2px dashed var(--color-text);
  display: flex;
  max-width: 400px;
  gap: 10px;
  align-items: center;
  padding: 20px 15px;
  text-decoration: none;
  margin-block-end: 16px;

  &:hover span {
    text-decoration: underline;
  }

  & span {
    font-weight: bolder;
    color: var(--color-text);
  }

  & img {
    width: 28px;
    height: 24px;
  }
}

.your-municipality {
  font-weight: bolder;
  font-style: italic;
}

/* ── Profile section ── */

body > section:last-of-type {
  position: relative;
  margin-block-end: 20px;

  /* ── Profile photo ── */

  & .profile-photo-wrapper {
    position: relative;
    width: calc(100% + 18px);
    max-width: 300px;
    margin: 0 auto;
    border-radius: 50px;
    overflow: hidden;

    & img {
      width: 100%;
      height: auto;
    }

    /* ── Founder & name labels (overlaid on photo) ── */

    & .profile-labels {
      position: absolute;
      bottom: 22%;
      left: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-weight: bolder;

      & .founder-wrapper {
        background: var(--color-bg);
        height: 45px;
        padding-inline: 16px;
        display: inline-flex;
        align-items: center;

        & .founder-label {
          font-size: 1.5em;
          text-decoration: underline;
          text-decoration-style: dotted;
          text-underline-offset: 3px;
          white-space: nowrap;
        }
      }

      & .name-wrapper {
        background: var(--color-bg);
        height: 40px;
        padding-inline: 16px;
        display: inline-flex;
        align-items: center;

        & .founder-name {
          font-weight: 600;
          font-size: 1.2em;
        }
      }
    }

    /* ── CTA button ── */

    & .cta-wrapper {
      position: absolute;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      width: 100%;
      display: flex;
      justify-content: center;

      & .cta-button {
        width: 100%;
        background: var(--color-text);
        border-radius: 15px;
        max-width: fit-content;
        padding-inline: 20px;
        font-weight: bolder;
        font-size: 1.5em;
        line-height: 55px;
        text-align: center;
        color: white;

        &:hover {
          background: color-mix(in srgb, var(--color-text) 80%, black 20%);
        }
      }
    }
  }
}

/* ── Desktop & Tablet Layout ── */

@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    min-height: 100vh;

    & > section:first-of-type {
      padding: 0;
      flex: 1;
      max-width: 600px;
    }

    & > section:last-of-type {
      flex: 0 0 350px;
    }
  }

  .profile-photo-wrapper {
    max-width: 100%;
  }
}
