
:root {
    --font-serif: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
    --bg-color-main: #FFFFFF;
    --bg-color-accent: #ececff;
    --color-primary: #3a3ab6;
    --text-color-main: #2c2c40;
    --text-color-hl: #09013c;
    --link-color-main: var(--color-primary);
    --link-color-hover: #2828ce;
    --link-color-visited: var(--link-color-main);
    --link-color-active: #f10135;
    --border-color-main: #8d8df0;
    --button-color-main: var(--color-primary);
    --button-text-color: #FFFFFF;
    --form-radius: 8px;
}


/* RESET */

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

* {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-decoration-skip-ink: all;
    line-height: clamp(1.2, 1.5, 1.6);
}

@media screen and (min-width: 320px) {
    html {
        font-size: calc(16px + 6 * ((100vw - 320px) / 680));
    }
}
@media screen and (min-width: 1000px) {
    html {
        font-size: 21px;
    }
}

body {
    overflow-wrap: break-word;
    word-break: break-word;
    min-block-size: 100%;
    height: 100%;
    min-height: 100vh;
    line-height: inherit;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    border: none;
    -webkit-user-select: none !important;
    user-select: none !important;
}

input, button, textarea, select {
    font: inherit;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    resize: none;
    line-height: 1;
}

input, textarea {
    width: 36ch;
    max-width: 100%;
}

p, h1, h2, h3, h4, h5, h6, span, div {
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 1rem;
    font-weight: normal;
    line-height: inherit;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

ul {
    list-style-type: "– ";
    list-style-position: outside;
    margin-bottom: 1rem;
}

li::marker {
    color: var(--color-primary);
    font-weight: 900;
    font-family: sans-serif !important;
}

:has(:target) {
    scroll-behavior: smooth;
}

:target {
    scroll-margin-top: 30px;
}

/* HELPERS */

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

.serif {
  font-family: var(--font-serif);
}

/* MAIN */

body {
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: var(--text-color-main);
    padding: 1rem 0;
    background-color: var(--bg-color-main);
}

#container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

a, a:link, a:visited {
    color: var(--link-color-main);
    text-decoration: none;
    transition-duration: 200ms;
}
a:hover {
    color: var(--link-color-hover);
}
a:active {
    color: var(--link-color-active);
}

*::selection {
    color: #ffffff;
    background: #000000;
    text-shadow: none !important;
}

sup {
  font-size: 0.65em;
  vertical-align: super;
  line-height: 0;
}

#logo {
    margin: 0 auto;
    user-select: none;
}

footer {
    border-top: 1px solid var(--border-color-main);
    padding: 1rem 0;
    margin: 2rem auto;
}

footer * {
    font-size: 0.7rem;
    font-weight: 650;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

footer p {

}

footer a, footer a:link, footer a:visited {
    color: var(--text-color-main);
}

hr {
    height: 1px;
    border-top: 1px solid var(--border-color-main);
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.1rem 0 0.1rem 0;
    color: var(--text-color-hl);
}

h3 {
    color: var(--text-color-hl);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.4rem 0 0.1rem 0;
}

h4 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

p {
    font-size: 0.96rem;
    margin: 0 0 1rem 0;
}

.col-primary {
  color: var(--color-primary);
}

/* FORMS */

input {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: var(--form-radius);
  border: 3px solid var(--border-color-main);
  background-color: #FFFFFF;
  color: var(--text-color-main);
  transition: border-color 0.3s ease;
  width: 100%;
  max-width: 420px;
  margin-bottom: 0.5rem;
}

input.email {
  flex-grow: 1;
  flex-shrink: 1;
  padding: 0.75rem 0.5rem 0.75rem 1.86em;
  margin-bottom: 0;
  background-image: url('/static/img/email_alt.webp'); /* Replace with your icon path */
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 1.2em auto;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

input.email:-webkit-autofill,
input.email:-webkit-autofill:hover,
input.email:-webkit-autofill:focus,
input.email:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
  box-shadow: 0 0 0px 1000px white inset !important;
  padding-left: 0.5rem !important;
  -webkit-text-fill-color: var(--color-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input.email::selection {
  background: transparent;
  color: inherit;
}

input:focus {
  border-color: color-mix(in srgb, var(--button-color-main) 70%, #000000);
}

button {
  flex-grow: 0;
  flex-shrink: 0;
  background: var(--button-color-main);
  color: var(--button-text-color);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  text-align: center;
  border-radius: var(--form-radius);
  cursor: pointer;
  overflow: hidden;
  transition: filter 0.3s ease;
  margin-bottom: 0.5rem;
  text-wrap: nowrap;
}

button.email {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-bottom: 0;
  box-shadow:
  inset 0 3px 0 0 color-mix(in srgb, var(--button-color-main) 70%, #000000),   /* Top */
  inset -3px 0 0 0 color-mix(in srgb, var(--button-color-main) 70%, #000000),  /* Right */
  inset 0 -3px 0 0 color-mix(in srgb, var(--button-color-main) 70%, #000000);  /* Bottom */
}

button:hover {
  filter: brightness(1.2);
}

.subholder {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--button-color-main) 40%, #FFFFFF);
  border-radius: var(--form-radius);
}

.sub {
  background: var(--bg-color-accent);
  border: 4px solid var(--border-color-main);
  padding: 1rem 1rem 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.sub p {
  font-size: 0.8rem;
  color: var(--color-primary);
  margin: 0;
  padding: 0;
}

#preview {
  max-width: 600px;
  margin: 0 auto;
}

#preview h4 {
  line-height: 1.2;
}

#preview a {
  color: #555587 !important;
}

#details {
  background: #f8f9fd;
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}

#details ul {
  margin-bottom: 0;
  margin-left: 1em;
}

/* SPECIALS */

.fade-text {
  position: relative;
  line-height: 1.2em;
  max-height: calc(1.2em * 1 + 1.4em); /* 1 line + fade area */
  overflow: hidden;
  font-size: 0.8rem;
  margin: 0 0 0.5rem 0;
}

.fade-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.4em; /* the fade gradient height */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, white 100%);
  pointer-events: none;
}


/* VIEWPORTS */

@media (max-width: 768px) {
  #details {
    flex-direction: column;
    margin-bottom: 1rem;
  }

  #details > div {
    flex-basis: 100% !important;
  }

  #details ul {
    margin-bottom: 0;
  }

}

@media screen and (max-width: 460px) {
    #container {
        padding: 0 0.75rem;
    }

    .subholder {
      width: 100%;
      flex-direction: column;
    }

    input.email {
      max-width: 100%;
      border-top-right-radius: var(--form-radius);
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      border-right: 3px solid var(--border-color-main);
      border-bottom: none;
      margin-bottom: 0;
    }

    /* Needs to be repeated */
    input.email:focus {
      border-color: color-mix(in srgb, var(--button-color-main) 70%, #000000);
    }

    button.email {
      padding: 0.75rem;
      border-top-right-radius: 0px;
      border-top-left-radius: 0;
      border-bottom-left-radius: var(--form-radius);
      box-shadow:
      inset -3px 0 0 0 color-mix(in srgb, var(--button-color-main) 70%, #000000),  /* Right */
      inset 0 -3px 0 0 color-mix(in srgb, var(--button-color-main) 70%, #000000),  /* Bottom */
      inset 3px 0 0 0 color-mix(in srgb, var(--button-color-main) 70%, #000000);   /* Left */
    }


}
