/**
 * TecKnoNerd corporate site — tokens aligned with nerd-style configs/ui/tokens.css
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: light;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #f1e7ff;
  --primary-soft-2: #eef2ff;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;

  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --ok: #059669;
  --ok-bg: #d1fae5;
  --info: #2563eb;
  --info-bg: #dbeafe;

  --shadow: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.08);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --max: 72rem;

  font-family: Inter, system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.font-display {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.brand-mark-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #22d3ee 100%);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 45%, var(--cyan-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Shell */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  color: white;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-name {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.nav a,
.nav-link-btn {
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav a:hover,
.nav-link-btn:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Hero */
.hero-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
}

.hero {
  display: grid;
  gap: 2rem;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    padding: 3rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--primary-soft-2);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text);
}

.lead {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

.actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn:hover {
  text-decoration: none;
}

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

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

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-panel {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--primary-soft-2) 0%, #ecfeff 100%);
  border: 1px solid var(--border);
}

.hero-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.stat-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
}

.stat-list strong {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.stat-list span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Sections */
.section {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.section-muted {
  max-width: none;
  background: linear-gradient(180deg, rgb(241 245 249 / 0.65) 0%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-left: 0;
  padding-right: 0;
}

.section-muted > .section-head,
.section-muted > .grid {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-head {
  margin-bottom: 1.35rem;
}

.section-head h2,
.contact-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.card {
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.95rem;
}

.product-featured {
  padding: 1.75rem 1.85rem;
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  background: linear-gradient(160deg, var(--surface) 0%, var(--primary-soft-2) 140%);
}

.product-featured h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.product-featured > .product-featured-body > p {
  max-width: 44rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-chips {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-chips li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Contact */
.contact-panel {
  display: grid;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (min-width: 800px) {
  .contact-panel {
    grid-template-columns: 1.4fr auto;
    align-items: center;
  }
}

.contact-copy {
  max-width: 32rem;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.footer-brand strong {
  color: var(--text);
  font-weight: 600;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.footer-meta a,
.footer-link-btn {
  color: var(--muted);
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.footer-meta a:hover,
.footer-link-btn:hover {
  color: var(--primary);
}

/* Contact dialog */
body.dialog-open {
  overflow: hidden;
}

.dialog[hidden] {
  display: none !important;
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.dialog-panel {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: min(90vh, 44rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.5rem 1.5rem;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.dialog-close {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.dialog-lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.field .req {
  color: var(--primary);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgb(79 70 229 / 0.35);
  outline-offset: 1px;
  border-color: var(--primary);
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.form-error {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: #ffe4e6;
  color: #be123c;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-success {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.85rem;
  font-weight: 600;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

@media (max-width: 560px) {
  .nav {
    gap: 0.85rem;
    font-size: 0.8rem;
  }

  .hero {
    padding: 1.5rem;
  }
}
