:root {
  --milk: #FFF8EE;
  --plum: #3A2233;

  --sun-pale: #FFF0BD;
  --sun-gold: #FFC95C;
  --sun-amber: #FF9F4A;
  --sun-coral: #FF7C5C;
  --sun-rose: #F4647C;

  /* a very large disc, so the visible crown reads as a horizon */
  --sun-d: clamp(640px, 165vw, 2400px);
  --serif: "Sorts Mill Goudy", "Goudy Old Style", "Iowan Old Style", Palatino, Georgia, serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--milk);
  color: var(--plum);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
  margin: 0;
  text-wrap: balance;
}

/* Sky */

.sky {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(1.75rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(130% 62% at 50% 100%, rgba(255, 164, 120, 0.5) 0%, rgba(255, 176, 140, 0.2) 45%, rgba(255, 190, 160, 0) 72%),
    radial-gradient(55% 48% at 0% 100%, rgba(198, 132, 224, 0.3) 0%, rgba(198, 132, 224, 0) 70%),
    radial-gradient(55% 48% at 100% 100%, rgba(255, 110, 150, 0.3) 0%, rgba(255, 110, 150, 0) 70%),
    linear-gradient(180deg, #FFFAF2 0%, var(--milk) 42%, #FFEBDC 100%);
}

/* film grain over sky and sun, under the content */
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: soft-light;
  opacity: 0.55;
  pointer-events: none;
}

/* Sun: anchored to the block it rises behind, so its rim always sits just above that block */

.horizon {
  position: relative;
}

.sun {
  position: absolute;
  z-index: -2;
  left: 50%;
  top: -3.5rem;
  width: var(--sun-d);
  height: var(--sun-d);
  transform: translateX(-50%);
  animation: sunrise 5s cubic-bezier(0.16, 0.7, 0.2, 1) both;
}

/* atmosphere: a soft halo hugging the rim */
.sun::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 186, 120, 0) 0%,
    rgba(255, 186, 120, 0) 78%,
    rgba(255, 190, 120, 0.7) 80.6%,
    rgba(255, 160, 124, 0.34) 86%,
    rgba(255, 138, 150, 0.12) 93%,
    rgba(255, 138, 150, 0) 100%
  );
  animation: breathe 9s ease-in-out 5s infinite alternate;
}

.sun-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    var(--sun-pale) 0,
    var(--sun-gold) 4rem,
    var(--sun-amber) 13rem,
    var(--sun-coral) 24rem,
    var(--sun-rose) 42rem
  );
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 18px 36px -10px rgba(255, 250, 225, 0.85),
    0 0 48px rgba(255, 205, 130, 0.65);
}

@keyframes sunrise {
  from {
    transform: translate(-50%, 15rem);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes breathe {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.6;
  }
}

/* Masthead */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.sigil {
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: var(--plum);
  stroke-width: 1.1;
}

.sigil circle:first-child {
  fill: var(--sun-amber);
  stroke: none;
}

.wordmark {
  font-size: 1.375rem;
  letter-spacing: 0.14em;
  line-height: 1.2;
  /* optical centering: trailing letter-space */
  padding-left: 0.14em;
}

/* Column */

.column {
  width: 100%;
  max-width: 60rem;
  margin-top: clamp(2.5rem, 9vh, 6rem);
  text-align: center;
}

h1 {
  font-size: clamp(2.5rem, 13.5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h1 span {
  display: block;
  text-wrap: wrap;
}

.lede {
  max-width: 31rem;
  margin: 1.5rem auto 0;
  font-size: 1.1875rem;
}

.signup {
  max-width: 35rem;
  margin: clamp(3rem, 11vh, 7rem) auto 0;
}

h2 {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
}

/* Form */

.line-form {
  margin-top: 1.25rem;
}

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

.fields {
  display: grid;
  gap: 0.875rem;
  text-align: left;
}

.field label {
  display: block;
  margin: 0 0 0.25rem 1.25rem;
  font-size: 1rem;
  line-height: 1.4;
}

.field input {
  display: block;
  width: 100%;
  min-height: 3.375rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(58, 34, 51, 0.3);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 12px 28px -18px rgba(58, 34, 51, 0.5);
  color: var(--plum);
  font: inherit;
  font-size: 1.125rem;
  line-height: 1.3;
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.field input:hover,
.field input:focus {
  border-color: var(--plum);
  background: rgba(255, 252, 247, 0.94);
}

button {
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.125rem;
  padding: 0.5rem 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--plum);
  box-shadow: 0 14px 30px -14px rgba(58, 34, 51, 0.75);
  color: var(--milk);
  font: inherit;
  font-size: 1.1875rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background: #4B2C42;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -14px rgba(58, 34, 51, 0.8);
}

button:active {
  transform: translateY(0);
}

button[disabled] {
  cursor: progress;
  opacity: 0.75;
  transform: none;
}

.field input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}

.form-note {
  margin-top: 0.875rem;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.5;
}

.form-error {
  margin-top: 0.875rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--plum);
  border-radius: 1.25rem;
  background: var(--milk);
  font-size: 1rem;
  line-height: 1.5;
}

/* Confirmation */

.in-line {
  margin-top: 1.25rem;
  padding: 1.5rem 1.5rem 1.625rem;
  border: 1px solid rgba(58, 34, 51, 0.3);
  border-radius: 1.75rem;
  background: rgba(255, 251, 244, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 24px 48px -28px rgba(58, 34, 51, 0.6);
  animation: settle 0.5s ease-out both;
  outline: none;
}

.in-line-title {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

[hidden] {
  display: none !important;
}

/* Fine print */

.fine-print {
  margin-top: auto;
  padding-top: clamp(3rem, 9vh, 5.5rem);
  max-width: 30rem;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.5;
}

/* Thanks page */

.column--thanks {
  margin-top: clamp(4rem, 16vh, 9rem);
}

.thanks-body {
  margin-top: clamp(3rem, 11vh, 7rem);
  padding-top: 0.5rem;
}

.column--thanks a {
  color: inherit;
  text-underline-offset: 0.2em;
}

@media (min-width: 40rem) {
  h1 {
    font-size: clamp(3.4rem, 8.6vw, 5.5rem);
  }

  h1 span {
    white-space: nowrap;
  }

  .fields {
    grid-template-columns: 1fr 1fr;
  }

  button {
    width: auto;
    min-width: 14rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sun,
  .sun::before,
  .in-line {
    animation: none;
  }

  .field input,
  button {
    transition: none;
  }

  button:hover {
    transform: none;
  }
}
