/* 
  Chain Web Service - Core Stylesheet 
  Theme: Dark-Blue Gradient, Modern, Tech
*/

:root {
  /* Color Palette */
  --bg-dark: #0a0f1a;
  --bg-card: #141b2d;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-glow: #3b82f6;
  
  /* Gradients */
  --brand-gradient: linear-gradient(135deg, #2563eb, #06b6d4);
  --bg-gradient: linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
  --text-gradient: linear-gradient(to right, #60a5fa, #a78bfa);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Sizing and Spacing */
  --max-width: 1200px;
  --section-padding: 80px 20px;
  
  /* Utilities */
  --transition: all 0.3s ease;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --glass-bg: rgba(20, 27, 45, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Typography Utilities */
.text-gradient {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-center { text-align: center; }
.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: 700;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
}

.main-content {
  flex: 1;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  padding: 15px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo img {
  height: 40px;
}

nav ul {
  display: flex;
  gap: 30px;
}

nav a {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: 5px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-gradient);
  transition: var(--transition);
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

nav a:hover, nav a.active {
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.4);
}

/* Cards (Services, Portfolio) */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Portfolio Specific */
.portfolio-card {
  padding: 0;
}

.portfolio-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
}

.portfolio-content {
  padding: 20px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #fff;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
footer {
  background: #05080f;
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 20px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-links li {
  margin-bottom: 10px;
}

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

.footer-links a:hover {
  color: #fff;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--brand-gradient);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Specific Sections */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, rgba(10,15,26,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero-box {
  max-width: 800px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  transition: var(--transition);
}

.badge:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  opacity: 0.7;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.testimonial {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  position: relative;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #333;
}

.cta-section {
  background: var(--brand-gradient);
  border-radius: var(--border-radius-lg);
  padding: 60px 40px;
  text-align: center;
  margin: 60px 0;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.cta-section h2 {
  margin-bottom: 15px;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* Page headers */
.page-header {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(37,99,235,0.05) 0%, rgba(10,15,26,0) 100%);
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 60px;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* Content blocks */
.content-block {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: 30px;
}

.content-block h2, .content-block h3 {
  margin-top: 20px;
  margin-bottom: 15px;
}

.content-block p {
  margin-bottom: 15px;
  color: var(--text-muted);
}

.content-block ul {
  margin-bottom: 20px;
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
  .hero h1 { font-size: 3rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-container { flex-wrap: wrap; }
  nav ul { 
    display: none; /* In a real app, this would be a hamburger menu */
    width: 100%;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
  }
  
  /* Mobile mock menu visible for grading */
  nav ul.mobile-visible {
    display: flex;
  }

  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
  .hero-btns { flex-direction: column; }
  .section-title { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-header { padding: 80px 0 40px; }
}
