/* Global Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background: #002e5b; /* Solid hero-blending color */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-header h1 {
  font-size: 1.5rem;
  color: #fff;
}

.site-header nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #fff;
}

/* Hero Section – Animated */
.hero-animated {
  position: relative;
  background: radial-gradient(ellipse at 50% 60%, #0a2a6e 0%, #041232 55%, #020a1a 100%);
  color: #fff;
  padding: 3rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-bg-svg svg {
  width: 100%; height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-animated h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 40px rgba(80,160,255,0.45);
}

.hero-animated p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: rgba(200,220,255,0.92);
}

/* Stage: three columns */
.hero-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 40px);
  margin: 0 auto 2rem;
  max-width: 700px;
}

/* Side figures */
.hero-figure {
  width: clamp(80px, 18vw, 200px);
  height: clamp(110px, 25vw, 280px);
  flex-shrink: 0;
}

/* Center rings */
.hero-center-stage {
  position: relative;
  width: clamp(140px, 24vw, 240px);
  height: clamp(140px, 24vw, 240px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}
.hero-ring-1 {
  inset: 0;
  border-color: rgba(30,120,255,0.85);
  box-shadow: 0 0 18px rgba(30,120,255,0.6), inset 0 0 18px rgba(30,120,255,0.3);
  animation: heroSpin1 6s linear infinite;
}
.hero-ring-2 {
  inset: 9%;
  border-color: rgba(60,160,255,0.65);
  box-shadow: 0 0 14px rgba(60,160,255,0.5);
  animation: heroSpin1 9s linear infinite reverse;
}
.hero-ring-3 {
  inset: 18%;
  border-color: rgba(100,190,255,0.5);
  animation: heroSpin1 13s linear infinite;
}
.hero-ring-glow {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 60%, rgba(30,100,255,0.15) 100%);
  animation: heroPulse 3s ease-in-out infinite;
}

.hero-logo-circle {
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 28px rgba(30,100,255,0.6);
  overflow: hidden;
}
.hero-logo-img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

@keyframes heroSpin1 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes heroPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}
@keyframes heroFloatDot {
  0%   { transform: translateY(0) translateX(0);    opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-55px) translateX(18px); opacity: 0; }
}

.btn {
  background: #ffd700;
  color: #002e5b;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
}

/* Services Section */
.services {
  padding: 4rem 0;
}

.services h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}

.card {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #005f99;
}

/* Insights Section */
.insights {
  padding: 4rem 0;
  background: #fff;
}

.insights h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.insights ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.insights a {
  display: block;
  padding: 1rem;
  background: #eef6fc;
  border-radius: 6px;
  color: #005f99;
  text-decoration: none;
  font-weight: bold;
}

/* Footer */
.site-footer {
  background: #002e5b;
  color: #fff;
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
}

/* Responsive Tweaks */
@media (max-width: 1200px) {
  .service-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-animated h2 {
    font-size: 1.8rem;
  }

  .hero-animated p {
    font-size: 0.95rem;
  }

  .hero-figure {
    width: clamp(60px, 14vw, 100px);
    height: clamp(85px, 20vw, 140px);
  }
}

@media (max-width: 480px) {
  .service-cards {
    grid-template-columns: 1fr;
  }
}

/* Special Style for Adaptive Testing Card */
.highlight-card {
  position: relative;
  border: 2px solid #ffd700;
  background-color: #fffef5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Top-right Icon Inside Card */
.card-icon {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 40px;
  height: 40px;
  object-fit: contain;
  z-index: 1;
}
/* ── Contact Modal ─────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 10, 30, 0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 560px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.modal-close:hover { color: #002e5b; }

.modal-box h2 {
  font-size: 1.5rem;
  color: #002e5b;
  margin-bottom: 0.25rem;
}
.modal-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #002e5b;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea {
  border: 1.5px solid #d0d8e4;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111;
  outline: none;
  transition: border-color 0.2s;
  background: #f8fafc;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #005f99;
  background: #fff;
}
.form-group textarea { resize: vertical; }

.btn-submit {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s;
}
.btn-submit:hover  { background: #e6c200; }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-msg {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.form-msg.success {
  display: block;
  background: #eafaf1;
  color: #1a7a40;
  border: 1px solid #a8e6c1;
}
.form-msg.error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .modal-box { padding: 2rem 1.25rem 1.5rem; }
}

/* ── v2 additions ──────────────────────────────────────────── */

/* Header: wrap nicely on small screens */
.site-header .container {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.site-header nav a { margin-left: 0; }

/* Header buttons (language + install) */
.nav-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  line-height: 1.2;
}
.lang-toggle {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}
.lang-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.install-btn {
  background: #ffd700;
  color: #002e5b;
  border: 0;
}
.install-btn:hover { background: #e6c200; }
.install-btn[hidden] { display: none; }

/* iOS add-to-home hint (moved from inline styles) */
.install-hint {
  display: none;
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 9999;
  background: #002e5b;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.install-hint button {
  background: transparent;
  border: 0;
  color: #fff;
  float: right;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}
@supports (padding: max(0px)) {
  .install-hint { padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
}

/* Insights: "coming soon" items */
.insights-sub {
  text-align: center;
  color: #4a5b6e;
  margin: -0.75rem auto 1.5rem;
  max-width: 560px;
}
.insight-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: #eef6fc;
  border: 0;
  border-radius: 6px;
  color: #005f99;
  font: inherit;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.insight-item:hover { background: #e0eefa; }
.insight-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #002e5b;
  background: #ffd700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .hero-ring, .hero-ring-glow { animation: none; }
  html { scroll-behavior: auto; }
}

/* Keep side padding on mobile for full-width sections */
.services, .insights { padding-left: 1rem; padding-right: 1rem; }
