/* =========================================================
   REQUEST FOR APPOINTMENT — page-specific styles
   Theme matches the homepage hero: deep blue, gold accents,
   glass morphism, Manrope + Inter fonts.
   ========================================================= */

/* ---------- PAGE HERO ---------- */
/* Height matches the homepage hero.
   Homepage hero is ~100vh in practice because the portrait and
   orbiting credential cards fill it. This page has less content,
   so we force the same min-height and vertically center the text. */
.req-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(110px, 12vh, 130px) 0 clamp(40px, 5vh, 70px);
  background: linear-gradient(135deg, var(--blue-900) 0%, #0c3a68 50%, var(--blue-800) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
}
.req-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
/* Blurred photo background — mirrors the homepage hero */
.req-hero__bg-image {
  position: absolute;
  inset: -4%;
  background-image: url('../images/appointment-hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.42;
  filter: blur(6px) saturate(1.15);
  transform-origin: center;
  animation: req-ken-burns 30s ease-in-out infinite alternate;
}
/* Brand-blue wash + gold rim-light (matches homepage overlay) */
.req-hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 50%, rgba(24,103,166,0.45) 0%, transparent 55%),
    radial-gradient(circle at 18% 85%, rgba(201,168,76,0.12), transparent 45%),
    linear-gradient(180deg, rgba(10,46,80,0.4) 0%, rgba(10,46,80,0.28) 50%, rgba(10,46,80,0.6) 100%);
}
@keyframes req-ken-burns {
  0%   { transform: scale(1.04) translate(0, 0); }
  50%  { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1.08) translate(1%, 1%); }
}

.req-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.req-hero__text {
  text-align: left;
  max-width: 560px;
}
.req-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.38);
  border-radius: 999px;
  color: var(--gold-300);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.req-hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 12px var(--gold-500);
  animation: req-pulse 2s ease-in-out infinite;
}
@keyframes req-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.7; }
}
/* Title — matches homepage hero h1 sizing */
.req-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--white);
  margin: 0 0 16px;
}
.req-hero__line {
  display: block;
  padding-bottom: 0.1em;
  white-space: nowrap;
  word-spacing: 0.12em;
  color: var(--white);
  min-height: 1.12em; /* reserve space while empty during typing */
}
/* Blinking caret for whichever line is currently typing, plus the
   last line once it finishes (so the caret hangs at the end). */
.req-hero__line.is-typing::after,
.req-hero__line.is-done::after {
  content: '|';
  display: inline-block;
  margin-left: 4px;
  font-weight: 300;
  color: var(--white);
  -webkit-text-fill-color: var(--white);
  animation: req-caret-blink 0.85s step-end infinite;
  transform: translateY(-2px);
}
.req-hero__line--gold.is-typing::after,
.req-hero__line--gold.is-done::after {
  color: var(--gold-500);
  -webkit-text-fill-color: var(--gold-500);
}
@keyframes req-caret-blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.req-hero__line--gold {
  background: linear-gradient(135deg, #f0d98a 0%, var(--gold-500) 50%, #b08a30 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 24px rgba(201,168,76,0.35));
}
.req-hero__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  color: rgba(255,255,255,0.78);
  max-width: 540px;
  margin: 0;
  line-height: 1.65;
}

/* ---------- CHAMBER CARDS ---------- */
.req-chambers {
  padding: clamp(60px, 8vh, 100px) 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(24,103,166,0.18) 0%, transparent 55%),
    linear-gradient(180deg, #05223e 0%, #0a2a4a 100%);
  color: var(--white);
}
.req-chambers__head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}
.req-chambers__head .section__eyebrow { color: var(--gold-300); }
.req-chambers__head .section__title { color: var(--white); }
.req-chambers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.req-chamber {
  position: relative;
  padding: 32px 28px 28px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(201,168,76,0.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 20px 50px rgba(0,0,0,0.35);
  overflow: hidden;
  animation: chamber-float 7s ease-in-out infinite;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.req-chamber--2 {
  animation-delay: -3.5s;
  animation-duration: 8s;
}
.req-chamber__glow {
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: conic-gradient(from 0deg,
    rgba(201,168,76,0) 0deg,
    rgba(201,168,76,0.6) 90deg,
    rgba(61,155,224,0.5) 180deg,
    rgba(201,168,76,0) 270deg);
  filter: blur(24px);
  opacity: 0.25;
  z-index: -1;
  animation: chamber-spin 12s linear infinite;
}
.req-chamber--2 .req-chamber__glow { animation-duration: 15s; animation-direction: reverse; }
.req-chamber:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(201,168,76,0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 28px 60px rgba(0,0,0,0.45),
    0 0 50px rgba(201,168,76,0.3);
  animation-play-state: paused;
}

.req-chamber__label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 10px;
}
.req-chamber__name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.req-chamber__list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.req-chamber__list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
}
.req-chamber__list svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--gold-400);
  margin-top: 2px;
}
.req-chamber__list a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.req-chamber__list a:hover { color: var(--gold-300); }
.req-chamber__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 999px;
  color: var(--gold-300);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.req-chamber__cta svg { width: 16px; height: 16px; }
.req-chamber__cta:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: #0a2a4a;
  transform: translateX(3px);
}

@keyframes chamber-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-8px) rotate(0.3deg); }
  50%      { transform: translateY(-4px) rotate(-0.2deg); }
  75%      { transform: translateY(-10px) rotate(0.2deg); }
}
@keyframes chamber-spin {
  to { transform: rotate(360deg); }
}

/* ---------- FORM ---------- */
.req-form-section {
  padding: clamp(60px, 10vh, 120px) 0 clamp(80px, 12vh, 140px);
  background:
    radial-gradient(circle at 50% 30%, rgba(24,103,166,0.2) 0%, transparent 50%),
    linear-gradient(180deg, #0a2a4a 0%, #05223e 100%);
  color: var(--white);
}
.req-form-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 52px);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(201,168,76,0.35);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 30px 80px rgba(0,0,0,0.4);
}
.req-form-panel__head {
  text-align: center;
  margin-bottom: 36px;
}
.req-form-panel__head .section__eyebrow { color: var(--gold-300); }
.req-form-panel__head .section__title { color: var(--white); }
.req-form-panel__intro {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  margin-top: 8px;
}

.req-form__required {
  color: var(--gold-400);
  font-weight: 700;
}

.req-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.req-form__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.req-form__field--full {
  grid-column: 1 / -1;
}
.req-form__field label {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.88);
  text-transform: uppercase;
}
.req-form__field label small {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255,255,255,0.55);
  margin-left: 4px;
}
.req-form__field input,
.req-form__field textarea,
.req-form__field select {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--white);
  background: rgba(5,34,62,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.req-form__field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}
.req-form__field input::placeholder,
.req-form__field textarea::placeholder {
  color: rgba(255,255,255,0.35);
}
.req-form__field input:focus,
.req-form__field textarea:focus,
.req-form__field select:focus {
  outline: none;
  border-color: rgba(201,168,76,0.75);
  background: rgba(5,34,62,0.75);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.14);
}
.req-form__field input:invalid:not(:placeholder-shown),
.req-form__field textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(220,80,80,0.55);
}

.req-form__select-wrap {
  position: relative;
}
.req-form__select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.req-form__select-wrap select option {
  background: #0a2a4a;
  color: var(--white);
}
.req-form__select-caret {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: rgba(255,255,255,0.6);
  pointer-events: none;
}

.req-form__hint {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  align-self: flex-end;
}

/* ----- file upload ----- */
.req-form__upload {
  border: 1.5px dashed rgba(201,168,76,0.45);
  border-radius: 14px;
  padding: 22px;
  background: rgba(5,34,62,0.4);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.req-form__upload.is-dragging {
  border-color: rgba(201,168,76,0.9);
  background: rgba(201,168,76,0.08);
}
.req-form__upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  padding: 10px;
  font-family: var(--font-sans);
  text-align: center;
}
.req-form__upload-btn svg {
  width: 34px;
  height: 34px;
  color: var(--gold-400);
  margin-bottom: 4px;
}
.req-form__upload-btn span {
  font-size: 0.95rem;
  font-weight: 600;
}
.req-form__upload-btn small {
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-weight: 500;
}
.req-form__upload-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.req-form__upload-list:empty { display: none; }
.req-form__upload-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}
.req-form__upload-list li svg {
  width: 18px;
  height: 18px;
  color: var(--gold-400);
  flex-shrink: 0;
}
.req-form__upload-list li .name {
  flex: 1;
  color: rgba(255,255,255,0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.req-form__upload-list li .size {
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
}
.req-form__upload-list li .remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}
.req-form__upload-list li .remove:hover {
  color: #ff7a7a;
  background: rgba(255,122,122,0.1);
}

/* ----- honeypot (off-screen) ----- */
.req-form__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ----- reCAPTCHA ----- */
.req-form__captcha {
  margin: 24px 0 4px;
  display: flex;
  justify-content: center;
}

/* ----- submit ----- */
.req-form__actions {
  margin-top: 28px;
  text-align: center;
}
.req-form__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 280px;
  padding: 16px 34px;
  background: linear-gradient(135deg, var(--gold-500) 0%, #b08a30 100%);
  color: #0a2a4a;
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(201,168,76,0.32),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.req-form__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 18px 42px rgba(201,168,76,0.42),
    inset 0 1px 0 rgba(255,255,255,0.45);
}
.req-form__submit:disabled {
  filter: saturate(0.5) brightness(0.85);
  cursor: not-allowed;
}
.req-form__submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(10,42,74,0.3);
  border-top-color: #0a2a4a;
  border-radius: 50%;
  animation: req-spin 0.8s linear infinite;
}
.req-form__submit.is-loading .req-form__submit-label { opacity: 0.4; }
.req-form__submit.is-loading .req-form__submit-spinner { display: inline-block; }
@keyframes req-spin { to { transform: rotate(360deg); } }

.req-form__privacy {
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

.req-form__error {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(220,80,80,0.45);
  background: rgba(220,80,80,0.1);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: #ffb6b6;
  text-align: center;
}

/* ---------- SUCCESS MODAL ---------- */
.req-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.req-modal[hidden] { display: none; }
.req-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,15,30,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: req-fade-in 0.35s ease;
}
.req-modal__card {
  position: relative;
  max-width: 520px;
  width: 100%;
  padding: 44px 36px 32px;
  text-align: center;
  background: linear-gradient(160deg, #0a3a68 0%, #05223e 100%);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 40px 100px rgba(0,0,0,0.6);
  color: var(--white);
  animation: req-modal-in 0.5s cubic-bezier(0.25, 1.25, 0.5, 1);
  overflow: hidden;
}
.req-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}
.req-modal__close:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.req-modal__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--gold-400);
  animation: req-pop-in 0.6s cubic-bezier(0.25, 1.35, 0.55, 1) 0.15s backwards;
}
.req-modal__icon svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 24px rgba(201,168,76,0.55));
}
.req-modal__title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.req-modal__body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
  margin: 0 0 20px;
}
.req-modal__urgent-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin: 0 0 10px;
}
.req-modal__phones {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.req-modal__phones a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.req-modal__phones a:hover {
  color: var(--gold-300);
}
.req-modal__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
}
.req-modal__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold-500), #f0d98a);
  transform-origin: right center;
  animation: req-countdown 11s linear forwards;
}

@keyframes req-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes req-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes req-pop-in {
  from { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes req-countdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  .req-form__grid {
    grid-template-columns: 1fr;
  }
  .req-form-panel {
    padding: 28px 22px;
  }
  .req-chamber {
    padding: 26px 22px 22px;
  }
}
@media (max-width: 480px) {
  .req-form__submit {
    min-width: unset;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .req-chamber,
  .req-chamber__glow,
  .req-hero__badge-dot,
  .req-modal__card,
  .req-modal__icon,
  .req-modal__progress span {
    animation: none !important;
  }
}
