/* ==========================================================================
   Simbla.io — not for everyone
   Concept: a closed door. Oxblood lacquer, gold leaf, the owner's wordmark.
   ========================================================================== */

:root {
  --lacquer: #2a0a10;
  --lacquer-lit: #4a1119;
  --lacquer-deep: #16050a;
  --gold: #c9a25f;
  --gold-light: #ecd49a;
  --gold-dark: #6f5024;
  --bone: #efe4d2;
  --bone-dim: rgba(239, 228, 210, 0.62);

  --font: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 50% 38%, var(--lacquer-lit) 0%, var(--lacquer) 48%, var(--lacquer-deep) 100%);
  background-color: var(--lacquer);
  color: var(--bone);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible { outline: 1px solid var(--gold); outline-offset: 6px; }

/* Invitation-card frame: double gold rule inset from the viewport */
.frame {
  position: fixed;
  inset: clamp(12px, 2.4vw, 28px);
  border: 1px solid rgba(201, 162, 95, 0.55);
  pointer-events: none;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 162, 95, 0.22);
}

.door {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 96px 32px;
  max-width: 44rem;
}

.wordmark { width: clamp(150px, 14vw, 190px); height: auto; margin-bottom: clamp(44px, 7vh, 72px); }

/* ---------- Words ---------- */

.statement {
  margin: 0 0 28px;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(3rem, 9vw, 7.25rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--bone);
  text-wrap: balance;
}

.whisper {
  margin: 0 0 48px;
  max-width: 30ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--bone-dim);
  text-wrap: balance;
}

.introduce {
  position: relative;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 10px 2px;
}
.introduce::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0.35);
  transition: transform 0.5s var(--ease);
}
.introduce:hover::after,
.introduce:focus-visible::after { transform: scaleX(1); }
.introduce:hover { color: var(--gold-light); }

/* ---------- Language ---------- */

.lang-switch {
  position: fixed;
  top: clamp(26px, 3.6vw, 50px);
  right: clamp(30px, 4vw, 58px);
  display: flex;
  gap: 16px;
}
.lang-btn {
  font: inherit;
  font-size: 0.85rem;
  background: none;
  border: none;
  padding: 6px 2px;
  cursor: pointer;
  color: var(--bone-dim);
}
.lang-btn.is-active { color: var(--gold); font-style: italic; }
.lang-btn:not(.is-active):hover { color: var(--bone); }

@media (max-height: 640px) {
  .door { padding: 64px 32px 88px; }
    .wordmark { margin-bottom: 28px; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Contact dialog: a private card laid over the door ---------- */

.contact {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--bone);
  overflow: visible;
}
.contact::backdrop {
  background: rgba(14, 3, 6, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.contact[open] { animation: card-in 0.5s var(--ease) both; }
.contact[open]::backdrop { animation: veil-in 0.5s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes veil-in { from { opacity: 0; } }

.contact-card {
  position: relative;
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: clamp(36px, 5vh, 52px) clamp(28px, 6vw, 56px) clamp(32px, 4.5vh, 44px);
  background: radial-gradient(130% 100% at 50% 0%, var(--lacquer-lit) 0%, var(--lacquer) 60%, var(--lacquer-deep) 100%);
  border: 1px solid rgba(201, 162, 95, 0.55);
  outline: 1px solid rgba(201, 162, 95, 0.22);
  outline-offset: -7px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  text-align: center;
}

.contact-card::-webkit-scrollbar { display: none; }

@media (max-height: 700px) {
  .contact-card { padding-top: 28px; padding-bottom: 24px; }
  .contact-title { font-size: 1.8rem; margin-bottom: 6px; }
  .contact-lede { margin-bottom: 16px; line-height: 1.45; }
  .field { margin-bottom: 12px; }
  .field input, .field textarea { padding: 4px 2px 6px; }
  .field textarea { height: 64px; }
  .contact-status { margin-bottom: 8px; }
  .contact-submit { padding: 12px 30px; }
}

@media (max-height: 660px) {
  .contact, .contact-card { max-height: calc(100svh - 12px); }
  .contact-card { padding-top: 22px; padding-bottom: 18px; }
  .contact-title { font-size: 1.6rem; }
  .field textarea { height: 52px; }
}

.contact-close {
  position: absolute; top: 14px; right: 16px;
  width: 44px; height: 44px;
  font: inherit; font-size: 1.8rem; line-height: 1;
  color: var(--bone-dim);
  background: none; border: none; cursor: pointer;
}
.contact-close:hover { color: var(--gold); }

.contact-title {
  margin: 0 0 10px;
  font-weight: 400; font-style: italic;
  font-size: clamp(1.8rem, 4.2vw, 2.4rem);
  line-height: 1.05;
}
.contact-title:focus { outline: none; }
.contact-lede {
  margin: 0 auto 28px;
  max-width: 40ch;
  color: var(--bone-dim);
  line-height: 1.6;
  text-wrap: balance;
}

.contact-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; text-align: left; }
.contact-form > * { grid-column: 1 / -1; }
.contact-form > .field.half { grid-column: auto; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.95rem;
  color: var(--bone-dim);
  margin-bottom: 6px;
}
.field label em { font-size: 0.85rem; opacity: 0.75; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  color: var(--bone);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(201, 162, 95, 0.35);
  border-radius: 0;
  padding: 8px 2px 10px;
  transition: border-color 0.2s;
}
.field textarea { resize: none; height: 96px; line-height: 1.55; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field [aria-invalid="true"] { border-bottom-color: #e08a74; }

/* honeypot: off-screen for people, still filled in by naive bots */
.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-status { min-height: 1.5em; margin: 0 0 14px; color: #f0b4a4; text-align: center; }
.contact-status a { color: var(--gold); text-underline-offset: 4px; }
.contact-status a:hover { color: var(--gold-light); }

.contact-submit {
  display: block;
  margin: 0 auto;
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--lacquer-deep);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 14px 34px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.contact-submit:hover { background: var(--gold-light); }
.contact-submit:focus-visible { outline-offset: 4px; }
.contact-submit[aria-busy="true"] { opacity: 0.6; cursor: progress; }

@media (max-width: 520px) {
  .contact-form { grid-template-columns: 1fr; }
  .contact { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0; }
  .contact-card { min-height: 100svh; max-height: 100svh; }
}

@media (prefers-reduced-motion: reduce) {
  .introduce::after { transition: none; }
  .contact[open], .contact[open]::backdrop { animation: none; }
}
