:root {
  --colored-0: #fff0e7;
  --colored-1: #ffdecc;
  --colored-2: #ffbd99;
  --colored-3: #ff9d66;
  --colored-4: #ff7c33;
  --colored-5: #ff5b00;
  --colored-6: #cc4900;
  --colored-7: #b34000;
  --colored-8: #993700;
  --colored-9: #662400;

  --monochrome-1: #0d0d0d;
  --monochrome-2: #1a1a1a;
  --monochrome-3: #262627;
  --monochrome-4: #333334;
  --monochrome-5: #404041;
  --monochrome-6: #666667;
  --monochrome-7: #8c8c8d;
  --monochrome-8: #b3b3b3;
  --monochrome-9: #d9d9d9;

  --font-large: 20px;
  --font-medium: 16px;
  --font-small: 12px;

  --primary-color: #000;
  --background-color: #fff0e7;
  --text-color: #333;
  --accent-color: #f19562;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-weight: 400;
  font-style: normal;
  background-color: rgb(255, 255, 255);
  color: var(--monochrome-3);
  font-size: var(--font-large);
  letter-spacing: 0;
  font-family: "Work Sans", Arial, sans-serif;
  font-weight: 300;
  font-style: Light;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

fieldset {
  border: none;
}

fieldset > .form-group > label {
  justify-self: start;
}

header {
  height: 12vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem 0 2rem;
}

h1 {
  font-size: 2rem;
  font-weight: bold;
}

#TOTIM-logo img {
  height: 45px;
}

.donate-button {
  background-color: var(--colored-3);
  color: var(--monochrome-3);
  width: 102px;
  height: 26.5px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  justify-content: center;
  align-items: center;
  font-weight: 550;
}

.home-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0 1.5rem;
  line-height: 37px;
}

main {
  max-width: 40%;
  margin-left: 3rem;
}

.splide {
  max-width: 50%;
  position: relative;
  height: auto;
}

.splide-pagination-page :has(.is-active) {
  background-color: var(--monochrome-2);
}

.splide__pagination .is-active {
  background-color: var(--monochrome-2) !important;
  transform: none !important;
  transition: background-color 0.3s ease !important;
}

.splide-arrows-custom {
  display: flex;
  justify-content: center;
}

.splide-arrow-custom {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 1em;
  margin: 0 !important;
  font-size: inherit !important;
  color: inherit !important;
  position: static !important;
  transform: none !important;
}

.splide-pagination-custom {
  position: static !important;
}

.about {
  margin-bottom: 2rem;
  direction: rtl;
  padding-left: 22px;
}

.about::-webkit-scrollbar {
  width: 8px;
}

.about::-webkit-scrollbar-thumb {
  background-color: #1e1e1e33;
  border-radius: 4px;
}

.about-content-container {
  direction: ltr;
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-style: Regular;
  font-size: 20px;
  line-height: 37px;
  letter-spacing: 0%;
}

h2.section-title {
  font-size: inherit;
  font-weight: normal;
  margin: 0;
  text-decoration: underline;
}

.about p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.slide {
  display: flex;
  flex-direction: column;
  min-width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  height: auto;
}

a.slide:hover {
  text-decoration: none;
}

.slide img {
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.18, 1);
  width: 100%;
  height: auto;
  max-height: 60vh;
}

.slide-text-container h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 500;
  font-style: Medium;
  font-size: 20px;
  line-height: 24px;
}
.slide-text-container p {
  margin-top: 0;
  margin-bottom: 0;
}
.slide-text-container p:nth-child(2) {
  font-weight: 500;
  font-style: Italic;
  font-size: 18px;
  line-height: 24px;
}
.slide-text-container p:nth-child(3) {
  font-weight: 400;
  font-style: Italic;
  font-size: 15px;
  line-height: 24px;
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 0%;
  text-decoration-skip-ink: auto;
}

.slide-info {
  display: flex;
  justify-content: space-between;
}

#substack-logo {
  width: 118px;
  height: 31px;
}

.slide-info h3 {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.source {
  font-size: 0.875rem;
  opacity: 0.9;
}

.download-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
  border: 1px solid var(--monochrome-2);
  border-radius: 1rem;
  width: fit-content;
  align-self: center;
  overflow: hidden;
  box-shadow: 0 0 10px #0000004b;
  margin: 3rem 0;
}

.download-container h3 {
  color: white;
  background-color: var(--colored-5);
  padding: 1rem;
  margin: 0;
  box-shadow: inset 0 -3px 6px var(--colored-6), 0 0 20px var(--colored-3);
}

.download-links {
  display: flex;
  justify-content: center;
}

.download-link {
  padding: 0 1rem;
  display: flex;
  text-decoration: none;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 1;
}

.download-link + .download-link {
  border-left: 1px solid #000;
}

.download-link:last-child {
  border-right: none;
}

footer {
  height: 12vh;
  width: 100%;
  align-content: center;
  align-items: center;
  margin-top: auto;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  align-content: center;
  max-width: 1200px;
  margin: 0 auto;
  font-weight: 500;
}

.footer-right {
  display: flex;
  gap: 1rem;
}

.footer-right a + a {
  padding-left: 1rem;
  border-left: 1px solid var(--monochrome-4);
}

a {
  color: var(--text-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none; /* hidden by default */
  z-index: 1000;
  opacity: 98%;
  backdrop-filter: blur(8px) brightness(90%);
}

.modal.is-open {
  display: block;
}

/* .modal__overlay {
    position: absolute;
    inset: 0;
    background: #7C7C7CA6;
} */

.modal__dialog {
  display: grid;
  color: var(--monochrome-3);
  width: 29.7rem;
  height: 25rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 520px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 4px 4px 10px 0px #00000040;
  padding: 0 1.5rem;
}

.modal__close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  font-weight: 50;
}

.form-title {
  justify-self: center;
  padding: 1rem 0 0 1rem;
  font-size: 24px;
  text-align: center;
  margin-top: 1rem;
}

.form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.modal-iframe {
  width: 100%;
  height: calc(100% - 2rem);
  border: none;
  border-radius: 6px;
  background: #fff;
}

label {
  display: grid;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

form input,
form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem;
  border: 1px solid #000000;
  border-radius: 4px;
  background: #efefef;
}

.submit-button {
  display: inline-block;
  margin-top: 0.25rem;
  width: 160px;
  background: var(--colored-1);
  border: 1px solid var(--monochrome-2);
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  justify-self: center;
  align-self: center;
  margin: 1rem auto;
}

#signup-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.form-group {
  display: grid;
  grid-template-columns: 1fr 3fr;
  margin-top: 16px;
}

.signup-form {
  justify-content: space-between;
}

.signup-form-wrapper > .form-group {
  margin-top: 26px;
  gap: 10px;
}

.signup-form-wrapper > .form-group:nth-child(1) {
  margin-top: 0;
}

.signup-form fieldset .form-group:nth-child(1) {
  margin-top: 0;
}

.signup-form fieldset .form-group {
  grid-template-columns: 0.75fr 3fr;
  align-items: center;
}

.signup-form fieldset .form-group input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #000;
  background: transparent;
  cursor: pointer;
  position: relative;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.signup-form fieldset .form-group input[type="radio"]:checked {
  background: var(--colored-3);
  outline: 2px solid var(--colored-3);
  border: 2px solid #fff;
}

#privacy-modal > .modal__dialog {
  width: 80vw;
  height: 80vh;
  max-height: 700px;
  /* max-width: 1312px; */
  max-width: 600px;
  padding: 0;
}

.privacy-content {
  padding: 2rem;
  overflow-y: auto;
  max-height: 100%;
  line-height: 37px;
}

.privacy-header {
  text-align: center;
  margin-bottom: 1rem;
}

.privacy-content h2 {
  font-size: 1.5rem;
  text-align: center;
}

.privacy-content h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.privacy-content p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.qr-modal-dialog {
  width: auto;
  height: auto;
  max-width: 400px;
  text-align: center;
}

.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

#qr-title {
  margin-top: 2rem;
}

.qr-code-image {
  max-width: 250px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.qr-code-container p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--monochrome-4);
}

.signup-form {
  display: flex;
}

@media screen and (min-width: 1280px) {
  body {
    display: grid;
    grid-template-rows: 10vh 80vh 10vh;
    overflow: hidden;
  }

  .home-container,
  header,
  footer {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
  }

  footer {
    margin-top: auto;
  }
}

@media screen and (min-width: 1560px) {
  .home-container,
  header,
  footer {
    max-width: 1560px;
    width: 100%;
    margin: 0 auto;
  }

  footer {
    margin-top: auto;
  }
}

@media screen and (max-width: 1024px) {
  .home-container,
  header,
  footer {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  footer {
    margin-top: auto;
    padding: 0 48px;
  }

  .download-label {
    display: none;
  }
}

@media (max-width: 560px) {
  .home-container,
  .signup-form {
    flex-direction: column;
    padding: 1rem;
  }

  .home-container {
    align-items: center;
  }

  .about {
    overflow: visible;
    max-height: 100%;
    padding-left: 0;
  }

  .footer-links {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
    align-items: center;
    gap: 1rem;
  }

  .modal__dialog {
    width: 90vw;
    height: auto;
    padding: 2rem 0;
  }

  .signup-form-wrapper > .form-group {
    grid-template-columns: 1fr;
    margin: 1rem 0;
    gap: 0.5rem;
  }

  .signup-form-wrapper > .form-group label {
    justify-content: start;
  }

  main {
    max-width: 600px;
    margin-left: 1.2rem;
    margin-right: 1.2rem;
  }

  main,
  .splide {
    max-width: 100%;
    padding-right: 0;
  }

  header,
  footer {
    padding: 1rem;
  }

  .slide-info {
    bottom: 1rem;
    left: 1rem;
  }

  .slide {
    padding: 0 2rem;
  }

  .privacy-content {
    padding: 1rem;
  }

  .signup-form fieldset .form-group {
    grid-template-columns: 0.25fr 3fr;
  }
  .qr-modal-dialog {
    max-width: 90vw;
  }
  .modal-iframe {
    min-height: 80vh;
  }
}

@media (min-width: 1300px) {
  .splide {
    max-width: 600px;
  }
  header {
    font-size: 18px;
    height: 5.35rem;
  }
}
