@font-face {
  font-family: "Akzidenz Grotesk";
  src: url("fonts/AkzidenzGrotesk-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Tusker";
  src: url("fonts/TuskerPro-6700Bold.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
:root {
  --color-dark-green: #00281e;
}
html,
body {
  margin: 0;
  background-color: #faf5f0;
  color: var(--color-dark-green);
  font-family: "Manrope", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.3;
  letter-spacing: 0.045em;
}

p{
  margin: 0 0 10px;
  padding: 0;
  max-width: 750px;
}

ul{
  margin: 0 0 10px 2vw;
  padding: 0;
  max-width: 750px;
}



/* The font's own bullet character, not the browser's larger drawn disc, so
   plain text matches the bullet the canvas draws */
ul {
  list-style-type: "• ";
}

main {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.bold {
  font-weight: 800;
}

h1 {
  font-family: "Tusker";
  font-size: clamp(52px, 5vw, 4vw);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
}

.content {
  min-height: calc(100svh - 4vw);
  
  position: sticky;
  top: 2vw;
  margin: 2vw;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
}

.content section, .source {
  display: flex;
  flex-direction: column;
  gap: 2vw;
}

.sponsor{
  display: flex;
  flex-direction: row;
}

.sponsor span{
  width: 150px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
    color: color-mix(in srgb, var(--color-dark-green) 60%, transparent);

}

.sponsor svg{
  align-items: start;
  fill: var(--color-dark-green);
  height: 26px;
}

.content,
.canvas-wrap {
  flex: 1;
  min-width: 0;
}

.canvas-wrap {
  background-color: var(--color-dark-green);
  color: #fff;
  min-height: 100svh;
}
canvas {
  width: 100%;
  display: block;
  /* Let touch drags scroll; taps are handled by the script */
  touch-action: manipulation;
}
#source {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Plain text view: hide the canvas and show #source as ordinary, selectable
   text, inset by the same margin the canvas draws it with */
.canvas-wrap.is-text canvas {
  display: none;
}
.canvas-wrap.is-text #source {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  padding: 2vw;
}
#source ::selection {
  background: #0AAFA0;
  color: var(--color-dark-green);
}

/* Zero-height and sticky, so the switch stays in the panel's corner while
   scrolling without pushing the canvas down */
.view-toggle {
  position: sticky;
  top: 20px;
  height: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}
.view-toggle button {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--color-dark-green);
  color: #faf5f0;
  font-family: inherit;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.075em;
  cursor: pointer;
}
.view-toggle button:focus-visible {
  outline: 2px solid #ffbe28;
  outline-offset: 2px;
}
.view-toggle-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 30%, transparent);
  transition: background-color 200ms ease;
}
.view-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #faf5f0;
  transition: transform 200ms ease;
}
.view-toggle [aria-checked="true"] .view-toggle-track {
  background: #f56423;
}
.view-toggle [aria-checked="true"] .view-toggle-track::after {
  transform: translateX(12px);
}


form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
form input,
form button {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: "Tusker", sans-serif;
  font-size: clamp(52px, 3vw, 5vw);
  line-height: 0.6;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-dark-green);

  transition: all 300ms ease;
}
/* Chrome won't let a text input's line box be shorter than the font's
   "normal" line height (~1.75em for Tusker), so pin the height to match */
form input {
  width: 100%;
  height: 1em;
  outline: none;
  caret-color: var(--color-dark-green);
}
form input::placeholder {
  color: color-mix(in srgb, var(--color-dark-green) 30%, transparent);
  opacity: 1;
}

form input:focus {
  margin: 20px 0;
  box-shadow: 0 1px 0 0 var(--color-dark-green);
}

form button {
  cursor: pointer;
}
form button:hover,
form button:focus-visible {
  color: #f56423;
  outline: none;
}

.form-message {
  margin: 12px 0 0;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  color: var(--color-dark-green);
}

.form-message.is-error {
  color: #f56423;
}

/* Narrow screens: one column, the content above the text */
@media (max-width: 1000px) {
  main {
    flex-direction: column;
    align-items: stretch;
    gap: 64px;
  }
  .content {
    height: auto;
    position: static;
    gap: 120px;
    margin: 4vw;
  }
  .content,
  .canvas-wrap {
    flex: none;
  }
  .sponsor svg {
    max-width: 100%;
    height: 24px;
  }
  .canvas-wrap.is-text #source {
    padding: 4vw;
  }
}
