/* ==========================================================================
   invite.dottut.com | the note of thanks (Views/Home/Thanks.cshtml)
   After the wedding (Wedding:Phase) this page replaces the cinematic invitation at the site's root. It sits on
   top of site.css and reuses its tokens, the wishes dialog, the warm button (.cta) and the toast. Every class of
   its own is prefixed ty-. Motion is transform and opacity only, and stops under reduced motion.
   ========================================================================== */

.nowrap { white-space: nowrap; }

/* ---------- the sky: dusk, stars, a warm horizon with the palace, and lit lanterns drifting up ---------- */
.ty-sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: linear-gradient(180deg, #060b1c 0%, #0c1634 32%, #1b2550 56%, #463a5e 78%, #77505a 100%); }
.ty-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ty-stars i { position: absolute; left: var(--x); top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: var(--a, 0.6); animation: ty-twinkle 5s ease-in-out var(--d, 0s) infinite; }
.ty-stars i:nth-child(3n) { width: 3px; height: 3px; }
@keyframes ty-twinkle { 0%, 100% { opacity: calc(var(--a, 0.6) * 0.4); } 50% { opacity: var(--a, 0.6); } }
.ty-glow { position: absolute; left: 50%; bottom: -22vh; width: max(140vw, 900px); height: 64vh; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(240, 176, 106, 0.55), rgba(240, 176, 106, 0.16) 55%, rgba(240, 176, 106, 0)); }
.ty-palace { position: absolute; left: 50%; bottom: 0; width: min(92vw, 640px, 95vh); height: auto; transform: translateX(-50%); opacity: 0.7; }
.ty-lantern { position: absolute; left: var(--x); bottom: -12vh; width: var(--s); height: auto; aspect-ratio: 120 / 200; opacity: 0; animation: ty-float var(--t) linear var(--d) infinite; will-change: transform, opacity; }
@keyframes ty-float {
  0% { transform: translate3d(0, 0, 0) rotate(-3deg); opacity: 0; }
  8% { opacity: 0.9; }
  50% { transform: translate3d(3vw, -62vh, 0) rotate(3deg); }
  86% { opacity: 0.75; }
  100% { transform: translate3d(-1vw, -125vh, 0) rotate(-2deg); opacity: 0; }
}

/* ---------- the card ---------- */
.ty { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: max(28px, env(safe-area-inset-top)) 16px max(36px, env(safe-area-inset-bottom)); }
.ty-card { width: min(100%, 540px); padding: clamp(1.6rem, 6vw, 2.6rem) clamp(1.25rem, 6vw, 2.4rem); text-align: center; color: var(--cream); background: rgba(8, 12, 28, 0.7); border: 1px solid rgba(201, 162, 74, 0.45); border-radius: 4px; box-shadow: inset 0 0 0 6px rgba(8, 12, 28, 0.35), inset 0 0 0 7px rgba(201, 162, 74, 0.28), 0 30px 60px rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* The couple waving from an arch at dusk (the illustration has a transparent ground). */
.ty-photo { width: min(48vw, 210px); aspect-ratio: 2 / 3; margin: 0 auto 1.4rem; padding: 7% 5% 0; border-radius: 999px 999px 10px 10px; background: linear-gradient(180deg, #101a3a 0%, #2b3a6a 45%, #6a5470 75%, #b8845e 100%); border: 1px solid rgba(201, 162, 74, 0.6); box-shadow: 0 0 0 6px rgba(8, 12, 28, 0.45), 0 0 0 7px rgba(201, 162, 74, 0.3), 0 24px 48px rgba(0, 0, 0, 0.45); overflow: hidden; }
.ty-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; transform-origin: 50% 100%; animation: ty-greet 6s ease-in-out infinite alternate; }
@keyframes ty-greet { to { transform: translateY(-1.2%) scale(1.012); } }

.ty-eyebrow { margin: 0; font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold-soft); }
.ty-title { margin: 0.3rem 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 13vw, 4.8rem); line-height: 1; color: var(--ivory); text-shadow: 0 0 34px rgba(244, 187, 106, 0.35), 0 2px 10px rgba(0, 0, 0, 0.45); }
.ty-message { max-width: 32ch; margin: 1rem auto 0; font-family: var(--display); font-style: italic; font-size: clamp(1.12rem, 4vw, 1.32rem); line-height: 1.42; color: rgba(244, 233, 211, 0.92); text-wrap: balance; }
.ty-names { margin: 1.3rem 0 0; font-family: var(--display); font-size: clamp(1.4rem, 5.4vw, 1.8rem); line-height: 1.15; color: var(--gold-soft); }
.ty-names .heart { width: 0.55em; height: 0.55em; color: var(--gold); }
.ty-date { margin: 0.55rem 0 0; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(232, 207, 143, 0.78); }
.ty-venue { display: block; margin-top: 0.3rem; font-family: var(--display); font-style: italic; font-size: 1rem; letter-spacing: 0.02em; text-transform: none; color: rgba(244, 233, 211, 0.78); }

/* The wishes book (the dialog from site.css) and sharing. */
.ty-actions { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin-top: 1.5rem; }
.ty-actions .cta { max-width: 360px; margin: 0; }
.ty-share { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border: 0; border-radius: 999px; background: none; color: rgba(232, 207, 143, 0.85); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer; transition: color 0.3s, background 0.3s; }
.ty-share:hover, .ty-share:focus-visible { color: var(--ivory); background: rgba(201, 162, 74, 0.12); outline: none; }
.ty-share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.no-js .ty-actions { display: none; } /* both need the script */

/* The maker's enquiry. */
.ty-maker { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid rgba(201, 162, 74, 0.28); }
.ty-maker-eyebrow { margin: 0; font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-soft); text-wrap: balance; }
.ty-maker-text { max-width: 40ch; margin: 0.5rem auto 0; font-size: 0.84rem; line-height: 1.5; color: rgba(244, 233, 211, 0.82); text-wrap: balance; }
.ty-maker-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; }
.ty-maker-btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 1rem; border: 1px solid rgba(201, 162, 74, 0.6); border-radius: 999px; background: rgba(201, 162, 74, 0.08); color: var(--cream); text-decoration: none; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; transition: background 0.3s, border-color 0.3s, transform 0.3s; }
.ty-maker-btn:hover, .ty-maker-btn:focus-visible { background: rgba(201, 162, 74, 0.2); border-color: var(--gold); outline: none; transform: translateY(-1px); }
.ty-maker-btn svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--gold-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ty-maker-btn img { flex: none; width: 18px; height: 18px; border-radius: 50%; }

/* Everything on the card rises into place in turn (--d). */
.ty-rise { opacity: 0; transform: translateY(16px); animation: ty-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s) forwards; }
@keyframes ty-rise { to { opacity: 1; transform: none; } }

/* ---------- wide screens: the arch beside the words ---------- */
@media (min-width: 640px) and (orientation: landscape) {
  .ty-card { width: min(100%, 960px); display: grid; grid-template-columns: clamp(170px, 27vw, 300px) minmax(0, 1fr); align-items: center; column-gap: clamp(1.8rem, 4vw, 3.4rem); padding: clamp(1.6rem, 4vw, 2.8rem) clamp(1.6rem, 4.5vw, 3.2rem); text-align: left; }
  .ty-photo { width: 100%; margin: 0; }
  .ty-message, .ty-maker-text { margin-left: 0; }
  .ty-message { max-width: 40ch; }
  .ty-actions { flex-direction: row; align-items: center; gap: 0.6rem; }
  .ty-actions .cta { width: auto; }
  .ty-maker-actions { justify-content: flex-start; }
}
/* Laptop windows: a little less air, so the whole card fits the screen. */
@media (min-width: 640px) and (orientation: landscape) and (max-height: 820px) {
  .ty-card { padding-top: 2rem; padding-bottom: 2rem; }
  .ty-title { font-size: clamp(2.6rem, 9vh, 4.2rem); }
  .ty-actions { margin-top: 1.2rem; }
  .ty-maker { margin-top: 1.2rem; padding-top: 1rem; }
}
@media (min-width: 640px) and (orientation: landscape) and (max-height: 680px) {
  .ty-message { font-size: 1.15rem; }
  .ty-actions .cta-text small { display: none; }
}
/* Short landscape phones: a smaller arch and title, and the enquiry keeps only its buttons. */
@media (orientation: landscape) and (max-height: 520px) {
  .ty { padding-top: 16px; padding-bottom: 16px; }
  .ty-card { grid-template-columns: clamp(130px, 22vw, 210px) minmax(0, 1fr); padding: 1.2rem 1.6rem; }
  .ty-title { font-size: clamp(2.2rem, 9vh, 3.2rem); }
  .ty-message { margin-top: 0.6rem; font-size: 1rem; }
  .ty-names { margin-top: 0.7rem; font-size: 1.3rem; }
  .ty-actions { margin-top: 0.9rem; }
  .ty-maker { margin-top: 0.9rem; padding-top: 0.8rem; }
  .ty-maker-text { display: none; }
  .ty-maker-actions { margin-top: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ty-rise { opacity: 1; transform: none; animation: none; }
  .ty-photo img, .ty-stars i { animation: none; }
  .ty-lantern { animation: none; opacity: 0.8; transform: translateY(calc(-1 * var(--y, 40vh))); }
}
