/* Purpose: Lay out the shared AIS sandbox postcard and its responsive landscape and greeting. */
@font-face {
  font-family: "Instrument Serif";
  src: url("media/display.woff") format("woff");
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #322e22;
  --rust: #80502e;
  --rule: #c5b796;
  --paper: #fffaeb;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f0e8d8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(20px, 3.2vw, 46px) max(6vw, calc((100% - 1220px) / 2));
}
header, .postage, .open { display: flex; align-items: center; justify-content: space-between; }
header { gap: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--rule); }
.brand { font: 1.8rem/1 "Instrument Serif", Georgia, serif; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .26em; }
header a { font-size: .88rem; font-weight: 600; }
a:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
a:hover { color: var(--rust); }
main { display: grid; align-items: center; margin: clamp(28px, 5vw, 75px) 0; }
.postcard {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  padding: clamp(12px, 1.5vw, 22px);
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 2px 0 #d9cdb5, 0 12px 30px #5c472717;
}
figure { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.landscape {
  display: block; flex: 1 1 0; height: 0; min-height: 370px; width: 100%;
  object-fit: cover; object-position: center;
}
figcaption, .clock {
  font: 600 .68rem/1.6 "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}
figcaption { padding: 10px 0 0 2px; color: #514733; }
figcaption span { color: var(--rust); margin: 0 .45em; }
.letter {
  display: flex; flex-direction: column; align-items: flex-start;
  margin: 4px 0 4px clamp(14px, 2.4vw, 35px);
  border-left: 1px solid var(--rule);
  padding: 0 clamp(12px, 2vw, 30px) 12px clamp(20px, 3vw, 46px);
}
.postage { align-self: stretch; gap: 12px; color: var(--rust); }
.clock { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stamp {
  display: grid; place-items: center; flex: none; margin-left: auto;
  width: 74px; height: 86px; transform: rotate(5deg); border: 2px dashed #9d7d55;
  outline: 1px solid #d5c695; outline-offset: -6px; background: #f5ebce;
}
.stamp img { display: block; width: 56px; height: 68px; object-fit: contain; }
h1 {
  margin: clamp(26px, 3vw, 42px) 0 0;
  font: 400 clamp(3.2rem, 5.3vw, 5.4rem)/.98 "Instrument Serif", Georgia, serif;
  letter-spacing: -.037em;
}
.letter p { margin: 20px 0 26px; max-width: 34ch; font-size: clamp(1rem, 1.25vw, 1.12rem); }
.open { gap: 16px; margin-top: auto; font-weight: 650; color: #533d23; }
@media (max-width: 700px) {
  body { padding: 20px 5vw; }
  .postcard { grid-template-columns: 1fr; }
  .landscape { flex: auto; height: clamp(165px, 53vw, 320px); min-height: 0; }
  .letter { margin: 15px 2px 0; border: 0; border-top: 1px solid var(--rule); padding: 18px 10px 16px; }
  .postage { min-height: 47px; }
  .stamp { width: 48px; height: 55px; }
  .stamp img { width: 35px; height: 43px; }
  h1 { margin-top: 20px; font-size: clamp(3.5rem, 12vw, 4.8rem); }
}
