/* feest.blerch.com — quiet housewarming wish list */

:root {
  --paper: #f4f0e8;
  --paper-deep: #ebe4d6;
  --ink: #1a3326;
  --ink-soft: #3d5a48;
  --muted: #6b7f72;
  --line: rgba(26, 51, 38, 0.14);
  --line-strong: rgba(26, 51, 38, 0.28);
  --leaf: #4a6b52;
  --leaf-deep: #2c4635;
  --taken: #8a958e;
  --danger: #8b3a3a;
  --shadow: 0 18px 40px rgba(26, 51, 38, 0.08);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Helvetica Neue", sans-serif;
  --max: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(74, 107, 82, 0.12), transparent 55%),
    radial-gradient(900px 500px at -10% 110%, rgba(74, 107, 82, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f3eb 0%, var(--paper) 40%, #efe8db 100%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: var(--leaf-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2rem); margin-bottom: 0.4rem; }
h3 { font-size: 1.35rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.55rem;
}

.lede {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 34rem;
}

.quiet { color: var(--muted); font-size: 0.95rem; }
.center { text-align: center; }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Botanical corners — soft watercolor blobs, not stickers */
.leaf {
  position: fixed;
  width: min(42vw, 280px);
  height: min(42vw, 280px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  filter: blur(0.2px);
}
.leaf-tr {
  top: -4rem;
  right: -3rem;
  background:
    radial-gradient(ellipse 40% 55% at 62% 38%, rgba(74, 107, 82, 0.45), transparent 70%),
    radial-gradient(ellipse 35% 45% at 40% 55%, rgba(107, 138, 96, 0.35), transparent 72%),
    radial-gradient(ellipse 30% 40% at 70% 70%, rgba(58, 90, 64, 0.28), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
.leaf-bl {
  bottom: -5rem;
  left: -4rem;
  background:
    radial-gradient(ellipse 45% 50% at 45% 55%, rgba(74, 107, 82, 0.4), transparent 70%),
    radial-gradient(ellipse 30% 40% at 65% 35%, rgba(120, 145, 100, 0.3), transparent 72%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-8px, 10px, 0) rotate(3deg); }
}

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

@keyframes fadeTaken {
  from { opacity: 1; }
  to { opacity: 0.72; }
}

/* Gate */
.page-gate {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
  position: relative;
}

.gate {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  width: min(100%, 860px);
  align-items: center;
  animation: rise 0.7s ease both;
}

@media (min-width: 820px) {
  .gate {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
  }
}

.gate-narrow {
  width: min(100%, 420px);
  grid-template-columns: 1fr;
}

.gate-art {
  margin: 0;
  justify-self: center;
  width: min(100%, 280px);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  animation: rise 0.9s ease 0.08s both;
}

.gate-art img {
  width: 100%;
  height: auto;
  filter: saturate(0.92) contrast(1.02);
}

.gate-copy h1 { margin-bottom: 0.15rem; }

.when-where {
  display: grid;
  gap: 0.9rem;
  margin: 1.6rem 0 1.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.when-where dt {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.when-where dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
}

.gate-form {
  display: grid;
  gap: 0.75rem;
  max-width: 22rem;
}

.gate-form input,
.field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  font: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.gate-form input:focus,
.field input:focus {
  border-color: var(--leaf);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(74, 107, 82, 0.12);
}

.gate-form button,
.btn-solid {
  appearance: none;
  border: 0;
  background: var(--leaf-deep);
  color: #f7f3eb;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.9rem 1.2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.gate-form button:hover,
.btn-solid:hover { background: var(--ink); }

.gate-form button:active,
.btn-solid:active { transform: translateY(1px); }

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.92rem;
}

/* Shared layout */
.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 0 0 4rem;
  animation: rise 0.55s ease both;
}

.site-head {
  position: relative;
  z-index: 1;
  padding: 1.75rem 1rem 0.5rem;
}

.site-head-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.site-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.site-nav a {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.top-bar {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 2;
}

.lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-toggle a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.lang-toggle a:hover {
  color: var(--ink);
}

.lang-toggle a.is-active {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
  font-weight: 500;
}

.lang-sep {
  color: var(--line-strong);
  user-select: none;
}

.intro {
  padding: 1.5rem 0 0.5rem;
}

.invite-strip {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin: 0.5rem 0 0.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .invite-strip {
    grid-template-columns: 160px 1fr;
    gap: 1.75rem;
  }
}

.invite-card {
  margin: 0;
  width: min(100%, 160px);
  justify-self: center;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.invite-card img {
  width: 100%;
  height: auto;
  filter: saturate(0.92) contrast(1.02);
}

.invite-copy .lede {
  margin-top: 0.35rem;
}

.when-where.compact {
  margin: 1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  gap: 0.75rem;
}

.when-where.compact dd {
  font-size: 1.1rem;
}

.status-line {
  margin: 1.1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.list-divider {
  margin: 2rem 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  padding: 2rem 0;
}

.contrib {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.contrib h2 {
  margin-bottom: 0.45rem;
}

.contrib-action {
  margin: 1.15rem 0 0;
}

.contrib-link {
  display: inline-block;
  color: var(--leaf-deep);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 70, 53, 0.35);
  padding-bottom: 0.1rem;
  transition: color 0.15s, border-color 0.15s;
}

.contrib-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.site-foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Gift rows — list, not cards */
.gift-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

.gift {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  grid-template-areas: "thumb body action";
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.gift:first-child { border-top: 1px solid var(--line); }

.gift-thumb { grid-area: thumb; }
.gift-body { grid-area: body; min-width: 0; }
.gift-action {
  grid-area: action;
  justify-self: end;
  align-self: center;
}

@media (max-width: 560px) {
  .gift {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "thumb body"
      "action action";
  }
  .gift-action {
    justify-self: stretch;
  }
  .gift-action .btn-claim,
  .gift-action .btn-ghost { width: 100%; }
}

.gift.is-taken {
  opacity: 0.62;
}

.gift.is-taken .gift-title {
  color: var(--taken);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(138, 149, 142, 0.7);
}

.gift-thumb {
  width: 64px;
  height: 64px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-deep);
  flex-shrink: 0;
  text-decoration: none;
}

.gift-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-title { margin: 0 0 0.2rem; }

.gift-qty {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.gift-notes {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 300;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .field-row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .field-qty {
    width: 7.5rem;
  }
}

.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.gift-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.86rem;
  color: var(--leaf);
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 107, 82, 0.35);
}

.gift-link:hover { border-bottom-color: var(--leaf-deep); }

.gift-taken-label {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}

.btn-claim,
.btn-ghost {
  appearance: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 2px;
  padding: 0.65rem 0.95rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn-claim {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}

.btn-claim:hover {
  border-color: var(--leaf-deep);
  background: rgba(44, 70, 53, 0.06);
}

.btn-claim:active { transform: translateY(1px); }

.btn-ghost {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.55rem;
}

.btn-ghost:hover { color: var(--ink); }
.btn-ghost.danger:hover { color: var(--danger); }

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  justify-content: flex-end;
}

/* Dialog */
.confirm {
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0;
  width: min(calc(100% - 2rem), 26rem);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.confirm::backdrop {
  background: rgba(26, 51, 38, 0.28);
  backdrop-filter: blur(2px);
}

.confirm form {
  padding: 1.5rem 1.4rem 1.35rem;
  display: grid;
  gap: 0.85rem;
}

.confirm h2 { font-size: 1.7rem; }

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.field em {
  font-style: normal;
  opacity: 0.75;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Admin compose */
.admin-compose {
  margin: 1.25rem 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.compose-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.compose-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.preview-slot {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.preview-slot img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-deep);
}

.preview-slot strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
}

.preview-slot span {
  font-size: 0.85rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
