:root {
  --green-deep: #0F5132;
  --green: #1E8449;
  --green-soft: #DCEFD8;
  --paper: #F6FBF4;
  --ink: #16301F;
  --muted: #4E6656;
  --gold: #A9851A;
  --line: #C9DDC4;
  --error: #B42318;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Mukta Malar", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 12% 8%, var(--green-soft) 0, transparent 42%),
    radial-gradient(circle at 92% 92%, #E4F2DE 0, transparent 48%),
    var(--paper);
}
a { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 72px 16px 32px;
  position: relative;
}
.lang {
  position: absolute; top: 14px; right: 16px;
  font: 600 15px "Mukta Malar", system-ui, sans-serif;
  color: var(--green-deep); background: #fff;
  border: 1.5px solid var(--green); border-radius: 999px;
  padding: 8px 18px; min-height: 44px; cursor: pointer;
}
.lang:hover { background: var(--green-soft); }

/* Hero */
.hero { text-align: center; width: 100%; max-width: 640px; }
.mark { display: inline-flex; align-items: flex-end; gap: 4px; }
.pin { width: clamp(44px, 11vw, 64px); height: auto; animation: drop 0.9s ease-out both, bob 3s ease-in-out 1s infinite; }
@keyframes drop { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(-6px); } }
.brand {
  font: 800 clamp(52px, 15vw, 96px) "Anek Tamil", system-ui, sans-serif;
  line-height: 0.9; letter-spacing: -2px; color: var(--green-deep);
}
.brand span { color: var(--green); }
.tag { margin-top: 10px; font-weight: 700; font-size: clamp(12px, 3.4vw, 15px); color: var(--green-deep); }
html[lang="en"] .tag { letter-spacing: 2px; text-transform: uppercase; }

h1 { margin-top: 32px; font: 800 clamp(30px, 8vw, 48px) "Anek Tamil", system-ui, sans-serif; line-height: 1.2; }
h1 .q { color: var(--green-deep); }
h1 .a { color: var(--green); }
.hand { font: 700 clamp(22px, 5.5vw, 28px) "Caveat", cursive; color: var(--gold); margin-top: 2px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font-weight: 700; font-size: 15px; color: var(--green-deep);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(30, 132, 73, 0.6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(30, 132, 73, 0); } }
.lead { font-size: clamp(16px, 4vw, 19px); color: var(--muted); margin-top: 14px; }
/* Scales with the screen: full width up to 640px, never taller than about a third of a small phone. */
.scene {
  display: block; width: 100%; max-width: 640px; height: auto; margin: 24px auto 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.scene-pin { animation: hop 3s ease-in-out infinite; }
.pin-shadow { transform-origin: 300px 214px; animation: shade 3s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes shade { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.75); } }

/* Form card */
.card {
  width: 100%; max-width: 600px; margin-top: 8px;
  background: #fff; border-radius: 24px; padding: 32px 18px 26px;
  box-shadow: 0 24px 60px -30px rgba(15, 81, 50, 0.45);
  border-top: 6px solid var(--green);
}
@media (min-width: 560px) { .card { padding: 36px 32px 30px; } }
.form-title { font: 800 clamp(20px, 5vw, 24px) "Anek Tamil", system-ui, sans-serif; line-height: 1.3; color: var(--green-deep); text-align: center; }
.form-sub { font-size: 15px; color: var(--muted); text-align: center; margin-top: 4px; }
form { margin-top: 20px; }
.fields { display: grid; gap: 14px; }
label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input {
  width: 100%; min-height: 48px; font: 16px "Mukta Malar", system-ui, sans-serif; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px rgba(30, 132, 73, 0.12); }
.row { display: grid; gap: 14px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; color: var(--muted); }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit {
  width: 100%; min-height: 52px; margin-top: 20px;
  font: 700 17px "Mukta Malar", system-ui, sans-serif; color: #fff;
  background: var(--green-deep); border: 0; border-radius: 14px; padding: 12px; cursor: pointer;
}
.submit:hover { background: var(--green); }
.submit:disabled { opacity: 0.6; cursor: wait; }
.msg { margin-top: 12px; font-size: 15px; text-align: center; min-height: 1.4em; }
.msg.error { color: var(--error); }
.done { text-align: center; padding: 8px 0; }
.done .tick { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--green); }
.done p { font-size: 18px; margin-top: 12px; }

/* Footer */
footer { margin-top: 40px; text-align: center; display: grid; gap: 14px; justify-items: center; color: var(--muted); }
.powered { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; font-size: 14px; }
.powered a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  text-decoration: none; font-weight: 700; font-size: 16px; color: var(--ink);
}
.powered img { width: 32px; height: 32px; border-radius: 8px; }
.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 16px; font-weight: 600; }
.contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--green-deep); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.contact a:hover { text-decoration-color: var(--green); }
.foot-line { font-size: 14px; }

@media (prefers-reduced-motion: reduce) { .pin, .dot, .scene-pin, .pin-shadow { animation: none; } }

/* Shown on staging builds only (config.js env !== production). */
.env {
  position: absolute; top: 22px; left: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: #1a1a1a; background: #f0b429; border-radius: 999px; padding: 2px 10px;
}
.env[hidden] { display: none; }
