/* ───────────────────────────────────────────────
   Expert Energy — single-page site styles
─────────────────────────────────────────────── */

:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --fg: #ffffff;
  --fg-dim: #b8b8b8;
  --fg-muted: #6a6a6a;
  --num: #5a5a5a;
  --btn: #b9b9b9;
  --accent: #5dd4cc;
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Open Sans", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

/* ── Top navigation bar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(0, 0, 0, 0);
  transition: background .35s ease, backdrop-filter .35s ease, padding .25s ease, box-shadow .35s ease;
}
.topbar.is-scrolled {
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 8px 28px rgba(0,0,0,.35);
}

.brand {
  display: block;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  transition: transform .25s ease, width .25s ease, height .25s ease;
}
.brand:hover { transform: scale(1.06); }
.brand img,
.brand svg { width: 100%; height: 100%; display: block; }
.topbar.is-scrolled .brand { width: 44px; height: 44px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}
.nav a {
  position: relative;
  color: rgba(255,255,255,.85);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 8px 2px;
  transition: color .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover,
.nav a.is-active { color: #fff; }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  backdrop-filter: blur(20px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.mobile-menu a {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .005em;
  transition: color .2s ease, transform .2s ease;
  opacity: 0;
  transform: translateY(20px);
}
.mobile-menu.is-open a {
  animation: mobileItemIn .5s cubic-bezier(.2,.7,.2,1) forwards;
}
.mobile-menu.is-open a:nth-child(1) { animation-delay: .08s; }
.mobile-menu.is-open a:nth-child(2) { animation-delay: .14s; }
.mobile-menu.is-open a:nth-child(3) { animation-delay: .20s; }
.mobile-menu.is-open a:nth-child(4) { animation-delay: .26s; }
.mobile-menu.is-open a:nth-child(5) { animation-delay: .32s; }
.mobile-menu.is-open a:nth-child(6) { animation-delay: .38s; }
.mobile-menu a:hover { color: var(--accent); }

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

/* ── Section base ── */
.section {
  position: relative;
  padding: clamp(72px, 9vw, 140px) clamp(24px, 6vw, 96px);
  background: var(--bg);
}

.display {
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.05;
  margin: 0 0 32px;
  font-size: clamp(40px, 5.6vw, 84px);
}

p { margin: 0 0 1.1em; }

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--btn);
  color: #1a1a1a;
  padding: 18px 32px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
  border: none;
  cursor: pointer;
  transition: background .25s ease, transform .15s ease;
}
.btn:hover { background: #d2d2d2; transform: translateY(-1px); }
.btn span { font-size: 22px; line-height: 0; transform: translateY(-1px); }

/* ─────────── 1. HERO ─────────── */
.hero {
  position: relative;
  width: 100%;
  padding: 0;
  background: #000;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 100vh;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(40px, 7vw, 110px);
  padding: 0 clamp(24px, 6vw, 96px);
  z-index: 2;
  pointer-events: none;
}
.hero-text h1 {
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 68px);
  line-height: 1.12;
  margin: 0 0 clamp(20px, 3vw, 40px);
  letter-spacing: -.005em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero-text h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  animation: heroLineIn 1s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-text h1 .line-1 { animation-delay: .35s; }
.hero-text h1 .line-2 { animation-delay: .75s; }

.hero-text .tagline {
  font-size: clamp(14px, 1.3vw, 20px);
  font-weight: 600;
  margin: 0;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.45);
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
}
.hero-text .tagline .word {
  opacity: 0;
  transform: translateY(14px);
  animation: heroLineIn .8s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero-text .tagline .w-1 { animation-delay: 1.25s; }
.hero-text .tagline .w-2 { animation-delay: 1.45s; }
.hero-text .tagline .w-3 { animation-delay: 1.65s; }

@keyframes heroLineIn {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-text h1 .line,
  .hero-text .tagline .word {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ─────────── 2. SPLIT (Досвід) ─────────── */
.split-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 90px);
  align-items: center;
}
.split-img img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.split-content h2.display { margin-bottom: 36px; }
.split-content p {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.55;
  margin-bottom: 48px;
  max-width: 540px;
}

/* ─────────── 3. SERVICES ─────────── */
.services-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.services-left { position: sticky; top: 60px; }
.services-title { font-size: clamp(44px, 5.6vw, 84px); margin-bottom: 36px; }
.services-img {
  margin: 0 0 32px;
  overflow: hidden;
}
.services-img img { width: 100%; height: auto; }

.services-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: none;
}
.services-list > li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 28px 0;
  border-bottom: 1px solid #1f1f1f;
}
.services-list > li:first-child { padding-top: 0; }
.services-list > li:last-child { border-bottom: 0; }
.services-list .num {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 700;
  color: var(--num);
  line-height: 1;
  padding-top: 4px;
}
.services-list h3 {
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 700;
  margin: 0 0 14px;
}
.services-list p {
  color: var(--fg-dim);
  font-size: 17px;
  margin: 0;
  max-width: 560px;
}

/* ─────────── 4. EXPERTISE ─────────── */
.expertise-inner { max-width: var(--maxw); margin: 0 auto; }
.expertise-top { margin-bottom: clamp(40px, 5vw, 64px); }
.expertise-top .lead {
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--fg-dim);
  max-width: 920px;
  margin-top: 24px;
}
.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.exp-block { margin-bottom: 40px; }
.exp-block h3 {
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 700;
  margin: 0 0 18px;
}
.exp-block ul {
  margin: 0;
  padding-left: 22px;
  color: var(--fg-dim);
  font-size: 16.5px;
}
.exp-block ul li { margin-bottom: 10px; line-height: 1.55; }
.expertise-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
}

/* ─────────── 5. DETAILS ─────────── */
.details-inner { max-width: var(--maxw); margin: 0 auto; }
.big-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.big-list > li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 36px 0;
  border-bottom: 1px solid #1f1f1f;
  align-items: start;
}
.big-list > li:last-child { border-bottom: 0; }
.big-num {
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 700;
  color: var(--num);
  line-height: 1;
}
.big-list h3 {
  font-size: clamp(19px, 1.6vw, 26px);
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.35;
}
.big-list .sub {
  margin: 0;
  padding-left: 22px;
  color: var(--fg-dim);
  font-size: 16.5px;
  font-weight: 600;
}
.big-list .sub li { margin-bottom: 8px; line-height: 1.5; }

/* ─────────── 6. SOFTWARE ─────────── */
.software {
  background: linear-gradient(180deg, #000 0%, #050505 50%, #000 100%);
  position: relative;
}
.software::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(93, 212, 204, 0.06), transparent 60%),
    radial-gradient(800px 600px at 90% 100%, rgba(93, 212, 204, 0.04), transparent 65%);
  pointer-events: none;
}
.software-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.software-top { margin-bottom: clamp(48px, 6vw, 88px); max-width: 920px; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.software-top .lead {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--fg-dim);
  margin-top: 24px;
  line-height: 1.6;
}

.software-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.4vw, 32px);
}
.sw-card {
  position: relative;
  padding: clamp(32px, 3.4vw, 48px);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  transition: border-color .35s ease, transform .35s ease, background .35s ease;
}
.sw-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.sw-card:hover {
  border-color: rgba(93, 212, 204, 0.28);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  transform: translateY(-2px);
}
.sw-card:hover::before { opacity: 1; }

.sw-card-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.sw-card-head .big-num { line-height: 1; flex-shrink: 0; }
.sw-card-head h3 {
  font-size: clamp(22px, 1.9vw, 30px);
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  padding-top: 4px;
}
.sw-card-lead {
  color: var(--fg-dim);
  font-size: clamp(15px, 1.15vw, 17px);
  margin: 0 0 24px;
  line-height: 1.6;
}
.sw-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sw-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--fg-dim);
  font-size: 15.5px;
  line-height: 1.5;
}
.sw-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 14px;
  height: 1.5px;
  background: var(--accent);
}
.sw-list li:last-child { padding-bottom: 0; }
.sw-list li strong {
  color: #fff;
  font-weight: 700;
}

/* ─────────── 7. QUOTE ─────────── */
.quote {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.quote-inner { max-width: 1100px; padding: 0 24px; }
.quote blockquote {
  margin: 0 0 40px;
  font-size: clamp(28px, 4.2vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.quote-author {
  color: var(--fg-muted);
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 600;
  margin: 0;
}

/* ─────────── 7. CONTACT ─────────── */
.contact-inner { max-width: var(--maxw); margin: 0 auto; }
.contact-inner .display { margin-bottom: 60px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.contact-img img {
  width: 100%;
  height: auto;
  display: block;
}
.contact-block { margin-bottom: 36px; }
.contact-block:last-child { margin-bottom: 0; }
.contact-block h4 {
  color: var(--fg-muted);
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 700;
  margin: 0 0 10px;
}
.contact-block p {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--fg);
}
.contact-block a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-block a:hover { color: var(--accent); }

/* ─────────── Footer ─────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid #1a1a1a;
  padding: 28px 24px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ─────────── Responsive ─────────── */
@media (max-width: 900px) {
  .topbar { padding: 12px 16px; }
  .brand { width: 44px; height: 44px; }
  .topbar.is-scrolled .brand { width: 38px; height: 38px; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { aspect-ratio: 4 / 5; max-height: none; }
  .hero-text h1 { font-size: 26px; line-height: 1.18; }
  .hero-text .tagline { font-size: 13px; gap: .35em; }

  .split-inner { grid-template-columns: 1fr; }
  .services-inner { grid-template-columns: 1fr; }
  .services-left { position: static; }
  .services-list > li { grid-template-columns: 64px 1fr; }

  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-img img { aspect-ratio: 4/3; }

  .big-list > li { grid-template-columns: 70px 1fr; padding: 28px 0; }

  .software-cards { grid-template-columns: 1fr; }

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

@media (max-width: 540px) {
  body { font-size: 16px; }
  .section { padding: 64px 20px; }
  .services-list > li,
  .big-list > li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .services-list .num,
  .big-num { font-size: 26px; }
  .btn { padding: 14px 22px; font-size: 15px; }
}
