/* ============================================================
   Ivolve — holding company single page
   Theme tokens: change these variables to re-theme the site.
   ============================================================ */

:root {
  /* Palette */
  --paper: #FAF9F6;        /* page background */
  --mist: #EFF1EC;         /* alternate surface */
  --line: #D9DDD4;         /* hairlines */
  --ink: #20313A;          /* primary text */
  --muted: #4C5D66;        /* secondary text (AA on paper) */
  --petrol: #0E3B43;       /* brand primary */
  --petrol-deep: #0A2C33;  /* dark section background */
  --amber: #A64D08;        /* accent — metrics, CTA (AA on paper and mist) */
  --amber-soft: #E8A75D;   /* accent on dark surfaces */
  --paper-on-dark: #EDF1EE;
  --muted-on-dark: #A9BDB9;

  /* Type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --size-display: clamp(2.3rem, 5.6vw, 4rem);
  --size-h2: clamp(1.6rem, 3.2vw, 2.4rem);
  --size-h3: 1.06rem;
  --size-body: 1.02rem;
  --size-small: 0.86rem;

  /* Layout */
  --content-max: 72rem;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--petrol);
  color: var(--paper-on-dark);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.85rem var(--pad-x);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-img {
  display: block;
  height: 32px;
  width: auto;
}

.brand-img-footer { height: 26px; }

.nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.94rem;
  color: var(--muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--petrol);
  border-bottom-color: var(--amber);
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-toggle button {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.32rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--petrol);
  color: var(--paper-on-dark);
}

/* Burger — visible only on small screens */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.burger-bar {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--petrol);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-bars {
  position: absolute;
  right: clamp(1rem, 5vw, 5rem);
  bottom: 0;
  width: min(30vw, 300px);
  height: auto;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad-x) clamp(3.5rem, 8vw, 6rem);
}

.eyebrow {
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: var(--size-display);
  font-weight: 680;
  color: var(--petrol);
  max-width: 17ch;
}

.hero-lead {
  margin-top: 1.6rem;
  max-width: 56ch;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-ctas {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 0.78rem 1.6rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--petrol);
  color: var(--paper-on-dark);
}
.btn-primary:hover { background: var(--petrol-deep); }

.btn-ghost {
  border-color: var(--line);
  color: var(--petrol);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--petrol); }

.btn-amber {
  background: var(--amber);
  color: #FFF8F0;
}
.btn-amber:hover { background: #93430A; }

/* Facts strip — quiet ledger line under the hero */

.facts {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem 4rem;
}

.fact { display: flex; flex-direction: column-reverse; }

.fact dd {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--petrol);
}

.fact dt {
  font-size: var(--size-small);
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ---------- Sections shared ---------- */

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}

.section-label {
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.2rem;
}

.section-label-dark { color: var(--amber-soft); }

/* ---------- About ---------- */

.about { background: var(--mist); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: 2rem 4rem;
}

.about-p1 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--petrol);
  font-weight: 500;
  max-width: 42ch;
}

.about-p2 {
  margin-top: 1.4rem;
  max-width: 58ch;
  color: var(--muted);
}

.functions {
  list-style: none;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.functions li {
  border-top: 2px solid var(--petrol);
  padding-top: 0.9rem;
}

.functions h3 {
  font-size: var(--size-h3);
  font-weight: 650;
  color: var(--petrol);
}

.functions p {
  margin-top: 0.4rem;
  font-size: 0.93rem;
  color: var(--muted);
}

/* ---------- Services ---------- */

.services h2 {
  font-size: var(--size-h2);
  font-weight: 650;
  color: var(--petrol);
  max-width: 24ch;
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.4rem;
}

/* Ledger-entry card: sector tag, name, description, metric as the entry value */

.card {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--petrol);
  background: var(--paper);
  padding: 1.3rem 1.4rem 1.5rem;
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line);
  border-radius: 0 0 6px 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -14px rgba(14, 59, 67, 0.35), 0 0 0 1px var(--line);
}

.card-tag {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h3 {
  margin-top: 0.7rem;
  font-size: 1.18rem;
  font-weight: 650;
  color: var(--petrol);
}

.card-desc {
  margin-top: 0.55rem;
  font-size: 0.95rem;
  color: var(--muted);
  flex-grow: 1;
}

.card-metric {
  margin-top: 1.5rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
  text-align: right;
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--petrol-deep);
  color: var(--paper-on-dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact h2 {
  font-size: var(--size-h2);
  font-weight: 650;
  max-width: 20ch;
}

.contact-lead {
  margin-top: 1rem;
  color: var(--muted-on-dark);
  max-width: 44ch;
}

.contact-details {
  margin-top: 2.4rem;
  display: grid;
  gap: 1.3rem;
}

.contact-details dt {
  font-size: var(--size-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.contact-details dd {
  margin-top: 0.15rem;
  font-size: 1.12rem;
  font-weight: 550;
}

.contact-details a {
  color: var(--paper-on-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-soft);
  transition: color 0.15s ease;
}

.contact-details a:hover { color: var(--amber-soft); }

/* Form */

/* Honeypot — žmonės nemato, botai užpildo */
.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .field { margin-bottom: 1.2rem; }

.contact-form button[disabled] { opacity: 0.6; cursor: wait; }

.contact-form label {
  display: block;
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--paper-on-dark);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(237, 241, 238, 0.28);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--amber-soft);
  background: rgba(255, 255, 255, 0.1);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #F4A88E;
}

.field-error {
  margin-top: 0.35rem;
  font-size: var(--size-small);
  color: #F4B8A2;
}

.form-success {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--amber-soft);
  background: rgba(232, 167, 93, 0.12);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--petrol-deep);
  color: var(--muted-on-dark);
  border-top: 1px solid rgba(237, 241, 238, 0.14);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.6rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-footer { color: var(--paper-on-dark); }

.footer-note { font-size: var(--size-small); }

/* ---------- Motion ---------- */

.rise { opacity: 0; transform: translateY(18px); animation: rise 0.7s ease forwards; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.15s; }
.rise-3 { animation-delay: 0.28s; }
.rise-4 { animation-delay: 0.4s; }
.rise-5 { animation-delay: 0.55s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.hbar {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  animation: hgrow 0.9s cubic-bezier(0.22, 0.9, 0.35, 1) forwards;
}
.hbar-2 { animation-delay: 0.12s; }
.hbar-3 { animation-delay: 0.24s; }
.hbar-4 { animation-delay: 0.36s; }

@keyframes hgrow {
  to { transform: scaleY(1); }
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .hbar { transform: none; animation: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.8rem; }
  .functions { grid-template-columns: 1fr; gap: 1.4rem; }
}

@media (max-width: 700px) {
  .nav-inner { gap: 0.75rem; }
  .brand { margin-right: auto; }
  .nav-burger { display: flex; }

  /* Menu becomes a dropdown panel under the sticky nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.5rem var(--pad-x) 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 24px -18px rgba(14, 59, 67, 0.4);
  }

  .nav.menu-open .nav-links { display: flex; }

  .nav-links a {
    padding: 0.85rem 0;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child { border-bottom-color: transparent; }

  .hero-bars { opacity: 0.55; width: 44vw; }
}
