@import url("https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap");

:root {
  --cream-top: #f7ecd9;
  --cream-bottom: #efd9ae;
  --maroon: #7a1116;
  --maroon-deep: #5c0c10;
  --gold-line: #c9a35a;
  --ink: #3a2a1e;
  --icon: #7b4c23;
  --card-radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img {
  display: block;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: "Arimo", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* Kill the iOS double-tap-to-zoom delay/zoom on all tappable controls */
a,
button,
input,
label {
  touch-action: manipulation;
}

/* ---------- Card shell (mobile ad-unit frame) ---------- */

.rath-card {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  /* Notch only — skyline must sit flush at the bottom (no cream gap) */
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: constant(safe-area-inset-left);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: constant(safe-area-inset-right);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: 0;
  background: radial-gradient(
    120% 60% at 50% 0%,
    #fbf3e2 0%,
    var(--cream-top) 38%,
    var(--cream-bottom) 100%
  );
}

/* subtle paper grain */
.rath-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(122, 17, 22, 0.035) 1px,
    transparent 1px
  );
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Top bar ---------- */
.top-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.itc-mark img {
  width: 50px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: "Tiro Devanagari Hindi", serif;
  color: var(--maroon);
  font-weight: 700;
}

.lang-toggle span{
    font-size: 13px;
    color: #dd434a;
}

.lang-toggle img {
  width: 20px;
}

/* ---------- Brand logo ---------- */
.brand-logo {
  /* position: relative;
  top: 18px;
  z-index: 3; */
  width: 100%;
  height: 100%;
  text-align: center;
}

.brand-logo img {
  width: 100px;
  height: auto;
  /* margin: 0 auto; */
}

/* ---------- Headline ---------- */
.headline {
  position: relative;
  z-index: 3;
  text-align: center;
}

.headline h1 {
  margin: 0;
  line-height: 1.2;
  color: var(--maroon-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.headline h1 .line-1 {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.headline h1 span.line-2,
.headline h1 span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ---------- Deity image (homepage / finale) ---------- */
.deity-wrap {
  position: relative;
  z-index: 3;
  display: block;
  /* Hug the image — do NOT flex-grow (that pulled the shadow away) */
  flex: 0 0 auto;
  width: 100%;
  max-width: 300px;
  margin: 10px auto 0;
  padding: 0 0 14px; /* room for the ground shadow under the wheels */
  line-height: 0;
}

.deity-wrap img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  margin: 0;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.1));
}

/* Ground shadow — anchored to the image box, not a stretched flex area */
.deity-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 76%;
  height: 18px;
  background: rgba(35, 15, 5, 0.75);
  filter: blur(10px);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.border-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url(../images/border-3.png) center / 100% 100% no-repeat;
  width: calc(100% - 20px);
  flex: 1 1 auto;
  min-height: 280px;
  height: auto;
  overflow: hidden;
  margin: 8px 10px 0;
  padding: 36px 28px;
}

.border-wrap .tagline {
  margin-top: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

.border-wrap .tagline strong {
  color: #9c1a1f;
}

/* ---------- Tagline ---------- */
.tagline {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-top: 6px;
  padding: 0 28px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  flex-shrink: 0;
}

/* Message page — border fills mid area; Next sits bottom-right */
.message-card .headline {
  flex-shrink: 0;
  margin-top: 4px;
}

.message-card .border-wrap {
  flex: 1 1 auto;
  min-height: 260px;
  max-height: none;
}

/* ---------- CTA ---------- */
.cta-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 12px;
  margin-bottom: 6px;
}

/* Message page — Next button bottom-right under the border frame */
.cta-wrap.cta-next {
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 28px;
  margin-right: 16px;
  padding-right: 4px;
}

.cta-btn {
  background: linear-gradient(
    180deg,
    #9c1a1f 0%,
    var(--maroon) 55%,
    var(--maroon-deep) 100%
  );
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 10px 20px -6px rgba(122, 17, 22, 0.55);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.cta-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 6px 14px -6px rgba(122, 17, 22, 0.6);
}

.cta-btn svg {
  width: 16px;
  height: 16px;
}

/* =========================================================
   REGISTRATION PAGE — welcome block, form, trust badges
   ========================================================= */

/* ---------- Welcome block ---------- */
.swagat-block {
  position: relative;
  z-index: 3;
  text-align: center;
  margin-top: 14px;
  padding: 0 24px;
}

.swagat-block h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.swagat-block p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.85;
}

/* ---------- Form ---------- */
.reg-form {
  position: relative;
  z-index: 3;
  margin-top: 18px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #faf1de;
  border: 1px solid #e3cfa1;
  border-radius: 14px;
  padding: 12px 14px;
}

.form-field .field-icon {
  display: flex;
  color: var(--icon);
  flex-shrink: 0;
}

.form-field .field-icon svg {
  width: 20px;
  height: 20px;
}

.form-field input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  /* 16px minimum — anything smaller makes iOS Safari auto-zoom the whole
     page when the field gets focus, and it never zooms back out */
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
}

.form-field input::placeholder {
  color: #9c8a6f;
}

/* WhatsApp field: two stacked rows inside the same box */
.whatsapp-field {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

.whatsapp-field .field-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #9c8a6f;
  font-weight: 500;
}

.whatsapp-field .field-top .field-icon svg {
  width: 18px;
  height: 18px;
}

.whatsapp-field .field-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whatsapp-field .whatsapp-icon {
  color: #25d366;
}

.whatsapp-field .prefix {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.whatsapp-field input {
  flex: 1;
}

/* ---------- Consent checkbox ---------- */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 4px;
}

.agree-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 1px;
  border-radius: 5px;
  border: 2px solid #2f7d46;
  background: #2f7d46;
  position: relative;
  cursor: pointer;
}

.agree-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.agree-row label {
  font-size: 0.82rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Submit ---------- */
.submit-wrap {
  position: relative;
  z-index: 3;
  margin-top: 16px;
  padding: 0 20px;
}

.submit-btn {
  width: 100%;
  background: linear-gradient(
    180deg,
    #9c1a1f 0%,
    var(--maroon) 55%,
    var(--maroon-deep) 100%
  );
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px -6px rgba(122, 17, 22, 0.55);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.submit-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 6px 14px -6px rgba(122, 17, 22, 0.6);
}

.submit-btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Trust badges ---------- */
.features-row {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-around;
  margin-top: 22px;
  padding: 0 10px;
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 50%;
  text-align: center;
}

.feature:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 69%;
  top: 36%;
  transform: rotate(90deg);
  width: 50%;
  height: 3px;
  background: #c7a96e;
}

.feature .icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon);
}

.feature h6 {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.feature h6 span {
  font-weight: 800;
}

/* ---------- Temple skyline footer — pinned to bottom ---------- */
.skyline {
  margin-top: auto;
  width: 100%;
  line-height: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Keep a modest gap under the CTA before the skyline (not huge empty band) */
.rath-card:has(.deity-wrap) .cta-wrap {
  margin-bottom: 8px;
}

.skyline img {
  display: block;
  width: 100%;
  height: 80px;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: multiply;
  opacity: 0.55;
  /* Kill the 2–4px descender gap some browsers leave under replaced imgs */
  vertical-align: bottom;
}

.registration-bg img {
  object-position: unset;
}

/* =========================================================
   LANGUAGE SELECTION POPUP (globe icon in the top bar)
   ========================================================= */
.lang-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
  background: rgba(30, 8, 6, 0.62);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lang-modal.show {
  opacity: 1;
  visibility: visible;
}

.lang-panel {
  width: 100%;
  max-width: 360px;
  max-height: 82vh;
  max-height: 82dvh;
  overflow-y: auto;
  background: radial-gradient(120% 80% at 50% 0%, #fbf3e2 0%, var(--cream-top) 45%, var(--cream-bottom) 100%);
  border: 1.5px solid var(--gold-line);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.22s ease;
}

.lang-modal.show .lang-panel {
  transform: translateY(0) scale(1);
}

.lang-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--maroon-deep);
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lang-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: #faf1de;
  border: 1.5px solid #e3cfa1;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.lang-option:active {
  transform: scale(0.97);
}

.lang-option .native {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.lang-option .eng {
  font-size: 0.72rem;
  font-weight: 500;
  color: #9c8a6f;
}

.lang-option.active {
  background: linear-gradient(180deg, #9c1a1f 0%, var(--maroon) 55%, var(--maroon-deep) 100%);
  border-color: var(--gold-line);
}

.lang-option.active .native,
.lang-option.active .eng {
  color: #ffe6b0;
}

/* =========================================================
   TERMS & CONDITIONS / PRIVACY POLICY — links under consent
   checkbox that open the PDFs directly in a new tab
   ========================================================= */

.tc-link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 4px;
  margin-top: -4px;
}

.tc-link {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7a1116;
  text-decoration: underline;
  cursor: pointer;
}

.tc-sep {
  font-size: 0.8rem;
  color: #c9a35a;
}

/* ---------- Small phone tweak (still mobile-only) ---------- */
@media (max-width: 360px) {
  .headline h1 .line-1 {
    font-size: 16px;
  }
  .headline h1 span {
    font-size: 23px;
  }
  .deity-wrap {
    max-width: 240px;
  }
  .swagat-block h2 {
    font-size: 1.4rem;
  }
  .tagline {
    font-size: 16px;
    padding: 0 20px;
  }
  .top-bar {
    padding: 0 14px;
  }
}

/* Short phones / landscape — keep one composition without clipping */
@media (max-height: 640px) {
  .tagline {
    margin-top: 4px;
    font-size: 15px;
  }
  .skyline img {
    height: 64px;
  }
  .deity-wrap {
    max-width: 220px;
    margin-top: 6px;
    padding-bottom: 12px;
  }
  .cta-wrap {
    margin-top: 8px;
    margin-bottom: 4px;
  }
  .message-card .border-wrap {
    min-height: 220px;
    padding: 28px 22px;
  }
  .border-wrap .tagline {
    font-size: 16px;
  }
}

@media (max-width: 340px) {
  .deity-wrap {
    max-width: 200px;
  }
  .cta-btn {
    font-size: 14px;
  }
}
