/* ==========================================================================
   Minipreneurs Academy — Divi 5 companion styles
   Everything is namespaced .mp-* / --mp-* so it never collides with Divi.
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font Licence, see fonts/OFL-*.txt) */
@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/albert-sans-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-var.woff2") format("woff2");
}

:root {
  --mp-purple: #6835b4;
  --mp-purple-deep: #4b2287;
  --mp-turquoise: #08cec1;
  --mp-cream: #f7f5ee;
  --mp-ink: #241b35;
  --mp-lavender: #e6dcf6;
  --mp-mint: #e0f7f2;
  --mp-gold: #ffc845;

  --mp-font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --mp-font-body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mp-step--1: clamp(0.875rem, 0.84rem + 0.15vw, 0.95rem);
  --mp-step-0: clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);

  --mp-gutter: clamp(1rem, 0.25rem + 3.6vw, 3.5rem);
  --mp-max: 1280px;
  --mp-r-s: 12px;
  --mp-r-pill: 999px;
  --mp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --- Neutralise Divi's default section/row/column spacing around our layouts --- */
.et_pb_section:has(.mp-header),
.et_pb_section:has(.mp-footer) {
  padding: 0 !important;
  overflow: visible !important;
}
.et_pb_section:has(.mp-header) {
  background-color: var(--mp-purple) !important;
  position: relative;
  z-index: 20;
}
.et_pb_section:has(.mp-footer) {
  background-color: var(--mp-ink) !important;
}
.et_pb_section:has(.mp-header) .et_pb_row,
.et_pb_section:has(.mp-footer) .et_pb_row {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}
.et_pb_section:has(.mp-header) .et_pb_column,
.et_pb_section:has(.mp-footer) .et_pb_column,
.et_pb_section:has(.mp-header) .et_pb_code,
.et_pb_section:has(.mp-footer) .et_pb_code {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow: visible !important;
}

/* --- Shared ------------------------------------------------------------------- */
.mp-header,
.mp-footer,
.mp-menu {
  font-family: var(--mp-font-body);
  font-size: var(--mp-step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.mp-header *,
.mp-footer *,
.mp-menu * {
  box-sizing: border-box;
}
.mp-header ul,
.mp-footer ul,
.mp-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mp-header li,
.mp-footer li,
.mp-menu li {
  padding: 0;
  margin: 0;
  line-height: inherit;
}
.mp-header li::before,
.mp-footer li::before,
.mp-menu li::before {
  content: none;
}
.mp-header p,
.mp-footer p {
  margin: 0;
  padding: 0;
}
.mp-header img,
.mp-footer img,
.mp-menu img {
  display: block;
  max-width: 100%;
  height: auto;
}
.mp-header a,
.mp-footer a,
.mp-menu a {
  color: inherit;
}
.mp-header :focus-visible,
.mp-footer :focus-visible,
.mp-menu :focus-visible {
  outline: 3px solid var(--mp-turquoise);
  outline-offset: 3px;
  border-radius: 6px;
}

.mp-wrap {
  width: 100%;
  max-width: calc(var(--mp-max) + var(--mp-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--mp-gutter);
}

.mp-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mp-skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100000;
  background: var(--mp-turquoise);
  color: var(--mp-ink) !important;
  font-family: var(--mp-font-body);
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  border-radius: var(--mp-r-s);
  border: 2px solid var(--mp-ink);
  text-decoration: none;
}
.mp-skip:focus {
  top: 1rem;
}

/* Icons drawn with CSS masks (inline SVG is stripped by Divi's Code module) */
.mp-ico {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: var(--mp-ico) center / contain no-repeat;
  mask: var(--mp-ico) center / contain no-repeat;
}
.mp-ico--external {
  --mp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}
.mp-ico--menu {
  --mp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h10'/%3E%3C/svg%3E");
  width: 22px;
  height: 22px;
}
.mp-ico--close {
  --mp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  width: 22px;
  height: 22px;
}

/* --- Buttons ------------------------------------------------------------------ */
.mp-btn {
  --mp-bg: var(--mp-turquoise);
  --mp-fg: var(--mp-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  border-radius: var(--mp-r-pill);
  border: 2.5px solid var(--mp-ink);
  background: var(--mp-bg);
  color: var(--mp-fg) !important;
  font-family: var(--mp-font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.1;
  text-decoration: none !important;
  box-shadow: 4px 4px 0 var(--mp-ink);
  cursor: pointer;
  transition:
    transform 180ms var(--mp-ease),
    box-shadow 180ms var(--mp-ease),
    background-color 180ms var(--mp-ease);
}
.mp-btn:hover,
.mp-btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--mp-ink);
}
.mp-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--mp-ink);
}
.mp-btn--small {
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.mp-header {
  position: relative;
  z-index: 20;
  background: var(--mp-purple);
  color: var(--mp-cream);
}
.mp-header__bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1.1rem;
}
.mp-brand {
  flex: none;
  display: block;
  border-radius: 10px;
}
.mp-brand img {
  width: 104px;
  height: auto;
}
.mp-nav {
  margin-left: auto;
}
.mp-nav ul {
  display: flex;
  gap: 0.25rem;
}
.mp-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: var(--mp-r-pill);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms var(--mp-ease);
}
.mp-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}
.mp-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 -3px 0 var(--mp-turquoise);
}
.mp-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mp-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding-inline: 0.5rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}
.mp-login:hover {
  text-decoration-color: var(--mp-turquoise);
}
.mp-menu-toggle {
  display: none;
}

@media (max-width: 1080px) {
  /* Only collapse once the script has added the Menu button (no-JS keeps links visible). */
  .mp-js .mp-nav,
  .mp-js .mp-header__actions .mp-login,
  .mp-js .mp-header__actions .mp-btn {
    display: none;
  }
  .mp-header__bar {
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
  }
  .mp-js .mp-header__bar {
    flex-wrap: nowrap;
  }
  .mp-header__actions {
    margin-left: auto;
  }
  .mp-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.5rem 1.1rem;
    border-radius: var(--mp-r-pill);
    border: 2.5px solid var(--mp-cream);
    background: transparent;
    color: var(--mp-cream);
    font-family: var(--mp-font-body);
    font-size: var(--mp-step-0);
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
  }
  .mp-brand img {
    width: 84px;
  }
}

/* Mobile menu (native <dialog>, built by minipreneurs.js) */
.mp-menu {
  margin: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 0;
  border: 0;
  background: var(--mp-purple);
  color: var(--mp-cream);
}
.mp-menu::backdrop {
  background: rgba(36, 27, 53, 0.5);
}
.mp-menu[open] {
  display: flex;
  flex-direction: column;
  animation: mp-menu-in 240ms var(--mp-ease);
}
@keyframes mp-menu-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}
.mp-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--mp-gutter);
}
.mp-menu__top .mp-brand img {
  width: 84px;
}
.mp-menu__top .mp-menu-toggle {
  display: inline-flex;
}
.mp-menu nav {
  padding: 1rem var(--mp-gutter) 2rem;
  flex: 1;
}
.mp-menu nav ul {
  display: grid;
  gap: 0.25rem;
}
.mp-menu nav a {
  display: block;
  padding: 0.55rem 0;
  font-family: var(--mp-font-display);
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 2.75rem);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mp-menu nav a[aria-current="page"] {
  color: var(--mp-turquoise);
}
.mp-menu__foot {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem var(--mp-gutter) 2rem;
  border-top: 2px solid rgba(255, 255, 255, 0.18);
}
.mp-menu__foot .mp-login {
  justify-content: flex-start;
  justify-self: start;
  padding-inline: 0;
}
html.mp-menu-open {
  overflow: hidden;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.mp-footer {
  position: relative;
  background: var(--mp-ink);
  color: #ece7f5;
  padding-top: clamp(4rem, 3rem + 4vw, 6rem);
  padding-bottom: 2rem;
}
.mp-scallop {
  --mp-scallop-color: var(--mp-cream);
  --mp-s: 88px;
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: calc(var(--mp-s) * 0.5);
  pointer-events: none;
  z-index: 2;
  transform: scaleY(-1);
  background:
    radial-gradient(circle at 50% 100%, var(--mp-scallop-color) 49%, transparent 50.5%) 0 100% / var(--mp-s) var(--mp-s) repeat-x,
    radial-gradient(circle at 50% 100%, var(--mp-scallop-color) 49%, transparent 50.5%) calc(var(--mp-s) * 0.5) 100% /
      calc(var(--mp-s) * 0.62) calc(var(--mp-s) * 0.62) repeat-x;
}
.mp-footer__spark {
  position: absolute;
  right: calc(var(--mp-gutter) + 2rem);
  top: -30px;
  width: 56px;
  height: 56px;
  z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 3c2 12 9 19 21 21-12 2-19 9-21 21-2-12-9-19-21-21 12-2 19-9 21-21z' fill='%2308CEC1' stroke='%23241B35' stroke-width='2.75' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.mp-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr) minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: 2.5rem;
}
.mp-footer__brand img {
  width: 150px;
}
.mp-footer__brand p {
  margin-top: 1.25rem;
  max-width: 30ch;
  color: #cfc7de;
}
.mp-footer h2 {
  font-family: var(--mp-font-body);
  font-size: var(--mp-step--1);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mp-turquoise);
  margin: 0 0 1rem;
  padding: 0;
}
.mp-footer ul {
  display: grid;
  gap: 0.15rem;
}
.mp-footer li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  text-decoration: none;
}
.mp-footer li a:hover {
  text-decoration: underline;
  text-decoration-color: var(--mp-turquoise);
  text-underline-offset: 4px;
}
.mp-footer li .mp-ico {
  width: 14px;
  height: 14px;
}
.mp-footer__mail {
  word-break: break-word;
}
.mp-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: var(--mp-step--1);
  color: #b9b0cb;
}
@media (max-width: 960px) {
  .mp-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .mp-footer__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .mp-scallop {
    --mp-s: 56px;
  }
}
@media (max-width: 480px) {
  .mp-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mp-footer__spark {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-header *,
  .mp-footer *,
  .mp-menu,
  .mp-menu * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
