/* ============================================
   EKVALITA — Main Stylesheet
   ============================================ */

/* Self-hosted DM Sans variable font — single typeface for the whole site */
@font-face {
  font-family: 'DM Sans';
  src: url('../assets/DM_Sans/DMSans-VariableFont_opsz,wght.ttf') format('truetype-variations'),
       url('../assets/DM_Sans/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../assets/DM_Sans/DMSans-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations'),
       url('../assets/DM_Sans/DMSans-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

/* ── Variables ── */
:root {
  /* Primary brand */
  --blue:      #323f88;
  --blue-lt:   #4d5ba8;
  --blue-dk:   #1f2659;

  /* Warm accents (from the rainbow logo gradient) */
  --orange:    #E8620A;
  --orange-lt: #F7841A;

  /* Backgrounds & surfaces */
  --cream:     #FFF8EE;
  --yellow:    #F5C842;
  --yellow-lt: #FDE98A;
  --purple:    #5B2D8E;
  --brown:     #3B2A1A;
  --white:     #FFFFFF;

  /* Text */
  --ink:       #1A1208;
  --ink-mid:   #4A3728;
  --ink-lt:    #7A6A5A;

  --font-display: 'DM Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --max-w:      1200px;
  --sec-pad:    5rem 2rem;
  --radius:     2px;
  --transition: 0.22s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  position: relative;
  overflow-x: hidden;
}
main, .site-footer { position: relative; z-index: 1; }

/* ── Page-wide gradient orbs ──
   Big diffuse orbs (2, 4, 6) anchor in the hero as atmospheric backdrop;
   small sharper orbs (1, 3, 5) start below the fold and slide up via the
   parallax script in main.js — closer "layer", scrolls faster.
   The `translate` property (set via CSS variable from JS) composes with the
   keyframe `transform` cleanly, so drift + parallax run together. */
.page-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  will-change: transform, opacity, translate;
  translate: 0 var(--parallax-y, 0);
}
.page-orb--1 { width: 460px; height: 460px; background-image: url('../assets/1.png'); top:  108vh; left:   -80px; animation: orbDrift 38s ease-in-out infinite,         orbBreath 13s ease-in-out infinite; }
.page-orb--2 { width: 820px; height: 820px; background-image: url('../assets/2.png'); top: -260px; left:  -260px; animation: orbDrift 44s ease-in-out infinite reverse, orbBreath 16s ease-in-out infinite; animation-delay: -3s,  -2s; }
.page-orb--3 { width: 380px; height: 380px; background-image: url('../assets/1.png'); top:  195vh; right:   12vw; animation: orbDrift 40s ease-in-out infinite,         orbBreath 11s ease-in-out infinite; animation-delay: -7s,  -4s; }
.page-orb--4 { width: 680px; height: 680px; background-image: url('../assets/2.png'); top:   45vh; right: -200px; animation: orbDrift 36s ease-in-out infinite reverse, orbBreath 14s ease-in-out infinite; animation-delay: -1s,  -6s; }
.page-orb--5 { width: 500px; height: 500px; background-image: url('../assets/1.png'); top:  275vh; left:    10vw; animation: orbDrift 42s ease-in-out infinite,         orbBreath 12s ease-in-out infinite; animation-delay: -5s,  -3s; }
.page-orb--6 { width: 820px; height: 820px; background-image: url('../assets/2.png'); bottom:-300px; right: -120px; animation: orbDrift 46s ease-in-out infinite,         orbBreath 17s ease-in-out infinite; animation-delay: -10s, -8s; }

@keyframes orbDrift {
  0%, 100% { transform: translate(   0,    0); }
  25%      { transform: translate( 180px,  -90px); }
  50%      { transform: translate( -80px,  150px); }
  75%      { transform: translate(-180px,  -50px); }
}

/* Sine-wave size breathing — independent of position drift. */
@keyframes orbBreath {
  0%, 100% { scale: 0.85; opacity: 0.40; }
  50%      { scale: 1.15; opacity: 0.62; }
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--cream);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  gap: 0.5rem;
  transition: transform 0.3s ease;
  will-change: transform;
}
.site-nav.nav-hidden { transform: translateY(-100%); }
/* offset content to clear the now-fixed nav */
header.site-header,
body > header { padding-top: 64px; }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 1rem;
}
.logo-mark { width: 36px; height: 36px; }
.logo-text {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin-left: auto; /* pushes links to right */
}
.nav-links li { position: relative; }
.nav-links a {
  display: block;
  padding: 0 0.95rem;
  height: 64px;
  line-height: 64px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links .active > a { color: var(--blue); }

/* Dropdown */
.has-drop:hover .dropdown,
.has-drop.open  .dropdown { display: block; }
.dropdown {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  background: var(--ink);
  min-width: 230px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 300;
}
.dropdown a {
  height: auto;
  line-height: 1.4;
  padding: 0.9rem 1.25rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
}
.dropdown a:hover { color: var(--orange-lt); background: rgba(255,255,255,0.05); }

/* ── LANGUAGE SWITCHER ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 3px;
  overflow: hidden;
}
.lang-switcher [data-lang] {
  background: none;
  border: none;
  border-right: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-lt);
  padding: 0.3rem 0.6rem;
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}
.lang-switcher [data-lang]:last-child { border-right: none; }
.lang-switcher [data-lang]:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.lang-switcher [data-lang].active {
  background: var(--blue);
  color: var(--white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: var(--transition);
}

/* ── HERO ── */
.hero {
  background: transparent;
  color: var(--ink);
  position: relative;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 2rem 4rem;
}
/* Canvas fills the entire hero — balls travel across the full banner */
#ekv-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
/* Text sits on top of the canvas */
.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero h1 {
  font-size: 0;
  line-height: 0;
  margin: 0 0 1.25rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
.hero h1.visible { opacity: 1; transform: none; }
.hero-wordmark {
  display: block;
  width: clamp(180px, 24vw, 240px);
  height: auto;
  margin: 0 auto;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-mid);
  min-height: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.2s ease 0.3s, transform 1.2s ease 0.3s;
}
.hero-subtitle.visible { opacity: 1; transform: none; }

/* ── SECTIONS ── */
.section-inner { max-width: var(--max-w); margin: 0 auto; }

/* Intro */
.intro-section { padding: var(--sec-pad); background: transparent; }
.intro-section p {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--ink-mid);
  max-width: 800px;
  line-height: 1.85;
}

/* About panel */
.about-panel {
  background: transparent;
  padding: var(--sec-pad);
}
.about-panel { position: relative; }
.about-panel-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4rem;
  align-items: start;
}
.about-decoration {
  position: absolute;
  top: 50%;
  right: -120px;
  /* `translate` (individual property) handles vertical centring so
     `transform` is free for the orbDrift keyframe to animate. */
  translate: 0 -50%;
  width: 460px;
  height: 460px;
  background: url('../assets/1.png') center/contain no-repeat;
  pointer-events: none;
  animation: orbDrift 48s ease-in-out infinite,
             orbBreath 14s ease-in-out infinite;
}
.about-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}
.about-logo svg { width: 110px; height: 110px; }
.about-logo-name {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.about-content p { color: var(--ink-mid); margin-bottom: 0.85rem; }
.about-content strong { color: var(--ink); font-weight: 700; }
.about-content ul {
  margin: 0.5rem 0 1rem;
  list-style: none;
}
.about-content ul li {
  padding: 0.2rem 0 0.2rem 1.4rem;
  position: relative;
  color: var(--ink-mid);
}
.about-content ul li::before {
  content: '◼';
  font-size: 0.35em;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
}
.about-content a { color: var(--blue); font-weight: 500; }

/* Services */
.services-section { padding: var(--sec-pad); background: transparent; }
.services-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.services-header h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.services-header p { max-width: 650px; margin: 0 auto; color: var(--ink-mid); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.service-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover {
  box-shadow: 0 6px 28px rgba(50,63,136,0.12);
  transform: translateY(-2px);
}
.service-card-icon {
  display: block;
  height: 88px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 1.25rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.6rem;
}
.service-card p { font-size: 0.93rem; color: var(--ink-mid); line-height: 1.7; }

/* Testimonial */
.testimonial-block {
  background: transparent;
  padding: 3.5rem 2rem;
}
.testimonial-inner { max-width: 880px; margin: 0 auto; }
.testimonial-block blockquote {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.testimonial-block cite {
  font-style: normal;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

/* CTA */
.cta-section {
  padding: 4rem 2rem;
  text-align: center;
  background: transparent;
}
.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s;
}
.btn:hover {
  background: var(--blue-lt);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--white);
}

/* ── FOOTER ── */
.site-footer {
  background: transparent;
  color: var(--ink);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(50, 63, 136, 0.12);
}
.footer-company {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  margin-bottom: 2.5rem;
  color: var(--blue);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: left;
}
.footer-col address,
.footer-col p {
  font-size: 0.88rem;
  line-height: 2;
  color: var(--ink-mid);
  font-style: normal;
}
.footer-col strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}
.footer-col a { color: var(--blue); }
.footer-col a:hover { color: var(--blue-lt); }
.footer-legal {
  font-size: 0.78rem;
  color: var(--ink-lt);
  line-height: 2.2;
}
.footer-legal a { color: var(--ink-lt); }
.footer-legal a:hover { color: var(--blue); }
.footer-social { margin-top: 1.75rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(50, 63, 136, 0.28);
  border-radius: 50%;
  color: var(--blue);
  transition: all var(--transition);
  text-decoration: none;
}
.footer-social a:hover {
  background: rgba(50, 63, 136, 0.08);
  color: var(--blue);
  border-color: rgba(50, 63, 136, 0.55);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .about-panel-inner { grid-template-columns: 1fr; gap: 2rem; }
  .about-logo { flex-direction: row; justify-content: flex-start; }
  .about-decoration { display: none; }

  .site-nav { flex-wrap: wrap; height: auto; padding: 0.75rem 1.25rem; }
  .logo { order: 1; }
  .nav-toggle { display: flex; flex-direction: column; order: 3; margin-left: auto; }
  .lang-switcher { order: 2; margin-left: auto; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 4;
    margin: 0.5rem -1.25rem 0;
    border-top: 1px solid rgba(0,0,0,0.07);
    background: var(--white);
  }
  .nav-links.open { display: flex; }
  .nav-links a { height: auto; line-height: 1; padding: 0.85rem 1.5rem; }
  .dropdown {
    position: static;
    background: rgba(0,0,0,0.03);
    box-shadow: none;
    display: none !important;
  }
  .has-drop.open .dropdown { display: block !important; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  :root { --sec-pad: 3.5rem 1.25rem; }
  .hero { padding: 5rem 1.25rem 4rem; }
  .services-grid { grid-template-columns: 1fr; }
}
