/* Dev Diary: mail from LA. Each release day is a postmark, each update a postcard (the in-game picture on one side,
   the writing on the other, a stamp for its topic), and Noah's note on top travels airmail in the brand pink and blue.
   Built on the landing page's tokens and parts (site.css): ink, pastels, Fredoka / Nunito, clay buttons, puffy wordmark. */


/* ---------- top: the title and Noah's note ---------- */
.d-hero { padding: clamp(36px, 5.5vw, 80px) var(--gut) clamp(56px, 7vw, 104px); background: linear-gradient(180deg, var(--blue-l) 0%, var(--page) 100%); }
.d-hero-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: 44px clamp(32px, 5vw, 84px); align-items: center; }
.d-title { font-size: clamp(66px, 8.6vw, 124px); line-height: 1; margin-left: -.04em; }
.d-title .w2 { margin-left: .18em; }
html:lang(zh-CN) .d-title { font-size: clamp(60px, 7.6vw, 108px); }
.d-lede { margin-top: 26px; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 24em; text-wrap: pretty; }
.d-count { margin-top: 14px; font: 700 15px/1.4 var(--body); color: var(--muted); }
.d-count:empty { display: none; }

/* airmail edge: the brand's pink and baby blue are the airmail stripes */
.letter { position: relative; padding: 11px; border-radius: 24px; transform: rotate(1.1deg);
  background: repeating-linear-gradient(-45deg, var(--pink) 0 15px, #fff 15px 24px, var(--blue) 24px 39px, #fff 39px 48px);
  box-shadow: 0 9px 0 rgba(27, 42, 107, .07), 0 36px 54px -32px rgba(27, 42, 107, .5); }
.letter-paper { position: relative; background: var(--white); border-radius: 14px; padding: 30px 34px 28px; }
.letter h2 { font-size: clamp(29px, 2.6vw, 36px); font-weight: 700; line-height: 1.1; padding-right: 104px; min-height: 64px; }   /* clears the stamp */
.letter p { margin-top: 13px; font-size: 17px; line-height: 1.62; color: var(--ink); max-width: 34em; }
.letter h2 + p { margin-top: 16px; }
.letter .letter-sign { margin-top: 14px; font: 600 30px/1 var(--display); color: var(--pink-d); display: inline-block; transform: rotate(-4deg); transform-origin: left; }
.letter-stamp { position: absolute; top: 18px; right: 22px; --c: var(--blue-l); }
.letter-stamp img { width: 44px; height: 44px; border-radius: 12px; }
.letter-mark { position: absolute; top: -14px; right: 66px; width: 82px; height: 82px; color: var(--ink); opacity: .55; transform: rotate(-14deg); pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; }
.letter-mark text { fill: currentColor; stroke: none; font: 700 10.5px var(--display); letter-spacing: 1.6px; }
.letter-mark .lm-c { font-size: 20px; letter-spacing: 1px; }

/* ---------- stamps (Noah's and each postcard's): white perforated paper, a colour panel, a toy icon ---------- */
.stamp, .letter-stamp { width: 70px; height: 80px; filter: drop-shadow(0 2px 1.5px rgba(27, 42, 107, .2)); transform: rotate(4deg); z-index: 2; }
.stamp > i, .letter-stamp > i { position: absolute; inset: 0; display: block; padding: 4px; background: #fff;
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.3px, #0000 95%, #000) -5px -5px / 10px 10px;
  mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.3px, #0000 95%, #000) -5px -5px / 10px 10px; }
.stamp b, .letter-stamp i::before { position: absolute; inset: 8px; background: var(--c); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(27, 42, 107, .08); }
.stamp b { display: grid; place-items: center; }
.letter-stamp i::before { content: ""; }
.letter-stamp img { position: absolute; left: 50%; top: 50%; margin: -22px 0 0 -22px; }
.stamp img { width: 40px; height: 40px; }

/* ---------- topic filters ---------- */
.d-log { padding: 0 var(--gut); }
.d-filters { max-width: var(--max); margin: 0 auto clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 9px; }
.chip { --c: #fff; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 7px 6px 6px; border-radius: 999px; border: 2px solid var(--pink-line);
  background: var(--white); color: var(--ink); font: 600 15px/1 var(--display); cursor: pointer; box-shadow: 0 3px 0 var(--pink-line); transition: transform .12s ease; }
.chip[data-tag="all"] { padding-left: 14px; }
.chip img { width: 26px; height: 26px; }
.chip b { min-width: 26px; padding: 5px 7px; border-radius: 999px; background: var(--c); font: 800 13px/1 var(--body); text-align: center; }
.chip[data-tag="all"] b { background: var(--pink-l); }
.chip:hover { transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 3px 0 #0E1A4D; }
.chip[aria-pressed="true"] b { color: var(--ink); }

/* ---------- days: a postmark rail beside the postcards ---------- */
.d-days { max-width: var(--max); margin: 0 auto; display: grid; gap: clamp(56px, 7vw, 96px); }
.day { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 0 clamp(20px, 3vw, 40px); align-items: start; }
.day[hidden] { display: none; }
.pm-wrap { position: sticky; top: 92px; padding-top: 6px; }
.pm { display: block; width: 196px; height: auto; color: var(--ink); transform: rotate(-9deg); transform-origin: 30% 50%; opacity: .8;
  fill: none; stroke: currentColor; stroke-width: 2.6; }
.pm .pm-waves { stroke-width: 3; stroke-linecap: round; }
.pm text { fill: currentColor; stroke: none; font-family: var(--display); }
.pm .pm-arc { font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; }
.pm .pm-mon { font-size: 15px; font-weight: 700; letter-spacing: 1.5px; }
.pm .pm-day { font-size: 40px; font-weight: 700; }
html:lang(zh-CN) .pm .pm-mon { letter-spacing: 0; font-size: 16px; }
.pm-date { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* read out; the postmark shows it */
.stamping .pm { opacity: 0; transform: rotate(-9deg) scale(1.35); }
.stamping .pm.stamped { opacity: .8; transform: rotate(-9deg) scale(1); transition: transform .32s cubic-bezier(.2, 1.6, .5, 1), opacity .12s linear; }

.cards { display: grid; gap: clamp(32px, 3.6vw, 48px); }

/* ---------- postcards ---------- */
.pc { --c: var(--pink); }
.pc[hidden] { display: none; }
.pc > article { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); background: var(--white); border-radius: 18px;
  border: 2px solid #F0E1E8; box-shadow: 0 6px 0 #F2E3EA, 0 34px 46px -34px rgba(27, 42, 107, .5); }
.pc:nth-child(odd) > article { transform: rotate(-.3deg); }
.pc:nth-child(even) > article { transform: rotate(.35deg); }
.pc-pic { position: relative; padding: 16px; display: flex; flex-direction: column; justify-content: center; border-radius: 16px 0 0 16px;
  background: #F3F8FD; background: color-mix(in srgb, var(--c) 17%, #fff); }   /* the photo, mounted on card stock in its topic colour */

.ph { display: block; width: 100%; padding: 0; border: 5px solid #fff; border-radius: 10px; overflow: hidden; background: var(--blue-l); cursor: zoom-in; box-shadow: 0 8px 16px -10px rgba(27, 42, 107, .45); }
.ph img { width: 100%; height: auto; }
.ph-main img { min-height: 220px; object-fit: cover; }
.ph-tuck { position: absolute; z-index: 3; width: 44%; right: -26px; bottom: -30px; border: 6px solid #fff; border-radius: 9px; transform: rotate(4deg);
  box-shadow: 0 16px 26px -12px rgba(27, 42, 107, .55); transition: transform .18s ease; }
.ph-tuck:hover { transform: rotate(1.5deg) scale(1.03); }
.has-tuck .pc-back { padding-bottom: 40px; }
.pc-back { position: relative; padding: 30px 32px 28px 34px; display: flex; flex-direction: column; }
.has-tuck .pc-back { padding-left: 44px; }
.pc-back .stamp { position: absolute; top: 18px; right: 20px; }
.pc-back h3 { font-size: clamp(23px, 2vw, 28px); font-weight: 700; line-height: 1.14; padding-right: 84px; min-height: 66px; text-wrap: balance; }   /* clears the stamp */
html:lang(zh-CN) .pc-back h3 { line-height: 1.3; }
.pc-back p { margin-top: 12px; font-size: 16.5px; line-height: 1.62; color: var(--ink-2); }
.pc-back h3 + p { margin-top: 16px; }
.pc-video { display: block; width: 100%; max-width: 640px; height: auto; margin-top: 16px; border-radius: 10px; background: #1f2036; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; }
.pc-tags li { padding: 6px 11px; border-radius: 999px; background: var(--c); font: 800 13px/1 var(--body); color: var(--ink); }

/* a card with no picture is all message: the writing runs wide on paper tinted with its topic colour */
.pc-text > article { grid-template-columns: minmax(0, 1fr); background: #FFFDF6; background: color-mix(in srgb, var(--c) 13%, #fff); }
.pc-text .pc-back { padding: 32px 120px 30px 38px; }
.pc-text .pc-back p { max-width: 40em; font-size: 17px; color: var(--ink); }
.pc-text .pc-back h3 { padding-right: 0; min-height: 0; }

.d-empty { max-width: var(--max); margin: 0 auto; padding: 24px 0; color: var(--ink-2); font-size: 17px; }
.d-empty[hidden] { display: none; }
.d-end { max-width: var(--max); margin: clamp(56px, 7vw, 96px) auto 0; padding-left: calc(196px + clamp(20px, 3vw, 40px)); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.d-end p { font: 600 19px/1.4 var(--display); color: var(--ink-2); }
.page-diary .foot { margin-top: clamp(72px, 9vw, 120px); }

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .d-hero-in { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
  .letter { max-width: 600px; }
}
@media (max-width: 900px) {
  .day { grid-template-columns: minmax(0, 1fr); }
  .pm-wrap { position: static; display: flex; align-items: center; gap: 4px; margin: 0 0 18px -6px; padding: 0; }
  .pm { width: 150px; }
  .pm-date { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-left: -34px; font: 700 21px/1.2 var(--display); color: var(--ink); background: var(--page); padding: 4px 8px; border-radius: 10px; }
  .d-end { padding-left: 0; }
}
@media (max-width: 720px) {
  .pc > article { grid-template-columns: minmax(0, 1fr); }
  .pc:nth-child(n) > article { transform: none; }
  .pc-pic { padding: 12px; border-radius: 16px 16px 0 0; }

  .has-tuck .pc-pic { padding-bottom: 12px; }
  .ph-tuck { width: 40%; right: 12px; bottom: -22px; border-width: 4px; }
  .pc-back, .has-tuck .pc-back { padding: 24px 20px 22px; }
  .has-tuck .pc-back { padding-top: 34px; }
  .pc-back h3 { padding-right: 70px; min-height: 54px; }
  .pc-back p { font-size: 16px; }
  .pc-back .stamp { top: 14px; right: 12px; }
  .has-tuck .pc-back .stamp { top: 22px; }
  .stamp { width: 60px; height: 70px; }
  .stamp img { width: 34px; height: 34px; }
  .pc-text .pc-back { padding: 26px 20px 24px; }
  .pc-text .pc-back h3 { padding-right: 76px; min-height: 54px; }
  .pc-text .pc-back p { font-size: 16px; }
  .letter-paper { padding: 24px 20px 22px; }
  .letter h2 { padding-right: 84px; min-height: 58px; }
  .letter p { font-size: 16px; }
  .letter-stamp { right: 14px; top: 14px; }
  .letter-mark { right: 52px; top: -12px; width: 68px; height: 68px; }
  .chip { font-size: 15px; min-height: 40px; }
  .chip img { width: 24px; height: 24px; }
}
@media (max-width: 420px) {
  .d-filters { gap: 8px; }
  .chip { padding: 5px 6px 5px 6px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .stamping .pm { opacity: .8; transform: rotate(-9deg); }
}
