@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealDashes {
  0% {
    stroke-dashoffset: 80;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

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

html {
  height: 100%;
}

body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  line-height: 1.7;
  color: #2c2c2c;
  background: #faf9f7;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

header {
  width: 100%;
  padding: 2rem 2rem 0;
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.1s forwards;
}

nav a {
  color: #888;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

nav a:hover {
  color: #2c2c2c;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.3s forwards;
}

p {
  margin-bottom: 0.5rem;
}

.dim {
  color: #aaa;
  font-style: italic;
  font-size: 0.7em;
}

.confirmation,
.error {
  padding: 4rem 0;
}

.confirmation p:first-child,
.error p:first-child {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error p:first-child {
  color: #c44;
}

form {
  margin-top: 2.5rem;
  width: 100%;
}

textarea,
input[type="email"] {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: #2c2c2c;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  outline: none;
  text-align: center;
}

textarea {
  resize: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem;
  background: #fff;
  text-align: left;
}

textarea:focus,
input[type="email"]:focus {
  border-color: #888;
}

input::placeholder {
  color: #bbb;
  font-style: italic;
}

button {
  font-family: inherit;
  font-size: 0.95rem;
  background: transparent;
  color: #2c2c2c;
  border: 1px solid #2c2c2c;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

button svg {
  flex-shrink: 0;
}

.plane-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.plane {
  position: relative;
  z-index: 1;
}

.contrail {
  position: absolute;
  right: 14px;
  top: 55%;
  transform: translateY(-50%) rotate(-30deg);
  transform-origin: right center;
  width: 28px;
  height: 14px;
  opacity: 0;
  pointer-events: none;
}

.contrail path {
  stroke-dashoffset: 80;
}

button.sending {
  opacity: 1;
  cursor: wait;
}

button.sending .contrail {
  opacity: 1;
}

button.sending .contrail path {
  animation: revealDashes 3s ease-out infinite;
}

button:hover {
  background: #2c2c2c;
  color: #faf9f7;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button:disabled:hover {
  background: transparent;
  color: #2c2c2c;
}

footer {
  width: 100%;
  padding: 2rem;
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.5s forwards;
}

footer p {
  color: #bbb;
  font-size: 0.8rem;
  font-style: italic;
}

footer a {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #2c2c2c;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.modal-content {
  background: #faf9f7;
  padding: 3rem 2.5rem;
  border-radius: 8px;
  text-align: center;
  max-width: 380px;
  margin: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-content p:first-child {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
