/* ===== ELYN GROUP — Design System ===== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette (immutable) */
  --primary-navy:   #0b1520;
  --brand-cyan:     #00A0C0;
  --bright-cyan:    #00B4D8;
  --ice-cyan:       #48CAE4;
  --slate:          #5a6a78;

  /* Semantic tokens — light mode defaults */
  --color-bg:       #ffffff;
  --color-bg-alt:   #f3f2ed;
  --color-surface:  #ffffff;
  --color-text:     #0b1520;
  --color-brand:    #00A0C0;
  --color-bright:   #00B4D8;
  --color-muted:    #5a6a78;
  --color-border:   #d8d8d0;
  --color-icon-bg:  rgba(0, 160, 192, 0.08);

  /* Typography */
  --font-heading: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body:    'Sora', system-ui, -apple-system, sans-serif;

  /* Spacing — tight rhythm */
  --section-py: clamp(2.5rem, 6vw, 5rem);
  --container:  min(90%, 1200px);

  /* Transitions */
  --ease: cubic-bezier(.25, .46, .45, .94);
}

/* --- Dark theme --- */
[data-theme="dark"],
.theme-dark {
  --color-bg:       #0b1520;
  --color-bg-alt:   #0f1d2a;
  --color-surface:  #132231;
  --color-text:     #ffffff;
  --color-brand:    #00B4D8;
  --color-bright:   #48CAE4;
  --color-muted:    rgba(255, 255, 255, 0.3);
  --color-border:   rgba(255, 255, 255, 0.08);
  --color-icon-bg:  rgba(0, 180, 216, 0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Utility --- */
.container   { width: var(--container); margin-inline: auto; }
.section     { padding-block: var(--section-py); }
.text-center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: .35rem;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: background .3s var(--ease), transform .2s var(--ease), box-shadow .3s var(--ease);
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--color-brand);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-navy);
  box-shadow: 0 4px 16px rgba(0,160,192,.25);
}
.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}
.btn-outline:hover {
  background: #ffffff;
  color: var(--primary-navy);
}
.btn-outline-dark {
  background: transparent;
  color: var(--primary-navy);
  border: 2px solid var(--primary-navy);
}
.btn-outline-dark:hover {
  background: var(--primary-navy);
  color: #ffffff;
}

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: .4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: .5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 640px;
  line-height: 1.55;
}
.text-center .section-subtitle { margin-inline: auto; }

.section-intro { margin-bottom: 2rem; }
.section-alt { background: var(--color-bg-alt); }
.btn-block { width: 100%; justify-content: center; }

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo svg { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 400;
  color: var(--color-muted);
  position: relative;
  transition: color .25s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-brand);
  transition: width .3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-links .btn { padding: .6rem 1.4rem; }
.nav-links .btn::after { display: none; }
.nav-links .btn-primary,
.nav-links .btn-primary:hover { color: #ffffff; }

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--primary-navy);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero {
  position: relative;
  padding-top: 72px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0d2136 60%, var(--brand-cyan) 100%);
  color: #ffffff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,192L48,186.7C96,181,192,171,288,181.3C384,192,480,224,576,213.3C672,203,768,149,864,144C960,139,1056,181,1152,192C1248,203,1344,181,1392,170.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom / cover;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 640px;
}
.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .75rem;
}
.hero-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  opacity: .9;
  margin-bottom: 1.25rem;
  max-width: 520px;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: .5rem;
  padding: 1.75rem 1.5rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: .5rem;
  background: var(--color-icon-bg);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
}
.card-icon svg {
  width: 24px; height: 24px;
  stroke: var(--color-brand);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .35rem;
}
.card p {
  font-size: .95rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--primary-navy);
  color: #ffffff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
  padding-block: 2rem;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--bright-cyan);
  line-height: 1.1;
}
.stat-label {
  font-size: .9rem;
  opacity: .7;
  margin-top: .25rem;
}

/* --- Two-Column Feature --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-image {
  aspect-ratio: 4/3;
  background: var(--color-bg-alt);
  border-radius: .5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--color-muted);
  font-size: .75rem;
  letter-spacing: .05em;
  border: 1px solid var(--color-border);
}
.feature-image svg {
  width: 100%; height: 100%;
  object-fit: cover;
}

.feature-text ul {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.feature-text li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .95rem;
  color: var(--color-muted);
}
.feature-text li::before {
  content: '✓';
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-icon-bg);
  color: var(--color-brand);
  font-size: .75rem;
  font-weight: 700;
  margin-top: 2px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-navy), var(--brand-cyan));
  color: #ffffff;
  text-align: center;
}
.cta-banner .section-title { color: #ffffff; }
.cta-banner p {
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 1.5rem;
  max-width: 560px;
  margin-inline: auto;
}

/* --- Footer --- */
.site-footer {
  background: var(--primary-navy);
  color: rgba(255,255,255,.7);
  padding-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo { margin-bottom: .75rem; }
.footer-brand p { font-size: .9rem; line-height: 1.55; max-width: 280px; }

.footer-col h4 {
  color: #ffffff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: .9rem;
  padding-block: .25rem;
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--bright-cyan); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
  font-size: .85rem;
  opacity: .5;
}

/* --- Page Header (subpages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary-navy), #0d2136);
  color: #ffffff;
  text-align: center;
  padding-bottom: 3rem;
  padding-top: calc(72px + 3rem);
}
.page-header .section-label { color: var(--ice-cyan); }
.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: .5rem;
}
.page-header p {
  font-size: 1.1rem;
  opacity: .8;
  max-width: 560px;
  margin-inline: auto;
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-info-block {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: .5rem;
  background: var(--color-icon-bg);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-info-icon svg {
  width: 20px; height: 20px;
  stroke: var(--color-brand);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.contact-info-block h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .2rem;
}
.contact-info-block p {
  font-size: .9rem;
  color: var(--color-muted);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .35rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: .35rem;
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(0,160,192,.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* --- Markets / Region Cards --- */
.region-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: .5rem;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.region-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.region-card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-navy), #0d2136);
  color: #ffffff;
}
.region-card-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
}
.region-card-body {
  padding: 1.5rem;
}
.region-card-body p {
  font-size: .95rem;
  color: var(--color-muted);
  margin-bottom: .75rem;
}
.region-tag {
  display: inline-block;
  padding: .25rem .75rem;
  background: var(--color-icon-bg);
  color: var(--color-brand);
  border-radius: 1rem;
  font-size: .8rem;
  font-weight: 700;
  margin-right: .4rem;
  margin-bottom: .4rem;
}

/* --- Products --- */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: .5rem;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.product-card-image {
  aspect-ratio: 16/10;
  background: var(--color-bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--color-muted);
  font-size: .7rem;
  letter-spacing: .05em;
}
.product-card-image svg {
  width: 32px; height: 32px;
  stroke: var(--color-border);
  stroke-width: 1.25;
  fill: none;
}
.product-card-body {
  padding: 1.5rem;
}
.product-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .35rem;
}
.product-card-body p {
  font-size: .9rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.team-member {
  text-align: center;
}
.team-avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0;
}
.team-avatar svg {
  width: 48px; height: 48px;
  stroke: var(--color-border);
  stroke-width: 1.25;
  fill: none;
}
.team-member h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .15rem;
}
.team-member p {
  font-size: .9rem;
  color: var(--color-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .feature-row { grid-template-columns: 1fr; gap: 2rem; }
  .feature-row.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform .35s var(--ease), opacity .3s var(--ease);
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links a { font-size: 1rem; }
  .nav-toggle { display: flex; }

  .hero { min-height: 70vh; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
