/* ========================================
   AIMI Trading — Apple-inspired Design
   Clean, restrained, breathing space
   ======================================== */

:root {
  --black: #1d1d1f;
  --dark: #2d2d2f;
  --gray: #6e6e73;
  --light-gray: #86868b;
  --border: #d2d2d7;
  --bg: #fbfbfd;
  --bg-dark: #f5f5f7;
  --white: #ffffff;
  --accent: #1d1d1f;
  --radius: 12px;
  --radius-lg: 20px;
  --max-w: 1120px;
  --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--black);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: var(--transition);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--black);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  color: var(--gray);
  transition: color var(--transition);
  letter-spacing: 0.3px;
}

.nav-links a:hover {
  color: var(--black);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 20px;
  height: 16px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--black);
  position: absolute;
  left: 0;
  transition: var(--transition);
}

.nav-toggle span:first-child { top: 0; }
.nav-toggle span:last-child { bottom: 0; }

.nav-toggle.active span:first-child {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active span:last-child {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 20px 40px 30px;
  gap: 20px;
}

.nav-mobile a {
  font-size: 15px;
  color: var(--gray);
}

.nav-mobile.open {
  display: flex;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}

/* Hero background carousel */
.hero-bg-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease;
}

.hero-bg-slide.active {
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -2px;
  color: var(--black);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--gray);
  font-weight: 300;
  max-width: 540px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

.hero-products {
  font-size: 15px;
  color: var(--light-gray);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.hero-scroll span {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--light-gray);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--black);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 980px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--dark);
  transform: scale(1.02);
}

.btn-ghost {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(0,0,0,0.04);
}

.btn-outline {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ---- Stats ---- */
.stats {
  padding: 60px 40px;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--black);
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--light-gray);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* ---- Sections ---- */
.section {
  padding: 120px 40px;
}

.section-dark {
  background: var(--bg-dark);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 72px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--light-gray);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 17px;
  color: var(--gray);
  line-height: 1.6;
  font-weight: 300;
}

.section-cta {
  text-align: center;
  margin-top: 56px;
}

/* ---- Product Grid ---- */
.product-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.product-img {
  height: 280px;
  overflow: hidden;
  position: relative;
  background: #f0eeeb;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.04);
}

.product-info {
  padding: 28px;
}

.product-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.product-info p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
}

/* ---- About Grid ---- */
.about-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}

.about-item {
  max-width: 440px;
}

.about-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.about-item h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.about-item p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.6;
}

/* ---- Strength List ---- */
.strength-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.strength-item {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 36px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.strength-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.06);
}

.strength-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--light-gray);
  letter-spacing: 1px;
  flex-shrink: 0;
  padding-top: 2px;
}

.strength-item h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.strength-item p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.6;
}

/* ---- Certifications ---- */
.cert-image-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.cert-image {
  width: 100%;
  max-width: 720px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.06);
}

/* ---- Contact ---- */
.contact-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.contact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 4px;
}

.contact-item span,
.contact-item a {
  font-size: 17px;
  font-weight: 400;
  color: var(--black);
}

.contact-item a:hover {
  opacity: 0.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--black);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form select {
  color: var(--light-gray);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 48px 40px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--light-gray);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  color: var(--gray);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--black);
}

.footer-copy {
  font-size: 12px;
  color: var(--light-gray);
  width: 100%;
  text-align: center;
  margin-top: 16px;
}

/* ---- Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: 36px 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 140px 24px 80px;
  }

  .hero-title {
    letter-spacing: -1px;
  }

  .section {
    padding: 80px 24px;
  }

  .stats {
    padding: 48px 24px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-img {
    height: 220px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .strength-item {
    gap: 20px;
    padding: 28px 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .nav-inner {
    padding: 0 24px;
  }

  .nav-mobile {
    padding: 20px 24px 30px;
  }
}

/* ---- Language Switcher ---- */
.lang-switcher {
  position: relative;
  margin-left: 20px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--gray);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  color: var(--black);
  border-color: var(--black);
}

.lang-toggle svg {
  transition: transform var(--transition);
}

.lang-switcher.open .lang-toggle svg {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 160px;
  padding: 6px 0;
  z-index: 200;
  backdrop-filter: blur(20px);
}

.lang-switcher.open .lang-dropdown {
  display: block;
}

.lang-option {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--gray);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--bg-dark);
  color: var(--black);
}

/* ---- RTL Support ---- */
body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl .nav-inner {
  flex-direction: row-reverse;
}

body.rtl .nav-links {
  flex-direction: row-reverse;
}

body.rtl .lang-switcher {
  margin-left: 0;
  margin-right: 20px;
}

body.rtl .lang-dropdown {
  right: auto;
  left: 0;
}

body.rtl .strength-item {
  flex-direction: row-reverse;
  text-align: right;
}

body.rtl .contact-item a,
body.rtl .contact-item span {
  direction: ltr;
  unicode-bidi: plaintext;
}

body.rtl .hero-actions {
  flex-direction: row-reverse;
}

body.rtl .footer-inner {
  flex-direction: row-reverse;
}

body.rtl .footer-links {
  flex-direction: row-reverse;
}

/* Mobile lang switcher */
@media (max-width: 680px) {
  .lang-switcher {
    margin-left: 0;
    margin-right: 12px;
  }

  body.rtl .lang-switcher {
    margin-right: 0;
    margin-left: 12px;
  }

  .lang-toggle span {
    max-width: 28px;
    overflow: hidden;
  }
}
