/* ============================================================
   Happy Raksha Bandhan, Neha — paper-collage / festive risograph
   ============================================================ */

:root {
  --paper:      #FFF3E3;
  --paper-2:    #FFE8CC;
  --ink:        #2A1233;
  --ink-soft:   #6B4A5E;
  --marigold:   #FF9E1B;
  --rani:       #E8156B;
  --teal:       #009E8E;
  --gold:       #FFC53D;
  --coral:      #FF5E5B;
  --violet:     #7B3FA0;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;

  --shadow: 4px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);

  --pad: clamp(20px, 6vw, 64px);
  --maxw: 780px;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Karla", "Helvetica Neue", sans-serif;
  --f-desi: "Yatra One", "Fraunces", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
  background-image:
    radial-gradient(60vw 60vw at 84% -8%,  rgba(255,158,27,.42), transparent 62%),
    radial-gradient(70vw 70vw at -14% 16%, rgba(232,21,107,.24), transparent 60%),
    radial-gradient(60vw 60vw at 108% 62%, rgba(0,158,142,.22),  transparent 60%),
    radial-gradient(80vw 60vw at 40% 104%, rgba(123,63,160,.20), transparent 62%);
  background-attachment: fixed;
}

/* paper grain --------------------------------------------------- */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 9;
  opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='4'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* drifting petals ----------------------------------------------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.petals span {
  position: absolute; top: -8vh;
  width: 11px; height: 14px;
  border-radius: 60% 60% 55% 55% / 70% 70% 40% 40%;
  opacity: .5;
  animation: drift linear infinite;
}
.petals span:nth-child(1){ left: 6%;  background: var(--marigold); animation-duration: 26s; animation-delay: -3s; }
.petals span:nth-child(2){ left: 19%; background: var(--rani);     animation-duration: 34s; animation-delay: -12s; }
.petals span:nth-child(3){ left: 31%; background: var(--gold);     animation-duration: 29s; animation-delay: -20s; }
.petals span:nth-child(4){ left: 44%; background: var(--teal);     animation-duration: 38s; animation-delay: -7s; }
.petals span:nth-child(5){ left: 57%; background: var(--marigold); animation-duration: 31s; animation-delay: -25s; }
.petals span:nth-child(6){ left: 68%; background: var(--coral);    animation-duration: 36s; animation-delay: -16s; }
.petals span:nth-child(7){ left: 79%; background: var(--gold);     animation-duration: 27s; animation-delay: -30s; }
.petals span:nth-child(8){ left: 88%; background: var(--rani);     animation-duration: 33s; animation-delay: -9s; }
.petals span:nth-child(9){ left: 96%; background: var(--violet);   animation-duration: 30s; animation-delay: -22s; }
@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg); }
  50%  { transform: translate3d(-26px, 55vh, 0) rotate(180deg); }
  100% { transform: translate3d(14px, 112vh, 0) rotate(360deg); opacity: 0; }
}

#confetti {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 8;
}

/* ============================ HERO ============================ */
.hero {
  position: relative; z-index: 2;
  padding: clamp(52px, 13vh, 110px) var(--pad) clamp(30px, 7vh, 56px);
  max-width: var(--maxw); margin: 0 auto;
  text-align: center;
}

.kicker {
  font-family: var(--f-desi);
  font-size: clamp(12px, 3.4vw, 15px);
  letter-spacing: .16em;
  color: var(--rani);
  margin: 0 0 18px;
  text-transform: uppercase;
}
.kicker .dot { color: var(--marigold); }

h1 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 100;
  font-weight: 800;
  font-size: clamp(46px, 15vw, 96px);
  line-height: .94;
  letter-spacing: -.028em;
  margin: 0 0 20px;
}
h1 .name {
  position: relative; display: inline-block;
  font-style: italic;
  color: var(--rani);
  padding: 0 .06em;
}
.squiggle {
  position: absolute; left: 0; bottom: -.12em;
  width: 100%; height: .22em;
  fill: none; stroke: var(--marigold);
  stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 240; stroke-dashoffset: 240;
  animation: draw 1.1s .7s cubic-bezier(.6,.05,.3,1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.lede {
  font-size: clamp(16px, 4.2vw, 19px);
  color: var(--ink-soft);
  margin: 0 auto 34px;
  max-width: 34ch;
  text-wrap: balance;
}
.lede b { color: var(--ink); font-weight: 700; }

/* the rakhi ------------------------------------------------------ */
.rakhi-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 8px 0 20px;
}
.thread-line {
  flex: 1; height: 5px; max-width: 130px;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg,
    var(--rani) 0 9px, var(--gold) 9px 18px, var(--teal) 18px 27px);
  opacity: 0; transform: scaleX(.2);
  animation: thread .9s .95s cubic-bezier(.2,.8,.3,1) forwards;
}
.rakhi-wrap .thread-line:first-child { transform-origin: right center; }
.rakhi-wrap .thread-line:last-child  { transform-origin: left center; }
@keyframes thread { to { opacity: 1; transform: scaleX(1); } }

.rakhi {
  flex: none;
  width: clamp(128px, 40vw, 178px); height: clamp(128px, 40vw, 178px);
  padding: 0; border: 0; background: none;
  cursor: pointer;
  animation: breathe 7s ease-in-out infinite;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.4);
  -webkit-tap-highlight-color: transparent;
}
.rakhi:active { transform: scale(.93); }
.rakhi:focus-visible { outline: 3px dashed var(--violet); outline-offset: 8px; border-radius: 50%; }
@keyframes breathe {
  0%,100% { transform: rotate(-4deg) scale(1); }
  50%     { transform: rotate(4deg) scale(1.035); }
}
.rakhi svg { width: 100%; height: 100%; overflow: visible; }
.petals-g ellipse { fill: var(--rani); }
.petals-inner ellipse { fill: var(--marigold); }
.petal-ring { transform-origin: 100px 100px; animation: spin 44s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bead-ring {
  fill: none; stroke: var(--gold); stroke-width: 7;
  stroke-dasharray: 2 11; stroke-linecap: round;
}
.core    { fill: var(--violet); }
.core-in { fill: var(--gold); }
.shine   { fill: #fff; opacity: .55; }
.rakhi.pop .core-in { animation: pulse .55s ease; }
@keyframes pulse { 50% { r: 19; } }

.tie-msg {
  font-size: 14.5px; color: var(--ink-soft);
  font-style: italic; margin: 0 auto 36px; min-height: 2.9em;
  max-width: 30ch; transition: opacity .25s;
}
.tie-msg.swap { opacity: 0; }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  color: var(--ink);
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: 999px; padding: 10px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}
.scroll-cue:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.scroll-cue svg {
  width: 15px; height: 15px; fill: none;
  stroke: var(--rani); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  animation: bob 1.9s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translateY(-2px);} 50%{ transform: translateY(2px);} }

/* ========================== SECTIONS ========================== */
.section {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 9vh, 82px) var(--pad);
}

.sec-head { margin-bottom: 34px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--teal);
  margin: 0 0 10px;
}
h2 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 80;
  font-weight: 800;
  font-size: clamp(32px, 9.4vw, 56px);
  line-height: 1.02; letter-spacing: -.022em;
  margin: 0 0 12px;
}
h2 em { font-style: italic; color: var(--rani); }
.sub { margin: 0; color: var(--ink-soft); font-size: 15.5px; font-style: italic; }

/* ============================ DECK ============================ */
.deck { display: grid; gap: 16px; }

.card {
  -webkit-tap-highlight-color: transparent;
  appearance: none; border: 0; padding: 0; background: none;
  font: inherit; text-align: left; cursor: pointer;
  perspective: 1400px;
  min-height: 208px;
}
.card-in {
  position: relative; height: 100%; min-height: 208px;
  transform-style: preserve-3d;
  transition: transform .62s cubic-bezier(.5,.05,.25,1);
}
.card.flipped .card-in { transform: rotateY(180deg); }
.card:hover .card-in { transform: translateY(-4px); }
.card.flipped:hover .card-in { transform: rotateY(180deg) translateY(-4px); }

.face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 2.5px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex; flex-direction: column;
}
.face.front { background: var(--paper-2); }
.face.back  { background: var(--ink); color: var(--paper); transform: rotateY(180deg); justify-content: center; }

.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft);
}
.card h3 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 800; font-size: 28px; line-height: 1.05;
  letter-spacing: -.02em; margin: 10px 0 6px;
}
.teaser { margin: 0; font-size: 15.5px; font-style: italic; color: var(--ink-soft); }
.flip-hint {
  margin-top: auto; font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rani);
}
.face.back p { margin: 0; font-size: 15.5px; line-height: 1.58; }
.stamp {
  margin-top: 14px !important;
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  border: 2px solid currentColor; border-radius: 6px;
  padding: 4px 9px; transform: rotate(-3deg);
}

/* per-card colour personality */
.c1 .face.front { background: #FFE0B8; }
.c1 .face.back  { background: var(--violet); }
.c2 .face.front { background: #FFD5DF; }
.c2 .face.back  { background: var(--rani); }
.c3 .face.front { background: #CFF0E8; }
.c3 .face.back  { background: var(--teal); }
.c4 .face.front { background: #E4DBFA; }
.c4 .face.back  { background: #2A1233; }
.face.back .stamp { opacity: .85; }
.card:nth-child(odd)  .face { transform-origin: center; }
.card:nth-child(2n)   .face.front { rotate: .5deg; }
.card:nth-child(3n)   .face.front { rotate: -.6deg; }

/* ======================= THREAD DIVIDER ======================= */
.thread-div {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}
.thread-div i {
  flex: 0 1 84px; height: 4px; border-radius: 3px; opacity: .75;
  background: repeating-linear-gradient(90deg,
    var(--rani) 0 7px, var(--gold) 7px 14px, var(--teal) 14px 21px);
}
.thread-div b {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--marigold);
  box-shadow: 0 0 0 3.5px var(--paper), 0 0 0 5.5px var(--ink);
}

/* ========================== PARCEL ========================== */
.parcel-sec { position: relative; }

.label {
  position: relative;
  background: #FFFDF7;
  border: 2.5px solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: 6px 7px 0 var(--ink);
  overflow: hidden;
  rotate: -1.1deg;
}
.label-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  padding: 9px 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.label-top .awb { color: var(--gold); white-space: nowrap; }
.label-body { padding: 6px 0; }
.row {
  display: grid; grid-template-columns: 78px 1fr;
  gap: 12px; align-items: start;
  padding: 12px 14px;
  border-bottom: 1.5px dashed rgba(42,18,51,.28);
}
.row:last-child { border-bottom: 0; }
.row > span {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); padding-top: 3px;
}
.row p { margin: 0; font-size: 15px; line-height: 1.45; }
.row .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .3em; color: var(--rani); font-weight: 700; }
.row.to .blank i {
  display: inline-block; font-size: 13.5px; color: var(--ink-soft);
  text-decoration: line-through; text-decoration-color: var(--coral);
}
.label-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-top: 2.5px solid var(--ink);
  background: var(--paper-2);
}
.barcode {
  flex: 1; height: 34px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 12px,
    var(--ink) 12px 13px, transparent 13px 17px);
  opacity: .82;
}
.rts { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--coral); white-space: nowrap; }

.row.to { position: relative; }
.ink-stamp {
  position: absolute; right: 6px; top: 4px;
  font-family: var(--f-display); font-weight: 900;
  font-size: 21px; line-height: .95; text-align: center;
  color: var(--coral); border: 3.5px solid var(--coral);
  border-radius: 8px; padding: 7px 11px;
  transform: rotate(-14deg); opacity: .78;
  letter-spacing: .04em;
}

.parcel-note {
  margin: 26px 0 0; font-size: 16px; color: var(--ink-soft);
  border-left: 4px solid var(--marigold); padding-left: 15px;
}

/* ========================== COUPONS ========================== */
.coupons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.coupon {
  position: relative;
  display: flex; align-items: stretch; gap: 14px;
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 17px 18px;
  transition: transform .2s, box-shadow .2s;
}
.coupon:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.coupon h4 {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 800; font-size: 19px; margin: 0 0 4px; letter-spacing: -.01em;
}
.coupon p { margin: 0; font-size: 14.6px; color: var(--ink-soft); line-height: 1.5; }
.stub {
  flex: none; align-self: center;
  border-left: 2.5px dashed rgba(42,18,51,.32);
  padding-left: 15px; min-width: 64px; text-align: center;
  font-family: var(--f-display); font-weight: 900; font-size: 23px;
  color: var(--ink);
}
.coupon:nth-child(1) { background: #FFE7C2; }
.coupon:nth-child(2) { background: #D8F1EB; }
.coupon:nth-child(2) .stub { color: var(--teal); }
.coupon > div { flex: 1; }

/* ========================= COUNTDOWN ========================= */
.count-sec { text-align: center; }
.count-sec .sec-head { margin-bottom: 28px; }
.clock {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 9px; margin-bottom: 22px;
}
.unit {
  background: var(--ink); color: var(--paper);
  border-radius: var(--r-sm);
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-sm);
  padding: 14px 4px 10px;
}
.unit b {
  display: block;
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(24px, 8vw, 40px); line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.unit span {
  display: block; margin-top: 6px;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,243,227,.7);
}
.unit:nth-child(2) b { color: var(--marigold); }
.unit:nth-child(3) b { color: #FF97BC; }
.unit:nth-child(4) b { color: #6FE3D2; }
.clock-note {
  margin: 0 auto; max-width: 42ch;
  font-size: 15.4px; color: var(--ink-soft);
}

/* =========================== OUTRO =========================== */
.outro {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(50px, 11vh, 90px) var(--pad) 44px;
  text-align: center;
}
.outro > div {
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 6px 7px 0 var(--ink);
  padding: clamp(26px, 7vw, 40px) clamp(20px, 6vw, 36px);
  rotate: .7deg;
}
.hi {
  font-family: var(--f-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 800; font-style: italic;
  font-size: clamp(26px, 7.4vw, 36px);
  margin: 0 0 16px; color: var(--rani);
}
.real { margin: 0 0 6px; font-size: 17.4px; color: var(--ink); text-wrap: pretty; }
.sign {
  margin: 24px 0 0;
  font-family: var(--f-desi); font-size: 18px; color: var(--violet); line-height: 1.5;
}
.sign small { font-family: var(--f-body); font-size: 12.5px; color: var(--ink-soft); font-style: italic; }

.again {
  margin-top: 22px;
  font: inherit; font-size: 14px; font-weight: 700;
  background: var(--marigold); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 11px 22px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s;
  -webkit-tap-highlight-color: transparent;
}
.again:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.again:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--ink); }

.fine {
  margin: 30px 0 0; font-size: 12px; letter-spacing: .04em;
  color: var(--ink-soft); opacity: .8;
}

/* ========================= MOTION ========================= */
.rise { opacity: 0; animation: rise .8s cubic-bezier(.2,.7,.3,1) var(--d, 0ms) forwards; }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: none; }
.deck .reveal:nth-child(2)  { transition-delay: .06s; }
.deck .reveal:nth-child(3)  { transition-delay: .12s; }
.deck .reveal:nth-child(4)  { transition-delay: .18s; }
.coupons .reveal:nth-child(2) { transition-delay: .07s; }

/* ========================= LARGER ========================= */
@media (min-width: 700px) {
  body { font-size: 18px; }
  .deck { grid-template-columns: 1fr 1fr; gap: 20px; }
  .card, .card-in { min-height: 236px; }
  .clock { gap: 14px; }
  .label { rotate: -.7deg; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rise, .reveal { opacity: 1 !important; transform: none !important; }
  .petals { display: none; }
  .squiggle { stroke-dashoffset: 0; }
}
