:root {
  --paper: #f2efe6;
  --paper-warm: #e8dfcc;
  --ink: #271812;
  --muted: #665746;
  --firebird: #9f251f;
  --firebird-dark: #641610;
  --linework: rgba(119, 41, 34, 0.56);
  --linework-soft: rgba(119, 41, 34, 0.24);
  --sketch-underline: url("data:image/svg+xml,%3Csvg width='260' height='8' viewBox='0 0 260 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.1 C 34 4.2, 58 6.3, 91 5.1 S 151 3.9, 191 5.2 S 230 6.4, 259 4.9' fill='none' stroke='rgba(119,41,34,0.32)' stroke-width='1.25' stroke-linecap='round'/%3E%3Cpath d='M3 6.2 C 45 5.6, 73 6.9, 113 5.8 S 173 4.9, 213 5.9 S 239 6.5, 257 5.7' fill='none' stroke='rgba(119,41,34,0.16)' stroke-width='0.75' stroke-linecap='round'/%3E%3C/svg%3E");
  --sketch-box: url("data:image/svg+xml,%3Csvg width='260' height='64' viewBox='0 0 260 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8 C 52 5, 104 6, 154 7 S 222 5, 255 8 C 258 21, 257 39, 255 57 C 200 59, 144 58, 91 57 S 30 60, 5 56 C 2 40, 3 22, 5 8 Z' fill='none' stroke='rgba(119,41,34,0.24)' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 10 C 48 8, 107 9, 151 9 S 218 8, 253 10 C 255 24, 254 40, 253 54 C 210 56, 153 55, 96 55 S 35 57, 7 54 C 5 40, 5 23, 7 10 Z' fill='none' stroke='rgba(119,41,34,0.12)' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --line: rgba(100, 22, 16, 0.22);
  --panel: rgba(239, 230, 204, 0.94);
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --organic-serif: "Fraunces", Cochin, "Iowan Old Style", Georgia, serif;
  --title-serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: Optima, Candara, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    url("assets/firebird%20background%20NEW.png") center top / cover no-repeat,
    linear-gradient(180deg, var(--paper) 0%, #eee9dc 58%, var(--paper-warm) 100%),
    var(--paper);
}

.home {
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px;
}

h2 {
  font-family: var(--organic-serif);
  letter-spacing: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.15rem;
  color: #fff8ec;
  background: var(--firebird);
  border: 1px solid var(--firebird-dark);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(100, 22, 16, 0.18);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  background: var(--firebird-dark);
  box-shadow: 0 20px 42px rgba(100, 22, 16, 0.24);
  transform: translateY(-1px);
}

.text-link {
  position: fixed;
  left: 50%;
  bottom: 52px;
  z-index: 10;
  padding: 0 0 3px;
  color: rgba(119, 41, 34, 0.56);
  background: transparent;
  border: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  transform: translateX(-50%);
  cursor: pointer;
}

.text-link::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 5px;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='8' viewBox='0 0 120 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.2 C 18 3.8, 30 6.4, 47 4.8 S 78 3.9, 119 5.1' fill='none' stroke='rgba(119,41,34,0.38)' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M4 6.1 C 25 5.1, 38 6.8, 62 5.6 S 91 4.8, 116 5.8' fill='none' stroke='rgba(119,41,34,0.2)' stroke-width='0.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.text-link:hover {
  color: rgba(119, 41, 34, 0.78);
}

.text-link:hover::after {
  opacity: 0.86;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: rgba(39, 24, 18, 0.18);
  backdrop-filter: blur(4px);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100svh - 48px);
  overflow: auto;
  padding: 36px 36px 32px;
  background:
    linear-gradient(180deg, rgba(248, 246, 236, 0.96), rgba(239, 232, 214, 0.96)),
    var(--paper);
  border: 0;
  border-radius: 7px 10px 8px 6px;
  box-shadow: 0 22px 62px rgba(39, 24, 18, 0.14);
}

.modal-panel::before {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(119, 41, 34, 0.18);
  border-radius: 6px 9px 7px 5px;
  transform: rotate(-0.25deg);
}

.modal-panel::after {
  position: absolute;
  inset: 13px 9px 8px 14px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(119, 41, 34, 0.08);
  border-radius: 9px 5px 8px 10px;
  transform: rotate(0.18deg);
}

.modal-panel > :not(.modal-logo) {
  position: relative;
  z-index: 1;
}

.modal-logo {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 0;
  width: 92px;
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: multiply;
  filter: saturate(0.8) contrast(1.05);
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, rgba(0, 0, 0, 0.72) 68%, transparent 78%);
  mask-image: radial-gradient(circle, #000 0 58%, rgba(0, 0, 0, 0.72) 68%, transparent 78%);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--linework);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  font-family: var(--organic-serif);
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.close-button:hover {
  border-color: var(--linework-soft);
}

.modal-panel h2 {
  margin: 0 0 1.35rem;
  color: var(--linework);
  font-size: 1.68rem;
  font-weight: 320;
  letter-spacing: -0.032em;
}

.contact-form {
  display: grid;
  gap: 1.05rem;
}

.contact-form label {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 0.38rem;
  color: rgba(119, 41, 34, 0.62);
  font-family: var(--organic-serif);
  font-size: 0.98rem;
  font-weight: 320;
  letter-spacing: -0.024em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(119, 41, 34, 0.2);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 252, 240, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
  font: 1.02rem/1.5 var(--organic-serif);
}

.contact-form input {
  height: 48px;
  padding: 0.25rem 0.8rem;
}

.contact-form textarea {
  min-height: 138px;
  padding: 0.8rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus,
.close-button:focus,
.button:focus,
.text-link:focus,
.submit-link:focus {
  outline: 2px solid rgba(119, 41, 34, 0.22);
  outline-offset: 2px;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--linework);
  font-family: var(--organic-serif);
  font-weight: 350;
  letter-spacing: -0.018em;
}

.submit-link {
  position: relative;
  justify-self: start;
  padding: 0 0 3px;
  color: var(--linework);
  background: transparent;
  border: 0;
  font-family: var(--organic-serif);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.submit-link::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 5px;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='8' viewBox='0 0 120 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.2 C 18 3.8, 30 6.4, 47 4.8 S 78 3.9, 119 5.1' fill='none' stroke='rgba(119,41,34,0.38)' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M4 6.1 C 25 5.1, 38 6.8, 62 5.6 S 91 4.8, 116 5.8' fill='none' stroke='rgba(119,41,34,0.2)' stroke-width='0.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.submit-link:hover {
  color: rgba(119, 41, 34, 0.78);
}

.submit-link:disabled {
  opacity: 0.48;
  cursor: wait;
}

@media (max-width: 720px) {
  body {
    background-image:
      url("assets/firebird%20background%20mobile%20NEW.png"),
      linear-gradient(180deg, var(--paper) 0%, #eee9dc 58%, var(--paper-warm) 100%);
    background-position: center top;
    background-size: cover;
  }

  .modal-panel {
    padding: 28px 20px 22px;
  }

  .contact-form label {
    grid-template-columns: 1fr;
  }

  .text-link {
    bottom: max(132px, calc(env(safe-area-inset-bottom) + 116px));
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

@media (max-width: 720px) and (max-height: 680px) {
  body {
    background-size: cover;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  body {
    background-size: auto 72svh;
  }
}
