/* ============================================
   INWEB.LT — Styles
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-input: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.1);
  --accent-glow: rgba(0, 212, 170, 0.15);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-h: 72px;
  --container: 1100px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.85;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.header.shrunk {
  --header-h: 56px;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height 0.3s;
}

.logo {
  color: var(--text);
  display: flex;
  align-items: center;
}

.logo-svg {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

.nav-phone {
  font-family: var(--font-mono);
  font-size: 13px !important;
  color: var(--accent) !important;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 24px 80px;
  background: linear-gradient(135deg, #0d1117 0%, #0f1923 40%, #0d1117 100%);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -30%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

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

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Section Shared --- */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* --- Services --- */
.services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 10px;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 4px;
}

/* --- Experience --- */
.experience {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.stat-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.portfolio-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.3s;
}

.portfolio-item:hover {
  border-color: var(--accent);
}

.portfolio-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-block;
}

.portfolio-item h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-item p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* --- About --- */
.about {
  background: var(--bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-text .btn {
  margin-top: 12px;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.value-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.value-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 8px;
}

.value-item h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.value-item p {
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Contact --- */
.contact {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 10px;
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.contact-item h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-item p,
.contact-item a {
  color: var(--text-muted);
  font-size: 15px;
}

.contact-item a:hover {
  color: var(--accent);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s;
  outline: none;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.cf-turnstile {
  margin-bottom: 4px;
}

.form-message {
  font-size: 14px;
  padding: 0;
  border-radius: 8px;
  transition: all 0.3s;
}

.form-message.success {
  color: var(--accent);
  padding: 12px 16px;
  background: var(--accent-dim);
}

.form-message.error {
  color: #f85149;
  padding: 12px 16px;
  background: rgba(248, 81, 73, 0.1);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 0;
}

.footer-content {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo svg {
  height: 28px;
  width: auto;
  color: var(--text);
}

.footer-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

  .footer-content {
    flex-direction: column;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 16px;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 60px) 24px 80px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  section {
    padding: 72px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .service-card {
    padding: 24px;
  }
}

/* --- Chat Widget --- */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 40;
  font-family: var(--font-body);
}

.chat-bubble-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-bubble-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 212, 170, 0.4);
}

.chat-bubble-btn svg {
  width: 24px;
  height: 24px;
}

.chat-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 360px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: chat-slide-up 0.25s ease-out;
}

.chat-panel[hidden] {
  display: none;
}

@keyframes chat-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.chat-header-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.chat-header-status {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-header-actions {
  display: flex;
  gap: 4px;
}

.chat-header-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.chat-header-btn:hover {
  color: var(--text);
  background: var(--bg-input);
}

.chat-header-btn svg {
  width: 16px;
  height: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 340px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-bubble a {
  text-decoration: underline;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}

.chat-bubble--user a {
  color: var(--bg);
}

.chat-bubble--bot {
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  padding: 8px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-typing[hidden] {
  display: none;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: chat-bounce 1.4s infinite ease-in-out both;
}

.chat-typing span:nth-child(1) { animation-delay: 0s; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 480px) {
  .chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .chat-panel {
    width: calc(100vw - 32px);
    max-height: 70vh;
    right: 0;
    bottom: 68px;
  }

  .chat-messages {
    max-height: none;
  }
}
