@font-face {
  font-family: Fraunces;
  src: url('./assets/fraunces.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('./assets/dm-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #293c33;
  --quiet: #49594d;
  --green: #385f4c;
  --line: #dedbc9;
  --wash: #fff6e8;
  --serif: Fraunces, Georgia, serif;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: #f6f3e8;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: clamp(1rem, 7.5vh, 4.1rem) 1rem 2rem; }
button { font: inherit; }

.gazette {
  width: min(100%, 63rem);
  margin-inline: auto;
  padding: clamp(.79rem, 2.4vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #fffcf4;
  box-shadow: 0 5px 0 #ede8d8, 0 15px 35px #3936280b;
}

.masthead { display: flex; justify-content: center; align-items: center; min-height: 3.5rem; gap: .63rem; margin-inline: .3rem; border-bottom: 1px solid var(--line); padding: 0 .3rem .74rem; }
.masthead p { margin: 0; text-align: center; font: 600 clamp(1.28rem, 4.5vw, 1.75rem)/1.1 var(--serif); letter-spacing: -.046em; }
.masthead-mark { display: grid; gap: .13rem; align-content: end; width: 1.04rem; height: 1.17rem; padding: 0 .17rem .19rem; border: 1.3px solid #446d55; border-radius: .115rem; transform: rotate(-9deg); }
.masthead-mark i { height: 1px; background: #446d55; }
.masthead-mark i:nth-child(1) { width: 70%; }

.edition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  grid-template-areas: 'copy art' 'next art';
  grid-template-rows: 1fr auto;
  column-gap: clamp(.85rem, 3.1vw, 2.15rem);
  padding: clamp(1.05rem, 3.7vw, 2.92rem);
  margin-top: 1rem;
  border: 1px solid #ebe0cc;
  border-radius: 1.05rem;
  background: var(--wash);
}

.copy { grid-area: copy; align-self: end; }
.kicker { display: inline-flex; align-items: center; gap: .42rem; margin: 0 0 .85rem; padding: .36rem .64rem .36rem .56rem; border: 1px solid #cdd8c5; border-radius: 2rem; background: #eaf0df; color: #3d5c49; font-size: .77rem; font-weight: 700; line-height: 1.2; letter-spacing: .07em; text-transform: uppercase; }
.kicker::before { flex: none; width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; content: ''; }
h1 { margin: 0; max-width: 14ch; font: 600 clamp(2.42rem, 5.55vw, 4.3rem)/1.015 var(--serif); letter-spacing: -.064em; text-wrap: balance; }
h1:focus { outline: none; }
.lede { margin: .75rem 0 0; color: var(--quiet); font-size: clamp(1rem, 2vw, 1.11rem); line-height: 1.45; }

.illustration { grid-area: art; min-width: 0; align-self: center; position: relative; isolation: isolate; margin: 0; }
.illustration img { width: 100%; height: auto; aspect-ratio: 1; display: block; object-fit: contain; mix-blend-mode: multiply; mask-image: radial-gradient(ellipse 72% 72% at center, #000 58%, transparent 99%); }
.revealed .illustration img { animation: greet 430ms cubic-bezier(.19,.86,.34,1.12) both; }

.next { grid-area: next; align-self: start; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.03rem; margin-top: 1.26rem; padding: .66rem 1rem; border: 1px solid #30503f; border-radius: .62rem; background: var(--green); color: #fffdf5; cursor: pointer; font-weight: 700; box-shadow: 0 3px 0 #d0d9c8; transition: background-color 150ms, transform 150ms; }
.action:hover { background: #304f40; transform: translateY(-1px); }
.action:active { transform: translateY(1px); }
.action:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.magnifier { position: relative; width: .82rem; height: .82rem; flex: none; border: 1.65px solid currentColor; border-radius: 50%; transform: translateY(-.05rem); }
.magnifier::after { position: absolute; width: .38rem; height: 1.6px; top: .59rem; left: .56rem; border-radius: 1rem; background: currentColor; transform: rotate(46deg); transform-origin: left; content: ''; }

.revealed .kicker { background: #f9e6e5; border-color: #ebccc7; color: #874c45; }
.revealed h1 { max-width: 11ch; }
.note { position: relative; margin: 1.15rem 0 0; padding: .94rem 2.05rem .94rem .98rem; border: 1px solid #eacdc3; border-radius: .65rem; background: #fff3ee; color: #523c34; animation: greet 360ms ease-out both; }
.note p { margin: 0; font-size: 1.01rem; line-height: 1.53; }
.note-heart { color: #b75d57; position: absolute; right: .7rem; bottom: .7rem; font-size: .95rem; }

@keyframes greet {
  from { transform: translateY(.28rem) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (max-width: 41rem) {
  body { padding: .88rem .73rem 1.65rem; }
  .gazette { max-width: 27rem; border-radius: 1.13rem; }
  .masthead { min-height: 2.75rem; padding-bottom: .52rem; }
  .edition { grid-template-columns: 1fr; grid-template-areas: 'copy' 'art' 'next'; grid-template-rows: auto; margin-top: .7rem; padding: 1.02rem .9rem .95rem; text-align: center; }
  h1 { max-width: min(16ch, 100%); margin-inline: auto; font-size: clamp(2.04rem, 8.4vw, 3.24rem); }
  .revealed h1 { max-width: 100%; }
  .kicker { margin-bottom: .63rem; }
  .lede { margin-top: .55rem; }
  .illustration { width: clamp(10.9rem, 64vw, 16.4rem); justify-self: center; margin-top: -.2rem; }
  .action { margin-top: 0; }
  .note { margin-top: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .action, .revealed .illustration img, .note { animation: none; transition: none; }
}
