/* Glossies site: prints dropped on a table, like the app's collages. */
:root {
  --table: #d6d3ce;
  --print: #fbfaf7;
  --ink: #1d1d1f;
  --muted: #5d5b57;
  --link: #0a5fc4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 8px 22px rgba(0, 0, 0, .22);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .16), 0 18px 36px rgba(0, 0, 0, .26);
}
@media (prefers-color-scheme: dark) {
  :root {
    --table: #2a2927;
    --print: #f4f2ee;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 26px rgba(0, 0, 0, .55);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .5), 0 20px 40px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--table);
  background-image: url("/paper.png");
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
a { color: var(--link); }

/* A print: white border, soft shadow, a small tilt set per print with --r. */
.print {
  --r: 0deg;
  position: relative;
  background: var(--print);
  color: var(--ink);
  padding: 14px;
  border-radius: 2px;
  box-shadow: var(--shadow);
  transform: rotate(var(--r));
  transition: transform .25s ease, box-shadow .25s ease;
}
.print.instant { padding: 14px 14px 46px; }
@media (hover: hover) {
  .table .print:hover { transform: rotate(var(--r)) translateY(-6px) scale(1.02); box-shadow: var(--shadow-lift); z-index: 5; }
}

/* Photos drawn in CSS: sharp at any size, nothing to download. */
.photo { display: block; width: 100%; aspect-ratio: 3 / 4; }
.photo.landscape { aspect-ratio: 4 / 3; }
.photo.sunset {
  background:
    radial-gradient(circle at 50% 46%, #ffe7a3 0 13%, transparent 13.5%),
    linear-gradient(#f39a3f 0%, #ec6f4e 45%, #d9566b 58%, #5a2f5c 58.5%, #3a2147 100%);
}
.photo.sea {
  background: linear-gradient(#a9d8f2 0%, #78bfe6 48%, #e9f6fc 48.6%, #2f86b6 49.5%, #1b5f8c 100%);
}
.photo.meadow {
  background:
    repeating-linear-gradient(100deg, transparent 0 9px, rgba(20, 70, 20, .45) 9px 11px) bottom / 100% 14% no-repeat,
    linear-gradient(#bfe3f7 0%, #9fd2ee 44%, #8cc86a 44.5%, #4e9a3c 100%);
}

/* Tilt and drop order for each home-page print. */
.n1 { --r: -2.2deg; --i: 0; }
.n2 { --r: 4deg; --i: 1; }
.n3 { --r: -5deg; --i: 2; }
.n4 { --r: 1.6deg; --i: 3; }
.n5 { --r: -3deg; --i: 4; }
.n6 { --r: 3.2deg; --i: 5; }
.n7 { --r: -1.4deg; --i: 6; }

/* Text prints. */
.note h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.1; margin: 4px 0 8px; letter-spacing: -.01em; }
.note h2 { font-size: 20px; margin: 2px 0 6px; }
.note p { margin: 0; color: var(--muted); }
.note p + p { margin-top: 8px; }
.note ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: 52px; border-radius: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; }
.soon { font-weight: 600; color: var(--ink); }

/* The home page table. Phones: one column, alternating tilts, a little overlap. */
.table {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 16px 56px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
}
.table > * { margin: 0 auto -6px; max-width: 380px; width: 100%; }
/* Photo prints on phones: smaller, pushed left and right so they read as scattered. */
.table .p-sunset { max-width: 190px; justify-self: end; margin: -2px 6% -34px auto; }
.table .p-sea { max-width: 250px; justify-self: start; margin: 0 auto -18px 4%; }
.table .p-meadow { max-width: 170px; justify-self: end; margin: -10px 10% -26px auto; }

/* Wider screens: a scattered layout on a 12-column grid. */
@media (min-width: 820px) {
  .table {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 64px;
    gap: 0;
    padding-top: 48px;
  }
  .table > * { margin: 0; max-width: none; }
  .p-title   { grid-column: 1 / 7;  grid-row: 1 / 5;  align-self: start; z-index: 3; }
  .p-sunset  { grid-column: 7 / 10; grid-row: 1 / 7;  align-self: start; margin-top: 12px; z-index: 2; }
  .p-sea     { grid-column: 9 / 13; grid-row: 4 / 8;  align-self: start; z-index: 1; }
  .p-what    { grid-column: 2 / 7;  grid-row: 5 / 9;  align-self: start; margin-top: 18px; z-index: 2; }
  .p-meadow  { grid-column: 7 / 10; grid-row: 7 / 12; align-self: start; margin-top: 8px; z-index: 3; }
  .p-private { grid-column: 9 / 13; grid-row: 8 / 11; align-self: start; margin-top: 24px; z-index: 4; }
  .p-links   { grid-column: 3 / 7;  grid-row: 9 / 12; align-self: start; margin-top: 28px; z-index: 1; }
}

/* The drop: each print falls onto the table and settles into its tilt. */
@keyframes drop {
  0%   { opacity: 0; transform: translateY(-46px) rotate(calc(var(--r) * -2.5)) scale(1.08); box-shadow: var(--shadow-lift); }
  70%  { opacity: 1; transform: translateY(3px) rotate(calc(var(--r) * 1.15)) scale(1); }
  100% { opacity: 1; transform: rotate(var(--r)); }
}
.table .print { animation: drop .7s cubic-bezier(.2, .8, .25, 1) both; animation-delay: calc(var(--i) * 110ms); }
@media (prefers-reduced-motion: reduce) {
  .table .print { animation: none; }
  .print { transition: none; }
}

/* Reading pages: one flat print on the table. */
.sheet {
  max-width: 760px;
  margin: 28px auto 56px;
  padding: 26px 30px 32px;
  --r: -0.4deg;
}
.sheet h1 { font-size: 32px; line-height: 1.15; margin: 6px 0 4px; }
.sheet h2 { font-size: 20px; margin: 30px 0 6px; }
.sheet .meta { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.topbar { max-width: 760px; margin: 0 auto; padding: 22px 16px 0; display: flex; align-items: center; gap: 16px; }
.topbar .brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; gap: 10px; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 8px; }
.topbar nav { margin-left: auto; display: flex; gap: 16px; font-size: 15px; font-weight: 600; }
.foot { max-width: 760px; margin: 0 auto; padding: 0 16px 36px; color: var(--muted); font-size: 14px; }
@media (max-width: 600px) {
  .sheet { margin: 18px 12px 40px; padding: 20px 18px 24px; }
}
