/* Shared stylesheet for index.html and contact.html.
 *
 * The pages carry their layout as inline style attributes (they began life as a
 * design-tool export). This file holds what inline attributes cannot express:
 * the base reset, keyframes, :hover and :focus states, and form styling.
 *
 * Several rules need !important purely to outrank those inline attributes. */

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { background: #0b111c; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #0b111c;
  color: #b9c2d0;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, li, figure, label { margin: 0; padding: 0; }

a { color: #7BA4F7; text-decoration: none; }
a:hover { color: #a8c3fb; }

input, textarea, button { font-family: inherit; font-size: 0.97rem; }

/* ── Motion ───────────────────────────────────────────────────────────── */

@keyframes grid-drift { from { transform: translateY(0); } to { transform: translateY(-64px); } }
@keyframes pulse-dot { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .btn-primary:hover { transform: none !important; }
}

/* ── Focus ────────────────────────────────────────────────────────────── */

/* The design-tool export set `outline: none` on fields with only a border-colour
 * change to replace it, which is not a sufficient focus indicator. Keep the
 * colour shift for looks and put a real ring back for keyboard users. */
:focus-visible {
  outline: 2px solid #7BA4F7;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Hover states ─────────────────────────────────────────────────────── */

/* These replace the `style-hover="..."` attributes left by the design tool,
 * which are not real HTML and never fired in a browser. */

.link-dim { transition: color 0.2s ease; }
.link-dim:hover { color: #F2F6FF; }

#lang-toggle:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #F2F6FF;
}

.cta-outline:hover {
  border-color: #5B8DEF;
  color: #ffffff;
  background: rgba(91, 141, 239, 0.14);
}

.btn-primary:hover:not(:disabled) {
  background: #5B8DEF;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(76, 127, 228, 0.38);
}

.card-hover:hover { background: #101827 !important; }

.service-row:hover {
  background: linear-gradient(90deg, rgba(91, 141, 239, 0.10), rgba(91, 141, 239, 0.00)) !important;
}

/* ── Form ─────────────────────────────────────────────────────────────── */

input::placeholder, textarea::placeholder { color: #55606f; }

input:focus, textarea:focus {
  border-color: rgba(91, 141, 239, 0.6) !important;
  background: rgba(91, 141, 239, 0.05) !important;
}

input[aria-invalid='true'], textarea[aria-invalid='true'] {
  border-color: rgba(232, 140, 140, 0.7) !important;
}

button:disabled { cursor: default; opacity: 0.6; }

/* Honeypot wrapper. Positioned off-screen rather than display:none, because
 * some bots skip fields they can tell are hidden. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Reserve the widget's height so it does not shove the submit button down
 * when it finishes loading. */
#turnstile-widget { min-height: 65px; }

/* ── Form status message ──────────────────────────────────────────────── */

#form-note {
  font-size: 0.82rem;
  min-height: 1.2rem;
  color: #6b7688;
  transition: color 0.2s ease;
}

#form-note[data-tone='ok'] { color: #6FD79B; }
#form-note[data-tone='error'] { color: #E88C8C; }

/* ── Small screens ────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr !important; }
}
