/* «İpək» flagship (prototype 2026-11-11): a kəlağayı the guest unfolds; the open silk is the cover.
   Colours are the dyes of a kəlağayı: albalı (madder), zəfərani (saffron), indigo-black; ivory only for text.
   One memorable moment (the unfolding, then the names pressed into the medallion); everything after it is quiet.
   Shared parts (RSVP form, countdown, music button, demo bar) are styled by invite.css through its variables. */

.ip-body {
  --mad: #6b0f1e; --mad-dk: #4a0915; --mad-dp: #5a0c19; --tone: #8c2032; --tone2: #a8364a;
  --sf: #e3ac45; --sf-ink: #3a0710; --ind: #17131f; --iv: #f4e6cf; --iv-2: rgba(244, 230, 207, .74);
  --fd: "Noto Serif Display", "Noto Serif Display Fallback", Georgia, serif;
  --fb: "EB Garamond", Georgia, serif;
  --fu: "Onest", "Onest Fallback", system-ui, sans-serif;
  /* silk weave: fine noise plus a faint warp */
  --weave: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .88 0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
           repeating-linear-gradient(90deg, rgba(255, 240, 220, .022) 0 1px, transparent 1px 3px);
  --weave-dk: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .25 0 0 0 0 .02 0 0 0 0 .05 0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
              repeating-linear-gradient(90deg, rgba(90, 20, 10, .03) 0 1px, transparent 1px 3px);
  margin: 0; background: #0f0c15; color: var(--iv); font: 400 20px/1.5 var(--fb);
  -webkit-text-size-adjust: 100%; font-variant-numeric: lining-nums;
}
.ip-main a { color: inherit; }
.ip-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* the cloth's dyes (classes on the shapes inside the <symbol>) */
.k-gr { fill: var(--mad); } .k-tn { fill: var(--tone); } .k-tn2 { fill: var(--tone2); }
.k-dk { fill: var(--mad-dk); } .k-dp { fill: var(--mad-dp); } .k-sf { fill: var(--sf); } .k-iv { fill: var(--iv); }
.k-ln { stroke: var(--sf); } .k-dot { fill: none; stroke: var(--sf); stroke-linecap: round; }

.ip {
  /* the shared rules in invite.css read these */
  --page: var(--mad); --page-ink: var(--iv); --page-acc: var(--sf); --on-acc: var(--sf-ink);
  position: relative; max-width: 480px; margin: 0 auto; min-height: 100svh; overflow-x: clip;
  background: var(--ind);
}
@media (min-width: 481px) { .ip { box-shadow: 0 0 0 1px rgba(227, 172, 69, .12), 0 30px 120px rgba(0, 0, 0, .6); } }
.ip :focus-visible { outline: 2px solid var(--sf); outline-offset: 3px; }

/* ---------- opening: the folded kəlağayı ---------- */
.ip-open { display: none; }
.js .ip-open {
  --D: min(90vw, 50svh, 430px);
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4svh;
  padding: 24px; text-align: center;
  background: radial-gradient(110% 70% at 50% 52%, #2a1f30 0%, #17131f 58%, #0c0a11 100%);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab;
}
.js .ip-open.is-gone { display: none; }
.js .ip-open:not(.is-gone) ~ .inv-music, .js .ip-open:not(.is-gone) ~ .demo-bar { display: none; }
.ip-open-t { margin: 0; font: italic 300 clamp(25px, 7vw, 32px)/1.2 var(--fd); color: var(--iv); }
.ip-open-name { display: block; margin-top: 8px; font: 300 clamp(30px, 9vw, 40px)/1.1 var(--fd); font-style: normal; color: var(--sf); }
/* the folded triangle sits in the lower half of the diamond's box: lift the stage so the eye lands on it */
.ip-stage { width: var(--D); height: var(--D); margin: calc(var(--D) * -.42) 0 calc(var(--D) * -.04); perspective: 1600px; }
.ip-fold { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.ip-fold::before { /* the cloth's shadow on the table */
  content: ""; position: absolute; left: 14%; right: 14%; top: 56%; height: 38%;
  background: radial-gradient(50% 50% at 50% 40%, rgba(0, 0, 0, .7), transparent 75%); filter: blur(16px); transform: translateZ(-4px);
}
.ip-half, .ip-flap { position: absolute; left: 0; width: 100%; height: 50%; transform-style: preserve-3d; }
.ip-half--low { top: 50%; clip-path: polygon(0 0, 100% 0, 50% 100%); transform: translateZ(-2px); }
.ip-flap { top: 0; transform-origin: 50% 100%; transform: rotateX(-180deg); }
.ip-face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ip-face--front { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
/* the back of the silk: the same print, a shade duller, folded over the lower half */
.ip-face--back { transform: rotateX(180deg); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: brightness(.86) saturate(.9); }
.ip-half svg, .ip-face svg { position: absolute; left: 0; width: 100%; height: 200%; display: block; }
.ip-half--low svg, .ip-face--back svg { top: -100%; }
.ip-face--front svg { top: 0; }
.ip-shade { position: absolute; inset: 0; pointer-events: none; opacity: var(--sh, 0); }
.ip-face--front .ip-shade { background: linear-gradient(to top, rgba(20, 0, 6, .55), rgba(20, 0, 6, .1) 70%, transparent); }
/* the soft rolled edge of the fold, and light catching the silk as it lifts */
.ip-face--back .ip-shade { opacity: 1; background: linear-gradient(to bottom, rgba(255, 236, 205, .32), rgba(255, 236, 205, .06) 7%, transparent 22%),
  linear-gradient(115deg, transparent 40%, rgba(255, 236, 205, calc(.08 + var(--sh, 0) * .2)) 52%, transparent 64%); }
.ip-open.is-idle .ip-flap { animation: ip-breathe 3.6s cubic-bezier(.45, 0, .3, 1) 1.2s infinite; }
@keyframes ip-breathe { 0%, 62%, 100% { transform: rotateX(-180deg); } 76% { transform: rotateX(-163deg); } }

.ip-unfold {
  position: relative; z-index: 1; padding: 14px 28px; border: 1px solid rgba(227, 172, 69, .75); border-radius: 3px;
  background: rgba(23, 19, 31, .4); color: var(--iv); font: 500 16px/1 var(--fu); letter-spacing: .01em; cursor: pointer;
}
.ip-unfold:hover { background: rgba(227, 172, 69, .12); }
.ip-open-hint { margin: -2svh 0 0; font: italic 400 17px/1.3 var(--fb); color: var(--iv-2); }

/* ---------- cover: the open silk ---------- */
.ip-main { outline: none; }
.ip-cover { position: relative; height: 100svh; min-height: 560px; max-height: 1000px; overflow: hidden; background: var(--mad); container-type: size; }
.ip-cloth { position: absolute; inset: 0; }
.ip-cloth svg { width: 100%; height: 100%; display: block; }
.ip-cover::after { /* a little falloff toward the edges, as on cloth in low light */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(75cqmax 75cqmax at 50% 50%, transparent 45%, rgba(25, 2, 8, .38) 100%), var(--weave);
}
/* the fold it was carried in: one crease along the diagonal */
.ip-crease {
  position: absolute; left: 50%; top: 50%; width: 150cqmax; height: 3px; transform: translate(-50%, -50%) rotate(-45deg);
  background: linear-gradient(to bottom, rgba(30, 0, 8, .28), rgba(30, 0, 8, .05) 45%, rgba(255, 232, 205, .12) 55%, transparent);
  pointer-events: none; z-index: 1;
}
.ip-sheen { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; mix-blend-mode: soft-light; transform: translateX(var(--sx, 0px)); }
.ip-sheen::before {
  content: ""; position: absolute; top: -40%; bottom: -40%; left: -60%; width: 220%;
  background: linear-gradient(100deg, transparent 36%, rgba(255, 238, 214, .2) 45%, rgba(255, 246, 232, .4) 50%, rgba(255, 238, 214, .2) 55%, transparent 64%);
  animation: ip-drift 16s ease-in-out infinite alternate;
}
@keyframes ip-drift { from { transform: translateX(-24%); } to { transform: translateX(24%); } }
.ip-cover-text {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 31cqmax; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-shadow: 0 1px 14px rgba(40, 0, 10, .55);
}
.js .ip-cover-text { opacity: 0; }
.js .ip-cover.is-in .ip-cover-text { opacity: 1; }
.ip-intro { margin: 0 0 2.2cqmax; max-width: 26cqmax; font: italic 400 2.05cqmax/1.3 var(--fb); color: var(--iv-2); text-wrap: balance; }
.ip-names { margin: 0; font: 300 5.5cqmax/1 var(--fd); color: var(--iv); letter-spacing: .005em; }
.ip-names > span { display: block; }
.ip-and { margin: 1cqmax 0; font-style: italic; font-size: 3cqmax; color: var(--sf); }
.ip-cover-date { margin: 2.6cqmax 0 0; font: 400 1.95cqmax/1.3 var(--fb); color: var(--sf); }

/* ---------- sections ---------- */
.ip-sec { position: relative; padding: 84px 30px 88px; }
/* a running stitch where one band of cloth meets the next */
.ip-sec::before {
  content: ""; position: absolute; left: 30px; right: 30px; top: 26px; height: 4px;
  background: radial-gradient(circle, var(--stitch, var(--sf)) 1.2px, transparent 1.8px) 0 50% / 10px 4px repeat-x; opacity: .75;
}
.ip-h { margin: 0 0 30px; font: italic 300 36px/1.1 var(--fd); color: var(--sf); }
.ip-h--big { font: 300 46px/1.05 var(--fd); color: var(--iv); }
.ip-lead { margin: 0; font: 300 27px/1.32 var(--fd); }
.ip-note { margin: -16px 0 28px; font: italic 400 19px/1.4 var(--fb); color: var(--iv-2); }

/* letter: saffron silk, madder ink */
.ip-letter { --stitch: var(--mad); background-color: var(--sf); background-image: var(--weave-dk); color: var(--sf-ink); padding-bottom: 0; }
.ip-to { margin: 0 0 20px; font: italic 400 23px/1.3 var(--fb); }
.ip-letter-text { margin: 0; font: 300 29px/1.3 var(--fd); letter-spacing: -.005em; text-wrap: pretty; }
.ip-sign { margin: 30px 0 0; padding-left: 40px; position: relative; font: italic 400 23px/1.3 var(--fb); }
.ip-sign::before { content: ""; position: absolute; left: 0; top: .72em; width: 28px; height: 1px; background: currentColor; }
.ip-letter:not(:has(.ip-photo)) { padding-bottom: 88px; }
/* the couple photo printed into the saffron, like ink on silk */
.ip-photo { margin: 48px -30px 0; }
.ip-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.12) brightness(1.04); mix-blend-mode: multiply; }

/* date: indigo, a giant day */
.ip-date { background-color: var(--ind); background-image: var(--weave); }
.ip-day { margin: 0 0 4px -.06em; font: 300 clamp(150px, 47vw, 216px)/.8 var(--fd); letter-spacing: -.04em; color: var(--sf); }
.ip-month { margin: 0; font: italic 300 42px/1.1 var(--fd); }
.ip-time { margin: 12px 0 0; font: 400 21px/1.4 var(--fb); color: var(--iv-2); }
.ip-cd { margin-top: 40px; max-width: none; gap: 0; border-top: 1px solid rgba(227, 172, 69, .35); padding-top: 18px; }
.ip-cd div { padding: 0; background: none; border-radius: 0; }
.ip-cd span { font: 300 36px/1 var(--fd); }
.ip-cd small { font: 400 13px/1.4 var(--fu); opacity: .7; margin-top: 4px; }
.ip-date .cd-done { margin-top: 36px; font: italic 300 30px/1.2 var(--fd); color: var(--sf); }

/* programme: one saffron thread down the madder, a folded-silk knot at each moment */
.ip-prog { background-color: var(--mad); background-image: var(--weave); }
.ip-thread { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.ip-thread::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 34px; width: 1px; background: var(--sf); opacity: .55; }
.ip-thread li { position: relative; padding-bottom: 30px; }
.ip-thread li:last-child { padding-bottom: 0; }
.ip-knot { position: absolute; left: -34px; top: 10px; width: 13px; height: 13px; background: var(--sf); transform: rotate(45deg); }
.ip-thread time { display: block; font: 300 40px/1 var(--fd); color: var(--sf); font-variant-numeric: lining-nums tabular-nums; }
.ip-thread span { display: block; margin-top: 6px; font: 400 21px/1.35 var(--fb); }

/* venue */
.ip-place { background-color: var(--ind); background-image: var(--weave); }
.ip-venue { margin: 0; font: 300 42px/1.08 var(--fd); text-wrap: balance; }
.ip-addr { margin: 12px 0 0; font: 400 20px/1.4 var(--fb); color: var(--iv-2); }

/* dress code: back to saffron */
.ip-dress { --stitch: var(--mad); background-color: var(--sf); background-image: var(--weave-dk); color: var(--sf-ink); }
.ip-dress .ip-h { color: var(--sf-ink); }

/* buttons */
.ip-btns { display: grid; gap: 10px; margin-top: 32px; max-width: 330px; }
.ip-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px;
  border: 1px solid rgba(244, 230, 207, .38); border-radius: 3px; color: var(--iv); text-decoration: none;
  font: 500 16px/1 var(--fu); background: rgba(244, 230, 207, .04);
}
.ip-btn:hover { border-color: var(--sf); }
.ip-btn .icon { width: 18px; height: 18px; color: var(--sf); }
.ip-btn--line { border-color: rgba(227, 172, 69, .7); }

/* RSVP: the shared form, in madder with ivory fields */
.ip-rsvp { background-color: var(--mad); background-image: var(--weave); }
.ip-rsvp .rsvp { max-width: none; margin-top: 0; gap: 22px; font-family: var(--fu); }
.ip-rsvp .rsvp-opts { gap: 10px; }
.ip-rsvp .rsvp-opts span { text-align: left; padding: 17px 20px; border-radius: 3px; border-color: rgba(244, 230, 207, .32); font: 400 22px/1.2 var(--fd); }
.ip-rsvp .rsvp-opts input:checked + span { border-color: var(--sf); background: rgba(227, 172, 69, .16); color: var(--iv); box-shadow: inset 4px 0 0 var(--sf); }
.ip-rsvp .rsvp-field { font: 500 15px/1.3 var(--fu); color: var(--iv-2); }
.ip-rsvp .rsvp-field input, .ip-rsvp .rsvp-field textarea {
  border-radius: 3px; border: 1px solid transparent; background: var(--iv); color: var(--sf-ink); font: 400 20px/1.3 var(--fb); padding: 13px 14px;
}
.ip-rsvp .rsvp-field input:focus, .ip-rsvp .rsvp-field textarea:focus { border-color: var(--sf); box-shadow: 0 0 0 2px var(--sf); }
.ip-rsvp .stepper { border-color: rgba(244, 230, 207, .32); }
.ip-rsvp .stepper button { background: rgba(244, 230, 207, .1); color: var(--iv); }
.ip-rsvp .stepper output { color: var(--iv); font: 400 20px/1 var(--fd); }
.ip-rsvp .inv-btn--solid { min-height: 56px; border-radius: 3px; font: 600 17px/1 var(--fu); background: var(--sf); color: var(--sf-ink); border-color: var(--sf); }
.ip-rsvp .rsvp-err { color: var(--sf); }
.ip-rsvp .rsvp-done { justify-items: start; text-align: left; }
.ip-rsvp .rsvp-done .inv-big { margin: 0; font: italic 300 40px/1.1 var(--fd); color: var(--sf); }
.ip-rsvp .inv-muted { opacity: .75; }
.ip-rsvp .rsvp-ev { color: var(--sf); }

.ip-foot { padding: 44px 30px 120px; text-align: center; background: var(--ind); font: 400 14px/1.4 var(--fu); color: var(--iv-2); }
.ip-foot p { margin: 0; }
.ip-foot a { color: var(--sf); }
.ip-foot-mark { display: block; width: 26px; height: 26px; margin: 0 auto 14px; }

/* the demo bar in this design's colours */
.ip .demo-bar { background: var(--ind); border: 1px solid rgba(227, 172, 69, .4); }
.ip .demo-bar a { background: var(--sf); color: var(--sf-ink); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .ip-sheen::before, .ip-open.is-idle .ip-flap { animation: none; }
}
.ip-open.is-zoom { cursor: default; }
.ip-open.is-zoom .ip-fold::before { opacity: 0; transition: opacity .3s; }

/* ---------- shared sections in this design's cloth (seating, album, thank-you photos) ---------- */
.ip .inv-sec { position: relative; padding: 84px 30px 88px; text-align: left; display: block; border-top: 0; background-color: var(--ind); background-image: var(--weave); }
.ip .inv-sec::before {
  content: ""; position: absolute; left: 30px; right: 30px; top: 26px; height: 4px;
  background: radial-gradient(circle, var(--sf) 1.2px, transparent 1.8px) 0 50% / 10px 4px repeat-x; opacity: .75;
}
.ip .inv-h { margin: 0 0 24px; font: italic 300 36px/1.1 var(--fd); color: var(--sf); }
.ip .inv-text { margin: 0 0 14px; max-width: none; font: 400 20px/1.45 var(--fb); }
.ip .inv-muted { color: var(--iv-2); }
.ip .inv-big { margin: 0; font: 300 34px/1.15 var(--fd); }
.ip .inv-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px;
  border: 1px solid rgba(244, 230, 207, .38); border-radius: 3px; color: var(--iv); text-decoration: none; font: 500 16px/1 var(--fu); background: rgba(244, 230, 207, .04); cursor: pointer;
}
.ip .inv-btn .icon { width: 18px; height: 18px; color: var(--sf); }
.ip .inv-btn--solid { background: var(--sf); border-color: var(--sf); color: var(--sf-ink); font-weight: 600; }
.ip .inv-btn--solid .icon { color: currentColor; }
.ip .inv-upload { margin-top: 18px; max-width: 330px; }
.ip .seat-q { border-radius: 3px; background: var(--iv); color: var(--sf-ink); border-color: transparent; font: 400 20px/1 var(--fb); }
.ip .seat-mine { color: var(--sf); }
.ip .seat-pick { border-radius: 3px; background: transparent; color: var(--iv); }
.ip-shots { padding-top: 64px; }
.ip .thx-grid img { border-radius: 2px; }
.ip-thx-text { margin: 18px 0 0; font: 400 21px/1.45 var(--fb); }
.ip-letter .thx-t { font: inherit; }
/* two events: each with its title and date, then its own place and routes */
.ip-ev + .ip-ev { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(227, 172, 69, .3); }
.ip-ev-t { margin: 0 0 6px; font: italic 300 30px/1.15 var(--fd); color: var(--sf); }
.ip-ev-d { margin: 0 0 18px; font: 400 19px/1.4 var(--fb); color: var(--iv-2); }
/* language switch and the sample mark wait until the silk is open */
.js .ip-open:not(.is-gone) ~ .inv-langs, .js .ip-open:not(.is-gone) ~ .inv-ribbon { display: none; }
.ip .inv-ribbon { background: var(--sf); color: var(--sf-ink); }
.is-video .inv-langs, .is-video .inv-music, .is-video .demo-bar { display: none !important; }
.ip .seat-form { max-width: 360px; }
.ip .inv-upload { width: fit-content; }
.is-video .ip { max-width: none; } /* the story video (540 px wide): the cloth edge to edge */
