/* Turncloak theme. Sizes are from the 1920px comp. */

@font-face {
  font-family: 'EB Garamond';
  src: url('/assets/fonts/eb-garamond-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink:   #000;
  --paper: #F8F4EC;
  --blood: #FF1717;
  --gutter: clamp(12px, 1.25vw, 24px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'EB Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.hero {
  position: relative;
  isolation: isolate;
  height: 78.125vw;
  min-height: 420px;
  padding-top: 5.5vw;
  text-align: center;
}

/* Crushes the photo's blacks, then fades into the page */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('/assets/hero.jpg') 39.2% 100% / max(127.6vw, 628px) auto no-repeat;
  filter: contrast(1.3) brightness(.85);
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 14%;
  background: linear-gradient(transparent, var(--ink));
}

.hero h1 { font-size: 0; }

.hero h1 img {
  display: block;
  width: 89.4vw;
  height: auto;
  margin: 0 auto;
  transform: translateX(.85vw);
}

.tagline {
  margin-top: max(2.35vw, 12px);
  font-size: max(2.8vw, 16px);
  line-height: 1.2;
  color: var(--ink);
}

/* 15 columns wide. Each act's board and caption sit on whole squares. */
.story { --cols: 15; --rows: 15; --w: calc(100vw / var(--cols)); --h: calc(var(--w) * 1.36);
  position: relative; height: calc(var(--h) * var(--rows)); overflow: clip; background: #000; }
.grid { position: absolute; inset: 0; }
/* Veined like marble: a soft darkening at the edges, cut apart by a hard black line */
.tile { position: absolute; width: var(--w); height: var(--h); opacity: .02;
  background-size: calc(var(--w) * 5) auto;
  box-shadow: inset 0 0 calc(var(--w) * .2) rgba(0, 0, 0, .5), inset 0 0 0 max(1px, calc(var(--w) * .012)) #000; }
.tile.light { background-color: #EDE6D1; background-image: url("/assets/vein-on-light.svg"); }
.tile.dark { background-color: #998263; background-image: url("/assets/vein-on-dark.svg"); }
.board { position: absolute; left: calc(var(--w) * var(--c)); top: calc(var(--h) * var(--r));
  width: calc(var(--w) * 8); height: calc(var(--h) * 4); }
.act:nth-of-type(1) { --c: 1; --r: 0; --cap: 10; }
.act:nth-of-type(2) { --c: 6; --r: 5; --cap: 1; }
.act:nth-of-type(3) { --c: 1; --r: 10; --cap: 10; }
.piece { position: absolute; width: var(--w); height: var(--h); display: grid; place-items: center; opacity: 0; will-change: transform, opacity; }
.piece img { height: 72%; width: auto; display: block; }
.blood { position: absolute; width: var(--w); height: var(--h); background: var(--blood); opacity: 0;
  box-shadow: inset 0 0 0 max(1px, calc(var(--w) * .012)) #000; }
.flash { position: absolute; width: var(--w); height: var(--h); opacity: 0; pointer-events: none; z-index: 1;
  box-shadow: 0 0 0 max(2px, calc(var(--w) * .025)) var(--blood), 0 0 calc(var(--w) * .45) var(--blood), inset 0 0 calc(var(--w) * .25) var(--blood); }
/* The lines of the neighbouring squares catch it too, fading outward */
.flash::before { content: ''; position: absolute; inset: calc(var(--h) * -1) calc(var(--w) * -1);
  background:
    repeating-linear-gradient(90deg, var(--blood) 0 max(1px, calc(var(--w) * .014)), transparent 0 var(--w)),
    repeating-linear-gradient(0deg, var(--blood) 0 max(1px, calc(var(--w) * .014)), transparent 0 var(--h));
  -webkit-mask: radial-gradient(closest-side, #000 35%, transparent);
  mask: radial-gradient(closest-side, #000 35%, transparent); }
.piece .traitor-piece { position: absolute; left: 50%; top: 50%; opacity: 0; }
.puff { position: absolute; width: var(--w); height: var(--h); opacity: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(closest-side, rgba(248, 244, 236, .55), rgba(248, 244, 236, .16) 55%, transparent); }
.caption { position: absolute; left: calc(var(--w) * var(--cap)); top: calc(var(--h) * var(--r));
  width: calc(var(--w) * 4); height: calc(var(--h) * 4);
  display: flex; flex-direction: column; justify-content: center; text-shadow: 0 0 12px #000; }
.caption span { color: var(--blood); font-size: 20px; }
.caption h2 { margin-top: 4px; font-size: max(2.8vw, 32px); font-weight: 400; line-height: 1.15; }
.caption p { margin-top: 10px; font-size: max(1.35vw, 19px); line-height: 1.35; color: rgba(248, 244, 236, .72); }
@media (max-width: 760px) {
  .story { --cols: 8; --rows: 24; }
  .act:nth-of-type(1) { --c: 0; --r: 3; }
  .act:nth-of-type(2) { --c: 0; --r: 11; }
  .act:nth-of-type(3) { --c: 0; --r: 19; }
  .caption { left: 16px; right: 16px; width: auto; top: calc(var(--h) * (var(--r) - 3)); height: calc(var(--h) * 3);
    justify-content: flex-end; padding-bottom: 12px; }
}

.waitlist {
  padding: max(5vw, 48px) 16px 0;
  text-align: center;
}

.waitlist form {
  max-width: 560px;
  margin: 0 auto;
}

.waitlist h2 {
  font-size: max(2.8vw, 32px);
  font-weight: 400;
  line-height: 1.2;
}

.waitlist [data-element="subheader"] {
  margin-top: 12px;
  font-size: 20px;
  line-height: 1.35;
  color: rgba(248, 244, 236, 0.75);
}

.formkit-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.formkit-input,
.formkit-submit {
  font: inherit;
  font-size: 18px;
  padding: 12px 16px;
  border-radius: 0;
}

.formkit-input {
  flex: 1 1 240px;
  min-width: 0;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(248, 244, 236, 0.5);
}

.formkit-input::placeholder { color: rgba(248, 244, 236, 0.6); }

.formkit-submit {
  flex: 0 1 auto;
  color: var(--ink);
  background: var(--blood);
  border: 1px solid var(--blood);
  cursor: pointer;
}

.formkit-submit:hover { background: var(--paper); border-color: var(--paper); }

.formkit-input:focus-visible,
.formkit-submit:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

.formkit-submit[data-active] { opacity: 0.6; }
.formkit-spinner { display: none; }

.formkit-alert {
  margin-top: 24px;
  list-style: none;
  font-size: 18px;
  color: var(--blood);
}

.formkit-alert:empty { display: none; }
.formkit-alert-success { color: var(--paper); }

.formkit-guarantee {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(248, 244, 236, 0.6);
}

.traitor {
  padding: max(5vw, 48px) 16px max(7vw, 64px);
  text-align: center;
}

.traitor img {
  display: block;
  width: max(4vw, 56px);
  height: auto;
  margin: 0 auto;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 8px var(--gutter) 32px;
  font-size: 16px;
  color: rgba(248, 244, 236, 0.6);
}

footer nav { display: flex; gap: 24px; }

/* Mirrors the wordmark at the top of the page */

.closer img {
  display: block;
  width: 89.4vw;
  height: auto;
  margin: 0 auto;
}
