/*
Theme Name: GlobalERP
Theme URI: https://www.globalerp.pro
Author: Industrial Software Solutions SIA
Description: Marketing theme for GlobalERP. Dark, photo-led, multilingual (Polylang).
Version: 0.1.0
Text Domain: globalerp
*/

:root {
  --navy-950: #0a1018;
  --navy-900: #0e1620;
  --navy-800: #141d27;
  --navy-700: #182029;
  --navy-600: #232e3b;
  --line: rgba(255,255,255,.10);
  --ink: #141d27;
  --ink-2: #56657a;
  --ground: #eceff4;
  --panel: #ffffff;
  --text: #e9eef5;
  --text-dim: #9fb0c4;
  --accent: #1f6feb;
  --accent-hover: #3a82f2;
  --purple: #702594;
  --amber: #f5b800;
  --radius: 14px;
  --maxw: 1180px;
  --font: "IBM Plex Sans", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--navy-900); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 46rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; font-family: inherit; }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14,22,32,.82); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: .96rem; color: var(--text-dim); }
.nav a:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

/* Language dropdown */
.lang-dd { position: relative; }
.lang-dd summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--text-dim); font-size: .82rem; font-weight: 600; letter-spacing: .06em; user-select: none; }
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary:hover, .lang-dd[open] summary { color: #fff; border-color: rgba(255,255,255,.3); }
.lang-dd summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.lang-dd .chev { transition: transform .15s; }
.lang-dd[open] .chev { transform: rotate(180deg); }
.nav .lang-menu { display: block; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; margin: 0; padding: 6px; list-style: none; background: var(--navy-800); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.7); z-index: 60; }
.nav .lang-menu a { color: var(--text); }
.lang-menu a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; }
.lang-menu a:hover { background: var(--navy-600); }
.lang-menu .code { width: 24px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: var(--text-dim); }
.lang-menu .is-current a { background: rgba(31,111,235,.16); }
.lang-menu .is-current .code { color: var(--accent-hover); }

/* Hero */
.hero { position: relative; isolation: isolate; min-height: min(88vh, 780px); display: flex; align-items: center; background: var(--navy-950) center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,16,24,.92) 0%, rgba(10,16,24,.62) 48%, rgba(10,16,24,.2) 100%); }
.hero .wrap { padding-top: 80px; padding-bottom: 80px; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: 34px; color: #cfdbe9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 38px; font-size: .86rem; color: var(--text-dim); letter-spacing: .02em; }

/* Sections */
section { position: relative; }
.section { padding: 96px 0; }
.section-head { margin-bottom: 52px; }
.section-alt { background: var(--navy-800); }

/* Module cards */
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.module { position: relative; isolation: isolate; border-radius: var(--radius); overflow: hidden; padding: 36px 34px 34px; min-height: 380px; background: var(--navy-700) center/cover no-repeat; border: 1px solid var(--line); display: flex; flex-direction: column; }
.module::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,16,24,.55) 0%, rgba(10,16,24,.88) 100%); transition: background .2s; }
.module:hover::before { background: linear-gradient(180deg, rgba(10,16,24,.42) 0%, rgba(10,16,24,.84) 100%); }
.module .kicker { margin-bottom: 8px; }
.module h3 { font-size: 1.7rem; margin-bottom: 18px; }
.module ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.module li { position: relative; padding-left: 22px; color: #d5e0ec; font-size: .98rem; line-height: 1.5; }
.module li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Split / custom dev */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.split-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: center/cover no-repeat; }

/* Stats / proof */
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.proof div { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-700); }
.proof strong { display: block; font-size: 1.15rem; margin-bottom: 6px; }
.proof span { color: var(--text-dim); font-size: .95rem; }

/* Demo CTA + form */
.demo { background: radial-gradient(1200px 500px at 85% 0%, rgba(112,37,148,.38), transparent 60%), var(--navy-950); border-top: 1px solid var(--line); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.form { background: var(--panel); color: var(--ink); border-radius: var(--radius); padding: 30px; display: grid; gap: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.form input, .form select, .form textarea { font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid #dce2ea; border-radius: 10px; background: #f5f7fa; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; background: #fff; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { background: #e6f6e6; color: #0b6b0b; padding: 14px 16px; border-radius: 10px; font-weight: 600; }
.form-err { background: #fdecec; color: #a11919; padding: 14px 16px; border-radius: 10px; font-weight: 600; }
.form label.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .84rem; color: #56657a; line-height: 1.45; }
.form label.consent input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; padding: 0; accent-color: var(--accent); }
.form label.consent a { color: #1550b4; }
.demo ul.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.demo ul.ticks li { padding-left: 30px; position: relative; color: #d5e0ec; }
.demo ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--amber); font-weight: 700; }

/* Footer */
.site-footer { background: var(--navy-950); border-top: 1px solid var(--line); padding: 56px 0 36px; font-size: .94rem; color: var(--text-dim); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer img { height: 44px; width: auto; margin-bottom: 16px; }
.site-footer h4 { margin: 0 0 12px; color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.copy { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Generic page */
.page-body { padding: 80px 0; background: var(--ground); color: var(--ink); min-height: 50vh; }
.page-body .wrap { max-width: 820px; }
.page-body a { color: var(--accent); }

/* Outline / link buttons */
.btn-outline { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-link { background: none; border-color: transparent; color: var(--text-dim); padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: #fff; }
.page-body .btn-outline { border-color: var(--ink); color: var(--ink); }
.page-body .btn-outline:hover { background: var(--ink); color: #fff; }

/* Footer legal links */
.copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.legal-links .credit a { text-decoration: underline; text-underline-offset: 2px; }

/* Cookie consent */
.gx-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; display: flex; justify-content: center; pointer-events: none; }
.gx-consent[hidden] { display: none; }
.gx-consent-inner { pointer-events: auto; width: 100%; max-width: 980px; background: var(--navy-800); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px -20px rgba(0,0,0,.75); padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; font-size: .94rem; }
.gx-consent-text strong { display: block; font-size: 1rem; margin-bottom: 4px; color: #fff; }
.gx-consent-text p { margin: 0; color: var(--text-dim); line-height: 1.5; }
.gx-consent-text a { color: #fff; }
.gx-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.gx-consent-panel { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.gx-consent-panel[hidden] { display: none; }
.gx-opt { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.gx-opt input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.gx-opt b { display: block; color: #fff; font-weight: 600; }
.gx-opt span { color: var(--text-dim); }
.gx-consent-panel .btn { justify-self: start; }

/* Legal page */
.page-body h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-body h2 { font-size: 1.3rem; margin-top: 2em; }
.page-body ul { padding-left: 1.2em; }
.page-body li { margin-bottom: .5em; }
.legal-updated { color: var(--ink-2); font-size: .92rem; }
.legal-table-wrap { overflow-x: auto; margin: 1em 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #dce2ea; vertical-align: top; }
.legal-table th { background: #f5f7fa; font-weight: 600; }
.legal-table code { font-size: .86rem; }

@media (max-width: 700px) {
  .gx-consent { left: 8px; right: 8px; bottom: 8px; }
  .gx-consent-inner { grid-template-columns: 1fr; padding: 16px; }
  .gx-consent-actions { justify-content: stretch; }
  .gx-consent-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Responsive */
@media (max-width: 900px) {
  .modules, .split, .demo-grid, .footer-grid, .proof { grid-template-columns: 1fr; }
  .split { gap: 32px; }
  .section { padding: 68px 0; }
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 72px; background: var(--navy-900); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 24px 26px; display: none; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 14px; }
  .form .row { grid-template-columns: 1fr; }
  .lang-menu { position: static; margin-top: 8px; box-shadow: none; }
  .hero::before { background: linear-gradient(180deg, rgba(10,16,24,.6), rgba(10,16,24,.9)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.form .captcha { min-height: 65px; }

/* Content images used as section backgrounds (real <img> for SEO / alt text) */
.hero > .bg-img, .module > .bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.split-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
