/* ============================================
   Forester IT — Landing Page Styles
   ============================================ */

:root {
  --color-bg: #0a0a0f;
  --color-surface: #12121a;
  --color-surface-2: #1a1a25;
  --color-border: #2a2a3a;
  --color-text: #e4e4eb;
  --color-text-muted: #8888a0;
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-accent: #22d3ee;
  --color-accent-2: #a78bfa;
  --color-qr: #f97316;
  --color-cloud: #6366f1;
  --color-gateway: #22d3ee;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 8px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--color-primary-light);
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

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

.nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--color-text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

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

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

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

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--color-text-muted);
  background: var(--color-surface);
}

.btn-github {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-github:hover {
  background: var(--color-surface);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

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

/* ---- Hero ---- */
.hero {
  padding: 140px 0 80px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-light);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

/* Code window */
.code-window {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-dots {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-surface-2);
}

.code-dots span:first-child { background: #ef4444; }
.code-dots span:nth-child(2) { background: #eab308; }
.code-dots span:last-child { background: #22c55e; }

.code-block {
  padding: 20px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.code-keyword { color: var(--color-accent); }
.code-string { color: #a5f3a3; }
.code-prop { color: var(--color-primary-light); }
.code-comment { color: var(--color-text-muted); }

/* ---- Section Headers ---- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-label {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* ---- Projects ---- */
.projects {
  padding: 100px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.project-card:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}

.project-card-featured {
  grid-column: 1 / -1;
}

.project-card-inner {
  padding: 36px;
}

.project-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 20px;
}

.project-icon-qr {
  background: rgba(249, 115, 22, 0.12);
  color: var(--color-qr);
}

.project-icon-cloud {
  background: rgba(99, 102, 241, 0.12);
  color: var(--color-cloud);
}

.project-icon-gateway {
  background: rgba(34, 211, 238, 0.12);
  color: var(--color-gateway);
}

.project-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.project-tagline {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.project-features {
  list-style: none;
  margin: 16px 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.project-card-featured .project-features {
  grid-template-columns: 1fr 1fr;
}

.project-features li {
  font-size: 13px;
  color: var(--color-text-muted);
  padding-left: 20px;
  position: relative;
}

.project-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary-light);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--color-accent);
}

/* ---- Open Source ---- */
.open-source {
  padding: 100px 0;
}

.oss-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px;
}

.oss-content h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.oss-tagline {
  color: var(--color-accent);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.oss-content > p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.oss-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tech-tag {
  padding: 4px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.oss-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.oss-stat {
  text-align: center;
}

.oss-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.oss-stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Services ---- */
.services {
  padding: 100px 0;
  border-top: 1px solid var(--color-border);
}

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

.service-item {
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.service-item:hover {
  border-color: var(--color-text-muted);
}

.service-item svg {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.service-item h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ---- Contact ---- */
.contact {
  padding: 100px 0;
  border-top: 1px solid var(--color-border);
}

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

.contact-info .section-label {
  margin-bottom: 16px;
}

.contact-info h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  transition: color var(--transition);
}

.contact-detail:hover {
  color: var(--color-primary-light);
}

.contact-detail svg {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition);
}

.social-links a:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

/* ---- Contact Form ---- */
.contact-form-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--transition);
  outline: none;
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238888a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

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

/* ---- Form Status ---- */
.form-status {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.form-status-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.form-status-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Blog ---- */
.blog-listing {
  padding: 140px 0 100px;
}

.blog-grid {
  display: grid;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition);
}

.blog-card:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}

.blog-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-card h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.blog-card h3 a:hover {
  color: var(--color-primary-light);
}

.blog-card p {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.blog-date {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.blog-read-more {
  color: var(--color-primary-light);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.blog-read-more:hover {
  color: var(--color-accent);
}

/* Blog Post */
.blog-post {
  padding: 140px 0 100px;
}

.blog-post .container {
  max-width: 720px;
}

.blog-post-header {
  margin-bottom: 48px;
}

.blog-back {
  display: inline-block;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.blog-back:hover {
  color: var(--color-text);
}

.blog-post-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.blog-post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}

.blog-post-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}

.blog-post-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.blog-post-content p {
  margin-bottom: 20px;
  color: var(--color-text-muted);
}

.blog-post-content a {
  color: var(--color-primary-light);
  text-decoration: none;
}

.blog-post-content a:hover {
  text-decoration: underline;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 0 0 20px 24px;
  color: var(--color-text-muted);
}

.blog-post-content li {
  margin-bottom: 8px;
}

.blog-post-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.blog-post-content code {
  background: var(--color-surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.blog-post-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
}

.blog-post-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 20px;
  margin: 0 0 20px;
  color: var(--color-text-muted);
  font-style: italic;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 13px;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  gap: 80px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--transition);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .oss-card {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }

  .nav.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

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

  .project-card-featured {
    grid-column: auto;
  }

  .project-features {
    grid-template-columns: 1fr;
  }

  .oss-card {
    padding: 28px;
  }

  .oss-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

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

  .footer-inner {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    gap: 48px;
  }

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

  .hero-actions .btn {
    text-align: center;
    justify-content: center;
  }
}
