/* Normal weight */
@font-face {
  font-family: "F37Bolton";
  src:
		/* best-practice: compressed web formats first */ url("fonts/F37Bolton-Book.woff2")
      format("woff2"),
    url("fonts/F37Bolton-Book.ttf") format("truetype"); /* fallback */
  font-weight: 400; /* regular */
  font-style: normal;
  font-display: swap;
}

/*  Medium (600)  */
@font-face {
  font-family: "F37Bolton";
  src: url("fonts/F37Bolton-Medium.woff2") format("woff2"),
    url("fonts/F37Bolton-Medium.ttf") format("truetype");
  font-weight: 600; /* medium */
  font-style: normal;
  font-display: swap;
}

/*  Bold (700)  */
@font-face {
  font-family: "F37Bolton";
  src: url("fonts/F37Bolton-Bold.woff2") format("woff2"),
    url("fonts/F37Bolton-Bold.ttf") format("truetype");
  font-weight: 700; /* bold */
  font-style: normal;
  font-display: swap;
}

/* Custom */
@font-face {
  font-family: "CustomBolton";
  src: url("fonts/Bolton_Modded.woff") format("woff2");
  font-weight: 600; /* medium */
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-light: #fffaf1;
  --bg-dark: #110a1a;
  --bg-mint: #238993;
  --header-height: 72px;
  --radius: 60vmin; /* circle diameter for hero */
  --global-max-width: 1920px;
  --global-min-height: 600px;
  --global-min-height-mobile: 500px;
  --global-side-paddings: 6rem;
  --dark-font-color: #110a1a;
  --light-font-color: #fffaf1;
}

/* Global reset & defaults */
html,
body {
  font-family: "F37Bolton", "Helvetica", sans-serif; /* keep fallbacks */
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: #fffaf1;
}

/* Lay out body as column so header sits on top */
body {
  display: flex;
  flex-direction: column;
}

/* Fixed full‑width header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  padding: 0rem var(--global-side-paddings);
  width: calc(100% - var(--global-side-paddings) - var(--global-side-paddings));
  height: var(--header-height);
  display: flex;
  flex-direction: row;
  justify-content: center;
  z-index: 100;
  background-color: var(--bg-dark);
}
.site-header .wrapper {
  width: 100%;
  height: 100%;
  max-width: var(--global-max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header img {
  height: calc(var(--header-height) - 2rem);
  width: auto;
}

.mobile-nav-open {
  display: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background-image: url("/images/burger.png");
  background-position: center;
  background-size: contain; /* or `cover` */
  background-repeat: no-repeat;
}

nav .mobile-nav-close {
  display: none;
  position: absolute;
  top: 1.3rem;
  right: 2rem;
  width: 28px;
  height: 28px;
  color: #fffaf1;
  cursor: pointer;
  z-index: 300;
  font-size: 2rem;
  background-image: url("/images/cross.svg");
  background-position: center;
  background-size: contain; /* or `cover` */
  background-repeat: no-repeat;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2.5rem;
  font-weight: 400;
  font-size: 1.3rem;
}
nav a {
  color: #fff;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 3px;
  color: #fff;
}

/* Main centred section */
main.container {
  display: flex;
  flex-direction: column; /* mobile first */
  justify-content: center;
  align-items: center;
  width: calc(100% - var(--global-side-paddings) - var(--global-side-paddings));
  height: calc(100vh - var(--header-height));
  min-height: calc(max(100vh, var(--global-min-height)) - var(--header-height)); /* I might’ve overdone it here */
  margin-top: var(--header-height);
  padding-left: var(--global-side-paddings);
  padding-right: var(--global-side-paddings);
}

main.container .wrapper {
  position: relative;
  display: flex;
  flex-direction: column; /* mobile first */
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  max-width: var(--global-max-width);
}

/* Hero text */
.hero-text {
  display: flex;
  position: absolute;
  font-family: "CustomBolton", "F37Bolton", "Helvetica";
  left: 0px;
  bottom: 0px;
  flex-direction: column;
  align-items: left;
  color: #fffaf1;
  font-size: clamp(4rem, 8vw, 10rem);
  font-weight: 600;
  line-height: 1.05;
  text-align: left;
  max-width: 10ch;
  z-index: 10;
}

/* circle‑masked illustration */
.mask {
  position: relative;
  width: var(--radius);
  height: var(--radius);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.mask img {
  position: absolute;
  top: 50%; /* push centre of the image to the mask’s centre … */
  left: 50%;
  transform: translate(-50%, -50%); /* … then pull it back by half its size */
  width: 120%; /* oversize so we can drift without black bars */
  height: 120%;
  object-fit: cover; /* fill the circle */
}

/* Outer border of the mask */
.mask-outer-border {
  position: relative;
  width: calc(var(--radius) * 1.03);
  height: calc(var(--radius) * 1.03);
  border-radius: calc(var(--radius) * 1.03);
  background-color: #291f34;
}

/* gentle drift – only applied when .floating and floating-img class present */
@keyframes drift-mask {
  0% {
    transform: translate(-2%, -2%);
  }
  50% {
    transform: translate(2%, 2%);
  }
  100% {
    transform: translate(-2%, -2%);
  }
}
@keyframes drift-img-inside {
  /* we move the img inside the compensate the eye clipping and fake eye movement, or the img would follow */
  0% {
    transform: translate(-50%, -50%) translate(3%, 3%);
  } /* don't forget to apply the -50-50 centering transform too*/
  50% {
    transform: translate(-50%, -50%) translate(-3%, -3%);
  } /* using 2% doesn't cut it, so we tweaked up and 3/4 seems to work*/
  100% {
    transform: translate(-50%, -50%) translate(3%, 3%);
  }
}
.mask.floating {
  animation: drift-mask 12s ease-in-out infinite;
}
.mask img.floating-img {
  animation: drift-img-inside 12s ease-in-out infinite;
}
.mask-outer-border.floating {
  animation: drift-mask 12s ease-in-out infinite;
}

/* Fadein */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.fade-in {
  animation: fadeIn 0.6s ease-out both;
}

/* 2 ▸ delay helpers (100 ms steps) */
.delay-100 {
  animation-delay: 0.1s;
}
.delay-200 {
  animation-delay: 0.2s;
}
.delay-300 {
  animation-delay: 0.3s;
}
.delay-400 {
  animation-delay: 0.4s;
}
.delay-1000 {
  animation-delay: 1s;
}

/* Tablet / desktop tweaks */
@media (max-width: 700px) {
  :root {
    --global-side-paddings: 2rem;
    --radius: 70vmin; /* circle diameter for hero */
  }

  .mobile-nav-open {
    display: block;
  }

  /* full-screen, BUT hidden by default */
  nav {
    position: fixed;
    inset: 0; /* top:0 right:0 bottom:0 left:0 */
    background: var(--bg-mint);
    display: none;
    padding-top: env(safe-area-inset-top);
    z-index: 200;
  }

  nav.closed {
    display: none;
  } /* default (hidden) */
  nav.open {
    display: block;
  } /* shown after tap */

  nav .mobile-nav-close {
    display: none;
  } /* hide by default, show when the parent nav has .open */
  nav.open .mobile-nav-close {
    display: block;
  }

  nav ul {
    margin: 0 auto;
    margin-top: 5rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: left;
    gap: 2rem;
    font-size: 4rem;
    padding-top: calc(env(safe-area-inset-top) + 4rem);
  }

  main.container {
    display: flex;
    flex-direction: column; /* mobile first */
    justify-content: center;
    align-items: center;
    width: calc(
      100% - var(--global-side-paddings) - var(--global-side-paddings)
    );
    height: 100vh;
    min-height: calc(max(100vh, var(--global-min-height-mobile)) - var(--header-height)); /* I might’ve overdone it here */
    margin-top: var(--header-height);
    padding-left: var(--global-side-paddings);
    padding-right: var(--global-side-paddings);
  }

  main.container .wrapper {
    justify-content: flex-start;
    padding-top: 5vh;
  }
}

.generic_content {
  width: 100%;
  height: 100%;
  padding-top: 10vh;
}

.generic_content h1 {
  font-family: "CustomBolton", "F37Bolton", "Helvetica", "Arial";
  font-size: 5rem;
}
.generic_content p {
  font-size: 3rem;
}

/* Tablet / desktop tweaks */
@media (max-width: 700px) {
  .generic_content {
    padding-top: 2vh;
  }
  .generic_content h1 {
    font-size: 3.3rem;
  }
  .generic_content p {
    font-size: 2rem;
  }
}

@media (min-width: 1200px) {
  .page_content {
    max-width: 1200px;
    margin: 0 autho;
  }
}

@media (max-width: 700px) {
  .page_content {
    h1 {
      font-size: 1.5em;
    }

    h2 {
      font-size: 1.3em;
    }

    h3 {
      font-size: 1.1em;
    }
  }
}

.page_container {
  background-color: var(--bg-light);
  margin-top: var(--header-height);
}

/* Page Content (TOS, Privacy Policy...) */
.page_content {
  color: var(--dark-font-color);
  padding: 0 var(--global-side-paddings);
  a {
    color: var(--dark-font-color);
  }
  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.2em;
  }
}

/* Footer */
footer {
  display: flex;
  align-items: center;

  padding: 0 var(--global-side-paddings);

  a {
    color: var(--light-font-color);
    text-decoration: none;
  }

  .logo_container {
    flex-grow: 1;
  }

  li {
    list-style: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    &:hover {
      opacity: 1;
    }
  }
}
