/* ============================================================
   ENVISBO — Design System & Layout
   Petrol × Orange · Light · Trustworthy · AI Consulting
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Brand */
  --c-petrol-deep:    #085041;
  --c-petrol:         #0F6E56;
  --c-petrol-mid:     #1D9E75;
  --c-petrol-pale:    #E8F5F0;
  --c-orange:         #E8782A;
  --c-orange-light:   #F5A461;
  --c-orange-pale:    #FDF1E8;

  /* Neutrals */
  --c-white:   #FFFFFF;
  --c-surface: #F5FBF8;
  --c-text:    #0D1E17;
  --c-muted:   #3D6B58;
  --c-border:  #C0E0D5;

  /* Typography */
  --font-display: 'Figtree', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Size scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  clamp(1.375rem, 2.5vw, 1.75rem);
  --text-3xl:  clamp(1.875rem, 4vw, 2.5rem);
  --text-hero: clamp(2.75rem, 7vw, 5rem);

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-section: clamp(4rem, 8vw, 7rem);

  /* Layout */
  --container: 1160px;
  --narrow:    720px;
  --pad:       clamp(1.25rem, 4vw, 2.5rem);

  /* Radii */
  --r-sm:   4px;
  --r-md:   10px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(10, 50, 60, 0.07);
  --shadow-md: 0 4px 16px rgba(10, 50, 60, 0.10);
  --shadow-lg: 0 8px 32px rgba(10, 50, 60, 0.13);

  /* Motion */
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast: 150ms;
  --dur-base: 260ms;
  --dur-slow: 480ms;

  /* Z-index */
  --z-thread: 0;
  --z-above:  5;
  --z-nav:    100;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
svg { display: block; flex-shrink: 0; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.container--narrow {
  max-width: var(--narrow);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Sections ────────────────────────────────────────────────── */
.section {
  padding-block: var(--sp-section);
  position: relative;
}
.section--alt  { background: var(--c-petrol-pale); }
.section--dark { background: var(--c-petrol-deep); color: var(--c-white); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: var(--sp-4);
}
.section-label::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-orange);
  border-radius: 2px;
}
.section--dark .section-label         { color: var(--c-orange-light); }
.section--dark .section-label::before { background: var(--c-orange-light); }

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-petrol-deep);
  margin-bottom: var(--sp-4);
}
.section--dark .section-title { color: var(--c-white); }

.section-sub {
  font-size: var(--text-lg);
  color: var(--c-muted);
  max-width: 54ch;
  line-height: 1.65;
}
.section--dark .section-sub { color: rgba(255,255,255,0.65); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.625rem;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    transform var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease),
    background var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
  cursor: pointer;
}
.btn--primary {
  background: var(--c-petrol);
  color: var(--c-white);
  box-shadow: 0 2px 12px rgba(26,112,133,0.28);
}
.btn--primary:hover {
  background: var(--c-petrol-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,112,133,0.36);
}
.btn--orange {
  background: var(--c-orange);
  color: var(--c-white);
  box-shadow: 0 2px 12px rgba(232,120,42,0.28);
}
.btn--orange:hover {
  background: var(--c-orange-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,120,42,0.36);
}
.btn--outline {
  border: 2px solid var(--c-border);
  color: var(--c-petrol-deep);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--c-petrol);
  color: var(--c-petrol);
  transform: translateY(-2px);
}
.btn--ghost-white {
  border: 2px solid rgba(255,255,255,0.35);
  color: var(--c-white);
  background: transparent;
}
.btn--ghost-white:hover {
  border-color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.07);
  transform: translateY(-2px);
}

/* ── Navigation ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-nav);
  transition:
    background var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--c-border), 0 2px 16px rgba(10,50,60,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-petrol-deep);
  flex-shrink: 0;
}
.nav-logo img { height: 44px; width: auto; margin-right: var(--sp-2); }
.nav-logo { font-size: 1.6rem; }
.nav-logo-vis { color: #1D9E75; font-weight: 500; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline-start: auto;
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-muted);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-link:hover, .nav-link.active {
  color: var(--c-petrol);
  background: var(--c-petrol-pale);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.lang-btn {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
  border: 1.5px solid var(--c-border);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lang-btn:hover {
  color: var(--c-petrol);
  border-color: var(--c-petrol);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  margin-inline-start: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-petrol-deep);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Orange Page Thread ──────────────────────────────────────── */
#page-thread {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
/* Ensure section content sits above the thread */
.section .container,
.hero .container,
.hero .hero-content,
.contact-band .contact-inner {
  position: relative;
  z-index: 2;
}
#thread-path {
  fill: none;
  stroke: var(--c-orange);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(68px + var(--sp-16)) var(--sp-section);
  position: relative;
  overflow: hidden;
  background: var(--c-white);
}
.hero-bg-mark {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 620px);
  color: var(--c-petrol);
  opacity: 0.035;
  pointer-events: none;
  animation: slowSpin 80s linear infinite;
}
@keyframes slowSpin { to { transform: translateY(-50%) rotate(360deg); } }
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.35rem var(--sp-4);
  background: var(--c-petrol-pale);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--c-petrol);
  margin-bottom: var(--sp-6);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-orange);
  animation: dotPulse 2.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.8); }
}
.hero-headline {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.06;
  color: var(--c-petrol-deep);
  margin-bottom: var(--sp-6);
}
.hero-headline .accent { color: var(--c-petrol-mid); }
.hero-sub {
  font-size: var(--text-xl);
  color: var(--c-muted);
  max-width: 50ch;
  line-height: 1.6;
  margin-bottom: var(--sp-10);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin-top: var(--sp-12);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--c-muted);
}
.trust-item svg { color: var(--c-petrol); }

/* ── Services (Editorial rows) ───────────────────────────────── */
.services-header {
  margin-bottom: var(--sp-10);
}
.services-list {
  border-top: 1px solid var(--c-border);
}
.service-row {
  display: grid;
  grid-template-columns: 3px 1fr 1fr 28px;
  align-items: center;
  gap: var(--sp-8);
  padding-block: var(--sp-8);
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  transition: background var(--dur-base) var(--ease);
  cursor: default;
}
.service-row:hover {
  background: rgba(238,248,250,0.7);
}
/* Orange accent bar on the left */
.service-row-accent {
  width: 3px;
  height: 0;
  background: var(--c-orange);
  border-radius: 2px;
  align-self: stretch;
  transition: height var(--dur-base) var(--ease);
}
.service-row:hover .service-row-accent { height: 100%; }
/* Title */
.service-row-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--c-petrol-deep);
  transition: color var(--dur-base) var(--ease);
}
.service-row:hover .service-row-title { color: var(--c-petrol); }
/* Description — hidden until hover */
.service-row-text {
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: 1.65;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
}
.service-row:hover .service-row-text {
  opacity: 1;
  transform: none;
}
/* Arrow */
.service-row-arrow {
  color: var(--c-orange);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
}
.service-row:hover .service-row-arrow {
  opacity: 1;
  transform: none;
}

/* ── Process ─────────────────────────────────────────────────── */
.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  margin-top: var(--sp-12);
}
.process-track::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(100% / 8);
  right: calc(100% / 8);
  height: 2px;
  background: linear-gradient(90deg,
    var(--c-orange) 0%,
    var(--c-orange-light) 50%,
    var(--c-orange) 100%);
  z-index: 0;
}
.process-step {
  padding: 0 var(--sp-4) var(--sp-8);
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--c-white);
  border: 2.5px solid var(--c-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--c-orange);
  box-shadow: 0 0 0 6px var(--c-orange-pale);
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.process-step:hover .step-num { background: var(--c-orange); color: var(--c-white); }
.process-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-petrol-deep);
  margin-bottom: var(--sp-2);
}
.process-step p { font-size: var(--text-sm); color: var(--c-muted); line-height: 1.65; }

/* ── Founders ────────────────────────────────────────────────── */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
  max-width: 820px;
  margin: var(--sp-12) auto 0;
}
.founder-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease);
}
.founder-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.founder-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--sp-5);
  border: 3px solid var(--c-white);
  box-shadow: 0 0 0 3px var(--c-border), var(--shadow-md);
}
.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.founder-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--c-petrol-deep);
  margin-bottom: 2px;
}
.founder-role {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-orange);
  margin-bottom: var(--sp-3);
}
.founder-tag {
  display: inline-block;
  padding: 3px var(--sp-3);
  background: var(--c-petrol-pale);
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-petrol);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-5);
}
.founder-bio { font-size: var(--text-sm); color: var(--c-muted); line-height: 1.7; }

/* ── Contact ─────────────────────────────────────────────────── */
.contact-band {
  background: var(--c-petrol-deep);
  padding-block: var(--sp-section);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 65% 70% at 50% 110%,
    rgba(232,120,42,0.18) 0%,
    transparent 65%
  );
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 1; }
.contact-headline {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}
.contact-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.6);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: var(--sp-3);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-lg);
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--sp-8);
  transition: color var(--dur-base) var(--ease);
}
.contact-email:hover { color: var(--c-white); }
.contact-actions { display: flex; justify-content: center; gap: var(--sp-3); flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #071820;
  padding-block: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: rgba(255,255,255,0.6);
}
.footer-links { display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
  transition: color var(--dur-fast) var(--ease);
}
.footer-links a:hover { color: rgba(255,255,255,0.8); }
.footer-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.25);
  width: 100%;
  text-align: center;
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: var(--sp-4);
}

/* ── Scroll Reveal ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .hero-bg-mark { animation: none; }
  #thread-path { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .process-track {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-8) var(--sp-4);
  }
  .process-track::before { display: none; }
  .founders-grid { grid-template-columns: 1fr; max-width: 420px; }
}

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

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 68px 0 0;
    background: var(--c-white);
    padding: var(--sp-6) var(--pad);
    gap: var(--sp-2);
    border-top: 1px solid var(--c-border);
    z-index: var(--z-nav);
  }
  .nav-right.is-open {
    display: flex;
    position: fixed;
    bottom: var(--sp-8);
    inset-inline: var(--pad);
    justify-content: center;
    gap: var(--sp-3);
    z-index: var(--z-nav);
  }

  .service-row {
    grid-template-columns: 3px 1fr 28px;
    grid-template-rows: auto auto;
    gap: var(--sp-3) var(--sp-5);
  }
  .service-row-title { grid-column: 2; grid-row: 1; }
  .service-row-text {
    grid-column: 2; grid-row: 2;
    opacity: 1;
    transform: none;
    font-size: var(--text-xs);
  }
  .service-row-accent { grid-column: 1; grid-row: 1 / 3; height: 100%; }
  .service-row-arrow { grid-column: 3; grid-row: 1; opacity: 0.35; transform: none; }
  .process-track { grid-template-columns: 1fr; }
  .process-track::before { display: none; }
  #page-thread { display: none; }
}
