/*
Theme Name: NetPlus Petrich
Theme URI: https://example.com/netplus-petrich
Author: NetPlus
Description: Custom WordPress theme for NetPlus Petrich with real-time Three.js WebGL network visualization.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: netplus
*/

:root {
  --ink: oklch(16% 0.025 245);
  --muted: oklch(44% 0.028 245);
  --paper: oklch(98% 0.012 92);
  --soft: oklch(94% 0.02 210);
  --line: oklch(87% 0.018 220);
  --night: oklch(18% 0.05 248);
  --blue: oklch(59% 0.18 238);
  --cyan: oklch(75% 0.13 190);
  --green: oklch(67% 0.16 150);
  --yellow: oklch(80% 0.14 82);
  --red: oklch(60% 0.2 28);
  --radius: 8px;
  --content: 1280px;
  --content-wide: 1440px;
  --gutter: clamp(20px, 4vw, 48px);
  --shadow: 0 24px 80px oklch(16% 0.025 245 / 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Segoe UI", "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.wrap {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content));
  margin-inline: auto;
}

.wrap--wide {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content-wide));
}

.site-header,
.hero,
.section,
.page-hero,
.site-footer {
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid oklch(100% 0 0 / 0.1);
  background: oklch(18% 0.05 248 / 0.94);
  color: oklch(96% 0.01 95);
  backdrop-filter: blur(16px);
}

.admin-bar .site-header {
  top: 32px;
}

.site-header__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

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

.brand__mark {
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: var(--ink);
  font-weight: 900;
}

.brand__name {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.brand__place {
  display: block;
  color: oklch(82% 0.025 230);
  font-size: 0.82rem;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: oklch(88% 0.016 235);
  font-weight: 700;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  background: oklch(100% 0 0 / 0.1);
  color: oklch(99% 0.01 95);
}

.menu-toggle {
  display: none;
  width: 44px;
  aspect-ratio: 1;
  border: 1px solid oklch(100% 0 0 / 0.18);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
}

.hero {
  position: relative;
  min-height: clamp(680px, 88vh, 900px);
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 22%, oklch(75% 0.13 190 / 0.26), transparent 32%),
    radial-gradient(circle at 10% 88%, oklch(60% 0.2 28 / 0.28), transparent 30%),
    linear-gradient(135deg, var(--night), oklch(25% 0.075 238));
  color: oklch(97% 0.012 95);
}

.netplus-three-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.62;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: clamp(680px, 88vh, 900px);
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: clamp(34px, 7vw, 96px);
  padding-block: clamp(70px, 10vw, 116px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 8px 11px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 900;
}

.eyebrow::before {
  content: "";
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1,
.page-hero h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero__lead,
.page-hero__lead {
  max-width: 68ch;
  color: oklch(84% 0.02 232);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  line-height: 1.48;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: oklch(98% 0.01 95);
  font-weight: 900;
  text-decoration: none;
  transition: transform 170ms ease-out, filter 170ms ease-out;
}

.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.button--light {
  border-color: oklch(98% 0.01 95);
  background: oklch(98% 0.01 95);
  color: var(--ink);
}

.button--ghost {
  background: transparent;
  color: currentColor;
}

.signal-card {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid oklch(100% 0 0 / 0.16);
  border-radius: var(--radius);
  background: oklch(100% 0 0 / 0.08);
  box-shadow: var(--shadow);
}

.signal-card h2 {
  margin-bottom: 22px;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid oklch(100% 0 0 / 0.12);
  font-weight: 800;
}

.metric-list strong {
  color: var(--yellow);
}

.section {
  padding-block: clamp(64px, 10vw, 124px);
}

.section--soft {
  background: var(--soft);
}

.section--night {
  background: var(--night);
  color: oklch(96% 0.012 95);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(240px, 0.5fr);
  align-items: end;
  gap: clamp(24px, 6vw, 84px);
  margin-bottom: clamp(34px, 5vw, 60px);
}

.section__head h2,
.content h2 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5.4vw, 4.8rem);
  line-height: 1;
}

.section__head p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.section--night .section__head p,
.section--night .card p {
  color: oklch(80% 0.02 230);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--services {
  grid-template-columns: repeat(12, 1fr);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(99% 0.008 95);
  padding: clamp(22px, 3vw, 32px);
}

.section--night .card {
  border-color: oklch(100% 0 0 / 0.14);
  background: oklch(100% 0 0 / 0.07);
}

.service-card {
  min-height: 260px;
}

.service-card:nth-child(1),
.service-card:nth-child(4) {
  grid-column: span 7;
}

.service-card:nth-child(2),
.service-card:nth-child(3) {
  grid-column: span 5;
}

.service-card:nth-child(n + 5) {
  grid-column: span 6;
}

.card__meta {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.card h3,
.card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1.05;
}

.card p,
.content p,
.content li {
  color: var(--muted);
}

.price {
  display: block;
  margin: 18px 0;
  color: var(--yellow);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.9;
}

.price small {
  font-size: 0.34em;
}

.page-hero {
  padding-block: clamp(74px, 12vw, 136px) clamp(42px, 7vw, 84px);
  background:
    radial-gradient(circle at 82% 18%, oklch(75% 0.13 190 / 0.35), transparent 28%),
    linear-gradient(135deg, oklch(96% 0.014 95), oklch(90% 0.032 220));
}

.page-hero h1 {
  color: var(--ink);
}

.page-hero__lead {
  color: var(--muted);
}

.content {
  padding-block: clamp(54px, 9vw, 104px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: clamp(26px, 6vw, 76px);
}

.list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(99% 0.008 95);
  font-weight: 800;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.news-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(99% 0.008 95);
}

.news-card__body {
  padding: 24px;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.site-footer {
  padding-block: 48px 32px;
  background: var(--ink);
  color: oklch(92% 0.014 230);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(24px, 5vw, 60px);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 8px 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyan);
}

@media (max-width: 900px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    inset: 76px var(--gutter) auto var(--gutter);
    display: none;
    padding: 12px;
    border: 1px solid oklch(100% 0 0 / 0.16);
    border-radius: var(--radius);
    background: var(--night);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-menu {
    display: grid;
    justify-content: stretch;
  }

  .nav-menu a {
    width: 100%;
  }

  .hero__inner,
  .section__head,
  .split,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.8rem);
  }

  .service-card,
  .service-card:nth-child(1),
  .service-card:nth-child(2),
  .service-card:nth-child(3),
  .service-card:nth-child(4),
  .service-card:nth-child(n + 5) {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
