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

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, #140005 0%, #080002 50%, #000 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-family: 'Cinzel', serif;
  color: #d4bfaf;
  padding: 2.5rem 1rem 3rem;
}

@media (min-width: 480px) {
  body { padding: 3.5rem 1.4rem 4rem; }
}

#home-wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 480px) {
  #home-wrap { gap: 3rem; }
}

/* ── Header ── */
header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.header-crosses {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 480px) {
  .header-crosses { gap: 1.4rem; margin-bottom: 0.6rem; }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 13vw, 4.8rem);
  color: var(--red-strong);
  text-shadow:
    0 0 40px var(--red-glow),
    0 0 90px rgba(255, 20, 20, 0.18),
    0 3px 8px rgba(0, 0, 0, 0.95);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
}

.event-tag {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(170, 100, 60, 0.65);
  margin-top: 0.2rem;
}

@media (min-width: 480px) {
  .event-tag { font-size: 0.62rem; letter-spacing: 0.28em; }
}

.event-by {
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-dim);
  font-style: normal;
}

@media (min-width: 480px) {
  .event-by { font-size: 0.64rem; letter-spacing: 0.12em; }
}

/* ── Deco cross sizes ── */
img.deco {
  width: auto;
  vertical-align: middle;
  opacity: 0.75;
  filter: drop-shadow(0 0 6px rgba(160, 80, 0, 0.3));
  height: 22px;
}

img.deco--lg { height: 34px; opacity: 0.85; }
img.deco--sm { height: 17px; opacity: 0.6; }

@media (min-width: 480px) {
  img.deco        { height: 26px; }
  img.deco--lg    { height: 40px; }
  img.deco--sm    { height: 20px; }
}

/* ── Event card ── */
.event-card {
  border: 1px solid rgba(140, 100, 30, 0.2);
  background: rgba(60, 20, 0, 0.08);
  padding: 1.4rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

@media (min-width: 480px) {
  .event-card { padding: 1.8rem 1.6rem; }
}

/* Corner ornaments */
.event-card::before,
.event-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(140, 100, 30, 0.35);
  border-style: solid;
}
.event-card::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}
.event-card::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}

.info-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
}

@media (min-width: 480px) {
  .info-row { gap: 1.4rem; padding: 1rem 0; }
}

.info-sep {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(140, 100, 30, 0.18) 20%,
    rgba(140, 100, 30, 0.18) 80%,
    transparent
  );
}

.info-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(170, 120, 60, 0.55);
  min-width: 60px;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .info-label { font-size: 0.62rem; letter-spacing: 0.22em; min-width: 72px; }
}

.info-value {
  font-family: var(--font-label);
  font-size: 0.85rem;
  color: var(--red-strong);
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-transform: uppercase;
}

@media (min-width: 480px) {
  .info-value { font-size: 1rem; }
}

.date-value {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-label);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--red-strong);
  letter-spacing: 0.01em;
  line-height: 1;
}

@media (min-width: 480px) {
  .date-value { font-size: 2.2rem; gap: 0.5rem; }
}

.date-month {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 160, 100, 0.65);
  align-self: flex-end;
  padding-bottom: 3px;
}

@media (min-width: 480px) {
  .date-month { font-size: 0.8rem; letter-spacing: 0.2em; }
}

.address-city {
  font-family: var(--font-label);
  font-size: 0.68rem;
  color: var(--red-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 480px) {
  .address-city { font-size: 0.82rem; }
}


/* ── Confession section ── */
.confession-section {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

@media (min-width: 480px) {
  .confession-section { gap: 1.6rem; }
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 480px) {
  .section-heading { gap: 1.2rem; }
}

h2 {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 5vw, 1.7rem);
  color: #c8b4a0;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-shadow: 0 0 25px rgba(160, 90, 40, 0.2), 0 2px 4px rgba(0,0,0,0.8);
}

/* ── Form ── */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

@media (min-width: 480px) {
  form { gap: 1.4rem; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

textarea {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(120, 20, 10, 0.35);
  border-bottom: none;
  color: #d4bfaf;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.7;
  padding: 0.9rem 1rem;
  resize: none;
  height: 110px;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.02em;
}

@media (min-width: 480px) {
  textarea { height: 130px; font-size: 1rem; padding: 1rem 1.1rem; }
}

textarea::placeholder {
  color: rgba(180, 130, 110, 0.22);
  font-style: italic;
}

textarea:focus {
  border-color: rgba(140, 10, 10, 0.6);
  background: rgba(255, 255, 255, 0.032);
}

.char-count {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(120, 20, 10, 0.35);
  border-top: 1px solid rgba(100, 10, 10, 0.12);
  padding: 0.3rem 0.8rem;
  font-size: 0.65rem;
  color: rgba(160, 120, 100, 0.4);
  letter-spacing: 0.06em;
  text-align: right;
}

textarea:focus ~ .char-count { border-color: rgba(140, 10, 10, 0.6); }

/* ── Auth ── */
.auth-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(180, 140, 120, 0.65);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkmark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(120, 30, 10, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: transparent;
  transition: all 0.2s;
  margin-top: 1px;
}

.checkbox-label input:checked ~ .checkmark {
  color: var(--red);
  border-color: var(--red-soft);
  background: rgba(255, 20, 20, 0.15);
  text-shadow: 0 0 8px var(--red-glow);
}

/* ── Submit ── */
button[type="submit"] {
  background: transparent;
  border: 1px solid var(--red-dim);
  color: var(--red-soft);
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  transition: all 0.22s;
  position: relative;
}

@media (min-width: 480px) {
  button[type="submit"] { font-size: 0.88rem; letter-spacing: 0.28em; padding: 0.95rem 2rem; }
}

button[type="submit"]::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(120, 10, 10, 0.1);
  pointer-events: none;
}

button[type="submit"]:hover {
  background: rgba(255, 20, 20, 0.08);
  border-color: var(--red-soft);
  color: var(--red-strong);
  box-shadow: 0 0 22px var(--red-glow);
}

button[type="submit"]:disabled { opacity: 0.32; cursor: not-allowed; }

/* ── Disclaimer ── */
.disclaimer {
  font-size: 0.68rem;
  color: rgba(150, 100, 70, 0.62);
  font-style: italic;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(120, 80, 20, 0.2), transparent);
}

.divider-cross {
  height: 14px;
  width: auto;
  opacity: 0.35;
  filter: drop-shadow(0 0 4px rgba(140, 80, 0, 0.3));
}

@media (min-width: 480px) {
  .divider-cross { height: 16px; }
}

/* ── Success ── */
#home-success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#home-success.entering {
  animation: successReveal 0.5s ease forwards;
}

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

.success-icon {
  height: 52px;
  width: auto;
  display: block;
  margin: 0 auto;
  animation: crossPulse 2s ease-in-out infinite alternate;
}

@keyframes crossPulse {
  from { filter: drop-shadow(0 0 10px rgba(140, 0, 0, 0.3)); opacity: 0.72; }
  to   { filter: drop-shadow(0 0 28px rgba(180, 20, 0, 0.72)); opacity: 0.9; }
}

@media (min-width: 480px) {
  .success-icon { height: 60px; }
}

#home-success p {
  font-size: 1rem;
  color: #d4bfaf;
  letter-spacing: 0.05em;
}

#home-success .sub {
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(180, 140, 120, 0.45);
}

#home-new {
  margin-top: 0.4rem;
  background: transparent;
  border: 1px solid rgba(120, 10, 10, 0.3);
  color: rgba(160, 100, 80, 0.6);
  font-family: 'Cinzel', serif;
  font-size: 0.73rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
}

#home-new:hover {
  border-color: rgba(160, 10, 10, 0.5);
  color: #9a1010;
}

/* ── Error ── */
.error-msg {
  color: rgba(220, 80, 60, 0.7);
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── Footer ── */
footer {
  text-align: center;
  opacity: 0.4;
  padding-bottom: 1rem;
}

/* ── Utils ── */
.field-error {
  font-size: 0.73rem;
  color: rgba(220, 80, 60, 0.78);
  letter-spacing: 0.04em;
}

.hidden { display: none !important; }
