/* Biyyam (బియ్యం): a Telugu barasala. Peacock-green silk with a Pochampally-style ikat weave, gold zari borders,
   a brass plate of raw rice, turmeric, kumkum and mango leaves. Opening: write in the rice with the gold ring;
   the name writes itself. Then: a note -> the name -> akshintalu (tap to sprinkle) -> the muhurtham ->
   the day -> the family -> reply. */

:root {
  --silk: #0f4f4a;
  --silk-2: #0b3a36;
  --silk-3: #17665f;
  --brass: #c8932f;
  --brass-hi: #f3d488;
  --brass-lo: #8a5f16;
  --turmeric: #f2b51e;
  --kumkum: #b3172c;
  --leaf: #3d6b2a;
  --rice: #f8f3e6;
  --cream: #fbf6ea;
  --ink: #26201a;
  --ink-2: #5b5046;

  --f-display: "Kurale", Georgia, serif;
  --f-body: "Hind Guntur", "Helvetica Neue", Arial, sans-serif;
  --f-script: "Ramaraja", "Kurale", "Noto Serif Bengali", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --ikat:
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(243, 212, 136, .07) 22px 26px, transparent 26px 44px),
    repeating-linear-gradient(-45deg, transparent 0 22px, rgba(243, 212, 136, .07) 22px 26px, transparent 26px 44px),
    radial-gradient(circle at 50% 50%, rgba(179, 23, 44, .16) 0 5px, transparent 6px) 0 0 / 31px 31px;

  --fx-music-bg: #0f4f4a;
  --fx-music-ring: #c8932f;
  --fx-music-ink: #f3d488;
  --fx-bg: #fbf6ea;
}

html { scroll-behavior: smooth; }
html.shut, html.shut body { overflow: hidden; }
body { background: var(--cream); color: var(--ink); font: 400 18px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--turmeric); color: var(--ink); }
:focus-visible { outline: 2px solid var(--kumkum); outline-offset: 4px; }
.script { font-family: var(--f-script); font-weight: 400; letter-spacing: 0; text-transform: none; }
.fit { display: inline-block; white-space: nowrap; }

/* gold zari band with a small ikat diamond row */
.zari {
  height: 30px;
  background:
    linear-gradient(180deg, var(--brass-lo) 0 2px, transparent 2px 28px, var(--brass-lo) 28px),
    conic-gradient(from 45deg at 50% 50%, var(--kumkum) 0 90deg, transparent 0 180deg, var(--kumkum) 0 270deg, transparent 0) 0 50% / 18px 18px no-repeat,
    linear-gradient(90deg, transparent 0 40%, rgba(179, 23, 44, .9) 40% 60%, transparent 60%) 0 50% / 18px 4px repeat-x,
    linear-gradient(180deg, var(--brass-hi), var(--brass) 45%, var(--brass-lo));
}

.wrap { width: min(100% - 40px, 580px); margin: 0 auto; text-align: center; }
.sec { position: relative; padding: clamp(72px, 14vw, 120px) 0; }
.kicker { font: 600 12px/1.4 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--kumkum); }
.kicker .script { font-size: 18px; }
.sec__title { margin: 12px 0 0; font: 400 clamp(36px, 10vw, 58px)/1.1 var(--f-display); color: var(--silk); text-wrap: balance; }
.sec__title--sm { font-size: clamp(30px, 8.4vw, 46px); }
.lede { margin-top: 18px; font-size: 19px; line-height: 1.65; text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 18px 0;
  border: 1.5px solid var(--silk); border-radius: 999px; background: transparent; color: var(--silk);
  font: 600 14px/1 var(--f-body); letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: rgba(15, 79, 74, .08); }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--silk); color: var(--brass-hi); }
.btn--solid:hover { background: var(--silk-3); }
.btn--big { min-height: 56px; padding: 4px 26px 0; font-size: 16px; }

/* =================================================================== OPENING */
.gate { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--ikat), radial-gradient(120% 80% at 50% 45%, var(--silk-3), var(--silk) 50%, var(--silk-2)); color: var(--cream); }
.gate > .zari { position: absolute; left: 0; right: 0; z-index: 1; }
.zari--top { top: 0; }
.zari--bottom { bottom: 0; }
.gate__col {
  position: relative; z-index: 2; width: min(100%, 460px); min-height: 100svh; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(70px + env(safe-area-inset-top)) 18px calc(42px + env(safe-area-inset-bottom));
}
.gate__head { width: 100%; min-height: 168px; display: flex; flex-direction: column; align-items: center; }
.gate__to { margin-bottom: 4px; font: italic 400 15px/1.3 var(--f-body); color: rgba(251, 246, 234, .75); }
.gate__kicker { font: 600 12px/1.4 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--turmeric); }
.gate__kicker .script { font-size: 19px; }
.swap { display: grid; width: 100%; flex: 1; }
.swap > * { grid-area: 1 / 1; align-self: center; transition: opacity .7s var(--ease), translate .8s var(--ease), visibility 0s; }
.gate__line { font: 400 clamp(34px, 9.6vw, 44px)/1.1 var(--f-display); color: var(--brass-hi); }
.gate__sub { margin: 6px auto 0; max-width: 30ch; font-size: 16px; line-height: 1.45; color: rgba(251, 246, 234, .82); }
.gate[data-phase="open"] .say, .gate:not([data-phase="open"]) .hero { opacity: 0; translate: 0 10px; visibility: hidden; transition: opacity .5s, translate .5s, visibility 0s .5s; }
.hero__name { margin: 0; width: 100%; font: 400 clamp(56px, 17vw, 88px)/1.05 var(--f-display); color: var(--brass-hi); text-shadow: 0 2px 18px rgba(0, 0, 0, .3); }
.hero__meaning { font: italic 400 19px/1.3 var(--f-display); color: var(--cream); }
.hero__when { margin-top: 6px; font: 600 12px/1.4 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--turmeric); }

/* the brass plate of rice */
.plate { position: relative; width: min(86vw, 370px, calc(100svh - 360px)); min-width: 250px; aspect-ratio: 1; margin: auto 0; border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 0 81%, var(--brass-lo) 81.5%, var(--brass-hi) 84%, var(--brass) 88%, #e7b95a 92%, var(--brass-lo) 97%, #6e4a10 100%);
  box-shadow: 0 30px 40px -18px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .2);
}
.plate::before { content: ""; position: absolute; inset: 1.5%; border-radius: 50%; border: 2px dotted rgba(255, 240, 200, .55); pointer-events: none; }
.plate__well {
  position: absolute; inset: 9%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 40% 35%, var(--brass-hi), var(--brass) 55%, var(--brass-lo));
  box-shadow: inset 0 6px 16px rgba(60, 30, 0, .55);
}
.rice { position: absolute; inset: 0; width: 100%; height: 100%; }
.plate.shake { animation: shake .55s ease-in-out; }
@keyframes shake { 20% { rotate: 1.4deg; translate: -3px 0; } 40% { rotate: -1.2deg; translate: 3px 0; } 60% { rotate: .8deg; translate: -2px 0; } 80% { rotate: -.4deg; translate: 1px 0; } }
.ring {
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; z-index: 3; pointer-events: none;
  border-radius: 50%; border: 6px solid var(--brass); box-shadow: inset 0 0 0 1px var(--brass-lo), 0 0 0 1px var(--brass-hi), 0 8px 10px rgba(0, 0, 0, .35);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .6) 0 3px, transparent 4px);
  transition: opacity .4s; opacity: 0;
}
.ring::after { content: ""; position: absolute; left: 50%; top: -12px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6f82, var(--kumkum)); box-shadow: 0 0 0 2px var(--brass); }
.ring.on { opacity: 1; }
.plate__kumkum { position: absolute; right: 2%; top: 4%; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e04257, var(--kumkum) 70%); box-shadow: 0 0 0 4px var(--brass), 0 6px 8px rgba(0, 0, 0, .35); }
.plate__kumkum::after { content: ""; position: absolute; left: -46px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd65a, var(--turmeric) 70%); box-shadow: 0 0 0 4px var(--brass), 0 6px 8px rgba(0, 0, 0, .35); }
.plate__btn { position: absolute; inset: 9%; padding: 0; border: 0; border-radius: 50%; background: none; cursor: crosshair; touch-action: none; -webkit-tap-highlight-color: transparent; }
.gate:not([data-phase="idle"]):not([data-phase="writing"]) .plate__btn { pointer-events: none; }
.gate[data-phase="idle"] .plate__btn::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255, 245, 210, .9), transparent); animation: shimmer 2.8s ease-in-out 1s infinite; opacity: 0; }
@keyframes shimmer { 0% { opacity: 0; scale: .2 1; } 40% { opacity: 1; } 100% { opacity: 0; scale: 1.1 1; } }

.gate__foot { align-self: stretch; padding: 8px 72px 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gate__hint { font: italic 400 19px/1.3 var(--f-display); color: var(--cream); min-height: 1.3em; }
.gate__down { display: none; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; color: var(--brass-hi); font: 600 12px/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; }
.gate__down span { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 5px; } }
.gate[data-phase="open"] .gate__down { display: flex; }
.gate[data-phase="open"] .gate__hint { display: none; }
.gate__skip {
  position: absolute; z-index: 5; right: 10px; top: calc(38px + env(safe-area-inset-top));
  min-width: 64px; min-height: 44px; padding: 3px 14px 0; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(243, 212, 136, .6); background: rgba(11, 58, 54, .6); color: var(--brass-hi); font: 600 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase;
}
html:not(.shut) .gate__skip { display: none; }

/* =================================================================== NOTE */
.sec--hello { background: var(--cream); padding-top: 0; }
.thoranam { display: block; width: min(100%, 560px); height: auto; margin: 0 auto 56px; }
.hello__sign { margin-top: 20px; font: 400 24px/1.3 var(--f-display); color: var(--kumkum); }

/* =================================================================== NAME */
.sec--name { background: var(--ikat), var(--silk); }
.namecard {
  position: relative; padding: 46px 22px 34px; border-radius: 50% 50% 18px 18px / 120px 120px 18px 18px; background: var(--cream);
  box-shadow: 0 0 0 6px var(--brass), 0 0 0 8px var(--brass-lo), 0 30px 50px -18px rgba(0, 0, 0, .55);
}
.namecard__photo { display: block; width: 150px; height: 150px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--brass); }
.namecard__hi { margin-top: 10px; font-size: clamp(40px, 11vw, 58px); line-height: 1.3; color: var(--kumkum); }
.namecard__name { font: 400 clamp(52px, 15vw, 84px)/1.08 var(--f-display); color: var(--silk); }
.namecard__meaning { margin-top: 6px; font: italic 400 21px/1.4 var(--f-display); color: var(--ink-2); }
.namecard__born { margin-top: 10px; font: 600 12px/1.4 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-lo); }
.namecard__parents { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--brass); font-weight: 500; }

/* =================================================================== AKSHINTALU */
.sec--bless { background: var(--cream); overflow: hidden; }
.bless__lede { margin-top: 10px; color: var(--ink-2); }
.sprinkle {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(100%, 340px); aspect-ratio: 1; margin: 28px auto 0;
  border: 0; border-radius: 50%; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle closest-side, #fff9e6 0 60%, #f3e2b0 61%, #fff9e6 64%, var(--brass-hi) 66%, var(--brass) 72%, var(--brass-lo) 76%, transparent 76.5%);
}
.sprinkle__name { position: relative; z-index: 1; max-width: 66%; font: 400 clamp(36px, 10vw, 52px)/1.05 var(--f-display); color: var(--silk); overflow-wrap: anywhere; }
.sprinkle__sub { position: relative; z-index: 1; margin-top: 4px; font: 600 12px/1.4 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--kumkum); }
.sprinkle__sub .script { font-size: 16px; }
.grain { position: absolute; z-index: 2; width: 5px; height: 2.4px; border-radius: 50%; background: var(--turmeric); box-shadow: inset 0 -.6px 0 rgba(150, 80, 0, .5); pointer-events: none; }
.grain--r { background: #e8743a; }
.bless__count { min-height: 1.5em; margin-top: 18px; font: italic 400 21px/1.4 var(--f-display); color: var(--kumkum); }

/* =================================================================== MUHURTHAM */
.sec--date { background: var(--ikat), var(--silk); color: var(--cream); }
.sec--date .kicker { color: var(--turmeric); }
.panchang {
  position: relative; width: min(100%, 300px); margin: 22px auto 0; padding: 30px 20px 26px; border-radius: 6px;
  background: linear-gradient(180deg, #fff9e8, #f4e6c2); color: var(--ink);
  box-shadow: 0 0 0 4px var(--brass), 0 0 0 6px var(--brass-lo), 0 24px 40px -16px rgba(0, 0, 0, .6);
}
.panchang::before, .panchang::after { content: ""; position: absolute; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e04257, var(--kumkum) 70%); }
.panchang::before { top: -11px; }
.panchang::after { bottom: -11px; background: radial-gradient(circle at 40% 35%, #ffd65a, var(--turmeric) 70%); }
.panchang__wd { font: 600 13px/1.3 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--kumkum); }
.panchang__day { font: 400 100px/1 var(--f-display); color: var(--silk); }
.panchang__my { font: 400 22px/1.2 var(--f-display); }
.panchang__time { display: inline-block; margin-top: 12px; padding: 6px 16px 2px; border-radius: 999px; background: var(--silk); color: var(--brass-hi); font: 600 16px/1.3 var(--f-body); }
.sec--date .count { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.sec--date .count span { min-width: 66px; padding: 10px 4px 6px; border-radius: 10px; border: 1px solid rgba(243, 212, 136, .4); font: 600 11px/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: rgba(251, 246, 234, .8); }
.sec--date .count b { font: 400 34px/1.1 var(--f-display); color: var(--brass-hi); letter-spacing: 0; }
.count__done { margin-top: 26px; font: 400 24px/1.3 var(--f-display); color: var(--brass-hi); }

/* =================================================================== EVENTS */
.sec--events { background: var(--cream); }
.ev { position: relative; margin-top: 32px; padding: 30px 22px 26px; border-radius: 14px; background: #fffdf6; box-shadow: inset 0 0 0 1px rgba(200, 147, 47, .45), 0 22px 40px -30px rgba(15, 79, 74, .7); overflow: hidden; transition-delay: calc(var(--i) * .08s); }
.ev__leaf { position: absolute; left: 0; right: 0; top: 0; height: 10px; background: linear-gradient(90deg, var(--leaf), #6aa04a 50%, var(--leaf)); }
.ev__leaf::after { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; background: var(--brass); }
.ev__hi { font-size: 26px; line-height: 1.4; color: var(--kumkum); }
.ev__name { margin: 0; font: 400 clamp(32px, 9vw, 42px)/1.15 var(--f-display); color: var(--silk); }
.ev__when { margin-top: 10px; font-weight: 600; }
.ev__where { margin-top: 6px; color: var(--ink-2); }
.ev__where strong { color: var(--ink); }
.ev__note { margin-top: 10px; font: italic 400 19px/1.45 var(--f-display); color: var(--ink-2); }
.ev__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* =================================================================== FAMILY */
.sec--family { background: linear-gradient(180deg, var(--cream), #f3e8cc); }
.family__elders { margin-top: 14px; font: 400 clamp(24px, 6.6vw, 32px)/1.35 var(--f-display); color: var(--silk); text-wrap: balance; }
.family__list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.family__list li { display: flex; flex-direction: column; align-items: center; min-width: 140px; padding: 12px 18px 8px; border-radius: 12px; background: #fffdf6; box-shadow: inset 0 0 0 1px rgba(200, 147, 47, .5); font-weight: 500; }
.family__list span { font: 600 11px/1.3 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--kumkum); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }

/* =================================================================== RSVP + FOOT */
.sec--rsvp { background: var(--cream); padding-top: 0; }
.rsvp__btns { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 26px; }
.rsvp__tag { margin-top: 20px; font-weight: 600; color: var(--kumkum); }
.foot { padding: 0 20px calc(96px + env(safe-area-inset-bottom)); text-align: center; background: var(--ikat), var(--silk-2); color: rgba(251, 246, 234, .85); }
.foot .zari { margin: 0 -20px 50px; }
.foot__hi { font-size: 36px; line-height: 1.4; color: var(--turmeric); }
.foot__name { font: 400 clamp(48px, 14vw, 72px)/1.05 var(--f-display); color: var(--brass-hi); }
.foot__line { margin-top: 8px; }
.foot__cal { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.foot__music, .foot__credit { margin-top: 12px; font-size: 14px; color: rgba(251, 246, 234, .7); }
.foot__music { margin-top: 26px; }
.foot__up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font: 600 12px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--brass-hi); text-decoration: none; }

/* =================================================================== LINK-PREVIEW CARD */
.ogcard { background: var(--ikat), radial-gradient(100% 90% at 70% 50%, var(--silk-3), var(--silk) 55%, var(--silk-2)); color: var(--cream); font-family: var(--f-body); }
.ogcard .zari { position: absolute; left: 0; right: 0; height: 36px; }
.og__plate {
  position: absolute; left: 70px; top: 85px; width: 460px; height: 460px; border-radius: 50%; display: grid; place-items: center;
  background:
    radial-gradient(circle closest-side, transparent 0 81%, var(--brass-lo) 81.5%, var(--brass-hi) 84%, var(--brass) 88%, #e7b95a 92%, var(--brass-lo) 97%, #6e4a10 100%),
    radial-gradient(ellipse 4px 2px, #fffdf3 0 60%, transparent 70%) 0 0 / 11px 9px,
    radial-gradient(ellipse 4px 2px, #ebe0c4 0 60%, transparent 70%) 5px 4px / 13px 10px,
    var(--rice);
  box-shadow: 0 40px 50px -20px rgba(0, 0, 0, .6);
}
.og__written { max-width: 300px; font-size: 92px; line-height: 1.3; color: var(--brass); text-shadow: 1px 1px 0 rgba(255, 250, 230, .9), -1px -1px 0 rgba(110, 74, 16, .6); text-align: center; }
.og__text { position: absolute; left: 600px; right: 60px; top: 70px; bottom: 70px; display: flex; flex-direction: column; justify-content: center; }
.og__kicker { font: 600 22px/1.4 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--turmeric); }
.og__kicker .script { font-size: 30px; }
.og__name { width: 100%; font: 400 120px/1.1 var(--f-display); color: var(--brass-hi); }
.og__line { font: italic 400 32px/1.25 var(--f-display); color: var(--cream); }
.og__date { margin-top: 20px; font: 600 32px/1.3 var(--f-body); color: var(--cream); }
.og__venue { margin-top: 4px; font: 400 23px/1.35 var(--f-body); color: rgba(251, 246, 234, .8); }

@media (min-width: 720px) { .rsvp__btns { flex-direction: row; justify-content: center; } }
