/* bibaho.app home page (docs/07 § Website home). No scripts: all motion is CSS, and the
   base styles are the final state, so without animation everything is simply there. */

@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap;
             src: url("/fonts/fraunces-600.woff2") format("woff2"); }
@font-face { font-family: "Tiro Bangla"; font-display: swap;
             src: url("/fonts/tiro-bangla.woff2") format("woff2");
             unicode-range: U+0980-09FF, U+200C-200D, U+25CC; }

:root {
  --maroon: #8B1E3F; --maroon-deep: #5E1129; --maroon-night: #3E0B1C;
  --ivory: #FBF7F1; --ink: #22181B; --ink-soft: #4A3D41; --muted: #6E6064;
  --gold: #C9A25B; --gold-light: #E8C98A; --gold-deep: #7E6026;
  --turmeric: #F5C542; --henna: #3F5A26; --henna-light: #DCE8CF; --rose: #F3CAD5;
  --marigold: #E8902A; --line: #EFE6DA;
  --display: "Fraunces", "Tiro Bangla", Georgia, serif;
  --bangla: "Tiro Bangla", "Fraunces", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-size: 17px; line-height: 1.6;
       font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
       overflow-x: hidden; }
html[lang="bn"] body { line-height: 1.8; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
html[lang="bn"] h1, html[lang="bn"] h2, html[lang="bn"] h3 { font-family: var(--bangla); }
p { margin: 0; }
.wrap { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--ivory);
        background: radial-gradient(120% 80% at 50% 0%, #9A2448 0%, var(--maroon-deep) 55%, var(--maroon-night) 100%); }
.garland { position: absolute; top: -6px; left: 0; width: 100%; height: 130px; transform-origin: 50% 0;
           animation: sway 7s ease-in-out infinite alternate; pointer-events: none; }
.petal { position: absolute; top: -30px; left: var(--x); width: calc(14px * var(--s)); height: calc(10px * var(--s));
         background: var(--marigold); border-radius: 80% 0 80% 0; opacity: .85; pointer-events: none;
         animation: fall var(--t) linear var(--d) infinite; }
.petal:nth-child(3n) { background: #F5A623; }
.petal:nth-child(4n) { background: var(--gold-light); }

.top { display: flex; align-items: center; justify-content: space-between; padding-top: 92px; z-index: 2; }
.brand { font-family: "Fraunces", serif; font-size: 26px; text-decoration: none; color: var(--ivory); }
.brand span { font-family: var(--bangla); color: var(--gold-light); font-size: 21px; margin-left: 10px; }
.lang { font-size: 15px; color: var(--gold-light); text-underline-offset: 4px; }

.intro { text-align: center; padding-top: 48px; z-index: 2; }
.kicker { display: inline-block; font-size: 15px; letter-spacing: .04em;
          color: var(--gold-light); background: rgba(255,255,255,.08); border: 1px solid rgba(232,201,138,.35);
          padding: 6px 16px; border-radius: 999px; margin-bottom: 22px; }
.cycle { display: inline-grid; font-weight: 600; color: #FFFFFF; }
.cycle > span { grid-area: 1 / 1; text-align: left; }
.cycle > span:not(:first-child) { opacity: 0; }
.hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.04; letter-spacing: -0.01em; max-width: 17ch; margin: 0 auto 22px; }
html[lang="bn"] .hero h1 { line-height: 1.3; max-width: 16ch; }
.lead { font-size: clamp(17px, 2vw, 20px); color: rgba(251,247,241,.82); max-width: 40ch; margin: 0 auto 30px; }

.download { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.badge { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; text-decoration: none;
         background: var(--ivory); color: var(--maroon); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.note { font-size: 14px; opacity: .75; }

.stage { position: relative; height: 620px; max-width: 980px; margin: 56px auto 0; z-index: 1; }
.phone { position: relative; width: 280px; aspect-ratio: 540 / 960; padding: 9px; border-radius: 44px;
         background: #17110F; box-shadow: 0 30px 70px rgba(30, 5, 15, .35), inset 0 0 0 1.5px rgba(255,255,255,.08); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }
.hero-phone { position: absolute; left: 50%; top: 0; width: 300px; margin-left: -150px; }

.float { position: absolute; z-index: 2; animation: bob var(--t, 6s) ease-in-out var(--d, 0s) infinite; }
.chip-card { display: flex; align-items: center; gap: 12px; background: #FFFFFF; color: var(--ink); border-radius: 22px;
             padding: 14px 16px; box-shadow: 0 18px 40px rgba(30, 5, 15, .28); font-size: 15px; line-height: 1.35; }
.chip-card b { display: block; font-weight: 650; }
.chip-card small { display: block; color: var(--muted); font-size: 13px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
          background: var(--henna-light); color: var(--henna); }
.tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #3E8E4E; color: #FFFFFF; font-weight: 700; }
.count { flex-direction: column; align-items: flex-start; gap: 0; background: linear-gradient(135deg, var(--maroon), var(--maroon-deep)); color: var(--ivory); }
.count b { font-family: "Fraunces", var(--bangla); font-size: 46px; line-height: 1; color: var(--gold-light); }
.count small { color: rgba(251,247,241,.8); }
.paid { flex-direction: column; align-items: stretch; gap: 4px; min-width: 190px; }
.paid b { font-family: "Fraunces", var(--bangla); font-size: 26px; }
.bar { display: block; height: 8px; border-radius: 99px; background: #F1E7E9; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 23%; border-radius: 99px; background: var(--maroon); }
.poll { flex-direction: column; align-items: stretch; gap: 8px; width: 230px; }
.opt { display: flex; justify-content: space-between; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 10px; font-size: 13px; }
.opt.on { border-color: var(--maroon); background: #FBEFF2; }
.opt i { font-style: normal; font-weight: 700; }
.f-card img { width: 150px; height: auto; border-radius: 10px; box-shadow: 0 18px 40px rgba(30, 5, 15, .35); transform: rotate(-7deg); }

.f-rsvp  { left: 2%;  top: 70px;  --t: 6.5s; }
.f-count { right: 6%; top: 30px;  --t: 7.5s; --d: -2s; }
.f-paid  { left: 9%;  top: 330px; --t: 8s;   --d: -4s; }
.f-poll  { right: 0;  top: 300px; --t: 6s;   --d: -1s; }
.f-card  { left: 23%; top: 400px; --t: 9s;   --d: -3s; z-index: 0; }

/* ---------- the days ---------- */
.day { position: relative; overflow: hidden; padding-top: 110px; }
.day > .wrap { display: grid; gap: 48px; align-items: center; }
.copy-col { padding-bottom: 8px; max-width: 520px; }
.day h2 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; margin-bottom: 18px; }
html[lang="bn"] .day h2 { line-height: 1.35; }
.day p { font-size: 18px; }
.event-chip { display: inline-block; font-size: 14px; font-weight: 650; letter-spacing: .03em; padding: 6px 14px;
              border-radius: 999px; margin-bottom: 20px; background: rgba(0,0,0,.08); }
.watermark { position: absolute; right: -2%; top: 40px; font-family: var(--bangla); font-size: clamp(120px, 21vw, 300px);
             line-height: 1; white-space: nowrap; opacity: .1; pointer-events: none; }
.visual { display: flex; justify-content: center; align-self: end; margin-bottom: -140px; }

.holud { background: var(--turmeric); color: var(--ink); }
.holud h2 { color: var(--maroon-deep); }
.holud .watermark { color: var(--maroon-deep); }

.mehndi { background: var(--henna); color: var(--ivory); }
.mehndi .event-chip { background: rgba(255,255,255,.14); }
.mehndi .watermark { color: #CFE3B8; opacity: .14; }
.pair { position: relative; display: flex; }
.pair .second { width: 250px; margin-left: -70px; margin-top: 90px; }

.aqd { background: var(--ivory); color: var(--ink); padding-bottom: 110px;
       background-image: radial-gradient(70% 60% at 80% 60%, #F4E7CE 0%, transparent 70%); }
.aqd h2 { color: var(--maroon); }
.aqd .event-chip { background: #F1E3C4; color: var(--gold-deep); }
.aqd .watermark { color: var(--gold); opacity: .16; }
.aqd .visual { margin-bottom: 0; align-self: center; }
.fan { position: relative; width: 170px; height: 240px; margin: 30px 0 60px; }
.fan img { position: absolute; inset: 0; width: 100%; height: auto; border-radius: 8px;
           transform-origin: 50% 110%; transform: translateX(var(--x)) rotate(var(--r));
           box-shadow: 0 20px 44px rgba(94, 17, 41, .2); }

.biye { background: var(--rose); color: var(--ink); }
.biye h2 { color: var(--maroon-deep); }
.biye .event-chip { background: rgba(139,30,63,.12); color: var(--maroon); }
.biye .watermark { color: var(--maroon); opacity: .1; }
.with-note, .with-chat { position: relative; }
.note-card { position: absolute; left: -120px; bottom: 210px; width: 220px; background: #FFFFFF; border-radius: 20px;
             padding: 16px; box-shadow: 0 18px 40px rgba(94, 17, 41, .2); display: grid; gap: 6px; }
.note-card b { font-family: "Fraunces", var(--bangla); font-size: 26px; color: var(--ink); }
.note-card small { color: var(--muted); font-size: 13px; }
.note-card .fill { width: 75%; background: var(--marigold); }

.walima { background: radial-gradient(90% 70% at 20% 0%, #5E1129 0%, var(--maroon-night) 70%); color: var(--ivory); }
.walima h2 { color: var(--gold-light); }
.walima .event-chip { background: rgba(232,201,138,.16); color: var(--gold-light); }
.walima .watermark { color: var(--gold-light); opacity: .08; }
.with-chat { display: flex; align-items: flex-start; }
.chat { position: relative; z-index: 2; width: 240px; margin: 70px -48px 0 0; display: grid; gap: 12px; }
.walima .visual { margin-bottom: -70px; }
.bubble { background: #FFFFFF; color: var(--ink); border-radius: 20px 20px 20px 6px; padding: 12px 14px; font-size: 15px;
          line-height: 1.45; box-shadow: 0 14px 34px rgba(0,0,0,.3); }
.bubble b { display: block; font-size: 12px; color: var(--maroon); margin-bottom: 2px; }
.bubble.mine { justify-self: end; background: var(--gold-light); border-radius: 20px 20px 6px 20px; }

/* ---------- the rest ---------- */
.rest { padding: 120px 0 40px; }
.rest h2, .faq h2 { font-size: clamp(32px, 4vw, 46px); color: var(--maroon); margin-bottom: 28px; }
.bento { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-bottom: 96px; }
.tile { background: #FFFFFF; border-radius: 26px; padding: 22px; border: 1px solid var(--line); color: var(--ink-soft); }
.tile h3 { font-size: 22px; color: var(--ink); margin-bottom: 12px; line-height: 1.25; }
.tile p { font-size: 16px; }
.icon { width: 34px; height: 34px; margin-bottom: 14px; fill: none; stroke: var(--maroon); stroke-width: 1.6;
        stroke-linecap: round; stroke-linejoin: round; }
.big, .wide { grid-column: 1 / -1; }
.private { background: linear-gradient(150deg, var(--maroon), var(--maroon-deep)); color: rgba(251,247,241,.88); border: 0; padding: 30px; }
.private h3 { color: var(--gold-light); font-size: 28px; }
.private ul { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 6px; }
.private a { color: var(--gold-light); }
.todo { background: var(--henna-light); border: 0; display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; background: #FFFFFF; border-radius: 14px; padding: 10px 14px; font-size: 15px; color: var(--ink); }
.check::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9AA88B; flex: none; }
.check.done { color: var(--muted); text-decoration: line-through; }
.check.done::before { background: var(--henna); border-color: var(--henna);
  background-image: linear-gradient(45deg, transparent 45%, #FFF 45% 55%, transparent 55%); }
.lang-tile { background: var(--turmeric); border: 0; color: var(--ink); }
.lang-tile b { display: block; font-size: 34px; line-height: 1.2; color: var(--maroon-deep); }
.lang-tile b[lang="bn"] { font-family: var(--bangla); }
.lang-tile b[lang="en"] { font-family: "Fraunces", serif; margin-bottom: 8px; }
.free { background: var(--rose); border: 0; }
.free b { display: block; font-family: var(--display); font-size: 40px; line-height: 1.1; color: var(--maroon); margin-bottom: 6px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { position: relative; background: #FFFFFF; border-radius: 26px; padding: 26px; border: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: "Fraunces", serif; font-size: 54px; line-height: 1;
                    color: var(--gold); margin-bottom: 10px; }
.steps h3 { font-size: 22px; margin-bottom: 6px; }
.steps p { color: var(--ink-soft); }

.faq { padding: 80px 0 110px; }
details { background: #FFFFFF; border-radius: 22px; padding: 18px 22px; margin-bottom: 12px; border: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--maroon); transition: transform .3s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 10px; color: var(--ink-soft); }

/* ---------- the end ---------- */
.end { position: relative; overflow: hidden; background: var(--maroon-night); color: var(--ivory); padding: 90px 0 0; text-align: center; }
.end-line { font-family: var(--display); font-size: clamp(30px, 4.4vw, 52px); line-height: 1.15; max-width: 16ch; margin: 0 auto 28px; color: var(--gold-light); }
html[lang="bn"] .end-line { font-family: var(--bangla); line-height: 1.4; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 44px; font-size: 15px; }
.links a { color: rgba(251,247,241,.8); }
.copy { margin-top: 14px; font-size: 14px; opacity: .55; }
.wordmark { font-family: var(--bangla); font-size: clamp(130px, 34vw, 460px); line-height: .9; margin-top: 30px;
            color: transparent; -webkit-text-stroke: 1.5px rgba(232,201,138,.45); white-space: nowrap; user-select: none;
            transform: translateY(14%); }

/* ---------- wider screens ---------- */
@media (min-width: 860px) {
  /* Compact, so a laptop screen shows the phone and the first floating cards. */
  .top { padding-top: 84px; }
  .intro { padding-top: 28px; }
  .kicker { margin-bottom: 16px; }
  .hero h1 { font-size: clamp(40px, 4.4vw, 60px); max-width: 20ch; margin-bottom: 16px; }
  .lead { max-width: 56ch; margin-bottom: 24px; font-size: 19px; text-wrap: balance; }
  .stage { margin-top: 36px; }
  .day > .wrap { grid-template-columns: 1fr 1fr; }
  .day .copy-col { padding-bottom: 150px; }
  .aqd .copy-col { padding-bottom: 0; }
  .mehndi > .wrap, .walima > .wrap { grid-template-columns: 1fr 1fr; }
  .mehndi .copy-col, .walima .copy-col { order: 2; }
  .watermark { top: 60px; }
  .mehndi .watermark, .walima .watermark { right: auto; left: -2%; }
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); }
  .big { grid-column: span 2; grid-row: span 2; }
  .wide { grid-column: span 2; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .fan { width: 180px; height: 250px; }
}

/* ---------- phones ---------- */
@media (max-width: 859px) {
  .top { padding-top: 76px; }
  .stage { height: 560px; margin-top: 44px; }
  .hero-phone { width: 250px; margin-left: -125px; }
  .chip-card { padding: 10px 12px; font-size: 13px; border-radius: 18px; }
  .f-rsvp  { left: 0; top: 40px; }
  .f-count { right: 0; top: 150px; }
  .f-count b { font-size: 34px; }
  .f-paid  { left: 0; top: 360px; min-width: 0; }
  .paid { min-width: 150px; }
  .paid b { font-size: 20px; }
  .f-poll, .f-card { display: none; }
  .phone { width: 240px; }
  .pair .second { width: 200px; margin-left: -80px; }
  .visual { margin-bottom: -120px; }
  .note-card { left: -40px; bottom: 170px; width: 180px; }
  .with-chat { flex-direction: column; align-items: center; }
  .chat { order: -1; width: 100%; max-width: 340px; margin: 0 0 20px; }
  .walima .visual { margin-bottom: -120px; }
  .fan { width: 140px; height: 195px; }
  .fan img:nth-child(1), .fan img:nth-child(4) { display: none; }
}

/* ---------- motion ---------- */
@keyframes sway { from { transform: rotate(-0.6deg) translateY(-2px); } to { transform: rotate(0.6deg) translateY(2px); } }
@keyframes fall { from { transform: translate(0, 0) rotate(0deg); }
                  to   { transform: translate(60px, 1500px) rotate(720deg); } }
@keyframes bob { 50% { transform: translateY(-12px); } }
@keyframes cycle { 0% { opacity: 0; transform: translateY(.5em); }
                   3%, 25% { opacity: 1; transform: none; }
                   28%, 100% { opacity: 0; transform: translateY(-.5em); } }

.cycle > span { animation: cycle 10s ease-in-out -0.3s infinite both; }
.cycle > span:nth-child(2) { animation-delay: 2.2s; }
.cycle > span:nth-child(3) { animation-delay: 4.7s; }
.cycle > span:nth-child(4) { animation-delay: 7.2s; }

@keyframes rise { from { opacity: 0; transform: translateY(48px); } }
@keyframes lift { from { transform: translateY(180px); } }
@keyframes slide-in { from { opacity: 0; transform: translate(140px, 40px) rotate(8deg); } }
@keyframes fan-open { from { transform: translateX(0) rotate(0deg); } }
@keyframes fill { from { width: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.94); } }

@supports (animation-timeline: view()) {
  .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .lift { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .pair .second { animation: slide-in linear both; animation-timeline: view(); animation-range: entry 10% cover 50%; }
  .fan img { animation: fan-open linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
  .note-card .fill { animation: fill linear both; animation-timeline: view(); animation-range: entry 40% cover 60%; }
  .note-card { animation: pop linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  .bubble { animation: pop linear both; animation-timeline: view(); }
  .bubble:nth-child(1) { animation-range: entry 20% cover 32%; }
  .bubble:nth-child(2) { animation-range: entry 45% cover 40%; }
  .bubble:nth-child(3) { animation-range: entry 70% cover 48%; }
  .watermark { animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  @keyframes drift { from { transform: translateX(6%); } to { transform: translateX(-6%); } }
  .wordmark { animation: rise-mark linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  @keyframes rise-mark { from { transform: translateY(45%); opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .petal { display: none; }
}
