/* Henry & Isuru — Ivory Invitation
   cream #FAF6EC · gold #B08D57 · forest #2F4838
   Cormorant Garamond (body) · Pinyon Script (flourish) */

:root {
  --cream: #faf6ec;
  --card: #fffdf7;
  --ink: #3a352c;
  --ink-soft: #6b6355;
  --gold: #b08d57;
  --gold-soft: #cfb98f;
  --gold-faint: #e5d9bf;
  --forest: #2f4838;
  --forest-soft: #4a6353;
  --danger: #8c3b2e;
}

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

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

body {
  font-family: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  background: radial-gradient(ellipse at 50% 0%, #fffcf3 0%, var(--cream) 55%, #f3ecdb 100%);
  color: var(--ink);
  min-height: 100dvh;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

/* ---------------------------------- invitation card */

.invite {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 24px 60px -30px rgba(58, 53, 44, 0.35);
  padding: 52px 30px 44px;
  text-align: center;
}

.invite::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid var(--gold-faint);
  pointer-events: none;
}

.invite.final {
  border-color: var(--forest-soft);
}

.invite.final::before {
  border-color: var(--gold-soft);
}

.card-body {
  position: relative;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.card-body.leaving {
  opacity: 0;
  transform: translateY(10px);
}

.card-body.entering {
  opacity: 0;
  transform: translateY(-10px);
  transition: none;
}

/* ---------------------------------- typography */

.names {
  font-family: 'Pinyon Script', cursive;
  font-weight: 400;
  color: var(--forest);
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 10px;
}

.subtitle {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 30ch;
  margin: 0 auto;
}

.ornament {
  display: block;
  width: 150px;
  margin: 26px auto;
  color: var(--gold);
}

.act-label {
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.invite.final .act-label {
  color: var(--forest);
}

.step-title {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(1.9rem, 8vw, 2.4rem);
  color: var(--forest);
  line-height: 1.2;
  margin-bottom: 18px;
}

.clue {
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-line;
}

.waiting {
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-line;
}

.monogram {
  margin-top: 34px;
  font-size: 0.85rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--gold);
}

/* ---------------------------------- host panel */

.host-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 26px 16px 60px;
}

.host-card {
  background: var(--card);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 18px 45px -28px rgba(58, 53, 44, 0.35);
  padding: 26px 22px;
  margin-bottom: 18px;
}

.host-heading {
  font-family: 'Pinyon Script', cursive;
  font-size: 2.4rem;
  color: var(--forest);
  text-align: center;
  line-height: 1.15;
}

.host-sub {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 6px 0 4px;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.status-line {
  text-align: center;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
}

.status-guests {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.btn {
  display: block;
  width: 100%;
  min-height: 56px;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--forest);
  color: var(--cream);
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  filter: brightness(1.2);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn.secondary {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--gold-soft);
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--gold-soft);
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 16px;
}

.stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

input[type='password'],
input[type='text'],
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1.05rem;
  padding: 14px;
  border: 1px solid var(--gold-soft);
  background: #fffef9;
  color: var(--ink);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
}

textarea {
  min-height: 170px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.step-list {
  list-style: none;
  margin-top: 4px;
}

.step-list li {
  border-bottom: 1px solid var(--gold-faint);
}

.step-list li:last-child {
  border-bottom: none;
}

.step-btn {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  padding: 13px 6px;
  font-size: 1.05rem;
  color: var(--ink);
}

.step-btn .num {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  min-width: 52px;
}

.step-btn.current {
  background: #f4eddc;
}

.step-btn.current .num {
  color: var(--forest);
}

.msg {
  margin-top: 12px;
  text-align: center;
  font-style: italic;
  font-size: 1rem;
  min-height: 1.4em;
}

.msg.error {
  color: var(--danger);
}

.msg.ok {
  color: var(--forest);
}

.file-label {
  display: block;
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 10px;
}

.file-label input {
  display: none;
}

.file-label span {
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  color: var(--forest);
}

.hidden {
  display: none !important;
}
