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

:root {
  --background: hsl(240, 10%, 8%);
  --foreground: hsl(0, 0%, 93%);
  --card: hsl(240, 10%, 12%);
  --card-foreground: hsl(0, 0%, 93%);
  --primary: hsl(187, 70%, 45%);
  --primary-foreground: hsl(240, 10%, 8%);
  --secondary: hsl(240, 8%, 17%);
  --secondary-foreground: hsl(0, 0%, 85%);
  --muted-foreground: hsl(240, 5%, 55%);
  --border: hsl(240, 8%, 22%);
  --input: hsl(240, 8%, 17%);
  --ring: hsl(187, 70%, 45%);
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid hsla(240, 8%, 22%, 0.5);
  background-color: hsla(240, 10%, 8%, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

@supports (backdrop-filter: blur(16px)) {
  .site-header {
    background-color: hsla(240, 10%, 8%, 0.8);
  }
}

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

.header-logo {
  display: flex;
  align-items: center;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background-color: var(--primary);
}

.logo-icon svg {
  color: var(--primary-foreground);
}

.logo-text {
  margin-left: 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

/* Desktop Nav */
.desktop-nav {
  display: none;
  align-items: center;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--foreground);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 0.5rem;
  background: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.2s;
}

.mobile-menu-btn:hover {
  color: var(--foreground);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background-color: var(--background);
  padding: 0.5rem 1.5rem 1rem;
}

.mobile-nav.is-open {
  display: block;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-fade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--background) 80%);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background-color: hsla(240, 8%, 17%, 0.8);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@supports (backdrop-filter: blur(4px)) {
  .hero-badge {
    background-color: hsla(240, 8%, 17%, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

.hero-badge-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--foreground);
}

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

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

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 6rem;
  }
}

.hero-description {
  max-width: 42rem;
  margin: 1.5rem auto 0;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

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

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  margin-bottom: 1rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

@media (min-width: 640px) {
  .btn-primary {
    margin-bottom: 0;
    margin-right: 1rem;
  }
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  opacity: 0.8;
}

/* ===== Tools Section ===== */
.tools-section {
  padding: 6rem 0;
  scroll-margin-top: 5rem;
}

.section-label {
  margin-bottom: 0.75rem;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.875rem;
  color: var(--primary);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

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

.section-description {
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.section-header {
  max-width: 42rem;
  margin-bottom: 4rem;
}

.tools-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (min-width: 1280px) {
  .tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Tool Card ===== */
.tool-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  transition: border-color 0.3s, background-color 0.3s;
}

.tool-card:hover {
  border-color: hsla(187, 70%, 45%, 0.4);
}

.tool-card:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.tool-card-accent {
  height: 1px;
  width: 100%;
  background-color: var(--border);
  transition: background-color 0.3s;
}

.tool-card:hover .tool-card-accent {
  background-color: hsla(187, 70%, 45%, 0.5);
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tool-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background-color: var(--secondary);
  color: var(--primary);
}

.tool-card-arrow {
  color: var(--muted-foreground);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.tool-card:hover .tool-card-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.tool-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.tool-card p {
  margin-bottom: 1rem;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
}

.tool-tag {
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background-color: var(--secondary);
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ===== About Section ===== */
.about-section {
  padding: 6rem 0;
  scroll-margin-top: 5rem;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  gap: 4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.about-text p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.about-text p + p {
  margin-top: 1rem;
}

.feature-card {
  display: flex;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  margin-bottom: 1.25rem;
}

.feature-card:last-child {
  margin-bottom: 0;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  margin-right: 1.25rem;
  border-radius: 0.5rem;
  background-color: var(--secondary);
  color: var(--primary);
}

.feature-card h3 {
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.feature-card p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* ===== Contact Section ===== */
.contact-section {
  padding: 6rem 0;
  scroll-margin-top: 5rem;
  border-top: 1px solid var(--border);
}

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

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: flex-start;
  }
}

.contact-text p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.email-card {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
}

.email-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  margin-right: 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--secondary);
  color: var(--primary);
}

.email-card-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.email-card-address {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Contact Form */
.contact-form {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
}

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

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--input);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
}

.form-group input {
  height: 2.75rem;
}

.form-group textarea {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  resize: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.75rem;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  opacity: 0.9;
}

.btn-submit:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-submit svg {
  margin-right: 0.5rem;
}

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

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-logo {
    margin-bottom: 0;
  }
}

.footer-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background-color: var(--primary);
}

.footer-logo-icon svg {
  color: var(--primary-foreground);
}

.footer-logo-text {
  margin-left: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.footer-links {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-links {
    margin-bottom: 0;
  }
}

.footer-link {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
  margin-right: 1.5rem;
}

.footer-link:last-child {
  margin-right: 0;
}

.footer-link:hover {
  color: var(--foreground);
}

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