/* =========================================
   Cheswick Web Solutions - Professional Styles
   ========================================= */

/* CSS Variables */
:root {
  --primary: #1a2a4a;
  --primary-light: #2d4a7c;
  --primary-dark: #0f1a2e;
  --accent: #c9a227;
  --accent-hover: #b8922a;
  --text-dark: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #6a6a6a;
  --text-on-dark: #e8e8e8;
  --bg-white: #ffffff;
  --bg-light: #f0f2f5;
  --bg-cream: #f5f3ef;
  --bg-dark: #1a2a4a;
  --bg-darker: #0f1a2e;
  --border-light: #d0d0d0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-cream);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-medium);
}

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

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

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

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================
   Navigation
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 1rem 0;
}

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

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-medium);
  padding: 0.5rem 0;
  position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: var(--bg-white);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--bg-white);
}

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

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: rgba(255,255,255,0.85);
  max-width: 550px;
}

.hero .btn-secondary {
  color: var(--bg-white);
  border-color: var(--bg-white);
}

.hero .btn-secondary:hover {
  background: var(--bg-white);
  color: var(--primary);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================================
   Sections
   ========================================= */
section {
  padding: 5rem 0;
}

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

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

.bg-light {
  background: var(--bg-light);
}

.bg-cream {
  background: var(--bg-cream);
}

.bg-dark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.bg-dark .section-header h2,
.bg-dark h2,
.bg-dark h3 {
  color: var(--bg-white);
}

.bg-dark .section-header p,
.bg-dark p {
  color: rgba(255,255,255,0.8);
}

.bg-dark .feature-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}

.bg-dark .feature-card h3 {
  color: var(--bg-white);
}

.bg-dark .feature-card p {
  color: rgba(255,255,255,0.8);
}

.bg-dark .feature-icon {
  background: var(--accent);
  color: var(--primary-dark);
}

/* =========================================
   Features / Services Grid
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--bg-white);
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* =========================================
   Services Page
   ========================================= */
.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-light);
}

.service-item:last-child {
  border-bottom: none;
}

.service-item:nth-child(even) {
  direction: rtl;
}

.service-item:nth-child(even) > * {
  direction: ltr;
}

.service-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.service-content p {
  margin-bottom: 1.5rem;
}

.service-list {
  list-style: none;
}

.service-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-medium);
}

.service-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.service-image {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 3rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.service-image-placeholder {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-size: 3rem;
}

/* =========================================
   Portfolio Grid
   ========================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.portfolio-image {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.3);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(26,42,74,0.95) 0%, transparent 100%);
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay h4 {
  color: var(--bg-white);
  margin-bottom: 0.5rem;
}

.portfolio-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Featured Portfolio (larger items) */
.portfolio-featured {
  grid-column: span 2;
}

.portfolio-featured .portfolio-image {
  height: 400px;
}

/* =========================================
   Testimonials
   ========================================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-weight: 600;
}

.testimonial-info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.testimonial-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* =========================================
   Contact Section
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin-bottom: 2rem;
}

.contact-details {
  list-style: none;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.contact-details li:last-child {
  border-bottom: none;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-text strong {
  display: block;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.contact-text span {
  color: var(--text-light);
}

/* Contact Form */
.contact-form {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,42,74,0.1);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* =========================================
   Page Headers
   ========================================= */
.page-header {
  padding: 10rem 0 4rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  text-align: center;
}

.page-header h1 {
  color: var(--bg-white);
  margin-bottom: 1rem;
}

.page-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================
   CTA Section
   ========================================= */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 5rem 0;
  text-align: center;
}

.cta h2 {
  color: var(--bg-white);
  margin-bottom: 1rem;
}

.cta p {
  color: rgba(255,255,255,0.8);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}

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

.footer-brand h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--bg-white);
  margin-bottom: 1rem;
}

.footer-brand h3 span {
  color: var(--accent);
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 0;
}

.footer h4 {
  color: var(--bg-white);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
  .features-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-featured {
    grid-column: span 1;
  }

  .portfolio-featured .portfolio-image {
    height: 280px;
  }

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

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    display: none;
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 8rem 0 4rem;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

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

  .service-item {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-item:nth-child(even) {
    direction: ltr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .page-header {
    padding: 8rem 0 3rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* =========================================
   Browser Mockup
   ========================================= */
.browser-mockup {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}

.browser-header {
  background: linear-gradient(to bottom, #e8e8e8, #d8d8d8);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #ccc;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
}

.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27ca40; }

.browser-url {
  flex: 1;
  background: var(--bg-white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
  border: 1px solid #ddd;
}

.browser-content {
  height: 500px;
  overflow: hidden;
}

.browser-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  transform-origin: top left;
}

.featured-project-info {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.featured-project-info h3 {
  margin-bottom: 1rem;
}

.featured-project-info p {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .browser-content {
    height: 350px;
  }
}

/* =========================================
   Utilities
   ========================================= */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
