/* gracias/css/gracias.css: the note that stands where the invitation was (since 2026-11-27; the wedding was
   2026-11-14). The invitation's own paper, open panels, faces and colours, copied from ../../css/tokens.css
   and ../../css/styles.css: this folder deploys on its own (firebase.gracias.json), so it carries its own
   copies. A value changes in the invitation's files first; this file follows. No motion: what is here is
   what shows. */

/* the faces: the invitation's own files, copied under /nota/ (this folder's own address, so no old address
   of the invitation can match the one-year cache rule in firebase.gracias.json) */
@font-face {
  font-family: "Cormorant";
  src: url("/nota/fonts/cormorant.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Cormorant";
  src: url("/nota/fonts/cormorant-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: block;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("/nota/fonts/libre-baskerville.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: block;
}

:root {
  /* the invitation's tokens (css/tokens.css), the ones this page uses */
  --paper: #f5f0e6;
  --paper-edge: #e9e2d4;
  --base: #5c6444;
  --olive: #4a5233;
  --olive-soft: #596240;
  --ink: #3a3a2c;
  --blush: #e9cfc4;
  --wine: #6b2a32;
  --shadow-rgb: 66, 50, 32;
  --serif: "Cormorant", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --serif-2: "Libre Baskerville", Baskerville, "Times New Roman", serif;
  --gutter: clamp(20px, 5vw, 48px);
  /* the stage (css/styles.css): the cream card is 1000 of a 1920 x 1080 stage; the open panels fill the rest */
  --s: max(100vw / 1920, 100vh / 1080);
  --cream: calc(1000 * var(--s));
  --margin: calc(55 * var(--s));
  --flap: calc(555 * var(--s));
}
@media (orientation: portrait) {
  :root { --cream: 100vw; --margin: 0px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
h1, p { margin: 0; }
::selection { background: var(--blush); color: var(--wine); }

/* ---------- the paper: the card's cream, lit once, under the whole page ---------- */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply; opacity: .28;
}
.light {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 30% 18%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 62%),   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
    radial-gradient(ellipse 120% 100% at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(var(--shadow-rgb), .12) 100%),   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
    linear-gradient(180deg, var(--paper), var(--paper-edge));   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
}
.light.grain::after { opacity: .16; }

/* ---------- the covers: the open panels at both edges (landscape only), the invitation's own ---------- */
.covers { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.cover {
  position: absolute; top: 0; bottom: 0; width: calc((100% - var(--cream)) / 2);
  background: var(--base); overflow: hidden;
}
.cover-l { left: 0; }
.cover-r { right: 0; }
.cover img {
  position: absolute; top: 50%; width: var(--flap); height: calc(var(--flap) / .3525); max-width: none;
  object-fit: cover; -webkit-user-drag: none; user-select: none;
}
.cover-l img { right: var(--margin); transform: translateY(-50%) scaleX(-1); }
.cover-r img { left: var(--margin); transform: translateY(-50%) scaleX(-1); }
/* the board's margin: the raised card darkens the board beside it */
.cover::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: var(--margin); z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .06));   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
}
.cover-l::before { right: 0; box-shadow: inset calc(var(--margin) * -.45) 0 calc(var(--margin) * .6) calc(var(--margin) * -.2) rgba(12, 14, 6, .34), inset 1px 0 0 rgba(255, 255, 255, .08); }   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
.cover-r::before { left: 0;  box-shadow: inset calc(var(--margin) * .45) 0 calc(var(--margin) * .6) calc(var(--margin) * -.2) rgba(12, 14, 6, .34), inset -1px 0 0 rgba(255, 255, 255, .08); }   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
/* the crease where the panel is hinged */
.cover::after { content: ""; position: absolute; top: 0; bottom: 0; width: calc(var(--flap) * .28); z-index: 1; }
.cover-l::after { right: var(--margin); background: linear-gradient(270deg, rgba(10, 12, 6, .26), rgba(10, 12, 6, 0)); }   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
.cover-r::after { left: var(--margin);  background: linear-gradient(90deg,  rgba(10, 12, 6, .26), rgba(10, 12, 6, 0)); }   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
@media (orientation: portrait) { .covers { display: none; } }

/* ---------- the note: printed on the cream between the covers, centred as the card's wording was ---------- */
.note-page {
  min-height: 100vh; min-height: 100svh;   /* taste-skill-ignore: the invitation's own paper light and panel shading, copied from css/styles.css */
  display: grid; place-items: center;
  padding: clamp(48px, 9vh, 112px) max(var(--gutter), calc((100% - var(--cream)) / 2 + var(--gutter)));
}
/* type scales with the note's width, as print does (cqw), with floors for phones (the card's own sizes) */
.note {
  width: min(100%, 600px);
  container-type: inline-size;
  display: grid; justify-items: center;
  text-align: center;
}
.seal { width: clamp(58px, 13cqw, 80px); height: auto; margin-bottom: clamp(24px, 5cqw, 36px); }
h1 {
  font-weight: 500; color: var(--olive);
  text-transform: uppercase; letter-spacing: .05em;   /* the names' setting on the card */
  font-size: clamp(32px, 8.8cqw, 58px); line-height: 1.08;   /* leads the note as the names lead the card */
  text-wrap: balance;
}
.names {
  margin-top: clamp(28px, 6cqw, 44px);
  color: var(--olive); font-weight: 500;
  font-size: clamp(24px, 5.2cqw, 32px); line-height: 1.2;   /* the footer's names */
}
.names .and { font-style: italic; font-weight: 400; color: var(--olive-soft); padding: 0 .1em; }   /* the couple's italic & */
.when {
  margin-top: clamp(10px, 2.2cqw, 14px);
  display: grid; gap: .15em;
  font-family: var(--serif-2); text-transform: uppercase; letter-spacing: .1em;   /* the card's informational lines */
  font-size: clamp(13px, 2.3cqw, 14px); line-height: 1.6; font-weight: 400; color: var(--ink);
}
