/* ==========================================================================
   sections.css — scratch card, celebrations timeline, footer, buttons
   Variables (--maroon-*, --gold*, --ivory*, --card-text, --f-*, --paper-noise)
   are defined in style.css.
   ========================================================================== */

/* ---------- Section base ---------- */
.section {
  padding: clamp(72px, 12vh, 140px) 20px;
  text-align: center;
  color: #6a3b2a;
  position: relative;
  z-index: 2;
  background: #ffe4bd;
  border: 1px solid rgba(212, 166, 74, 0.45);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  width: calc(100% - 32px);
  max-width: 920px;
  margin: 48px auto;
}

.section__kicker {
  margin: 0;
  color: #a0702a;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 13px;
  font-family: var(--f-body);
  font-weight: 600;
}

.section__title {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 46px);
  color: #6b1424;
  margin: 0.4em 0 1em;
  line-height: 1.2;
  text-wrap: balance;
  position: relative;
  padding-bottom: 28px;
}

/* gold line with centre diamond */
.section__title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 120px;
  height: 10px;
  margin-left: -60px;
  background:
    linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 42%, transparent 42%, transparent 58%, var(--gold) 58%, var(--gold) 80%, transparent) center / 100% 1px no-repeat;
}

.section__title::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(212, 166, 74, 0.6);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e3b85a, #b8862f);
  color: var(--maroon-900);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1.5px solid transparent;
  box-shadow: 0 6px 16px rgba(120, 80, 20, 0.35), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(120, 80, 20, 0.45), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.btn:focus-visible {
  outline: 2px solid var(--maroon-700);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.footer {
  padding: 80px 20px calc(60px + env(safe-area-inset-bottom));
  text-align: center;
  color: #6a3b2a;
  position: relative;
  z-index: 2;
  background: #ffe4bd;
  border: 1px solid rgba(212, 166, 74, 0.45);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  width: calc(100% - 32px);
  max-width: 920px;
  margin: 48px auto;
}

.footer > * {
  margin-left: auto;
  margin-right: auto;
}

.footer__blessing {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: #6a3b2a;
  margin-top: 28px;
  margin-bottom: 0;
  max-width: 560px;
  text-wrap: balance;
}

.footer__families {
  font-family: var(--f-script);
  font-size: 34px;
  color: #9b1b24;
  margin-top: 18px;
  margin-bottom: 0;
  line-height: 1.3;
  text-wrap: balance;
}

.footer__deva {
  font-family: var(--f-deva);
  font-size: 18px;
  color: #a0702a;
  margin-top: 20px;
  margin-bottom: 0;
}

.footer__note {
  font-family: var(--f-body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: #7a4a22;
  max-width: 24em;
  margin-top: 26px;
  margin-bottom: 0;
  text-wrap: balance;
}

/* Diya drawn in pure CSS: bowl (::before) + flame (::after) */
.footer__ornament {
  position: relative;
  width: 60px;
  height: 60px;
  margin-top: 0;
  margin-bottom: 0;
}

.footer__ornament::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 52px;
  height: 22px;
  margin-left: -26px;
  border-radius: 4px 4px 26px 26px / 4px 4px 22px 22px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 45%, #8a5a1c 100%);
  box-shadow: 0 6px 14px rgba(90, 40, 20, 0.3), 0 0 18px rgba(242, 159, 5, 0.25);
}

.footer__ornament::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 14px;
  height: 28px;
  margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 75%, #fff6c8 0%, #ffd25a 35%, var(--marigold) 65%, rgba(200, 54, 27, 0.9) 100%);
  box-shadow: 0 0 14px 4px rgba(242, 159, 5, 0.55), 0 0 32px 10px rgba(242, 159, 5, 0.25);
  transform-origin: 50% 100%;
  animation: diya-flicker 1.8s ease-in-out infinite;
}

@keyframes diya-flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); opacity: 1; }
  15% { transform: scale(0.94, 1.06) rotate(-2deg); opacity: 0.95; }
  30% { transform: scale(1.04, 0.95) rotate(1.5deg); opacity: 1; }
  50% { transform: scale(0.96, 1.08) rotate(-1deg); opacity: 0.92; }
  70% { transform: scale(1.03, 0.97) rotate(2deg); opacity: 1; }
  85% { transform: scale(0.97, 1.04) rotate(-1.5deg); opacity: 0.96; }
}

@media (prefers-reduced-motion: reduce) {
  .footer__ornament::after { animation: none; }
  .btn { transition: none; }
}

/* ---------- Scratch to reveal ---------- */
.scratch__card {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 16/10;
  margin: 8px auto 0;
  border-radius: 14px;
  background: #fff6e6 var(--paper-noise);
  box-shadow: 0 14px 34px rgba(90,40,20,.22);
  outline: 1px solid rgba(212,166,74,.7);
  outline-offset: -10px;
  overflow: hidden;
}
.scratch__date {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 16px;
}
.scratch__day {
  font-family: var(--f-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .35em;
  font-size: 13px;
  color: #a0702a;
  margin: 0;
}
.scratch__big {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(30px, 9vw, 44px);
  color: #9b1b24;
  letter-spacing: .06em;
  margin: 0;
  font-variant-numeric: lining-nums;
}
.scratch__time {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .2em;
  color: #7a2a1e;
  margin: 2px 0 4px;
}
.scratch__venue {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  color: #6a3b2a;
  margin: 0;
}
.scratch__foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  transition: opacity .7s ease;
}
.scratch__card.is-revealed .scratch__foil { opacity: 0; pointer-events: none; }
.scratch__card.is-revealed .scratch__date { animation: scratch-pop .7s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes scratch-pop { from { transform: scale(.94); } to { transform: scale(1); } }
.scratch__hint {
  margin-top: 14px;
  font-family: var(--f-body);
  font-size: 14px;
  color: #7a4a22;
}
.scratch__reveal {
  border: 0;
  background: none;
  text-decoration: underline;
  color: #9b1b24;
  font: inherit;
  cursor: pointer;
  padding: 4px;
}
.scratch__hint.is-hidden { visibility: hidden; }
.scratch__actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .scratch__card.is-revealed .scratch__date { animation: none; }
}

/* ---------- Celebrations timeline (celebrations/index.html) ---------- */
.celebrations__intro {
  max-width: 30em;
  margin: 0 auto;
  font-family: var(--f-body);
  font-size: 17px;
  font-style: italic;
  color: #7a4a22;
  text-wrap: balance;
}
.timeline {
  position: relative;
  max-width: 620px;
  margin: 40px auto 0;
}
.event {
  --accent: #9b1b24;
  position: relative;
}
.event + .event { margin-top: 36px; }
.event--day1 { --accent: #23607a; }
.event--wedding { --accent: #9b1b24; }
.event__card {
  position: relative;
  padding: 24px 18px 26px;
  border-radius: 16px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: -7px;
  background: transparent;
  text-align: center;
}
.event__day {
  margin: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
  color: var(--accent);
}
.event__art {
  display: block;
  width: auto;
  height: 88px;
  max-width: 100%;
  margin: 14px auto 4px;
}
.event__art--painted {
  height: 120px;
  margin-top: 10px;
}
/* The wedding art is wide; at 88px tall it covers about the same area as the 120px kalash. */
.event__art--wide {
  height: 88px;
}
.event__title {
  margin: 4px 0 10px;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.15;
  color: var(--accent);
}
.event__date {
  margin: 0 0 4px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 17px;
  color: #6a3b2a;
  text-wrap: balance;
}
.event__time {
  margin: 0;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 19px;
  color: #6a2a1e;
}
.event__desc {
  max-width: 26em;
  margin: 6px auto 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
  color: #6a3b2a;
  text-wrap: balance;
}
.event__place {
  margin: 12px 0 0;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: #6a3b2a;
  text-wrap: balance;
}
.event__actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.event__hint-line {
  margin: 0 0 14px;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 15px;
  color: #7a4a22;
}
.event .scratch__card { margin-top: 0; }
.event .scratch__big { font-size: clamp(28px, 8vw, 40px); }
.celebrations { padding-left: 12px; padding-right: 12px; }
@media (min-width: 720px) {
  .celebrations { padding-left: 20px; padding-right: 20px; }
  .event__card { padding: 30px 32px 32px; }
}
