/* ============================================================
   Ifeoluwa's birthday wishes site
   Palette drawn from her own Ankara print + the marble-and-gold
   lobby shot: deep teal, chartreuse, ink-teal, warm gold, warm
   paper background.
   ============================================================ */

:root {
  --paper: #F6F0DF;
  --paper-dim: #EFE7D2;
  --ink: #17231F;          /* near-black, but green-black, not neutral charcoal */
  --teal: #0E4C46;
  --teal-deep: #0A3733;
  --lime: #AFC934;
  --lime-deep: #8FA828;
  --gold: #C9A24B;
  --gold-soft: #E4CE9A;
  --card: #FFFDF7;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", "Segoe UI", sans-serif;

  --measure: 62ch;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  background: var(--teal-deep);
}

.hero-gallery {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.hero-gallery .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.6s ease, transform 6s ease;
}

.hero-gallery .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-gallery .slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6rem;
  padding: 4rem 4.5rem;
  color: var(--paper);
}

.hero-copy .kicker {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--lime);
  margin: 0;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 480;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.98;
  margin: 0;
  font-style: italic;
}

.hero-copy p.lede {
  font-size: 1.15rem;
  max-width: 34ch;
  color: var(--gold-soft);
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--lime);
  color: var(--teal-deep);
}
.btn-primary:hover { background: var(--gold); }

.btn-ghost {
  background: transparent;
  border-color: rgba(246, 240, 223, 0.5);
  color: var(--paper);
}
.btn-ghost:hover {
  border-color: var(--paper);
}

/* jagged divider echoing the print's angular lines */
.jag-divider {
  height: 34px;
  background: var(--paper);
  clip-path: polygon(
    0% 100%, 4% 0%, 9% 100%, 14% 0%, 19% 100%, 24% 0%, 29% 100%,
    34% 0%, 39% 100%, 44% 0%, 49% 100%, 54% 0%, 59% 100%, 64% 0%,
    69% 100%, 74% 0%, 79% 100%, 84% 0%, 89% 100%, 94% 0%, 100% 100%,
    100% 100%, 0 100%
  );
  margin-top: -1px;
}

/* ---------- Tribute ---------- */

.tribute {
  padding: 5.5rem 1.5rem 4rem;
  display: flex;
  justify-content: center;
}

.tribute-inner {
  max-width: var(--measure);
}

.tribute h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  color: var(--teal-deep);
  margin: 0 0 1.6rem;
}

.tribute p {
  font-size: 1.12rem;
  color: #2B332E;
  margin: 0 0 1.3rem;
}

.tribute p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 600;
  float: left;
  line-height: 0.8;
  padding-right: 0.12em;
  padding-top: 0.05em;
  color: var(--teal);
}

.tribute .closing {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--teal-deep);
  border-left: 3px solid var(--gold);
  padding-left: 1.1rem;
  margin-top: 2rem;
}

/* ---------- Form ---------- */

.wish-section {
  background: var(--teal-deep);
  color: var(--paper);
  padding: 4.5rem 1.5rem 5rem;
  position: relative;
}

.wish-inner {
  max-width: 640px;
  margin: 0 auto;
}

.wish-section h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin: 0 0 0.6rem;
}

.wish-section .sub {
  color: var(--gold-soft);
  margin: 0 0 2.2rem;
  max-width: 46ch;
}

.banner {
  background: var(--lime);
  color: var(--teal-deep);
  font-weight: 700;
  padding: 0.9rem 1.2rem;
  border-radius: 2px;
  margin-bottom: 1.8rem;
}
.banner.error {
  background: #E4B7A0;
}

form.wish-form {
  display: grid;
  gap: 1.3rem;
}

.field label {
  display: block;
  font-size: 0.92rem;
  color: var(--gold-soft);
  margin-bottom: 0.45rem;
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(246, 240, 223, 0.06);
  border: 1px solid rgba(246, 240, 223, 0.35);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 2px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(246, 240, 223, 0.45);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
  border-color: var(--lime);
}

.field textarea { min-height: 120px; resize: vertical; }

.field-hp { position: absolute; left: -9999px; }

.wish-form .submit-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

.char-count {
  font-size: 0.85rem;
  color: rgba(246, 240, 223, 0.55);
}

/* ---------- Wishes wall ---------- */

.wall {
  background: var(--paper-dim);
  padding: 4.5rem 0 5rem;
}

.wall-head {
  max-width: 640px;
  margin: 0 auto 0.6rem;
  padding: 0 1.5rem;
  text-align: center;
}

.wall-head h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--teal-deep);
  margin: 0 0 0.5rem;
}

.wall-head p {
  color: #4A5750;
  margin: 0;
}

.drag-hint {
  text-align: center;
  color: #8A8570;
  font-size: 0.86rem;
  margin: 0 0 1.8rem;
}

.empty-wall {
  text-align: center;
  color: #4A5750;
  padding: 0 1.5rem;
}

.wall-scroll {
  --gap: 1.4rem;
  display: flex;
  gap: var(--gap);
  padding: 0.4rem 1.5rem 1.6rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.wall-scroll.dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none;
}

.wall-scroll::-webkit-scrollbar {
  height: 8px;
}
.wall-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.wall-scroll::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

.wish-card {
  position: relative;
  flex: 0 0 280px;
  width: 280px;
  height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid #E1D6B6;
  padding: 1.5rem 1.4rem 1.3rem;
  border-top: 6px solid var(--lime);
}

.wish-card:nth-child(3n+2) { border-top-color: var(--gold); }
.wish-card:nth-child(3n) { border-top-color: var(--teal); }

.wish-card p.msg {
  font-size: 1.02rem;
  color: #232B26;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

.wish-card .signoff {
  flex: none;
}

.wish-card .from {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--teal-deep);
  margin: 0;
}

.wish-card .when {
  font-size: 0.8rem;
  color: #8A8570;
  display: block;
  margin-top: 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-gallery .slide { transition: opacity 0.4s ease; }
}

/* ---------- Toast popup ---------- */

.toast {
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translate(-50%, -18px);
  background: var(--lime);
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(10, 30, 27, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.toast .tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--teal-deep);
  color: var(--lime);
  font-size: 0.8rem;
  flex: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

@media (max-width: 560px) {
  .toast {
    left: 1rem;
    right: 1rem;
    top: 14px;
    transform: translateY(-14px);
  }
  .toast.show { transform: translateY(0); }
}

/* ---------- Footer ---------- */

footer {
  background: var(--ink);
  color: rgba(246, 240, 223, 0.6);
  text-align: center;
  padding: 2.2rem 1.5rem;
  font-size: 0.9rem;
}

footer .heart { color: var(--lime); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-gallery { height: 62vh; }
  .hero-copy { padding: 3rem 1.6rem 3.5rem; }
  .hero-copy p.lede { max-width: 100%; }
}

@media (max-width: 560px) {
  .wish-card { flex-basis: 250px; width: 250px; height: 240px; }
  .tribute, .wish-section, .wall { padding-left: 1.1rem; padding-right: 1.1rem; }
}
