:root {
  --bg: #0F1419;
  --bg-card: #1A202C;
  --bg-glass: rgba(26,32,44,0.55);
  --text: #F7FAFC;
  --text-muted: #A0AEC0;
  --gold: #C9A96E;
  --gold-light: #D4B87A;
  --gold-dark: #A68B52;
  --line: rgba(201,169,110,0.25);
  --line-strong: rgba(201,169,110,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }

/* Background texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(201,169,110,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(201,169,110,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(15,20,25,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.03em; transition: color 0.3s; }
.nav-links a:hover { color: var(--gold); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--gold); font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('<?php echo $heroBgImage ?? "https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&q=80"; ?>') center/cover no-repeat;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,20,25,0.55) 0%, rgba(15,20,25,0.85) 60%, var(--bg) 100%);
}
.hero-gold {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,169,110,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 900px; padding: 0 24px;
  animation: fadeInUp 1s ease-out;
}
.hero-label {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--line-strong);
  padding: 8px 20px; border-radius: 999px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .gold { color: var(--gold); }
.hero p {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 620px; margin: 0 auto 36px;
  font-weight: 300;
}
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 36px; border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--gold);
}
.btn:hover {
  background: transparent;
  color: var(--gold);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  margin-left: 16px;
}
.btn-outline:hover { background: var(--gold); color: var(--bg); }
.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  width: 24px; height: 36px;
  border: 2px solid var(--gold); border-radius: 12px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero-scroll::after {
  content: "";
  width: 4px; height: 8px;
  background: var(--gold); border-radius: 2px;
  animation: scrollBounce 2s infinite;
}

/* Sections */
section { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}
.section-title .gold { color: var(--gold); }
.section-title::after {
  content: "";
  display: block;
  width: 60px; height: 2px;
  background: var(--gold);
  margin: 16px auto 0;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 640px; margin: -24px auto 48px;
}

/* About */
.about {
  padding: 100px 0 80px;
  border-top: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.about-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}
.about-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.about-card .num {
  font-size: 2.8rem; font-weight: 800; color: var(--gold);
  display: block; margin-bottom: 8px;
}
.about-card .label { font-size: 0.85rem; color: var(--text-muted); }
.about-text {
  max-width: 720px; margin: 0 auto;
  color: var(--text-muted); font-size: 1rem; text-align: center; line-height: 1.8;
}

/* Services */
.services {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 40px rgba(201,169,110,0.08);
}
.service-icon {
  width: 56px; height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--gold);
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-size: 1.1rem; font-weight: 600; margin-bottom: 12px;
}
.service-card p {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
}

/* Competencies */
.competencies {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.competencies-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.comp-list { list-style: none; }
.comp-list li {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.comp-list li:last-child { border-bottom: none; }
.comp-marker {
  width: 10px; height: 10px; min-width: 10px;
  border: 2px solid var(--gold); border-radius: 50%;
  margin-top: 6px;
}
.comp-list h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.comp-list p { font-size: 0.9rem; color: var(--text-muted); }
.steps-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 28px; }
.steps-title .gold { color: var(--gold); }
.step {
  display: flex; gap: 20px; align-items: flex-start;
  margin-bottom: 28px;
}
.step-num {
  width: 48px; height: 48px; min-width: 48px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: var(--gold);
}
.step h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--text-muted); }

/* Portfolio */
.portfolio {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.masonry {
  column-count: 3;
  column-gap: 20px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.masonry-item img {
  width: 100%;
  border-radius: 10px;
  transition: transform 0.5s ease;
}
.masonry-item:hover img { transform: scale(1.06); }
.masonry-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15,20,25,0.9) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 10px;
}
.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-overlay h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.masonry-overlay p { font-size: 0.85rem; color: var(--text-muted); }
.masonry-overlay .gold-line {
  width: 40px; height: 2px; background: var(--gold); margin-bottom: 10px;
}

/* Contacts */
.contacts {
  padding: 80px 0 100px;
  border-top: 1px solid var(--line);
}
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; }
.contact-info h3 .gold { color: var(--gold); }
.contact-block { margin-bottom: 24px; }
.contact-block .label { font-size: 0.8rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.contact-block .value { font-size: 1.05rem; color: var(--text); }
.contact-block .value a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.contact-block .value a:hover { color: var(--gold); }
.contact-form {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(15,20,25,0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit; font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-submit {
  width: 100%;
  background: var(--gold);
  color: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
  font-family: inherit; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}
.form-submit:hover {
  background: transparent;
  color: var(--gold);
}

/* Team */
.team {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.team-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 40px rgba(201,169,110,0.08);
}
.team-photo {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 2px solid var(--line-strong);
}
.team-card h3 {
  font-size: 1.1rem; font-weight: 600; margin-bottom: 6px;
}
.team-card .position {
  font-size: 0.85rem; color: var(--gold); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.team-card p {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative; z-index: 1;
}
footer .gold { color: var(--gold); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu */
.nav-links.mobile-open {
  display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0;
  background: rgba(15,20,25,0.95); backdrop-filter: blur(16px); padding: 20px 40px; gap: 16px;
  border-bottom: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .competencies-wrapper { grid-template-columns: 1fr; gap: 48px; }
  .contacts-grid { grid-template-columns: 1fr; }
  .masonry { column-count: 2; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .masonry { column-count: 1; }
  .hero .btn-outline { margin-left: 0; margin-top: 12px; }
  .hero-buttons { display: flex; flex-direction: column; gap: 12px; }
  .btn, .btn-outline { display: block; width: 100%; max-width: 280px; margin: 0 auto; }
  .team-grid { grid-template-columns: 1fr; }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {
    html { font-size: 82%; }
    .container, [class*="container"] { padding-left: 12px !important; padding-right: 12px !important; }
    section, [class*="section"] { padding: 40px 0 !important; }
    h1, .h1 { font-size: 1.5rem !important; }
    h2, .h2 { font-size: 1.25rem !important; }
    h3, .h3 { font-size: 1rem !important; }
    p, .p { font-size: 0.85rem !important; line-height: 1.5 !important; }
    .hero, [class*="hero"] { min-height: auto !important; padding: 80px 12px 32px !important; }
    .hero-stats, [class*="hero-stats"] { flex-wrap: wrap !important; gap: 12px !important; }
    .about-grid, .services-grid, .portfolio-grid, .contacts-grid, .team-grid, [class*="grid"] { grid-template-columns: 1fr !important; gap: 16px !important; }
    .service-card, .portfolio-item, .stat-card, .team-card, [class*="card"] { padding: 12px !important; }
    .btn, [class*="btn"] { padding: 8px 16px !important; font-size: 0.8rem !important; }
    .about-stat-number, .stat-number, .hero-stat-number, [class*="stat-number"] { font-size: 1.8rem !important; }
    .service-icon, .icon, [class*="icon"] { width: 36px !important; height: 36px !important; }
    .service-icon svg { width: 18px !important; height: 18px !important; }
    .nav-links, [class*="nav-links"] { display: none !important; }
    .mobile-menu-btn, [class*="mobile-menu"] { display: block !important; }
    .logo img, [class*="logo"] img { max-height: 24px !important; }
    .feedback-form, [class*="feedback-form"] { padding: 12px !important; }
    .footer, [class*="footer"] { padding: 20px 0 !important; font-size: 0.75rem !important; }
    .about-image img, [class*="about-image"] img { max-width: 100% !important; height: auto !important; }
    .masonry-item, [class*="masonry-item"] { margin-bottom: 8px !important; }
    .step-circle, [class*="step-circle"] { width: 48px !important; height: 48px !important; font-size: 1rem !important; }
    .header-inner, [class*="header-inner"] { padding: 0 12px !important; }
}

/* ===== LOGO FONT = BUTTON FONT ===== */
.logo, .logo span, #navbar .logo, header .logo, .header .logo, nav .logo {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
}


/* ===== MOBILE FIXES (2025-05-19) ===== */

/* 1. Hide vertical scroll oval on mobile */
@media (max-width: 640px) {
  .hero-scroll { display: none !important; }
}

/* 2. Thinner header — 2x reduction */
@media (max-width: 640px) {
  nav { padding: 7px 16px !important; min-height: 36px !important; }
  nav .logo { font-size: 0.85rem !important; }
  .mobile-menu-btn { font-size: 1.1rem !important; }
}
@media (max-width: 600px) {
  nav { padding: 6px 12px !important; min-height: 32px !important; }
}

/* 3. Hero-label oval: laconic text, fills 80%+ area */
@media (max-width: 640px) {
  .hero-label {
    font-size: 0.6rem !important; font-weight: 600 !important;
    letter-spacing: 0.12em !important; padding: 4px 12px !important;
    border-radius: 999px !important; margin-bottom: 16px !important;
    line-height: 1.2 !important; border-width: 1px !important;
    max-width: 90vw !important; white-space: nowrap !important;
    overflow: hidden !important; text-overflow: ellipsis !important;
  }
}
@media (max-width: 380px) {
  .hero-label { font-size: 0.55rem !important; padding: 3px 10px !important; letter-spacing: 0.08em !important; }
}
