:root {
  color-scheme: dark;
  --ink: #000000;
  --paper: #f7f6f3;
  --muted: #8f8b88;
  --surface: rgb(255 255 255 / 5.5%);
  --surface-hover: rgb(255 255 255 / 7.5%);
  --line: rgb(255 255 255 / 15%);
  --line-strong: rgb(255 255 255 / 38%);
  --danger: #e7a4a4;
  --duration-fast: 150ms;
  --duration: 350ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 14px;
  left: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-160%);
  transition: transform var(--duration) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.site-shell {
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(32px, 5vw, 80px) clamp(24px, 6vw, 96px);
  place-items: center;
}

.hero {
  display: grid;
  width: min(100%, 1180px);
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  transform: translateY(clamp(-10px, -1.2vh, -4px));
}

.site-header {
  display: flex;
  justify-content: center;
}

.site-signature {
  position: fixed;
  z-index: 2;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  opacity: 0;
  transform: translate(-50%, 4px);
  animation: signature-in 500ms 420ms var(--ease) forwards;
}

.site-signature a {
  position: relative;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: #5e5a57;
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--duration) var(--ease);
}

.site-signature a::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.site-signature span {
  color: #817c78;
  font-weight: 600;
}

.site-signature a:hover,
.site-signature a:focus-visible {
  color: #aaa5a1;
}

.site-signature a:hover::after,
.site-signature a:focus-visible::after {
  opacity: 0.55;
  transform: scaleX(1);
}

.site-signature a:focus-visible {
  border-radius: 3px;
  outline: 1px solid #817c78;
  outline-offset: 5px;
}

.brand-logo {
  display: block;
  width: clamp(210px, 20vw, 300px);
  height: auto;
}

.hero__copy {
  display: grid;
  width: 100%;
  min-width: 0;
  justify-items: center;
  margin-top: clamp(38px, 5.5vh, 58px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(21px, 6.2vw, 66px);
  font-weight: 560;
  letter-spacing: -0.057em;
  line-height: 1;
  white-space: nowrap;
}

.hero__subtitle {
  margin: clamp(12px, 1.8vh, 18px) 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 430;
  letter-spacing: -0.022em;
  line-height: 1.35;
}

.newsletter-form {
  display: grid;
  width: min(100%, 900px);
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  margin-top: clamp(34px, 5vh, 52px);
}

.newsletter-form__intro {
  display: flex;
  width: 100%;
  max-width: 900px;
  min-height: 45px;
  margin: 0 auto clamp(20px, 2.6vh, 26px);
  align-items: center;
  justify-content: center;
  color: #aaa5a1;
  font-size: 15px;
  letter-spacing: -0.012em;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.newsletter-form__field {
  --pointer-x: 50%;
  --pointer-y: 50%;
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(100%, 640px);
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 4%),
    0 18px 56px -36px rgb(255 255 255 / 18%);
  transition:
    border-color var(--duration) var(--ease),
    background-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.newsletter-form__field::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    230px circle at var(--pointer-x) var(--pointer-y),
    rgb(255 255 255 / 14%),
    transparent 62%
  );
  content: "";
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  pointer-events: none;
}

.newsletter-form__field:hover,
.newsletter-form__field:focus-within {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 8%),
    0 24px 72px -38px rgb(255 255 255 / 32%);
  transform: translateY(-2px);
}

.newsletter-form__field:hover::before,
.newsletter-form__field:focus-within::before {
  opacity: 1;
}

.newsletter-form__field.is-error {
  border-color: rgb(231 164 164 / 68%);
  animation: field-shake 280ms var(--ease);
}

.newsletter-form input[type="email"] {
  min-width: 0;
  padding: 0 26px;
  border: 0;
  outline: 0;
  color: var(--paper);
  background: transparent;
  font-size: 17px;
  letter-spacing: -0.012em;
}

.newsletter-form input[type="email"]::placeholder {
  color: #777370;
  transition: color var(--duration) var(--ease);
}

.newsletter-form__field:focus-within input::placeholder {
  color: #96918d;
}

.newsletter-form button {
  position: relative;
  display: grid;
  min-width: 170px;
  min-height: 54px;
  margin: 5px;
  padding: 0;
  overflow: hidden;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    transform var(--duration-fast) ease-out;
}

.newsletter-form button:hover {
  background: #ffffff;
  box-shadow: 0 8px 28px -14px rgb(255 255 255 / 58%);
}

.newsletter-form button:active {
  transform: scale(0.975);
}

.newsletter-form button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.newsletter-form button:disabled {
  cursor: default;
}

.newsletter-form button[data-state="loading"] {
  cursor: wait;
}

.button-state {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 650;
  opacity: 0;
  filter: blur(2px);
  transform: translateY(4px);
  transition:
    opacity var(--duration-fast) ease-in-out,
    filter var(--duration-fast) ease-in-out,
    transform var(--duration-fast) ease-in-out;
  pointer-events: none;
}

.button-motion {
  --magnet-x: 0px;
  --magnet-y: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translate3d(var(--magnet-x), var(--magnet-y), 0);
  transition: transform 180ms var(--ease);
  will-change: transform;
}

.button-label {
  display: grid;
  height: 1.2em;
  overflow: hidden;
  line-height: 1.2;
}

.button-label__text {
  grid-area: 1 / 1;
  transition: transform 380ms var(--ease);
}

.button-label__text--next {
  transform: translateY(115%);
}

.button-arrow-viewport {
  position: relative;
  width: 18px;
  height: 18px;
  overflow: hidden;
}

.newsletter-form button:not([data-state]) .button-state--idle,
.newsletter-form button[data-state="idle"] .button-state--idle,
.newsletter-form button[data-state="loading"] .button-state--loading,
.newsletter-form button[data-state="success"] .button-state--success {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.button-arrow,
.button-spinner,
.button-check {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.button-arrow {
  position: absolute;
  inset: 0;
  transition: transform 420ms var(--ease);
}

.button-arrow--next {
  transform: translate3d(-115%, 115%, 0);
}

.newsletter-form button:focus-visible .button-label__text:not(.button-label__text--next) {
  transform: translateY(-115%);
}

.newsletter-form button:focus-visible .button-label__text--next {
  transform: translateY(0);
}

.newsletter-form button:focus-visible .button-arrow--current {
  transform: translate3d(115%, -115%, 0);
}

.newsletter-form button:focus-visible .button-arrow--next {
  transform: translate3d(0, 0, 0);
}

@media (hover: hover) and (pointer: fine) {
  .newsletter-form button:hover .button-label__text:not(.button-label__text--next) {
    transform: translateY(-115%);
  }

  .newsletter-form button:hover .button-label__text--next {
    transform: translateY(0);
  }

  .newsletter-form button:hover .button-arrow--current {
    transform: translate3d(115%, -115%, 0);
  }

  .newsletter-form button:hover .button-arrow--next {
    transform: translate3d(0, 0, 0);
  }
}

.button-spinner {
  animation: spin 700ms linear infinite;
}

.button-spinner circle {
  stroke-dasharray: 28 16;
}

.button-check path {
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  animation: draw-check 350ms var(--ease) forwards;
}

.consent {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 4px;
  align-items: flex-start;
  justify-self: center;
  gap: 9px;
  color: #817c78;
  font-size: 12px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.consent input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.consent__control {
  position: relative;
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid #65605d;
  border-radius: 6px;
  transition:
    border-color var(--duration-fast) var(--ease),
    background-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}

.consent__control::after {
  position: absolute;
  inset: -12px;
  content: "";
}

.consent__control svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.consent__control path {
  stroke-dasharray: 17;
  stroke-dashoffset: 17;
  transition: stroke-dashoffset 350ms var(--ease);
}

.consent:hover .consent__control {
  border-color: #918b87;
}

.consent input:focus-visible + .consent__control {
  border-color: var(--paper);
  box-shadow: 0 0 0 3px rgb(247 246 243 / 14%);
}

.consent input:checked + .consent__control {
  border-color: var(--paper);
  background: var(--paper);
}

.consent input:checked + .consent__control path {
  stroke-dashoffset: 0;
}

.form-message {
  width: min(calc(100% - 8px), 640px);
  margin: 5px 4px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
  text-align: left;
  animation: message-in var(--duration) var(--ease);
}

.form-message:not(.is-error) {
  text-align: center;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message[hidden] {
  display: none;
}

.newsletter-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.newsletter-turnstile {
  width: min(100%, 640px);
  min-height: 0;
  margin-top: 2px;
}

.newsletter-turnstile:empty {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(12px);
  animation: reveal 500ms var(--ease) forwards;
}

.reveal--1 {
  animation-delay: 80ms;
}

.reveal--2 {
  animation-delay: 140ms;
}

.reveal--3 {
  animation-delay: 200ms;
}

.reveal--4 {
  animation-delay: 270ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes field-shake {
  25% {
    transform: translateX(6px);
  }

  50% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes signature-in {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 720px) {
  .site-shell {
    padding: 30px 24px;
  }

  .hero {
    transform: translateY(-6px);
  }

  .brand-logo {
    width: clamp(190px, 55vw, 240px);
  }

  .hero__copy {
    margin-top: 36px;
  }

  .hero h1 {
    font-size: clamp(21px, 6.35vw, 38px);
  }

  .hero__subtitle {
    max-width: 430px;
    margin-top: 12px;
    font-size: 16px;
  }

  .newsletter-form {
    margin-top: 32px;
  }

  .newsletter-form__intro {
    max-width: min(330px, calc(100vw - 48px));
    min-height: 58px;
    margin-bottom: 18px;
    font-size: 13px;
  }

  .newsletter-form__field {
    min-height: 62px;
  }

  .newsletter-form input[type="email"] {
    padding: 0 20px;
    font-size: 16px;
  }

  .newsletter-form button {
    min-width: 154px;
    min-height: 50px;
  }
}

@media (max-width: 520px) {
  .newsletter-form__field {
    min-height: 56px;
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .newsletter-form button {
    min-width: 46px;
    width: 46px;
    min-height: 46px;
    margin: 4px;
  }

  .button-label {
    display: none;
  }

  .button-motion,
  .button-state--idle {
    gap: 0;
  }
}

@media (max-width: 340px) {
  .newsletter-form__intro {
    font-size: 11.5px;
    letter-spacing: -0.02em;
  }
}

@media (max-height: 680px) and (min-width: 721px) {
  .brand-logo {
    width: 220px;
  }

  .hero__copy {
    margin-top: 30px;
  }

  .newsletter-form {
    margin-top: 28px;
  }

  .newsletter-form__intro {
    margin-bottom: 16px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
