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

:root {
  --gold: #fcc935;
  --dark: #1a1208;
}

html, body { min-height: 100%; }

body {
  font-family: 'Patrick Hand SC', cursive;
  color: var(--dark);
}

/* BACKGROUND */
.bg {
  position: fixed;
  inset: 0;
  background: url('hero.svg') center top / cover no-repeat;
  z-index: 0;
  filter: var(--photo-filter) blur(1.2px);
  transform: scale(1.05);
}
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--photo-vignette), var(--photo-grain), rgba(245, 240, 232, 0.9);
}

/* MAIN */
.main {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 130px 24px 80px;
}

h1 {
  font-family: 'Patrick Hand SC', cursive;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 12px;
}

.subtitle {
  font-size: 1.64rem;
  line-height: 1.4;
  color: #000000;
  margin-bottom: 32px;
}

/* NY NOTE */
.note-form {
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 16px rgba(26,18,8,0.07);
  border: 1px solid rgba(26,18,8,0.1);
  margin-bottom: 32px;
}

.note-form textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  font-family: 'Patrick Hand SC', cursive;
  font-size: 1.6rem;
  line-height: 1.4;
  color: #000000;
}

.note-form textarea::placeholder { color: rgba(26,18,8,0.45); }

.note-form button {
  margin-top: 12px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  font-family: 'Patrick Hand SC', cursive;
  font-size: 1.07rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.note-form button:hover { background: #fdd55e; transform: translateY(-1px); }

/* NOTER */
.notes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note {
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 16px rgba(26,18,8,0.07);
  border: 1px solid rgba(26,18,8,0.1);
}

.note-date {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26,18,8,0.6);
  margin-bottom: 6px;
}

.note-text {
  font-size: 1.6rem;
  line-height: 1.4;
  color: #000000;
  white-space: pre-wrap;
  text-wrap: pretty;
}

/* TRÆK OG SLIP */
.note {
  position: relative;
  padding-left: 60px;
}

.note-handle {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 36px;
  height: 44px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(26,18,8,0.45);
  cursor: grab;
  touch-action: none;
}
.note-handle:hover { color: #000000; }

.note.dragging {
  box-shadow: 0 10px 30px rgba(26,18,8,0.25);
  border-color: var(--gold);
}
.note.dragging .note-handle { cursor: grabbing; }
body.note-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }

/* UDFØRT */
.note.done { background: rgba(255,255,255,0.5); }
.note.done .note-text {
  text-decoration: line-through;
  color: rgba(26,18,8,0.5);
}
.note.done .note-date::after {
  content: ' · Udført ✓';
  color: #000000;
}

.note-actions {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.note-done,
.note-delete {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Patrick Hand SC', cursive;
  font-size: 1.1rem;
  color: rgba(26,18,8,0.6);
  text-decoration: underline;
  cursor: pointer;
}
.note-done:hover,
.note-delete:hover { color: #000000; }

@media (max-width: 640px) {
  .main { padding: 106px 16px 60px; }
  h1 { font-size: 2.2rem; }
  .note-form, .note { padding: 16px; }
  .note { padding-left: 52px; }
  .note-handle { left: 8px; top: 10px; }
}
