@import url('https://fonts.googleapis.com/css2?family=Mooli&family=Open+Sans:wght@400;700&display=swap');

:root {
  --blue: #b2dbe2;
  --blue-dark: #63c3d3;
  --tan: #cfb6a2;
  --tan-dark: #bc977c;
  --off: #edece6;
  --ink: #25282a;
  --radius: 14px;
  --gap: 16px;
  --shadow: 0 10px 30px rgba(37, 40, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  /* Use Open Sans as the default font */
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  
  /* 1. Set the simple, solid base background color */
  background: var(--off);
  
  /* 2. Prepare body for the ::before pseudo-element */
  position: relative;
  overflow-x: hidden; /* Ensure pseudo-element doesn't cause scroll */
}

body::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; /* Place it behind all content */

  /* 3. This is the ripple texture */
  /* The color is a semi-transparent version of the brand's blue-dark */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20'%3E%3Cpath d='M0 10 Q 25 0, 50 10 T 100 10' fill='none' stroke='rgba(99,195,211,0.25)' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  
  /* 4. This is the radial gradient, used as a MASK. */
  /* It will make the ripple texture above fade out. */
  mask-image: radial-gradient(1200px 1200px at 50% -10%, black 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(1200px 1200px at 50% -10%, black 0%, transparent 60%);
}

.page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  /* Ensure page content is on top of the ::before */
  position: relative;
  z-index: 1;
}

.card {
  width: min(500px, 94vw);
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 48px);
  text-align: center;
}

.logo {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto 20px auto;
  display: block;
}

.title {
  font-family: "Mooli", sans-serif;
  margin: 6px 0 10px;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: clamp(24px, 4vw, 30px);
}

.subtitle {
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  margin: 0 0 30px;
  opacity: .7;
  font-size: clamp(14px, 1.3vw, 16px);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.row {
  display: grid;
  gap: var(--gap);
}

.row.split {
  grid-template-columns: 1fr 1fr;
}
.row.center {
  justify-content: center;
  align-items: center;
}

.field {
  text-align: left;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  opacity: .8;
  margin: 0 0 8px;
  color: var(--ink);
}

.field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 4px;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 2px solid #0000001a;
  border-radius: 0;
  transition: border-color .2s ease;
  font-family: "Open Sans", sans-serif;
}

.field input::placeholder {
  color: #5d6a72a6;
}

.field input:focus {
  border-bottom-color: var(--blue-dark);
}

.hint {
  font-size: 12px;
  opacity: .6;
  margin-top: 8px;
}

.err {
  color: #b23434;
  font-size: 12px;
  margin-top: 6px;
  min-height: 14px;
}

.btn {
  margin-top: 16px;
  width: 100%;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  letter-spacing: .2px;
  padding: 14px 20px;
  border-radius: 8px;
  background: var(--blue-dark);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(99, 195, 211, .3);
  transition: all .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--blue);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(99, 195, 211, .4);
}

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

.g-recaptcha {
  margin: 10px auto 0;
  transform-origin: center;
}

@media (max-width: 600px) {
  .row.split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .card {
    padding: 24px;
  }
  .logo {
    max-width: 160px;
  }
  .title {
    font-size: 24px;
  }
  .subtitle {
    font-size: 14px;
  }
  .g-recaptcha {
    transform: scale(0.9);
  }
}

@media (max-width: 360px) {
  .g-recaptcha {
    transform: scale(0.8);
  }
}

.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}
/* ===========================
   Water Ripple Page Transition
   =========================== */
#ripple-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  /* Start invisible */
  opacity: 0;
}

.ripple-active #ripple-overlay {
  opacity: 1;
}

/* We draw a large radial “wave” that expands and slightly shimmers via the SVG filter. */
#ripple-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Subtle brand-tinted water color */
  background:
    radial-gradient(circle at var(--rx, 50%) var(--ry, 50%),
      rgba(99,195,211,0.45) 0%,
      rgba(99,195,211,0.40) 10%,
      rgba(178,219,226,0.35) 20%,
      rgba(237,236,230,0.00) 55%);
  transform: scale(0.01);
  transform-origin: center;
  filter: url("#waterRipple");
  will-change: transform, opacity;
}

/* Expanding wave */
.ripple-active #ripple-overlay::before {
  animation: rippleExpand 800ms ease-out forwards, rippleShimmer 1200ms linear infinite;
}

/* thanks page can fade the overlay out on load so the experience feels continuous */
.ripple-fadeout #ripple-overlay::before {
  animation: rippleFadeOut 500ms ease-out forwards;
}

@keyframes rippleExpand {
  0%   { transform: scale(0.01); opacity: 1; }
  70%  { transform: scale(25);   opacity: 1; }
  100% { transform: scale(35);   opacity: 0.96; }
}

/* Gentle shimmer by slightly shifting the radial center */
@keyframes rippleShimmer {
  0%   { background-position: 50% 50%; }
  50%  { background-position: 51% 49%; }
  100% { background-position: 50% 50%; }
}

@keyframes rippleFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
