/* ==========================================================================
   DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(2, 132, 199, 0.12);
  
  --accent: #4f46e5;
  --accent-light: #e0e7ff;
  --accent-glow: rgba(79, 70, 229, 0.08);
  
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --nav-bg: rgba(248, 250, 252, 0.75);
  --card-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  
  /* Fonts */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Layout */
  --container-max-width: 1100px;
  --header-height: 80px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Transition Speeds */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASICS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-family: var(--font-family-display);
  font-weight: 700;
  line-height: 1.2;
}

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

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

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-display);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-secondary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
  z-index: 100;
  transition: all var(--transition-normal);
}

.header.scrolled {
  height: 70px;
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.logo-img {
  height: 38px;
  width: auto;
  display: block;
  transition: all var(--transition-normal);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-tld {
  color: var(--primary);
  font-weight: 500;
}

.header.scrolled .logo-img {
  height: 32px;
}

/* Nav Menu */
.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-family-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav {
  margin-left: auto;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family-display);
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 24px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  transition: color var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  color: var(--primary);
}

.lang-divider {
  color: var(--border);
  font-size: 0.8rem;
  user-select: none;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}

.hamburger-lines .line {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}

/* ==========================================================================
   SECTIONS GENERAL
   ========================================================================== */
.section {
  padding-top: 100px;
  padding-bottom: 100px;
  position: relative;
}

.section-header {
  max-width: 600px;
  margin-bottom: 64px;
}

.section-title {
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 120px;
  display: flex;
  align-items: center;
  min-height: 80vh;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}

.shape-1 {
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background-color: var(--primary-light);
}

.shape-2 {
  bottom: -10%;
  left: -5%;
  width: 40vw;
  height: 40vw;
  background-color: var(--accent-light);
  opacity: 0.3;
}

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

.hero-content {
  max-width: 680px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-family-display);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
}

.tag-pulse {
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  position: relative;
}

.tag-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3.5); opacity: 0; }
}

.hero-title {
  font-size: 3.5rem;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
}

/* ==========================================================================
   EXPERTISE SECTION
   ========================================================================== */
.expertise-section {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.expertise-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  transition: all var(--transition-normal);
  box-shadow: var(--card-shadow);
}

.expertise-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light-border, #bae6fd);
  box-shadow: var(--card-shadow-hover);
}

.card-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  margin-bottom: 24px;
}

.card-icon {
  width: 24px;
  height: 24px;
}

.expertise-card:nth-child(2) .card-icon-wrapper {
  background-color: var(--accent-light);
  color: var(--accent);
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-meta {
  font-family: var(--font-family-display);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 12px;
}

.project-title {
  font-size: 1.85rem;
  margin-bottom: 20px;
}

.project-text {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px;
}

.project-tags li {
  font-size: 0.8rem;
  font-weight: 500;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.project-visual {
  width: 100%;
}

.visual-placeholder {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  transition: all var(--transition-normal);
}

.project-item:hover .visual-placeholder {
  transform: scale(1.02);
  border-color: var(--border-hover);
}

.visual-svg {
  width: 100%;
  max-width: 240px;
  height: auto;
}

/* Alternating layout */
.project-reverse {
  direction: rtl;
}

.project-reverse .project-content,
.project-reverse .project-visual {
  direction: ltr; /* Reset text direction inside */
}

.project-reverse {
  grid-template-columns: 1fr 1fr;
}

/* ==========================================================================
   REFERENCES SECTION
   ========================================================================== */
.references-section {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
  align-items: center;
  justify-items: center;
}

.logo-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: transform var(--transition-normal);
}

.client-logo-svg {
  max-width: 100%;
  height: auto;
  max-height: 36px;
  color: var(--text-muted);
  opacity: 0.6;
  transition: color var(--transition-normal), opacity var(--transition-normal), transform var(--transition-normal);
}

.logo-item:hover {
  transform: translateY(-2px);
}

.logo-item:hover .client-logo-svg {
  color: var(--primary);
  opacity: 1;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-card-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.contact-details {
  padding: 48px;
  border-right: 1px solid var(--border);
}

.contact-details-title {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.contact-details-text {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-method-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

a.contact-method-item:hover {
  background-color: var(--bg-primary);
  border-color: var(--border);
  transform: translateY(-1px);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
}

.contact-info-text {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.contact-value {
  font-family: var(--font-family-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Card CTA side */
.contact-cta {
  background-color: rgba(2, 132, 199, 0.02);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-cta-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.contact-cta-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--bg-primary);
  border-top: 1px solid rgba(226, 232, 240, 0.4);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  text-decoration: none;
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.footer-logo-img {
  height: 32px;
  width: auto;
  display: block;
  transition: transform var(--transition-normal);
}

.footer-logo-link:hover .footer-logo-img {
  transform: scale(1.05);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.scroll-reveal.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Medium Desktops & Landscape Tablets */
@media (max-width: 1200px) {
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Tablets & Small Desktops */
@media (max-width: 992px) {
  :root {
    --header-height: 70px;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  
  .project-item, .project-reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .project-reverse {
    display: flex;
    flex-direction: column;
  }
  
  .project-visual {
    order: 2;
  }
  
  .contact-card {
    grid-template-columns: 1fr;
  }
  
  .contact-details {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 36px;
  }
  
  .contact-cta {
    padding: 36px;
  }
}

/* Mobile & Small Tablets */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.35rem;
  }
  
  .section {
    padding-top: 70px;
    padding-bottom: 70px;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .section-title {
    font-size: 1.85rem;
  }

  .lang-switch {
    margin-left: auto;
    margin-right: 16px;
  }
  
  /* Mobile Menu Toggle */
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--bg-secondary);
    border-bottom: 0 solid var(--border);
    overflow: hidden;
    transition: height var(--transition-normal), border-bottom-width var(--transition-fast);
    z-index: 100;
  }
  
  .nav.open {
    height: 240px;
    border-bottom-width: 1px;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.05);
  }
  
  .nav-list {
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    gap: 20px;
  }
  
  .nav-link {
    font-size: 1.1rem;
  }
  
  /* Mobile Menu Toggle Animation */
  .mobile-nav-toggle[aria-expanded="true"] .line1 {
    transform: translateY(7px) rotate(45deg);
  }
  
  .mobile-nav-toggle[aria-expanded="true"] .line2 {
    opacity: 0;
  }
  
  .mobile-nav-toggle[aria-expanded="true"] .line3 {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .hero-cta-group {
    flex-direction: column;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
}

/* Mobile Devices */
@media (max-width: 576px) {
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
