/* ============================================================
   Cyprus Migration — "Trust & Authority" design system (CPL-188)

   Direction generated by ui-ux-pro-max for legal services:
   Style:  Trust & Authority (credentials, badges, metric cards,
           WCAG AAA targets), light-first.
   Type:   EB Garamond (authority headings, Cyrillic) +
           Source Sans 3 (body; substituted for Lato, which has
           no Cyrillic on Google Fonts).
   Color:  navy #1E3A8A / #1E40AF (trust), amber #B45309 (CTA),
           slate neutrals on #F8FAFC.
   Shape:  interactive 8px, surfaces 12px; card shadows for depth.
   ============================================================ */

/* Dark variant: deep navy night office (NovaDark default scope) */
:root {
  --bg-0: #0a1020;
  --bg-1: #0e1628;
  --bg-2: #142036;
  --bg-3: #1c2c48;
  --bg-4: #26395c;

  --text-primary: #e2e8f0;
  --text-secondary: #9fb0c7;
  --text-muted: #64748b;
  --text-accent: #f1f5f9;

  --border-subtle: rgba(226, 232, 240, 0.08);
  --border-default: rgba(226, 232, 240, 0.14);
  --border-strong: rgba(226, 232, 240, 0.20);
  --border-hover: rgba(226, 232, 240, 0.28);

  /* CTA color drives buttons platform-wide */
  --accent-primary: #d97706;
  --accent-primary-rgb: 217, 119, 6;
  --accent-primary-glow: rgba(217, 119, 6, 0.14);
  --accent-secondary: #1e40af;

  --gradient-hero: linear-gradient(135deg, #1e3a8a, #1e40af);
  --gradient-mesh: radial-gradient(at 20% 80%, var(--accent-primary-glow), transparent 50%);

  --font-display: 'EB Garamond', 'Georgia', serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;

  /* Trust & Authority system variables (per ui-ux-pro-max) */
  --trust-color: #93b4f0;        /* navy, readable on dark */
  --trust-strong: #b9cdf5;
  --security-green: #34d399;
  --metric-highlight: #fbbf24;
  --cta-ink: #1c1107;            /* ink on amber controls */
  --badge-height: 48px;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.35);
}

/* Primary expression: light, clean, institutional */
[data-theme="light"] {
  --bg-0: #ffffff;
  --bg-1: #f8fafc;
  --bg-2: #f1f5f9;
  --bg-3: #e2e8f0;
  --bg-4: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #0f172a;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-default: rgba(15, 23, 42, 0.14);
  --border-strong: rgba(15, 23, 42, 0.22);
  --border-hover: rgba(15, 23, 42, 0.32);

  --accent-primary: #b45309;
  --accent-primary-rgb: 180, 83, 9;
  --accent-primary-glow: rgba(180, 83, 9, 0.12);
  --accent-secondary: #1e40af;

  --trust-color: #1e40af;
  --trust-strong: #1e3a8a;
  --security-green: #059669;
  --metric-highlight: #b45309;
  --cta-ink: #ffffff;
  --card-shadow: 0 4px 6px rgba(15, 23, 42, 0.10);

  --shadow-glow: 0 8px 24px rgba(30, 58, 138, 0.10);
}

/* ------------------------------------------------------------
   Type
   ------------------------------------------------------------ */
.cm-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1, h2, h3 { text-wrap: balance; }

/* Accent word in the wordmark and headings: trust navy */
.cm-copper { color: var(--trust-color); }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.nd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms var(--ease-out),
              background-color 160ms ease,
              border-color 160ms ease,
              color 160ms ease,
              box-shadow 160ms ease;
}
.nd-btn:active { transform: scale(0.97); }
.nd-btn:focus-visible {
  outline: 2px solid var(--trust-color);
  outline-offset: 2px;
}

.nd-btn--sm { padding: 0.45rem 0.9rem; font-size: var(--text-sm); }
.nd-btn--md { padding: 0.65rem 1.3rem; font-size: var(--text-sm); }
.nd-btn--lg { padding: 0.85rem 1.7rem; font-size: var(--text-base); }
.nd-btn--full { width: 100%; }
.nd-btn--pill { border-radius: var(--radius-full); }

.nd-btn--primary {
  background: var(--accent-primary);
  color: var(--cta-ink);
  box-shadow: var(--card-shadow);
}
.nd-btn--secondary {
  background: transparent;
  color: var(--trust-color);
  border-color: var(--border-strong);
}
.nd-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
  .nd-btn--primary:hover { background: #92400e; }
  :root:not([data-theme="light"]) .nd-btn--primary:hover { background: #f59e0b; }
  .nd-btn--secondary:hover { border-color: var(--trust-color); color: var(--trust-strong); }
  .nd-btn--ghost:hover { color: var(--text-accent); }
}

/* ------------------------------------------------------------
   Hero: lead-generation layout. Copy + proof points left,
   consultation request card right (form fields <= 3).
   ------------------------------------------------------------ */
.cm-hero {
  position: relative;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-subtle);
}
.cm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.cm-hero__title {
  font-size: clamp(2.4rem, 1.4rem + 4vw, 4.2rem);
  line-height: 1.08;
  color: var(--text-accent);
}
.cm-hero__title .cm-copper { color: var(--trust-color); }

.cm-hero__points {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cm-hero__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: var(--text-base);
}
.cm-hero__points svg { color: var(--security-green); flex-shrink: 0; margin-top: 0.2rem; }

.cm-lead-card {
  background: var(--bg-0);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
:root:not([data-theme="light"]) .cm-lead-card {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.cm-lead-card__head {
  background: linear-gradient(140deg, #1e3a8a, #1e40af);
  color: #ffffff;
  padding: 1.1rem 1.5rem;
}
.cm-lead-card__head p {
  color: rgba(219, 229, 248, 0.85);
  font-size: var(--text-sm);
}
.cm-lead-card__body { padding: 1.5rem; }
.cm-lead-card__note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.cm-lead-card__note svg { color: var(--security-green); flex-shrink: 0; }

@media (max-width: 1023px) {
  .cm-hero__grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Credentials strip: the Trust & Authority signature element
   ------------------------------------------------------------ */
.cm-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.cm-badge {
  min-height: var(--badge-height);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-0);
  box-shadow: var(--card-shadow);
}
.cm-badge svg { color: var(--trust-color); flex-shrink: 0; }
.cm-badge--verified svg { color: var(--security-green); }
.cm-badge strong {
  display: block;
  color: var(--text-accent);
  font-size: var(--text-sm);
  font-weight: 600;
}
.cm-badge span {
  color: var(--text-muted);
  font-size: var(--text-xs);
}
@media (hover: hover) and (pointer: fine) {
  .cm-badge { transition: border-color 200ms ease, box-shadow 200ms ease; }
  .cm-badge:hover {
    border-color: var(--trust-color);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.14);
  }
}

/* ------------------------------------------------------------
   Photo frame reused outside the hero
   ------------------------------------------------------------ */
.cm-photo {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
}
.cm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------------------------------------
   Steps: how-we-work sequence (problem -> solution overview)
   ------------------------------------------------------------ */
.cm-step {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1.1rem;
  align-items: start;
}
.cm-step__num {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--trust-color);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}
:root:not([data-theme="light"]) .cm-step__num { color: #0a1020; }
.cm-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 0.3rem;
}

/* ------------------------------------------------------------
   Services: card grid with shadows (Trust & Authority depth)
   ------------------------------------------------------------ */
.cm-service {
  padding: 1.75rem;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-0);
  box-shadow: var(--card-shadow);
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (hover: hover) and (pointer: fine) {
  .cm-service { transition: border-color 200ms ease, box-shadow 200ms ease; }
  .cm-service:hover {
    border-color: var(--trust-color);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.14);
  }
}
.cm-service__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--trust-color);
  background: rgba(30, 64, 175, 0.10);
}
:root:not([data-theme="light"]) .cm-service__icon {
  background: rgba(147, 180, 240, 0.12);
}
.cm-service h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 0.35rem;
}

/* ------------------------------------------------------------
   Stats: metric cards with icons (per style spec)
   ------------------------------------------------------------ */
.cm-metric {
  padding: 1.5rem;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-0);
  box-shadow: var(--card-shadow);
}
.cm-stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
  line-height: 1;
  color: var(--text-accent);
}
.cm-stat-suffix { color: var(--metric-highlight); }

/* ------------------------------------------------------------
   Pricing: featured panel framed in trust navy
   ------------------------------------------------------------ */
.cm-plan {
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-0);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.cm-plan--featured {
  border: 2px solid var(--trust-color);
}
.cm-plan__price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-4xl);
  color: var(--text-accent);
  line-height: 1;
}
.cm-plan__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--trust-color);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 600;
}
:root:not([data-theme="light"]) .cm-plan__badge { color: #0a1020; }

/* ------------------------------------------------------------
   Testimonials: carousel (pattern: 3-5 quotes, social proof
   before the CTA). Track/slide CSS for NovaDark carousel JS.
   ------------------------------------------------------------ */
.cm-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
  line-height: 1.45;
  color: var(--text-accent);
}
.cm-quote-small {
  color: var(--text-secondary);
  line-height: 1.65;
}

[data-nd-carousel] {
  position: relative;
  overflow: hidden;
}
.nd-carousel__track {
  display: flex;
  transition: transform 400ms var(--ease-out);
}
.nd-carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 0 1rem;
}
.nd-carousel__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-0);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.nd-carousel__btn:hover { color: var(--trust-strong); border-color: var(--trust-color); }
.nd-carousel__indicators {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.nd-carousel__indicators .nd-carousel__dot {
  /* visual dot 8px; padding keeps a larger tap area, content-box clips the fill */
  width: 24px;
  height: 24px;
  min-height: 0;
  min-width: 0;
  border-radius: 50%;
  border: none;
  padding: 8px;
  background: var(--bg-4);
  background-clip: content-box;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.nd-carousel__indicators .nd-carousel__dot--active {
  background: var(--trust-color);
}
@media (prefers-reduced-motion: reduce) {
  .nd-carousel__track { transition-duration: 1ms; }
}

/* ------------------------------------------------------------
   FAQ: grouped accordion with sticky topic rail
   ------------------------------------------------------------ */
.cm-faq-rail {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cm-faq-rail a {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}
.cm-faq-rail a:hover {
  color: var(--trust-strong);
  background: var(--bg-2);
}
.cm-faq-group h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  color: var(--text-accent);
}
.cm-faq-item button { transition: color 150ms ease; }
.cm-faq-item [data-nd-accordion-content] {
  transition: max-height 250ms var(--ease-out);
}
.cm-faq-item .cm-copper { color: var(--trust-color); }

@media (max-width: 1023px) {
  .cm-faq-rail { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ------------------------------------------------------------
   CTA: photographic band under a navy scrim, amber action
   ------------------------------------------------------------ */
.cm-cta {
  position: relative;
  background: linear-gradient(140deg, #1e3a8a, #1e40af);
  color: #dbe5f8;
  overflow: hidden;
}
.cm-cta__photo {
  position: absolute;
  inset: 0;
}
.cm-cta__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cm-cta__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(23, 42, 96, 0.92), rgba(30, 64, 175, 0.82));
}
.cm-cta > .nd-container { position: relative; z-index: 1; }
.cm-cta .cm-display { color: #ffffff; }
.cm-cta p { color: rgba(219, 229, 248, 0.88); }
.cm-cta .nd-btn--primary {
  background: #f59e0b;
  color: #1c1107;
}
@media (hover: hover) and (pointer: fine) {
  .cm-cta .nd-btn--primary:hover { background: #fbbf24; }
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.nd-input-group { position: relative; }
.nd-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-0);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: var(--text-base);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.nd-input::placeholder { color: var(--text-muted); }
.nd-input:focus {
  border-color: var(--trust-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}
.nd-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
textarea.nd-input { min-height: 120px; resize: vertical; }
.nd-error-text { margin-top: 0.25rem; font-size: var(--text-xs); color: var(--accent-danger); }

/* ------------------------------------------------------------
   Navbar tint
   ------------------------------------------------------------ */
.nd-navbar--scrolled {
  background-color: rgba(10, 16, 32, 0.85) !important;
}
[data-theme="light"] .nd-navbar--scrolled {
  background-color: rgba(248, 250, 252, 0.88) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .nd-btn,
  .nd-btn:active { transform: none; transition-duration: 1ms; }
  .cm-faq-item [data-nd-accordion-content] { transition-duration: 1ms; }
  [data-scroll] { transition-duration: 1ms !important; animation: none !important; }
}
