/* =========================================================
   SAROY va MAKTUB dizaynlari + umumiy yangi komponentlar
   ========================================================= */
:root { --on-accent: #fff; }

/* ---------------- Mavzu ranglari ---------------- */
.t-saroy {
  --bg: #0a0e2a; --bg2: #0d1233; --ink: #f1e4c3; --muted: #a99b80;
  --accent: #e2bd6e; --accent-2: #c9a35a; --gold: #e2bd6e; --card: #ffffff08;
  --line: #e2bd6e33; --on-accent: #1b1430; --intro-bg: #05081a;
  --petal-a: #ffd98a; --petal-b: #fff1c4; --petal-c: #e2a94a;
}
.t-maktub {
  --bg: #faf3ea; --bg2: #fffaf3; --ink: #4a3a2e; --muted: #8c7a6a;
  --accent: #a8555f; --accent-2: #6f9079; --gold: #c9a96a; --card: #fffdf8e6;
  --line: #ead8c6; --intro-bg: radial-gradient(120% 90% at 50% 20%, #fffaf3 0%, #f6e8da 70%);
  --petal-a: #f4c6cc; --petal-b: #ffffff; --petal-c: #e9a7b2;
  --inner: #fff; --inner-edge: #eee;
}

.btn-solid, .countdown div { color: var(--on-accent); }
.lang button.active { color: var(--on-accent); }

/* =================== SAROY: ESHIK =================== */
.intro-door { display: block; background: radial-gradient(ellipse at 50% 45%, #0f1640 0%, #05081a 75%); cursor: pointer; }
.door-stage {
  position: absolute; left: 50%; top: 50%; height: 100%; aspect-ratio: 400 / 860;
  transform: translate(-50%, -50%); transform-origin: 50% 52%; perspective: 1400px;
}
.door-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.leaf {
  position: absolute; top: 23.256%; height: 58.14%; width: 26.25%;
  transition: transform 2s cubic-bezier(.55,.05,.25,1) .45s;
  will-change: transform; filter: drop-shadow(0 0 1px #000);
}
.leaf svg { width: 100%; height: 100%; display: block; }
.leaf-l { left: 23.75%; transform-origin: 0 50%; }
.leaf-r { left: 50%; transform-origin: 100% 50%; }
.door-light {
  position: absolute; left: 23.75%; width: 52.5%; top: 23.256%; height: 58.14%;
  border-radius: 50% 50% 0 0 / 21% 21% 0 0; overflow: hidden; opacity: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 60%, #fffdf2 0%, #ffe6a8 26%, #f5a742 55%, #8a3f10 85%, #2a1206 100%);
  transition: opacity 1.4s ease .5s;
}
.door-window {
  position: absolute; left: 31%; width: 38%; top: 20%; height: 52%;
  border-radius: 50% 50% 0 0 / 28% 28% 0 0;
  background: linear-gradient(#fffef6, #ffe9b0); box-shadow: 0 0 50px 24px #fff1c4; opacity: .9;
}
.door-spill {
  position: absolute; left: 4%; width: 92%; top: 80%; height: 20%; opacity: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 0%, #ffd27acc, #ffb34733 50%, transparent 75%);
  transition: opacity 1.6s ease .7s;
}
.seam {
  position: absolute; left: calc(50% - 1px); width: 2px; top: 24.5%; height: 56.5%;
  background: linear-gradient(transparent, #ffe7a3 12%, #fff8dc 50%, #ffe7a3 88%, transparent);
  box-shadow: 0 0 14px 3px #ffc65c99; animation: seamPulse 2.4s ease-in-out infinite;
}
.door-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 52%, #fffdf5 0%, #ffe6ad 55%, #f0b860 100%);
  transition: opacity .8s ease 2.35s;
}
.door-title {
  position: absolute; left: 0; right: 0; top: calc(5.5svh + env(safe-area-inset-top)); z-index: 3; margin: 0;
  text-align: center; font: 500 clamp(21px, 6.2vw, 30px)/1.2 "Cormorant Garamond", serif;
  letter-spacing: .17em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff1c8, #e2bd6e 55%, #a87b2e); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fadeDown 1.2s ease both .3s; filter: drop-shadow(0 2px 10px #000);
}
.door-hint {
  position: absolute; left: 0; right: 0; bottom: calc(4.5svh + env(safe-area-inset-bottom)); z-index: 3;
  width: max-content; max-width: calc(100% - 32px); margin: 0 auto; white-space: nowrap;
  padding: 12px 22px; border: 1px solid #d6aa5566; border-radius: 99px;
  background: #0a0b1ccc; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #e8cf95; font-size: 10.5px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  animation: fadeUp 1s ease both 1s, glowPill 2.4s ease-in-out infinite 2s;
}
.intro-door .lamp { animation: swing 5s ease-in-out infinite; }
.intro-door .lamp:nth-of-type(2) { animation-delay: -2.5s; }
.glow { animation: flicker 3.2s ease-in-out infinite; }
.candle:nth-of-type(2n) .glow { animation-delay: -1.1s; }
.fl { transform-box: fill-box; transform-origin: 50% 100%; animation: flame 1.3s ease-in-out infinite alternate; }
.lamp-core { animation: flicker 2.6s ease-in-out infinite; }

.intro-door.opening .seam { animation: seamOpen .9s ease forwards; }
.intro-door.opening .leaf-l { transform: rotateY(108deg); }
.intro-door.opening .leaf-r { transform: rotateY(-108deg); }
.intro-door.opening .door-light, .intro-door.opening .door-spill { opacity: 1; }
.intro-door.opening .door-stage { transform: translate(-50%, -50%) scale(3.6); transition: transform 1.9s cubic-bezier(.7,0,.35,1) 1.45s; }
.intro-door.opening .door-flash { opacity: 1; }
.intro-door.opening .door-title, .intro-door.opening .door-hint { opacity: 0; transition: opacity .5s; animation: none; }

/* =================== MAKTUB: KONVERT =================== */
.intro-env { background: #fbf5ec; }
.env-flora { position: absolute; inset: 0; width: 100%; height: 100%; }
.flora-tl { animation: floraIn 1.6s ease both .1s; transform-origin: 0 0; }
.flora-br { animation: floraIn 1.6s ease both .3s; transform-origin: 400px 860px; }
.env-title {
  margin: 0 0 34px; font: 400 clamp(44px, 13vw, 60px)/1 "Great Vibes", "Cormorant Garamond", serif;
  color: #9c5560; animation: fadeDown 1.1s ease both .35s;
}
.intro-env .intro-kicker { color: #6f9079; }
.envelope {
  --w: min(80vw, 330px); position: relative; width: var(--w); height: calc(var(--w) * .66);
  margin: 0 auto; perspective: 1000px; cursor: pointer; outline: none;
  animation: giftIn 1.2s cubic-bezier(.2,.9,.25,1.2) both .5s;
  transition: transform 1s cubic-bezier(.6,0,.3,1), opacity .9s ease;
}
.env-back { position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(#e7d8bf, #dccaa9); box-shadow: 0 30px 50px -20px #5a3a2066; }
.env-letter {
  position: absolute; left: 6%; right: 6%; top: 6%; height: 88%; z-index: 1;
  background: #fffdf8; border-radius: 6px; box-shadow: 0 2px 10px #0002;
  display: grid; place-items: center; text-align: center; padding: 10px;
  transition: transform 1.1s cubic-bezier(.3,.7,.2,1) 1s;
}
.env-letter::before { content: ""; position: absolute; inset: 7px; border: 1px solid #e8d3b0; border-radius: 4px; }
.letter-inner small { display: block; font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: #6f9079; font-weight: 700; }
.letter-inner b { display: block; font: 400 30px/1.1 "Great Vibes", "Cormorant Garamond", serif; color: #8a4a54; margin: 6px 0 4px; }
.letter-inner b i { font-size: .7em; color: #c9a96a; margin: 0 6px; }
.letter-inner em { font-style: normal; font-size: 11px; letter-spacing: .24em; color: #8c7a6a; }
.env-front {
  position: absolute; inset: 0; z-index: 2; border-radius: 8px;
  background: linear-gradient(165deg, #f3e9d8, #e5d4b7);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.env-front::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent 49.6%, #b9a07a55 50%, transparent 50.6%),
              linear-gradient(to top left, transparent 49.6%, #b9a07a55 50%, transparent 50.6%);
}
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 58%; z-index: 3;
  background: linear-gradient(#efe3cd, #e0cdac); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; transition: transform .9s cubic-bezier(.4,.1,.2,1) .35s, z-index 0s .75s;
}
.env-seal {
  position: absolute; left: 50%; top: 56%; width: 64px; height: 64px; z-index: 4;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cc5566, #8e2433 55%, #5e1220);
  box-shadow: 0 4px 10px #0005, inset 0 -3px 6px #0004, 0 0 0 3px #8e2433, 0 0 0 4px #6e1a28;
  display: grid; place-items: center; color: #f3d9a0;
  font: italic 600 21px "Cormorant Garamond", serif;
  transition: transform .5s cubic-bezier(.5,-0.5,.5,1.5), opacity .45s ease .1s;
  animation: sealPulse 2.4s ease-in-out infinite 1.8s;
}
.env-seal::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px dashed #f3d9a066; }
.env-seal i { font-size: .7em; margin: 0 1px; }
.intro-env.opening .env-seal { transform: translate(-50%, -50%) scale(1.35) rotate(-18deg); opacity: 0; animation: none; }
.intro-env.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.intro-env.opening .env-letter { transform: translateY(-64%); }
.intro-env.zoom .envelope { transform: scale(2.2) translateY(14%); opacity: 0; }
.intro-env.opening .env-title, .intro-env.opening .intro-hint, .intro-env.opening .intro-kicker { opacity: 0; transform: translateY(-12px); transition: .5s; animation: none; }

/* =================== SAROY: SAHIFA =================== */
.t-saroy .page { box-shadow: 0 0 80px #000; }
.t-saroy .title {
  font-weight: 500; text-transform: uppercase; letter-spacing: .14em; font-size: clamp(27px, 7.8vw, 36px);
  background: linear-gradient(180deg, #fff1c8, #e2bd6e 55%, #a87b2e); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t-saroy .label { color: #a99b80; }
.t-saroy .cover-text { margin-top: 9svh; text-shadow: none; filter: drop-shadow(0 2px 14px #000c); }
.t-saroy .names { text-transform: uppercase; letter-spacing: .08em; font-weight: 500; font-size: clamp(40px, 12.5vw, 58px); }
.t-saroy .names > span:not(.amp), .t-saroy .final-text h3 {
  background: linear-gradient(180deg, #fff3cf, #e8c47a 50%, #a87b2e); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t-saroy .names .amp { color: #e2bd6e; text-transform: none; }
.t-saroy .cover-kicker { color: #c9a35a; }
.t-saroy .cover-date { color: #d9c9a0; }
.t-saroy .scroll-hint, .t-saroy .lang, .t-saroy .music-btn { background: #0b0f2bcc; color: #e2bd6e; box-shadow: none; border: 1px solid #e2bd6e33; }
.t-saroy .lang button { color: #a99b80; }
.t-saroy .lang button.active { background: linear-gradient(#f0d58e, #c9a35a); }
.t-saroy .btn-solid { background: linear-gradient(180deg, #f3d98f, #c9a050); border-color: #c9a050; box-shadow: 0 10px 24px -12px #e2bd6e; }
.t-saroy .btn-line { color: #e2bd6e; border-color: #e2bd6e66; }
.t-saroy .countdown div { background: transparent; color: var(--ink); box-shadow: none; border-radius: 0; border-left: 1px solid var(--line); }
.t-saroy .countdown div:first-child { border-left: 0; }
.t-saroy .countdown b { font-size: 34px; font-weight: 500; }
.t-saroy .calendar, .t-saroy .place-card, .t-saroy .rsvp-done { background: #ffffff06; box-shadow: none; }
.t-saroy .the-day svg { display: none; }
.t-saroy .the-day i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(#f3d98f, #c9a050); color: #1b1430; box-shadow: 0 0 18px #e2bd6e88; animation: heartbeat 2s ease-in-out infinite; }
.t-saroy .t-ic { background: #0d1233; border-color: #e2bd6e55; color: #e2bd6e; }
.t-saroy .timeline time { color: #e2bd6e; }
.t-saroy .field input, .t-saroy .field textarea, .t-saroy .choice label, .t-saroy .stepper { background: #ffffff08; color: var(--ink); border-color: #e2bd6e33; }
.t-saroy .field ::placeholder { color: #8d8170; }
.t-saroy .place-card .pin circle { fill: #0d1233; }
.t-saroy .final-text { text-shadow: none; filter: drop-shadow(0 2px 14px #000c); }
.t-saroy .final-text h3 { text-transform: uppercase; letter-spacing: .1em; font-weight: 500; font-size: clamp(36px, 10.5vw, 50px); }
.t-saroy .final-names { color: #d9c9a0; }
.t-saroy .map-embed iframe { filter: invert(.9) hue-rotate(185deg) saturate(.6) brightness(.95) contrast(.95); }
.t-saroy .scene .lamp { animation: swing 6s ease-in-out infinite; }
.t-saroy .scene .win { animation: winGlow 4s ease-in-out infinite alternate; }
.float-candle { animation: bobWater 3.6s ease-in-out infinite; }

/* =================== MAKTUB: SAHIFA =================== */
.t-maktub .names { font-family: "Great Vibes", "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(60px, 17vw, 86px); line-height: .95; color: #5a3d34; }
.t-maktub .names .amp { font-family: "Great Vibes", serif; font-size: .45em; color: #c9a96a; }
.t-maktub .title, .t-maktub .final-text h3 { font-family: "Great Vibes", "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(44px, 12.5vw, 56px); color: #8a4a54; }
.t-maktub .cover-text { margin-top: 21svh; text-shadow: 0 0 22px #fffaf3, 0 0 6px #fffaf3; }
.t-maktub .cover-text::before, .t-maktub .final-text::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 120%; height: 150%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, #fffaf3f2 0%, #fffaf3d9 55%, #fffaf300 100%);
}
.t-maktub .final-text { margin-top: 26svh; text-shadow: 0 0 22px #fffaf3, 0 0 6px #fffaf3; }
.t-maktub .cover-kicker { color: #6f9079; }
.t-maktub .countdown div { background: #fffdf8; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 20px -16px #8a4a54; }
.t-maktub .countdown b { color: #8a4a54; }
.t-maktub .the-day svg { fill: #c97b86; }

/* =================== UMUMIY YANGI KOMPONENTLAR =================== */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 380px; margin: 28px auto 0; }
.parents:has(> div:only-child) { grid-template-columns: 1fr; }
.parents div { display: flex; flex-direction: column; gap: 4px; }
.parents small { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.parents b { font: 600 19px/1.25 "Cormorant Garamond", serif; color: var(--ink); }
.tagline { margin: 22px 0 0; color: var(--gold); font: italic 500 19px "Cormorant Garamond", serif; }
.tagline span { font-size: 10px; font-style: normal; vertical-align: middle; }
.ornament { width: 160px; }
.final-orn { margin: 14px auto 0; color: var(--gold); }

.cal-btns { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 99px;
  border: 1px solid var(--accent); color: var(--accent); background: transparent; text-decoration: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; transition: transform .2s, background .3s;
}
.pill:active { transform: scale(.97); }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pill-link { font-size: 12px; color: var(--muted); }
.landmark { margin-top: 6px !important; font-style: italic; font-size: 13.5px !important; color: var(--accent-2) !important; }

.map-embed { position: relative; max-width: 360px; height: 230px; margin: 16px auto 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-cover { position: absolute; inset: 0; border: 0; background: transparent; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 12px; }
.map-cover span { background: #000a; color: #fff; font-size: 11.5px; padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(6px); }
.map-embed.active .map-cover { display: none; }

.cards {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 24px -24px 0; padding: 10px max(24px, calc(50% - 165px)) 18px;
}
.cards::-webkit-scrollbar { display: none; }
.cards .bank-card { flex: 0 0 min(80vw, 330px); margin: 0; scroll-snap-align: center; }
.bank-card .bank-name { position: absolute; top: 20px; right: 20px; font-weight: 800; font-style: italic; letter-spacing: .1em; font-size: 14px; opacity: .95; }
.bank-uzcard { background: linear-gradient(135deg, #0d4a40, #1f8a6e 60%, #34b08c) !important; box-shadow: 0 22px 40px -22px #0d4a40 !important; }
.bank-humo { background: linear-gradient(135deg, #0f1f3a, #1d4f6e 60%, #3b8fb0) !important; box-shadow: 0 22px 40px -22px #0f1f3a !important; }
.bank-visa { background: linear-gradient(135deg, #4a0d18, #8e2433 60%, #b84a52) !important; box-shadow: 0 22px 40px -22px #4a0d18 !important; }
.bank-mastercard { background: linear-gradient(135deg, #161616, #383838 60%, #5a4a3a) !important; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 2px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: .3s; }
.dots i.on { width: 18px; background: var(--accent); }
.copy-btn { margin-top: 16px; }

.final .fireworks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.final-text { z-index: 3; }
.sky-lanterns { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.sky-lanterns span {
  position: absolute; left: var(--x); bottom: -40px; width: calc(13px * var(--s)); height: calc(17px * var(--s));
  border-radius: 42% 42% 30% 30%; opacity: 0;
  background: radial-gradient(circle at 50% 72%, #fff3c4, #ffb347 55%, #d9661a);
  box-shadow: 0 0 16px 5px #ffb34766;
  animation: rise var(--t) linear var(--d) infinite;
}

/* =================== KEYFRAMES =================== */
@keyframes seamPulse { 0%, 100% { opacity: .55; box-shadow: 0 0 10px 2px #ffc65c77; } 50% { opacity: 1; box-shadow: 0 0 22px 5px #ffc65ccc; } }
@keyframes seamOpen { 0% { opacity: 1; } 35% { opacity: 1; width: 14px; left: calc(50% - 7px); box-shadow: 0 0 60px 20px #ffd27a; } 100% { opacity: 0; width: 40px; left: calc(50% - 20px); } }
@keyframes glowPill { 0%, 100% { box-shadow: 0 0 0 #e2bd6e00; } 50% { box-shadow: 0 0 22px #e2bd6e55; } }
@keyframes flicker { 0%, 100% { opacity: .85; } 20% { opacity: 1; } 40% { opacity: .7; } 60% { opacity: .95; } 80% { opacity: .78; } }
@keyframes flame { from { transform: scale(1, 1) skewX(-3deg); } to { transform: scale(.9, 1.15) skewX(3deg); } }
@keyframes floraIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes sealPulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.07); } }
@keyframes winGlow { from { opacity: .82; } to { opacity: 1; } }
@keyframes bobWater { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes rise { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 8% { opacity: 1; } 85% { opacity: .9; } 100% { transform: translate(40px, -105svh) scale(.6); opacity: 0; } }
.cards .bank-card .num { font-size: clamp(16px, 5vw, 20px); letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Uzun matnlar ekrandan chiqib ketmasin */
body { overflow-wrap: anywhere; }
.page { overflow-x: clip; }
.names.long { font-size: clamp(34px, 9.5vw, 46px); }
.names.xlong { font-size: clamp(26px, 7.4vw, 36px); }
.t-maktub .names.long { font-size: clamp(44px, 12vw, 60px); }
.t-maktub .names.xlong { font-size: clamp(34px, 9vw, 46px); }
