:root {
  --ink: rgba(242, 238, 226, 0.92);
  --ink-dim: rgba(242, 238, 226, 0.55);
  --veil: rgba(10, 18, 15, 0.42);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #2f4a3f;
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* full-bleed image */
.stage {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.stage picture, .still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.still {
  display: block;
  object-fit: cover;
  object-position: 50% 45%;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.still.loaded { opacity: 1; }

/* the button: hidden until the visitor moves / touches */
.peel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 6px));
  margin: 0;
  padding: 10px 14px;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), letter-spacing 1.1s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.peel::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
  opacity: 0.6;
}

.peel.show,
.peel:focus-visible,
.no-js .peel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  letter-spacing: 0.36em;
}

.peel:hover::after,
.peel:focus-visible::after { transform: scaleX(1); }
.peel:focus { outline: none; }

/* the sheet: email capture */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 24px;
  background: var(--veil);
  -webkit-backdrop-filter: blur(6px) saturate(0.9);
  backdrop-filter: blur(6px) saturate(0.9);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

.sheet[hidden] { display: none; }
.sheet.open { opacity: 1; }

.sheet-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px) + 6px);
  right: 18px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--ink-dim);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sheet-close:hover, .sheet-close:focus-visible { color: var(--ink); outline: none; }

/* title sits exactly where the button was; the field appears beneath it */
.sheet-form {
  width: min(420px, 100%);
  margin-top: calc(50vh - 8px);
  text-align: center;
  transition: filter 1.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1), transform 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* after a successful signup: everything softens, blurs and goes */
.sheet-form.dissolve {
  filter: blur(10px);
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.sheet-title {
  margin: 0 0 26px;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.36em;
  text-transform: lowercase;
  color: var(--ink);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ink-dim);
  transition: border-color 0.4s var(--ease);
}
.field:focus-within { border-color: var(--ink); }

#email {
  flex: 1;
  min-width: 0;
  padding: 12px 8px;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-align: center;
  outline: none;
  caret-color: var(--ink);
}
#email::placeholder { color: var(--ink-dim); }
#email:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-out;
}

.go {
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  color: var(--ink-dim);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.4s var(--ease), transform 0.5s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.go:hover, .go:focus-visible { color: var(--ink); transform: translateX(3px); outline: none; }
.go[disabled] { opacity: 0.4; cursor: default; transform: none; }

.sheet-note {
  min-height: 1.4em;
  margin: 16px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

/* utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .still, .peel, .peel::after, .sheet, .sheet-form, .go, .field { transition: none; }
}

@media (max-width: 480px) {
  .peel, .sheet-title { font-size: 11.5px; }
  #email { font-size: 16px; } /* prevents iOS zoom on focus */
}
