/* Ashley & Nico · save the date
   Laid out after the Bliss & Bone paperless page: same sizes, spacing and motion.
   Names: a picture of the lettering from our own Bliss & Bone card (scripts/names-image.mjs), so it matches the print.
   Fonts: Work Sans Light is the same as theirs, Inter Light for NeueSwiss, Cormorant Garamond Light Italic for Ethic Serif. */
:root {
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", Times, serif;
  --card-ink: #fffbf7;
  --rule: #d6d6d6;
  --muted: #9a9490;
  --ease-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-io: cubic-bezier(0.455, 0.03, 0.515, 0.955);
  --u: 1px; /* card width / 502, set by app.js */
  color-scheme: light;
}
* { margin: 0; padding: 0; border: 0; outline: 0; font: inherit; font-size: 100%; vertical-align: baseline; box-sizing: border-box; }
html { background: #fff; line-height: 1; -webkit-text-size-adjust: 100%; }
body { font-size: 20px; font-family: var(--sans); font-weight: 300; min-width: 320px; color: #000; background: #fff; }
b, strong { font-weight: 600; }
i, em { font-style: italic; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; transition: all 0.4s var(--ease-io); }
p { font: 300 1em/1.4 var(--sans); letter-spacing: 0.01em; margin-bottom: 20px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { display: block; width: 100%; height: auto; }
h2 { font: 300 1.8em/1.2 var(--sans); margin-bottom: 0.8em; -webkit-font-smoothing: antialiased; }
h3 { font: 500 15px/1.47 var(--sans); letter-spacing: 0.01em; -webkit-font-smoothing: antialiased; }
h5 { font: 400 15px/1 var(--serif); -webkit-font-smoothing: antialiased; }
/* Cormorant runs small next to Ethic Serif: a larger size on a tighter line keeps the same footprint */
.toGreet { font: 300 2em/0.85 var(--serif); margin-bottom: 26px; -webkit-font-smoothing: antialiased; }

input, textarea {
  font: 300 15px/34px var(--sans); height: 36px; width: 100%; padding: 0; margin: 0 auto 10px;
  background: transparent; color: #000; border-bottom: 1px solid var(--rule); border-radius: 0;
  text-align: center; -webkit-appearance: none; appearance: none;
}
textarea { resize: none; overflow: hidden; }
textarea::placeholder { color: #9b9b9b; opacity: 1; }

.button {
  display: inline-block; vertical-align: middle; padding: 9px 28px; margin: 0 3px 10px; min-width: 150px;
  font: 600 15px/24px var(--sans); letter-spacing: 1px; text-transform: uppercase; text-align: center;
  color: #000; background: transparent; border: 1px solid #000; border-radius: 21px; cursor: pointer;
  -webkit-font-smoothing: antialiased; transition: all 0.4s var(--ease-io); -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .button:hover { background: #000; color: #fff; } }
.button:active { background: #000; color: #fff; }
.button[disabled] { opacity: 0.35; pointer-events: none; }
.line { display: inline-block; width: 50px; border-top: 1px solid var(--rule); margin-top: 28px; }

.animate { transition-property: opacity, transform; transition-duration: 1s; transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
.fadeUp { transform: translateY(50px); opacity: 0; }

/* ───── the card on the painting ───── */
#mainContent { padding-top: 100vh; padding-top: clamp(492px, 100vh, 900px); }
.cardPreview {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-content: center;
  width: 100%; height: 100vh; min-height: 492px; max-height: 900px; padding: 0 5% 1%;
  position: absolute; top: 0; left: 0; overflow: hidden; pointer-events: none;
  font-size: 14px; line-height: 23px; background: #fff; will-change: height;
}
.backgroundCard {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: url("/assets/orchard.webp") center / cover no-repeat;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  opacity: 0; transition: opacity 1s var(--ease-quad); will-change: opacity, background-position;
}
@media (max-width: 1200px) { .backgroundCard { background-image: url("/assets/orchard-1200.webp"); } }
.preview {
  position: relative; width: 502px; max-width: 100%;
  box-shadow: 3px 7px 24px rgba(0, 0, 0, 0.65);
  opacity: 0; transform: translateY(130%);
  transition: transform 1s var(--ease-quad), opacity 1s var(--ease-quad);
  will-change: transform, opacity; transform-origin: 50% 50%;
}
.card { position: relative; background: #fff; }
.card img { aspect-ratio: 502 / 703; object-fit: cover; }
.cardPreview.active .backgroundCard { opacity: 1; }
.cardPreview.active .preview { opacity: 1; transform: translateY(0); }
.cardPreview.done .backgroundCard, .cardPreview.done .preview { transition-property: none !important; }

/* text on the card, placed by the same percentages as the Bliss & Bone card */
.content { position: absolute; inset: 0; color: var(--card-ink); }
.content .text { position: absolute; overflow: hidden; text-align: center; }
.content p { margin: 0; font: inherit; letter-spacing: inherit; -webkit-font-smoothing: antialiased; }
/* the names, captured from our Bliss & Bone card; position measured on it (percent of the card) */
.content .names-img { position: absolute; left: 29.3482%; top: 54.2141%; width: 42.1159%; height: auto; display: block; pointer-events: none; }
.content .when { top: 76.8819%; left: 7.07154%; width: 83.7697%; height: 30%;
  padding-top: calc(var(--u) * 43.2);
  font: 300 calc(var(--u) * 18) / 1.2 "Work Sans", var(--sans); text-transform: uppercase; }
.content .follow { top: 93.5028%; left: 15.7518%; width: 67.86%; height: 9.33818%;
  padding-top: calc(var(--u) * 16.8);
  font: 300 calc(var(--u) * 14) / 1.2 "Work Sans", var(--sans); text-transform: uppercase; }
.content .monogram { position: absolute; top: 41.8859%; left: 39.1892%; width: 21%; height: auto; color: var(--card-ink); overflow: visible; }
.monogram text { fill: currentColor; font-family: "Pinyon Script", cursive; }
.monogram .mono-a { font-size: 46px; }
.monogram .mono-n { font-size: 30px; }

/* ───── below the card ───── */
.greeting { text-align: center; padding: 36px 40px 0; }
.greeting h3 { letter-spacing: 1px; text-transform: uppercase; }
.greeting h3 b { font-weight: 600; }
.eventTitle { text-align: center; padding: 24px 40px 50px; }
.eventTitle h2 { font: 300 1.6em/1.2 var(--sans); }
.addressesForm { display: block; max-width: 500px; margin: 30px auto 0; }
.formRow { display: flex; align-items: flex-end; margin-bottom: 20px; }
.formRow > * { width: 100%; margin-right: 10px; }
.formRow > *:last-child { margin-right: 0; }
.fieldText { display: flex; align-items: flex-start; border-bottom: 1px solid var(--muted); }
.fieldText.fifty { width: calc(50% - 5px); }
.fieldText label {
  display: inline-block; padding-right: 16px; white-space: nowrap;
  font: 300 15px/30px var(--sans); -webkit-font-smoothing: antialiased; transition: opacity 0.2s var(--ease-io);
}
.fieldText label.active { opacity: 0.65; }
.fieldText input, .fieldText textarea {
  min-width: 0; flex: 1; padding: 0 10px 0 0; margin: 0; border: none;
  text-align: left; line-height: 30px; height: 30px; font-size: 16px; /* 16px stops iPhone zooming in */
}
.fieldText textarea { padding: 0; }
.addressesForm .button { margin-top: 20px; }
.addressesForm .button.success { height: 44px; background: #000; color: #fff; pointer-events: none; }
.addressesForm .button.success svg { display: inline-block; width: 22px; height: 22px; vertical-align: middle; }
.formMsg { min-height: 0; margin: 0; font-size: 14px; line-height: 1.4; color: #b3261e; }
.formMsg:empty { display: none; }
.formMsg.ok { color: var(--muted); }

.messageWrapper { background: #fff; }
.message { padding: 5% 40px; }
.message > div { max-width: 630px; margin: 0 auto; }

/* where to stay */
.stay { text-align: center; border-top: 1px solid var(--rule); padding-top: 48px; }
.stay p { margin-bottom: 0; }
.stay__eyebrow { font: 500 12px/1.4 var(--sans); letter-spacing: 3px; text-transform: uppercase; }
.stay__name { font: 300 1.6em/1.2 var(--sans); margin-top: 16px; }
.stay__addr { font: italic 400 19px/1.4 var(--serif); margin-top: 8px !important; }
.stay__addr a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.stay__deal { display: inline-block; margin-top: 26px !important; padding: 7px 18px; border: 1px solid #000; border-radius: 21px; font: 500 14px/1.4 var(--sans); letter-spacing: 1px; text-transform: uppercase; }
.stay__how { max-width: 400px; margin: 22px auto 0 !important; font-size: 17px; line-height: 1.5; color: #333; }
/* scroll hint: a thin arrow that bobs on the painting until the guest scrolls */
.scrollCue {
  position: absolute; left: 50%; top: calc(100vh - 58px); z-index: 10; transform: translateX(-50%);
  width: 52px; height: 52px; padding: 10px; border: 0; background: none; color: #fff; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.8s var(--ease-io);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); -webkit-tap-highlight-color: transparent;
}
.scrollCue.show { opacity: 0.85; pointer-events: auto; }
.scrollCue.gone { opacity: 0; pointer-events: none; transition-duration: 0.3s; }
.scrollCue svg { display: block; width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round; animation: cueBob 2.4s var(--ease-io) infinite; }
@keyframes cueBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scrollCue svg { animation: none; } }
.is-hero .scrollCue { display: none; }

/* add to calendar: a smaller outlined button under the call button; opens a short list of calendars */
.cal { display: block; margin-top: 4px; }
.cal__btn { list-style: none; display: inline-block; padding: 6px 20px; min-width: 0; font-size: 12px; line-height: 20px; letter-spacing: 1px; }
.cal__btn::-webkit-details-marker { display: none; }
.cal[open] .cal__btn { background: #000; color: #fff; }
.cal__menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 6px; }
.cal__menu a { font: 500 13px/1.6 var(--sans); letter-spacing: 0.5px; color: #000; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
@media (hover: hover) { .cal__menu a:hover { text-decoration-color: #000; } }
.stay__call { margin-top: 24px; background: #000; color: #fff; text-transform: none; letter-spacing: 0.5px; }
@media (hover: hover) { .stay__call:hover { background: #fff; color: #000; } }

footer { padding: 14px 0; background: #000; color: #fff; overflow: hidden; }
footer .logo { display: block; float: left; margin: 0 0 0 20px; font: 400 17px/15px var(--serif); letter-spacing: 0.16em; color: #fff; }
footer .logo i { font-style: italic; letter-spacing: 0; }
footer h5 { float: right; width: 400px; margin: 0 12px 0 0; text-align: right; color: #fff; font-weight: 400; font-size: 16px; }
footer h5 span { margin: 0 8px; letter-spacing: 1px; }

@media (max-width: 768px) {
  .greeting { padding: 50px 20px 0; }
  .eventTitle { padding: 40px 20px 25px; }
  .message { padding: 40px 40px 26px; text-align: center; }
  footer { padding: 15px 20px; text-align: center; }
  footer .logo { float: none; margin: 0 auto 15px; }
  footer h5 { float: none; width: 100%; margin: 0; text-align: center; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  .animate, .backgroundCard, .preview { transition: none !important; }
}

/* hero-only view used to render the email picture: /?hero */
.is-hero #mainContent > :not(.cardPreview) { display: none; }
.is-hero .cardPreview { position: fixed; height: 100vh; max-height: none; }
.is-hero .preview, .is-hero .backgroundCard { transition: none; }
