/* Palette values live exclusively in config.js and are applied by script.js.
   Layout is mobile-first: these rules are the phone layout, and the
   @media (min-width: 601px) block below restores the wide-screen composition. */
:root {
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--black); }
.invitation {
  position: relative;
  isolation: isolate;
  min-height: 820px;
  min-height: max(820px, 100svh);
  overflow: hidden;
  background: var(--cream);
}
/* Soft paper grain, using only the configured ink color. */
.invitation::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .035;
  background-image: repeating-radial-gradient(circle at 23% 31%, var(--black) 0 .45px, transparent .8px 3px);
  background-size: 7px 9px;
  pointer-events: none;
}
.invitation-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 94%; margin: 0 auto; padding: 52px 0 340px; text-align: center; }
time { display: block; color: var(--burgundy); font-size: clamp(28px, 3.5vw, 44px); font-style: italic; letter-spacing: -.055em; }
/* Both halves of the phrase share one headline style: the h1 above the
   hearts and the paragraph below them. */
.headline {
  width: min(100%, 350px);
  margin: 0 auto;
  font-family: 'Licorice', cursive;
  font-style: normal;
  /* Licorice has no native bold; thicken its strokes without changing the font. */
  font-weight: 400;
  -webkit-text-stroke: 1px currentColor;
  paint-order: stroke fill;
  font-size: clamp(74px, 16vw, 96px);
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}
.names { margin: 0; color: var(--burgundy); font-size: clamp(30px, 4vw, 47px); font-style: italic; }
/* Each configured name sits on its own line so "Nacho / + / Sab" reads as a sum. */
.names > span { display: block; }
.photo { position: absolute; bottom: -38px; left: -33px; width: 205px; margin: 0; padding: 10px 10px 35px; background: var(--cream); border: 1px solid var(--burgundy); transform: rotate(-11deg); z-index: 1; }
.photo::before { content: ''; position: absolute; width: 105px; height: 34px; top: -17px; left: 30%; background: var(--burgundy); opacity: .16; transform: rotate(6deg); }
.photo-window { aspect-ratio: 3 / 4; border: 1px solid var(--burgundy); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
[hidden] { display: none !important; }
.photo-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 18px; color: var(--burgundy); text-align: center; }
.photo-placeholder svg { width: 85px; }
.photo-placeholder span { font-size: 17px; font-style: italic; }
.cake { position: absolute; right: 9px; bottom: 24px; width: 155px; color: var(--burgundy); transform: rotate(7deg); }

/* Text stays in HTML so configuration and assistive technology remain supported. */
.locket { position: relative; width: min(88%, 340px); aspect-ratio: 635 / 425; margin: 10px auto 0; color: var(--burgundy); container-type: inline-size; }
/* The original two-hearts artwork, embedded inline and tinted with the
   configured palette through an SVG filter (no cross-origin file request). */
.hearts { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--burgundy); }
.hearts feFlood { flood-color: var(--burgundy); }
.locket time, .locket .names { position: absolute; margin: 0; text-align: center; }
.locket time { left: 25%; top: 59.5%; font-size: 23px; font-size: 4.1cqw; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; transform: translate(-50%, -50%) rotate(-10.6deg); }
/* The names sit over the right heart, nudged down and left of its wide
   chamber's raw centre: the first pass (65% x, 58.5% y) read too high and too
   far right against the artwork, so the block moved to 62.5% x and 62% y.
   6.4cqw is roughly a quarter larger than the first pass, with compact leading
   so the three lines stay inside the heart's inner outline. */
.locket .names { left: 62.5%; top: 62%; width: 26%; font-family: 'Licorice', cursive; font-style: normal; font-size: 39px; font-size: 6.4cqw; line-height: .84; text-wrap: balance; overflow-wrap: anywhere; -webkit-text-stroke: .5px currentColor; paint-order: stroke fill; transform: translate(-50%, -50%) rotate(9.9deg); }

/* Wide screens keep the original desktop composition. */
@media (min-width: 601px) {
  .invitation { min-height: 900px; min-height: max(900px, 100svh); }
  .invitation-copy { width: min(92%, 720px); padding: clamp(30px, 5vw, 52px) 0 300px; }
  .headline { width: min(100%, 620px); font-size: clamp(76px, 10vw, 128px); }
  .photo { width: clamp(220px, 29vw, 340px); bottom: -48px; left: max(-28px, calc(50% - 570px)); padding: 15px 15px 49px; }
  .cake { right: max(16px, calc(50% - 550px)); bottom: 12px; width: clamp(150px, 24vw, 270px); }
  .locket { width: min(100%, 560px); }
}
