@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --ink: #25231f;
  --muted: #797268;
  --paper: #f5f0e8;
  --card: #fffdf8;
  --line: #dcd4c8;
  --accent: #d95432;
  --accent-dark: #b83c20;
  --shadow: 0 18px 50px rgba(65, 54, 41, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, .8), transparent 28rem),
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(83, 70, 55, .035) 32px),
    var(--paper);
  font-family: "Manrope", sans-serif;
}

button, textarea { font: inherit; }
button { color: inherit; }

.shell {
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.03em;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--card);
  background: var(--ink);
  border-radius: 50% 50% 50% 12%;
  font-family: "DM Mono", monospace;
  font-size: 14px;
}

.note-count, .eyebrow, .note-meta, .hint {
  font-family: "DM Mono", monospace;
}

.note-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  padding: 76px 0 36px;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 750px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: .98;
  letter-spacing: -.065em;
}

.intro {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.composer {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.composer:focus-within {
  border-color: #bcb1a3;
  box-shadow: 0 20px 60px rgba(65, 54, 41, .13);
  transform: translateY(-2px);
}

textarea {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 25px 27px 15px;
  resize: vertical;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 18px;
  line-height: 1.55;
}

textarea::placeholder { color: #aaa195; }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 27px;
  border-top: 1px solid #ece6dd;
}

.hint {
  color: #968e84;
  font-size: 10px;
}

kbd {
  padding: 2px 5px;
  background: #eee8df;
  border: 1px solid #ded6ca;
  border-radius: 4px;
  box-shadow: 0 1px 0 #cbc1b4;
  font: inherit;
}

.composer button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 17px;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s, transform .2s;
}

.composer button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.composer button:active { transform: translateY(0); }

.notes-section { padding-top: 54px; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.clear-all {
  padding: 5px 0;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 12px;
}

.clear-all:hover { color: var(--accent); }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note-card {
  display: flex;
  min-height: 180px;
  padding: 23px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(65, 54, 41, .04);
  animation: note-in .35s cubic-bezier(.2, .8, .2, 1);
}

@keyframes note-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
}

.note-text {
  margin: 0 0 28px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.6;
}

.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #999085;
  font-size: 10px;
}

.delete-note {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: #a59c91;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.delete-note:hover { color: var(--accent); background: #f7e9e3; }
.delete-note svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }

.empty-state {
  padding: 65px 20px;
  text-align: center;
  border: 1px dashed #cfc5b8;
  border-radius: 14px;
}

.empty-icon {
  position: relative;
  width: 48px;
  height: 55px;
  margin: 0 auto 18px;
  background: #e8e0d5;
  border-radius: 5px;
  transform: rotate(-3deg);
}

.empty-icon::before {
  position: absolute;
  inset: -5px 5px 5px -5px;
  z-index: -1;
  background: #d8cec0;
  border-radius: 5px;
  content: "";
}

.empty-icon span { display: block; width: 26px; height: 2px; margin: 0 auto 7px; background: #b9ad9f; }
.empty-icon span:first-child { padding-top: 16px; }
.empty-state h3 { margin: 0 0 8px; font-size: 17px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 11px 16px;
  color: white;
  background: var(--ink);
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s;
  font-size: 12px;
}

.toast.show { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (max-width: 650px) {
  .shell { width: min(100% - 28px, 940px); }
  .hero { padding-top: 55px; }
  .notes-grid { grid-template-columns: 1fr; }
  .hint { display: none; }
  .composer-footer { justify-content: flex-end; padding-left: 16px; }
  .note-card { min-height: 155px; }
}

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