/*
Theme Name: MeshWebDesign
Theme URI: https://meshwebdesign.com
Author: MeshWebDesign
Author URI: https://meshwebdesign.com
Description: Premium IT agency WordPress theme with dark mesh background and neon accents
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meshwebdesign
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --background: oklch(0.145 0.02 250);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.18 0.02 250);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.18 0.02 250);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.7 0.2 210);
  --primary-foreground: oklch(0.145 0.02 250);
  --secondary: oklch(0.25 0.02 250);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.25 0.02 250);
  --muted-foreground: oklch(0.65 0.01 250);
  --accent: oklch(0.7 0.2 210);
  --accent-foreground: oklch(0.145 0.02 250);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);
  --border: oklch(0.25 0.02 250);
  --input: oklch(0.25 0.02 250);
  --ring: oklch(0.7 0.2 210);
  --radius: 0.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Mesh Gradient Background */
.mesh-gradient {
  background-image: radial-gradient(at 0% 0%, oklch(0.25 0.1 210 / 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 0%, oklch(0.25 0.1 210 / 0.2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, oklch(0.25 0.1 210 / 0.3) 0px, transparent 50%),
    radial-gradient(at 0% 100%, oklch(0.25 0.1 210 / 0.2) 0px, transparent 50%);
}

/* Glow Effects */
.glow-text {
  text-shadow: 0 0 20px oklch(0.7 0.2 210 / 0.5);
}

.glow-border {
  box-shadow: 0 0 20px oklch(0.7 0.2 210 / 0.3);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(11, 19, 43, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background-color: oklch(0.7 0.2 210 / 0.2);
  border: 1px solid var(--primary);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background-color: oklch(0.65 0.2 210);
}

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

.btn-outline:hover {
  background-color: oklch(0.7 0.2 210 / 0.1);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
}

.mobile-nav.active {
  display: flex;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(128, 128, 128, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--muted-foreground);
  margin-bottom: 3rem;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-mouse {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid oklch(0.7 0.2 210 / 0.5);
  border-radius: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem;
}

.scroll-dot {
  width: 0.375rem;
  height: 0.375rem;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Section Styles */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-bg-alt {
  background-color: oklch(0.25 0.02 250 / 0.3);
}

.section-header {
  max-width: 64rem;
  margin: 0 auto 4rem;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.section-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Card Styles */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: oklch(0.7 0.2 210 / 0.5);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  background-color: oklch(0.7 0.2 210 / 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon svg {
  color: var(--primary);
  width: 1.5rem;
  height: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.card-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Portfolio Card */
.portfolio-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.portfolio-card:hover {
  border-color: oklch(0.7 0.2 210 / 0.5);
}

.portfolio-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
  background-color: var(--secondary);
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--card-foreground);
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 80rem;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-form {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  resize: none;
  min-height: 150px;
}

/* Footer */
.site-footer {
  background-color: var(--background);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-bottom a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: oklch(0.65 0.2 210);
}

/* Animations */
@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */
@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 3rem;
  }

  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Enhanced mobile responsive styles - forcing single column and preventing overflow */
@media (max-width: 767px) {
  /* Prevent horizontal overflow on mobile */
  body {
    overflow-x: hidden;
  }

  .container {
    padding: 0 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Force all grid layouts to single column on mobile */
  .grid,
  .grid-cols-1,
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  /* Ensure cards don't overflow */
  .card,
  .portfolio-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .main-nav,
  .header-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .logo-text {
    font-size: 1.125rem;
  }

  .logo-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .mobile-nav {
    padding: 1rem 0;
  }

  .mobile-nav a {
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  /* Improved hero section for mobile with better spacing and visual hierarchy */
  .hero-section {
    min-height: 100vh;
    padding: 6rem 0 4rem;
    display: flex;
    align-items: center;
  }

  .hero-content {
    padding: 0 0.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 800;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    width: 100%;
    gap: 1rem;
    padding: 0 0.5rem;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border-width: 2px;
  }

  /* Enhanced mesh gradient visibility on mobile */
  .mesh-gradient {
    background-image: radial-gradient(at 20% 30%, oklch(0.3 0.15 210 / 0.4) 0px, transparent 50%),
      radial-gradient(at 80% 20%, oklch(0.3 0.15 210 / 0.3) 0px, transparent 50%),
      radial-gradient(at 80% 80%, oklch(0.3 0.15 210 / 0.4) 0px, transparent 50%),
      radial-gradient(at 20% 70%, oklch(0.3 0.15 210 / 0.3) 0px, transparent 50%);
  }

  .hero-grid {
    background-size: 20px 20px;
    opacity: 0.5;
  }

  .scroll-indicator {
    bottom: 1.5rem;
  }

  .section {
    padding: 3.5rem 0;
    overflow-x: hidden;
  }

  .section-header {
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
    font-weight: 700;
  }

  .section-description {
    font-size: 1.0625rem;
    line-height: 1.6;
  }

  .card {
    padding: 1.5rem;
  }

  .card-icon {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1rem;
  }

  .card-icon svg {
    width: 1.375rem;
    height: 1.375rem;
  }

  .card-title {
    font-size: 1.1875rem;
    margin-bottom: 0.625rem;
    font-weight: 700;
  }

  .card-description {
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  .portfolio-image {
    height: 11rem;
  }

  .portfolio-content {
    padding: 1.5rem;
  }

  .portfolio-title {
    font-size: 1.375rem;
    margin-bottom: 0.625rem;
    font-weight: 700;
  }

  /* Contact grid single column on mobile */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .contact-form {
    padding: 1.75rem;
    width: 100%;
    box-sizing: border-box;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-input,
  .form-textarea {
    font-size: 1rem;
    padding: 0.875rem 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .form-textarea {
    min-height: 140px;
  }

  .btn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
    width: 100%;
  }

  .site-footer {
    padding: 2.5rem 0;
  }

  .footer-content {
    gap: 1.25rem;
  }

  .footer-links {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .footer-bottom p {
    font-size: 0.8125rem;
    line-height: 1.5;
  }
}

/* Extra small mobile styles for screens under 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  /* Optimized hero for very small screens */
  .hero-section {
    padding: 5rem 0 3rem;
  }

  .hero-title {
    font-size: 1.875rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 95%;
  }

  .hero-buttons {
    gap: 0.875rem;
    padding: 0;
  }

  .hero-buttons .btn {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-description {
    font-size: 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card-title {
    font-size: 1.0625rem;
  }

  .card-description {
    font-size: 0.9375rem;
  }

  .portfolio-image {
    height: 10rem;
  }

  .portfolio-content {
    padding: 1.25rem;
  }

  .portfolio-title {
    font-size: 1.1875rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .form-label {
    font-size: 0.875rem;
  }

  .form-input,
  .form-textarea {
    font-size: 1rem;
    padding: 0.75rem 0.875rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
  }

  .site-footer {
    padding: 2rem 0;
  }

  .footer-bottom p {
    font-size: 0.8125rem;
  }
}

/* Landscape mobile optimization */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 4rem 0 2.5rem;
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }

  .section {
    padding: 2.5rem 0;
  }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .main-nav a,
  .mobile-nav a,
  .footer-links a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }

  .mobile-menu-toggle {
    min-width: 48px;
    min-height: 48px;
  }

  .form-input,
  .form-textarea {
    min-height: 48px;
  }
}
