/*
  REVALYTICS — CONTACT PAGE
  Page-specific styles: layout, form, contact info tiles, demo card.
*/

/* ── Page shell ──────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
}

.page {
  max-width: 1920px;
  margin: 0 auto;
}

/* ── Section scaffold ────────────────────────────────────── */
.section {
  margin: 25px 30px;
  background: #fff;
  border-radius: 25px;
  box-shadow: var(--rev-shadow-card);
  overflow: hidden;
}

.section-pad {
  padding: clamp(48px, 5vw, 80px) clamp(28px, 5vw, 80px);
}

/* ── Nav clearance ───────────────────────────────────────── */
#main {
  margin-top: 93px;
}

/* ── Text styles (local) ─────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rev-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


.sec-title {
  font-size: clamp(30px, 3.5vw, 50px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--rev-text);
  margin: 22px 0 0;
}

.sec-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--rev-blue);
}

/* ── Contact two-column grid ─────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: stretch;
}

.contact-col {
  display: flex;
  flex-direction: column;
}

/* ── Direct contact tiles ────────────────────────────────── */
.contact-info {
  background: var(--rev-blue-25);
  border-radius: 20px;
  padding: 35px 35px 32px;
  box-shadow: var(--rev-shadow-tile);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.info-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--rev-blue-100);
}

.info-row:first-of-type {
  padding-top: 6px;
}

.info-row:last-of-type {
  border-bottom: none;
  padding-bottom: 6px;
}

.info-row .ico {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--rev-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-row .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rev-text-muted);
  margin: 0 0 4px;
}

.info-row .value {
  font-size: 18px;
  font-weight: 500;
  color: var(--rev-text);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

.info-row .value a {
  color: inherit;
  text-decoration: none;
  transition: color var(--rev-dur) var(--rev-ease);
}

.info-row .value a:hover {
  color: var(--rev-blue);
}

/* ── Demo CTA card ───────────────────────────────────────── */
.demo-card {
  margin-top: 28px;
  background: var(--rev-cta-gradient);
  color: #fff;
  padding: 32px;
  border-radius: var(--rev-radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 86, 235, 0.25);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-card::before {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(75, 133, 234, 0.4);
  filter: blur(40px);
}

.demo-card .l {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 12px;
}

.demo-card h3 {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.demo-card h3 em {
  font-style: italic;
  font-weight: 300;
  color: var(--rev-blue-300);
}

.demo-card a.go {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--rev-navy-900);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 100px;
  text-decoration: none;
  transition: background var(--rev-dur) var(--rev-ease);
}

.demo-card a.go:hover {
  background: var(--rev-blue-25);
}

/* ── Form card ───────────────────────────────────────────── */
.form-card {
  background: #fff;
  border: 1px solid var(--rev-blue-100);
  border-radius: 20px;
  padding: clamp(28px, 3vw, 40px);
  box-shadow: var(--rev-shadow-tile);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-stack>*+* {
  margin-top: 22px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rev-text-muted);
  margin: 0 0 10px;
}

.form-label .req,
.form-consent .req {
  color: var(--rev-blue);
  margin-left: 2px;
}

.form-input,
.form-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--rev-text);
  background: var(--rev-blue-25);
  border: 1px solid var(--rev-blue-100);
  border-radius: 100px;
  padding: 0 22px;
  height: 52px;
  transition: border-color var(--rev-dur), background var(--rev-dur), box-shadow var(--rev-dur);
}

.form-textarea {
  border-radius: 20px;
  height: auto;
  min-height: 150px;
  padding: 18px 22px;
  resize: vertical;
  line-height: 1.4;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--rev-text-muted);
  font-weight: 400;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--rev-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 86, 235, 0.1);
}

.form-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--rev-blue-tint-5);
  border: 1px solid var(--rev-blue-200);
  border-radius: 20px;
}

.form-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 1.5px solid var(--rev-blue);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background var(--rev-dur);
}

.form-consent input[type="checkbox"]:checked {
  background: var(--rev-blue);
  border-color: var(--rev-blue);
}

.form-consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-consent label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--rev-text-body);
  font-weight: 500;
}

.form-submit {
  width: 100%;
  background: var(--rev-cta-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  height: 56px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: filter var(--rev-dur) var(--rev-ease), transform var(--rev-dur);
  box-shadow: 0 8px 20px rgba(0, 86, 235, 0.25);
}

.form-submit:hover {
  filter: brightness(1.08);
}

.form-submit:active {
  transform: scale(0.99);
}

.form-fine {
  font-size: 13px;
  color: var(--rev-text-muted);
  margin: 0;
  font-weight: 500;
}

/* ── CAPTCHA animation ───────────────────────────────────── */
@keyframes rev-spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ── Mobile overrides (≤900px) ───────────────────────────── */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Stack email+phone at tablet widths too */
@media (max-width: 768px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #main {
    margin-top: 82px !important;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .section {
    margin: 12px 0;
    border-radius: 16px;
  }

  .section-pad {
    padding: 28px 20px;
  }

  .contact-grid,
  .contact-col {
    min-width: 0;
  }

  .sec-title {
    font-size: 26px;
    margin-bottom: 24px !important;
  }

  .form-stack > * + * {
    margin-top: 16px;
  }

  .form-card {
    padding: 22px 18px;
    min-width: 0;
  }

  .form-input,
  .form-textarea {
    font-size: 15px;
    height: 48px;
  }

  .form-textarea {
    height: auto;
    min-height: 120px;
  }

  .form-consent {
    padding: 14px 16px;
    gap: 12px;
  }

  .form-consent label {
    font-size: 13px;
  }

  /* Scale reCAPTCHA down to fit — clipped by wrapper overflow:hidden */
  .recaptcha-wrap {
    padding: 14px 12px;
    overflow: hidden;
    max-width: 100%;
  }

  .recaptcha-wrap .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 0 0;
    height: 70px; /* compensate for collapsed visual height after scale */
  }

  .form-submit {
    font-size: 15px;
    height: 50px;
  }

  .contact-info {
    padding: 22px 20px;
    gap: 0;
  }

  .info-row {
    grid-template-columns: 40px 1fr;
    gap: 14px;
    padding: 16px 0;
  }

  .info-row .ico {
    width: 40px;
    height: 40px;
  }

  .info-row .value {
    font-size: 15px;
  }

  .demo-card {
    padding: 24px 20px;
    margin-top: 20px;
  }

  .demo-card h3 {
    font-size: 22px;
  }

  .contact-grid {
    gap: 32px;
  }
}