:root {
  --bg-gradient: linear-gradient(180deg, #fdfbf7 0%, #f4e4e9 40%, #e0eff5 100%);
  --text-primary: #2c2420;
  --text-secondary: #5d4d44;
  --accent-pink: #e9afc8;
  --paper-white: #ffffff;
  --shadow-soft: 0 10px 40px rgba(44, 36, 32, 0.08);
  --shadow-sharp: 0 2px 8px rgba(44, 36, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e9afc8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>') 12 12, auto;
}

a,
.polaroid {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23e9afc8" stroke="%23e9afc8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle></svg>') 12 12, pointer;
}

/* Typography */
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  margin: 0;
}

.handwritten-note {
  font-family: "Caveat", cursive;
  font-size: 28px;
  color: var(--text-secondary);
  transform: rotate(-4deg);
  display: inline-block;
  margin-bottom: 16px;
}

/* Layout */
#journal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  align-items: center;
}

/* Hero Section */
#hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
}

.logo-container {
  width: 180px;
  height: 180px;
  margin-bottom: -20px;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.logo {
  width: 100%;
  height: auto;
}

.intro h1 {
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.intro .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* Polaroid Grid */
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  width: 100%;
  padding: 20px;
}

.polaroid {
  background: var(--paper-white);
  padding: 16px 16px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: rotate(var(--rotation, 0deg));
}

.polaroid:nth-child(1) {
  --rotation: -2deg;
}

.polaroid:nth-child(2) {
  --rotation: 1.5deg;
  margin-top: 40px;
}

.polaroid:nth-child(3) {
  --rotation: -1deg;
}

.polaroid:hover {
  transform: scale(1.02) rotate(0deg) translateY(-10px);
  box-shadow: 0 20px 60px rgba(44, 36, 32, 0.15);
  z-index: 10;
}

.photo-frame {
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
  overflow: hidden;
  position: relative;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  background-image: url("./cherry.webp");
  background-size: cover;
  background-position: center;
  filter: sepia(0.2) contrast(0.9);
  transition: transform 0.6s ease;
}

.polaroid:hover .placeholder-img {
  transform: scale(1.1);
}

/* Placeholder variations using different crop positions of the same image */
.p1 {
  background-position: 10% 50%;
}

.p2 {
  background-position: 50% 50%;
}

.p3 {
  background-position: 90% 50%;
}

.caption {
  font-family: "Caveat", cursive;
  font-size: 24px;
  color: var(--text-primary);
}

/* Footer */
#footer {
  text-align: center;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.social-links {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.social-links a {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s ease;
}

.social-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  color: var(--text-primary);
}

.social-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.copyright {
  font-size: 12px;
  color: rgba(93, 77, 68, 0.6);
}

@media (max-width: 768px) {
  #journal {
    padding: 40px 20px;
    gap: 40px;
  }

  .intro h1 {
    font-size: 42px;
  }

  .polaroid:nth-child(2) {
    margin-top: 0;
  }
}

/* Stamp Animation */
.stamp {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid #e9afc8;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--rotation));
  z-index: 100;
  animation: stamp-appear 0.8s ease-out forwards;
  background: rgba(233, 175, 200, 0.1);
  box-shadow: 0 0 0 2px rgba(233, 175, 200, 0.2);
}

.stamp::after {
  content: "PANDOON";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 10px;
  color: #e9afc8;
  letter-spacing: 1px;
}

@keyframes stamp-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5) rotate(var(--rotation));
  }

  20% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1) rotate(var(--rotation));
  }

  80% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1) rotate(var(--rotation));
  }
}