/* ==========================================================================
   Blue Star Consulting and Services SRL — Design System & Layout
   Cohesive Cobalt / Navy / Slate palette calibrated to the Blue Star emblem
   ========================================================================== */

:root {
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-navy: #0F294A;
  --bg-navy-deep: #09192E;

  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --text-inverse-muted: #CBD5E1;

  --brand-primary: #1E4E8C;
  --brand-primary-hover: #153A6A;
  --brand-accent: #0284C7;
  --brand-accent-soft: #E0F2FE;
  --brand-tint: #EFF6FF;

  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-navy: rgba(255, 255, 255, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 41, 74, 0.06);
  --shadow-md: 0 12px 28px rgba(15, 41, 74, 0.09);

  --container-max: 1160px;
  --gutter: 20px;
  --header-height: 92px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-page);
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

a:hover {
  color: var(--brand-accent);
}

:focus-visible {
  outline: 2.5px solid var(--brand-accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-navy);
  color: var(--text-inverse);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 2000;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 68px;
  width: auto;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 2px;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--brand-primary);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.lang-switch a,
.lang-switch span {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
}

.lang-switch .lang-active {
  background: var(--bg-navy);
  color: var(--text-inverse);
}

.lang-switch a {
  color: var(--text-secondary);
}

.lang-switch a:hover {
  color: var(--brand-primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--bg-navy);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-sm {
  padding: 9px 15px;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  color: var(--text-inverse);
}

.btn-secondary {
  background: transparent;
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.btn-outline-dark {
  background: var(--bg-surface);
  color: var(--brand-primary);
  border-color: var(--border-strong);
}

.btn-outline-dark:hover {
  background: var(--brand-tint);
  border-color: var(--brand-primary);
  color: var(--brand-primary-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.16);
  color: #7DD3FC;
  border: 1px solid rgba(125, 211, 252, 0.3);
  margin-bottom: 16px;
}

.badge-light {
  background: var(--brand-tint);
  color: var(--brand-primary);
  border-color: #BFDBFE;
}

/* ==========================================================================
   Hero & Page Sections
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--bg-navy-deep) 0%, var(--bg-navy) 58%, #163E73 100%);
  color: var(--text-inverse);
  padding: 56px 0 52px;
  border-bottom: 3px solid var(--brand-accent);
}

.hero-compact {
  padding: 44px 0 40px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 840px;
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: var(--text-inverse-muted);
  max-width: 780px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--bg-navy);
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.section-alt .card {
  background: var(--bg-page);
}

.card-accent-top {
  border-top: 3px solid var(--brand-primary);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--bg-navy);
}

.card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.9625rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-link {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Case Studies & Service Pillars
   ========================================================================== */
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.case-meta {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-accent);
  margin-bottom: 6px;
}

.case-card h2,
.case-card h3 {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.3;
  color: var(--bg-navy);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.case-block h3 {
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
}

.case-block h4 {
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
}

.case-block p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.case-block p:last-child {
  margin-bottom: 0;
}

.clean-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.clean-list li {
  margin-bottom: 6px;
}

.clean-list li:last-child {
  margin-bottom: 0;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.pillar-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.pillar-num {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-accent);
  background: var(--brand-accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.pillar-card h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--bg-navy);
}

.coverage-box {
  background: var(--brand-tint);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.coverage-box h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--bg-navy);
}

.coverage-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.anchor-target {
  display: block;
  position: relative;
  top: calc(-1 * var(--header-height) - 24px);
  visibility: hidden;
  height: 0;
}

/* ==========================================================================
   About & Quick Facts
   ========================================================================== */
.prose {
  max-width: 820px;
}

.prose p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.facts-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.facts-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.facts-value {
  color: var(--text-primary);
  font-size: 0.97rem;
  font-weight: 500;
}

/* ==========================================================================
   Contact Layout & Form
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.req {
  color: #B91C1C;
}

.form-control {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.form-control:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(30, 78, 140, 0.14);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.checkbox-row label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
}

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #065F46;
}

.form-status.is-error {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: var(--bg-navy);
}

.contact-item {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-item:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-note {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--bg-navy);
}

.step-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Legal Pages (GDPR & Cookies)
   ========================================================================== */
.legal-doc {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  max-width: 900px;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-doc h2 {
  margin: 24px 0 10px;
  font-size: 1.2rem;
  color: var(--bg-navy);
}

.legal-doc h2:first-of-type {
  margin-top: 0;
}

.legal-doc p,
.legal-doc li {
  color: var(--text-secondary);
  font-size: 0.9625rem;
}

.legal-doc ul {
  margin: 8px 0 14px;
  padding-left: 20px;
}

/* ==========================================================================
   Bottom CTA Banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-navy) 0%, #163E73 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-md);
}

.cta-banner h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--text-inverse);
}

.cta-banner p {
  margin: 0;
  color: var(--text-inverse-muted);
  max-width: 640px;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.cta-note {
  font-size: 0.8125rem;
  color: #CBD5E1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-navy-deep);
  color: var(--text-inverse-muted);
  padding: 48px 0 28px;
  border-top: 1px solid var(--border-navy);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-navy);
}

.footer-brand-name {
  color: var(--text-inverse);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.footer-desc {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-inverse-muted);
}

.footer-heading {
  color: var(--text-inverse);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-inverse-muted);
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.footer-legal-line {
  line-height: 1.5;
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    padding: 18px var(--gutter) 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    display: block;
    padding: 10px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--bg-subtle);
  }

  .nav-link[aria-current="page"]::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    font-weight: 700;
    color: var(--brand-primary);
  }

  .header-actions {
    justify-content: space-between;
    padding-top: 4px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .grid-3,
  .grid-4,
  .case-grid,
  .coverage-box,
  .facts-list,
  .steps-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 22px;
  }

  .cta-actions,
  .cta-actions .btn {
    width: 100%;
  }

  .brand-logo {
    height: 54px;
  }

  .case-card,
  .pillar-card,
  .form-card,
  .legal-doc {
    padding: 20px;
  }
}
