/* ==========================================================================
   Components: buttons, forms, media cards, video dialog, preview label
   ========================================================================== */

/* ---- Buttons: one shape, four colourways, understated hover ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px;
  padding: 0.8em 1.75em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn .icon { width: 1.05em; height: 1.05em; transition: transform var(--dur) var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }
.btn--sm { min-height: 44px; padding: 0.62em 1.35em; }

/* On ivory / white */
.btn--primary { background: var(--vd-blue-700); color: var(--vd-ivory-100); }
.btn--primary:hover { background: var(--vd-blue-900); color: var(--vd-white); }
.btn--outline { background: transparent; color: var(--vd-blue-700); border-color: var(--vd-blue-700); }
.btn--outline:hover { background: var(--vd-blue-700); color: var(--vd-ivory-100); }

/* On blue / photography: taupe fill with DARK blue text (5.6:1; white on taupe would fail) */
.btn--accent { background: var(--vd-taupe-500); color: var(--vd-blue-900); }
.btn--accent:hover { background: var(--vd-taupe-300); color: var(--vd-blue-900); }
.btn--ghost-light { background: transparent; color: var(--vd-ivory-100); border-color: rgba(246, 243, 237, 0.6); }
.btn--ghost-light:hover { background: rgba(246, 243, 237, 0.14); border-color: var(--vd-ivory-100); color: var(--vd-white); }

/* ---- Forms: mirrors Gravity Forms markup (gform_wrapper / gfield) so the CSS ports to the real form ---- */
.gform_wrapper { font-size: var(--fs-small); }
.gform_required_legend { margin: 0 0 1.4rem; color: var(--color-text-muted); font-size: var(--fs-small); }
.gform_fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.gfield { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gfield--width-full { grid-column: 1 / -1; }
.gfield_label { font-size: var(--fs-small); font-weight: 500; color: var(--vd-blue-900); }
.gfield_required_asterisk { margin-left: 0.2em; color: var(--vd-alert); }
.gform_required_legend .gfield_required_asterisk { margin: 0; }
.gfield input, .gfield select, .gfield textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.7em 0.95em;
  background: var(--vd-white);
  color: var(--color-text);
  border: 1px solid var(--vd-field-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gfield textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.gfield select {
  appearance: none;
  padding-right: 2.6em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%23123B5D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
}
.gfield input::placeholder { color: #7C8185; }
.gfield input:focus, .gfield select:focus, .gfield textarea:focus {
  outline: none;
  border-color: var(--vd-blue-700);
  box-shadow: 0 0 0 3px rgba(18, 59, 93, 0.22);
}
.gfield.has-error input, .gfield.has-error select, .gfield.has-error textarea { border-color: var(--vd-alert); }
.gfield__error { margin: 0; color: var(--vd-alert); font-size: 0.875rem; }
.gform_validation_container { display: none !important; }   /* Gravity Forms honeypot, hidden exactly as on the live site */
.gform_footer { margin-top: 26px; }
.gform_footer .gform_button { min-width: 190px; }
.form-status { margin: 18px 0 0; padding: 14px 16px; border-left: 3px solid var(--vd-taupe-500); background: var(--vd-ivory-100); color: var(--vd-ink); font-size: var(--fs-small); }
.form-status[hidden] { display: none; }

/* ---- Media cards (services, blog) ---- */
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-link:hover { color: inherit; }
.card-media { position: relative; display: block; flex: none; overflow: hidden; border-radius: var(--radius-md); background: var(--vd-ivory-200); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card-link:hover .card-media img { transform: scale(1.035); }
/* flex:1 stretches the title row so every card's bottom rule lines up even when one title wraps */
.card-title {
  flex: 1;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin: 0; padding: 18px 0 14px;
  border-bottom: 1px solid var(--vd-line);
  transition: border-color var(--dur) var(--ease);
}
.card-title .icon { width: 22px; height: 22px; margin-top: 0.28em; color: var(--vd-taupe-700); transition: transform var(--dur) var(--ease); }
.card-link:hover .card-title { border-color: var(--vd-taupe-500); }
.card-link:hover .card-title .icon { transform: translateX(4px); }

/* ---- Video tiles + dialog ---- */
.video-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius-md); background: var(--vd-blue-900); }
.video-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.9s var(--ease); }
.video-tile:hover img { transform: scale(1.03); }
.video-tile__play {
  position: absolute; right: 16px; bottom: 16px;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  background: rgba(246, 243, 237, 0.94);
  color: var(--vd-blue-900);
  border-radius: 50%;
  box-shadow: 0 8px 24px -10px rgba(11, 47, 74, 0.6);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.video-tile:hover .video-tile__play { transform: scale(1.08); background: var(--vd-white); }
.video-tile__play .icon { width: 22px; height: 22px; margin-left: 3px; }

.video-modal {
  width: min(1120px, 92vw);
  max-width: none; padding: 0; border: 0;
  background: transparent; color: var(--vd-ivory-100);
  overflow: visible;
}
.video-modal::backdrop { background: rgba(8, 31, 49, 0.86); }
.video-modal__frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.video-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-modal__close {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px auto;
  padding: 8px 14px;
  background: transparent; color: var(--vd-ivory-100);
  border: 1px solid rgba(246, 243, 237, 0.5); border-radius: var(--radius-sm);
  font-size: var(--fs-small);
}
.video-modal__close:hover { background: rgba(246, 243, 237, 0.14); }
.video-modal form { display: flex; }

/* ---- Preview label (removed on deployment; ?clean hides it) ---- */
/* Slim bar in normal flow above the sticky header: labels the page as a preview without covering any content */
.preview-flag {
  position: relative; z-index: 110;
  padding: 9px 56px 9px var(--gutter);
  background: var(--vd-blue-900); color: var(--vd-ivory-100);
  font-size: 0.8125rem; line-height: 1.4; text-align: center;
}
.preview-flag p { margin: 0; }
.preview-flag strong { font-weight: 600; color: var(--vd-taupe-300); letter-spacing: 0.1em; }
.preview-flag button {
  position: absolute; right: max(12px, calc(var(--gutter) - 10px)); top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  background: transparent; color: var(--vd-ivory-100);
  border: 1px solid rgba(246, 243, 237, 0.4); border-radius: 50%;
}
.preview-flag button:hover { background: rgba(246, 243, 237, 0.16); }
.preview-flag button .icon { width: 14px; height: 14px; }
.preview-flag[hidden], .is-clean .preview-flag { display: none; }
