@font-face {
  font-family: "Playfair Display";
  src: url("./fonts/PlayfairDisplay-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("./fonts/PlayfairDisplay-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("./fonts/PlayfairDisplay-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("./fonts/Caveat-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("./fonts/Caveat-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --hero-bg: #f4efe6;
  --panel: rgba(255, 253, 249, 0.9);
  --panel-solid: #fffdf9;
  --text: #1f1a17;
  --muted: #6f655e;
  --accent: #49a696;
  --accent-strong: #3f9183;
  --line: rgba(31, 26, 23, 0.12);
  --shadow: 0 24px 80px rgba(31, 26, 23, 0.1);
  --paper-rule: 34px;
  --paper-rule-offset: calc(var(--paper-rule) * 0.85);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(95, 191, 175, 0.14), transparent 30%),
    linear-gradient(180deg, #f9f5ee 0%, var(--bg) 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 350;
}

a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.04em;
  font-weight: 500;
}

p,
li {
  color: var(--muted);
  line-height: 1.65;
  font-weight: 350;
}

.shell,
.page-shell {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.shell {
  width: min(860px, calc(100vw - 32px));
}


.page-shell-narrow {
  width: min(820px, calc(100vw - 32px));
}

.hero {
  position: relative;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: visible;
}

.hero > h1 {
  margin: 0 0 56px;
  font-size: clamp(44px, 9vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.desktop-break {
  display: inline;
}

.lede {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: clamp(18px, 2.5vw, 22px);
}

.actions,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.actions {
  margin-top: 56px;
}

.hero-image {
  --hero-image-offset-x: 178px;
  --hero-image-offset-y: -148px;
  --hero-image-rotation: 17deg;
  position: absolute;
  z-index: 1;
  left: var(--hero-image-offset-x);
  top: var(--hero-image-offset-y);
  margin: 0;
  transform: rotate(var(--hero-image-rotation));
  transform-origin: center center;
  cursor: default;
}

.hero-image img {
  display: block;
  width: 760px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.button,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 350;
  font-size: 16px;
  text-align: center;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.button {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 16px 32px rgba(12, 124, 89, 0.2);
}

.button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  text-decoration: none;
}

.button-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.ghost:hover {
  border-color: rgba(31, 26, 23, 0.22);
  transform: translateY(-1px);
  text-decoration: none;
}


.panel,
.list {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 32px;
}

.list {
  overflow: hidden;
  background: var(--panel-solid);
}

.item {
  display: block;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.item:first-child {
  border-top: 0;
}

.item:hover {
  background: rgba(12, 124, 89, 0.04);
  text-decoration: none;
}

.item-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
}

.version {
  margin: 0 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
}

.meta {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

ul {
  margin: 24px 0 0;
  padding-left: 22px;
}

li + li {
  margin-top: 12px;
}

.shopping-list {
  list-style: none;
  padding: 0;
  margin-top: 28px;
}

.todo-card {
  --todo-offset-y: 219px;
  --todo-rotation: 10deg;
  --todo-offset-right: 0px;
  position: relative;
  z-index: 2;
  float: right;
  width: 280px;
  margin: 0 0 24px 32px;
  padding: 28px;
  border: none;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent calc(var(--paper-rule) - 1px),
      rgba(73, 166, 150, 0.12) calc(var(--paper-rule) - 1px),
      rgba(73, 166, 150, 0.12) var(--paper-rule)
    ),
    linear-gradient(180deg, #fffef8 0%, #faf6eb 50%, #f5eedf 100%);
  background-position: 0 var(--paper-rule-offset), 0 0;
  box-shadow:
    0 1px 1px rgba(31, 26, 23, 0.08),
    0 4px 8px rgba(31, 26, 23, 0.08),
    0 16px 32px rgba(31, 26, 23, 0.1),
    0 32px 64px rgba(31, 26, 23, 0.08),
    inset 0 0 0 1px rgba(122, 103, 77, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(var(--todo-offset-y)) rotate(var(--todo-rotation));
  shape-outside: inset(var(--todo-offset-y) 0 0 0);
  margin-right: var(--todo-offset-right);
}

/* Paper texture overlay */
.todo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  mix-blend-mode: multiply;
}


.todo-card .meta {
  display: none;
}

.todo-card h1 {
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 36px;
  font-weight: 600;
  line-height: var(--paper-rule);
  margin: 0;
  padding: 0;
  color: var(--accent);
}

.todo-card h2 {
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 22px;
  font-weight: 500;
  line-height: var(--paper-rule);
  color: var(--accent);
  opacity: 0.6;
  margin: var(--paper-rule) 0 0;
  padding: 0;
}

.todo-card h2:first-of-type {
  margin-top: var(--paper-rule);
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.todo-item {
  margin: 0;
}

.todo-toggle {
  all: unset;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: var(--paper-rule);
  min-height: var(--paper-rule);
  padding: 0;
  cursor: pointer;
  position: relative;
}

.todo-item {
  position: relative;
}

.todo-heading {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  width: fit-content;
  max-width: calc(100% - 30px);
}

.todo-popover {
  --note-rotate: -15deg;
  position: absolute;
  left: 100%;
  top: 0;
  z-index: 10;
  width: 150px;
  min-height: 150px;
  padding: 12px;
  background: linear-gradient(165deg, #fdf7cd 0%, #f6e8a7 100%);
  border-radius: 2px;
  box-shadow:
    0 3px 12px rgba(31, 26, 23, 0.15),
    0 1px 2px rgba(31, 26, 23, 0.1);
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 20px;
  font-weight: 500;
  color: #5c5434;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, 0) rotate(var(--note-rotate));
  transform-origin: left top;
  transition: opacity 150ms ease, transform 150ms ease;
}

.todo-popover-link {
  text-decoration: none;
}

.todo-popover-link:hover {
  text-decoration: none;
}

.todo-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 12px;
  width: 18px;
  height: 14px;
}

.todo-popover-body {
  display: block;
}

.todo-store-link {
  margin-top: 10px;
  color: var(--accent);
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.todo-popover-link:hover .todo-store-link {
  color: var(--accent-strong);
  text-decoration: underline;
}

.todo-item:hover .todo-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(10px, 0) rotate(var(--note-rotate));
}

.todo-item:nth-child(4n + 1) .todo-popover {
  --note-rotate: -12deg;
}

.todo-item:nth-child(4n + 2) .todo-popover {
  --note-rotate: -17deg;
}

.todo-item:nth-child(4n + 3) .todo-popover {
  --note-rotate: -9deg;
}

.todo-item:nth-child(4n) .todo-popover {
  --note-rotate: -14deg;
}


.todo-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--accent);
  opacity: 0.35;
  background: transparent;
  position: relative;
  transition: opacity 120ms ease;
}

.todo-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transition: opacity 120ms ease;
}

.todo-toggle:hover .todo-check {
  opacity: 0.6;
}

.todo-toggle:hover .todo-check::after {
  opacity: 0.5;
}

.todo-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.todo-item.is-checked .todo-check {
  opacity: 0.6;
}

.todo-item.is-checked .todo-check::after {
  opacity: 1;
}

.todo-name {
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
  line-height: var(--paper-rule);
}

.todo-item.is-checked .todo-name {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

@media (max-width: 900px) {
  .todo-card {
    float: none;
    width: 100%;
    margin: 0 0 32px 0;
    transform: rotate(0deg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero,
  .panel {
    padding: 28px;
    border-radius: 24px;
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero > h1 {
    order: 1;
    margin-bottom: 32px;
  }

  .hero > .lede {
    order: 2;
  }

  .hero > .actions {
    order: 3;
  }

  .hero-image {
    order: 4;
    position: relative;
    --hero-image-rotation: 8deg;
    left: auto;
    top: auto;
    margin-top: 40px;
    transform: none;
  }

  .hero-image img {
    width: min(100%, 760px);
    margin: 0 auto;
  }

  .todo-card {
    order: 5;
    padding: 24px;
    margin: 40px 0 0;
  }

  .desktop-break {
    display: none;
  }

  .item-split {
    grid-template-columns: 1fr;
  }

  .todo-item {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
  }
}
