/* ============================================================
   POLARIS SYSTEMS — CORPORATE PREMIUM STYLESHEET
   Palette: Deep Navy #0C1B33 | Ivory #F5F0E8 | Gold #C8A96E
   Type: Cormorant Garamond (headings) | Inter (body)
   Reference: McKinsey, Deloitte, Airbus corporate sites
   ============================================================ */

:root {
  /* Core Palette — Polaris Systems corporate navy + white */
  --navy:          #0D2060;
  --navy-mid:      #112470;
  --navy-light:    #1A3080;
  --ivory:         #F4F6FB;
  --ivory-dark:    #E8ECF5;
  /* Accent: clean white + cool steel-blue (replaces gold) */
  --gold:          #FFFFFF;
  --gold-light:    rgba(255,255,255,0.85);
  --gold-dark:     rgba(255,255,255,0.65);
  --accent:        #5B8FD4;   /* steel-blue for interactive elements */
  --accent-light:  #7AAAE0;
  --white:         #FFFFFF;

  /* Text */
  --text-primary:  #0C1B33;
  --text-secondary:#3D5278;
  --text-muted:    #7A8BAB;
  --text-on-dark:  #E8EDF5;
  --text-muted-dark: #8FA0C0;

  /* Borders */
  --border-light:  rgba(12, 27, 51, 0.1);
  --border-gold:   rgba(255,255,255,0.18);
  --border-dark:   rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-serif:    'Cormorant Garamond', 'Georgia', serif;
  --font-body:     'Inter', 'Helvetica Neue', sans-serif;
  --font-arabic:   'Alexandria', 'Segoe UI', sans-serif;

  /* Spacing & Radius */
  --max-w:         1160px;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;

  /* Transitions */
  --ease:          0.25s ease;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--ivory);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] { font-family: var(--font-arabic); }
[dir="rtl"] .btn-arrow { transform: rotate(180deg); }
[dir="rtl"] .service-tile { text-align: right; }
[dir="rtl"] .tile-icon-line { margin-right: 0; }

/* ─── Top Accent Bar ─── */
.top-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, #0D2060 0%, #112470 40%, #5B8FD4 80%, #7AAAE0 100%);
}

/* ─── Site Wrapper ─── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─── */
.site-header {
  background-color: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  user-select: none;
}

.brand-icon-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-star-svg {
  width: 18px;
  height: 18px;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.lang-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-divider {
  color: rgba(255,255,255,0.2);
  font-size: 13px;
}

.lang-pill {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-muted-dark);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--ease);
  text-transform: uppercase;
}

.lang-pill:hover { color: var(--white); }

.lang-pill.active {
  color: var(--gold);
  font-weight: 600;
}

.header-cta-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--accent);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}

.header-cta-btn:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* ─── HERO ─── */
.hero-section {
  background-color: var(--navy);
  background-image:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(30, 48, 85, 0.8) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 100% 20%, rgba(200, 169, 110, 0.07) 0%, transparent 60%);
  padding: 80px 40px 100px;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { order: -1; }
}

/* Badge */
.construction-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 28px;
}

.badge-dot {
  width: 9px;
  height: 9px;
  background: #5B8FD4;
  border-radius: 50%;
  animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Hero Headline */
.hero-headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}

.headline-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
  color: var(--gold);
  line-height: 1.1;
  display: block;
}

.headline-main {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  display: block;
}

/* Hero Paragraph */
.hero-paragraph {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-muted-dark);
  max-width: 560px;
  margin-bottom: 40px;
}

/* Hero Actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 143, 212, 0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-muted-dark);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 13px 0;
  border: none;
  cursor: pointer;
  transition: color var(--ease);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.btn-ghost:hover {
  color: var(--white);
  border-bottom-color: var(--gold);
}

.btn-copy-icon { font-size: 15px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-arrow { width: 18px; height: 18px; flex-shrink: 0; }

/* Hero Panel */
.hero-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.panel-header {
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 14px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}

.offices-list { padding: 8px 0; }

.office-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  transition: background var(--ease);
}

.office-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.office-flag { font-size: 22px; flex-shrink: 0; }

.office-details { flex: 1; }

.office-country {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
}

.office-role {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted-dark);
  margin-top: 2px;
}

.hq-role { color: rgba(255,255,255,0.85); }

.hq-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--navy);
  background: var(--white);
  padding: 3px 8px;
  border-radius: 2px;
}

.hq-item { border-bottom: 1px solid rgba(255,255,255,0.08); }
.hq-item + .office-divider { display: none; }

/* ─── Section Divider ─── */
.section-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 40px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.rule-line {
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.rule-ornament {
  font-size: 8px;
  color: var(--accent);
  opacity: 0.6;
}

/* ─── SERVICES ─── */
.services-section {
  background-color: var(--ivory);
  padding: 80px 40px;
}

.services-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Section Label Pattern */
.section-label-row {
  margin-bottom: 48px;
}

.section-label-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-tile--wide { grid-column: 1; }
}

.service-tile {
  padding: 40px 36px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--white);
  transition: background var(--ease);
  position: relative;
}

.service-tile:hover {
  background: #FDFBF7;
}

.service-tile:nth-child(2n) {
  border-right: none;
}

.service-tile--wide {
  grid-column: 1 / -1;
  border-right: none;
  border-bottom: none;
}

.tile-number {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.8;
}

.tile-icon-line {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  margin-bottom: 20px;
}

.tile-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.3;
}

.tile-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ─── CONTACT ─── */
.contact-section {
  background-color: var(--navy);
  padding: 80px 40px;
}

.contact-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 80px;
  align-items: center;
}

@media (max-width: 1024px) {
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
}

.contact-section .section-label-tag { color: var(--accent-light); }
.contact-section .section-title { color: var(--white); }

.contact-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted-dark);
  margin-top: 16px;
  max-width: 440px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.contact-card-inner {
  padding: 36px;
}

.contact-card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.contact-email-link {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color var(--ease);
  word-break: break-all;
}

.contact-email-link:hover { color: var(--accent-light); }

.contact-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── FOOTER ─── */
.site-footer {
  background-color: #080F1E;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 28px 40px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted-dark);
}

.footer-slogan {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted-dark);
  text-align: right;
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-slogan { text-align: left; }
  .hero-section, .services-section, .contact-section { padding-left: 24px; padding-right: 24px; }
  .header-inner { padding: 0 24px; }
  .header-cta-btn { display: none; }
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── Country Code Flag Badges ─── */
.office-flag {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.hq-item .flag-code {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
}
