/* Body */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
}

@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  src: url("/fonts/Inter-Italic.woff2") format("woff2");
  font-weight: 100 900;
}

/* Mono */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: italic;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Italic.woff2") format("woff2");
  font-weight: 400;
}

/* Heading */

@font-face {
  font-family: "Archivo Narrow";
  font-style: normal;
  font-display: swap;
  src: url("/fonts/ArchivoNarrow.woff2") format("woff2");
  font-weight: 400 700;
}

@font-face {
  font-family: "Archivo Narrow";
  font-style: italic;
  font-display: swap;
  src: url("/fonts/ArchivoNarrow-Italic.woff2") format("woff2");
  font-weight: 400 700;
}

:root {
  /* Fonts */
  --heading: "Archivo Narrow", system-ui, sans-serif;
  --body: "Inter Variable", system-ui, sans-serif;
  --monospace: "IBM Plex Mono", ui-monospace, monospace;

  /* UI */
  --accent: rgb(132 10 22);
  --accent-dark: rgb(90 5 15);
  --secondary: rgb(33 0 0);
  --background: rgb(66 0 0);
  --background-2: rgb(77 0 0);


  /* Text */
  --text: rgb(255 235 235);
  --text-2: rgb(255 190 190);
  --text-3: rgb(190 110 120);
}

/* CSS Reset */

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

* {
  margin: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

/* Typography */

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.375;
}

p {
  overflow-wrap: break-word;
  word-break: break-word;
}

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

  &:is(:hover, :focus-visible) {
    color: var(--text-2);
  }
}

code {
  font-family: var(--monospace);
  background-color: var(--secondary);
  outline: 1px solid var(--accent-dark);
  padding-inline: 0.125em;
}

/* Page elements */

html {
  block-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--background);
  color: var(--text);
  min-block-size: 100%;
  display: flex;
  flex-direction: column;
}

/* header */

header {
  position: sticky;
  inset-block-start: 0;
  padding-block: 2rem 1.5rem;
  padding-inline: 1rem;
  background-color: var(--background);
  border-block-end: 1px solid var(--accent-dark);
  display: flex;
  justify-content: center;
}

header a svg {
  block-size: 32px;
}

/* main */

main {
  flex: 1;
  background-color: var(--background);
  display: flex;
  flex-direction: column;
}

/* hero */

.hero {
  border-block-end: 1px solid var(--accent-dark);
}

.hero-inner {
  max-inline-size: 40rem;
  padding: 2.25rem 1rem;
  margin-inline: auto;

  & > * + * {
    margin-block-start: 1.5rem;
  }
}

.hero-inner p {
  font-size: clamp(0.875rem, 0.25rem + 1.25vw, 1rem);
  color: var(--text-2);
}

/* hero home */

.hero.home {
  background: linear-gradient(var(--background), var(--accent-dark));
}

.hero.home .hero-inner {
  padding-block: 8rem;
  text-align: center;

  & > * + * {
    margin-block-start: 1rem;
  }
}

.hero.home h1 {
  font-size: clamp(2.25rem, -0.25rem + 5vw, 2.75rem);
}

.hero.home h2 {
  font-size: clamp(2.25rem, 0.375rem + 3.75vw, 2.625rem);
  color: var(--text-2);
}

/* container */

.container {
  margin-inline: auto;
  inline-size: 100%;
  max-inline-size: 40rem;
  padding: 3rem 1rem;
  line-height: 1.625;

  > * + * {
    margin-block-start: 1.5em;
  }
}

.container a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;

  &:is(:hover, :focus-visible) {
    color: var(--text-2);
  }
}

.container hr {
  all: unset;
  display: block;
  inline-size: 100%;
  block-size: 1px;
  background-color: var(--accent-dark);
  margin-block: 2.25rem;
}

.container ul {
  list-style: disc;
}

.container :is(ul, ol) {
  margin-block-start: 1.25em;
  padding-inline-start: 1lh;

  ::marker {
    color: var(--text-3);
  }
}

.container * + li {
  margin-block-start: 1.25em;
}

/* newsletter container */

.newsletter {
  flex: 1;
  background: linear-gradient(var(--secondary), var(--background));
  border-block-start: 1px solid var(--accent-dark);
  font-size: clamp(0.875rem, 0.25rem + 1.25vw, 1rem);
  text-align: center;
}

.newsletter h2 {
  font-size: clamp(1.375rem, -0.5rem + 3.75vw, 1.75rem);
}

.newsletter a {
  font-weight: 600;
  text-decoration: underline;
}

.newsletter form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

input {
  font: inherit;
  background-color: var(--background);
  border: 1px solid var(--accent);
  color: var(--text);

  &::placeholder {
    color: var(--text-3);
  }
}

input[type="email"],
input[type="text"] {
  padding: 0.75em;
  inline-size: 100%;
}

input[type="submit"] {
  grid-column: 1 / span 2;
  padding: 0.75em 1.75em;
  cursor: pointer;

  &:is(:hover, :focus-visible) {
    color: var(--text-2);
    background-color: var(--accent);
  }
}

.newsletter altcha-widget {
  grid-column: 1 / span 2;
}

.newsletter .altcha-main {
  color: var(--text-2);
  background-color: var(--background);
  border-color: var(--accent);
  border-radius: 0;
  padding: 0.75em;
  max-inline-size: 100%;
  inline-size: 100%;

  .altcha-checkbox-wrap {
    gap: 0.75em;
  }
}

/* footer */

footer {
  font-size: 0.875rem;
  color: var(--text-2);
  border-block-start: 1px solid var(--accent-dark);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 1rem;
  max-inline-size: 70rem;
  margin-inline: auto;
  inline-size: 100%;
  line-height: 1.625;
}

footer a {
  color: inherit;
  font-weight: 600;

  &:is(:hover, :focus-visible) {
    color: var(--text);
  }
}

footer p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* mobile */

@media screen and (max-width: 40rem) {
  header {
    padding-block: 1.25rem;
  }

  .newsletter form {
    grid-template-columns: 1fr;
  }

  .newsletter input[type="submit"] {
    grid-column: unset;
  }

  .newsletter altcha-widget {
    grid-column: unset;
  }

  .footer-inner {
    flex-direction: column;
  }
}