/* ===== Base reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f7fb;
  color: #111827;
  line-height: 1.6;
}

/* ===== Links & text ===== */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin: 0.25rem 0 0.75rem;
}

/* ===== Layout wrapper ===== */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.25rem 3rem;
}

/* ===== Header / navigation ===== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-main {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #111827;
}

.logo-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.logo-tagline {
  font-size: 0.75rem;
  color: #6b7280;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #4b5563;
}

.nav-link:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  text-decoration: none;
}

.nav-link-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ===== Hero & sections ===== */
.hero {
  background: linear-gradient(135deg, #eff6ff, #f4f4ff);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
  margin-bottom: 2rem;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: #6366f1;
  margin-bottom: 0.35rem;
}

.hero-title {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.hero-subtitle {
  font-size: 0.98rem;
  max-width: 40rem;
  color: #4b5563;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-ghost {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

.btn-ghost:hover {
  background: #f3f4f6;
}

/* ===== Cards / grid ===== */
.section-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.1rem 1.1rem 1.2rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6366f1;
}

.card-title {
  font-size: 1rem;
  margin: 0.35rem 0;
}

.card-text {
  font-size: 0.9rem;
  color: #4b5563;
}

.card-link {
  display: inline-flex;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

/* ===== Page header (inner pages) ===== */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
}

.page-header-lead {
  max-width: 44rem;
  color: #4b5563;
}

/* ===== Code examples styling ===== */
.example {
  margin-bottom: 1.75rem;
}

.example-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.example-desc {
  font-size: 0.9rem;
  color: #4b5563;
}

.code-actions {
  margin-top: 0.65rem;
}

.code-block {
  margin-top: 0.65rem;
  background: #020617;
  color: #e5e7eb;
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
}

/* ===== Sandbox layout ===== */
.sandbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.sandbox-panel {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sandbox-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.sandbox-panel label {
  font-size: 0.85rem;
  color: #4b5563;
}

.sandbox-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  padding: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
}

.sandbox-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sandbox-iframe {
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  flex: 1;
}

/* ===== Footer ===== */
.site-footer {
  padding: 1.25rem 1.25rem 1.75rem;
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 1.25rem 1.1rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .sandbox-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Contact form ===== */
.form {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;  /* stack fields under each other */
  gap: 1rem;               /* a bit more space between them */
}

.form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.form-label .required {
  color: #dc2626;
  margin-left: 0.15rem;
}

.form-input,
.form-textarea {
  border-radius: 0.65rem;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.form-textarea {
  min-height: 260px;  /* bigger message area */
  resize: vertical;
}


.form-helper {
  font-size: 0.75rem;
  color: #6b7280;
}

.form-actions {
  margin-top: 0.5rem;
}
