/* Tom Knows Tech - Main Stylesheet */

:root {
  --brand: #0ea5e9;
  --brand2: #2563eb;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --bg: #ffffff;
  --surface: #f8fafc;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Navbar */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  height: 58px;
}

@media (max-width: 700px) {
  .brand img {
    height: 46px;
  }
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--brand2);
  text-decoration: none;
}

.nav a.active {
  color: var(--brand2);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 64px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    min-width: 220px;
    padding: 0.5rem;
  }
  
  .nav a {
    padding: 0.6rem;
    border-radius: 8px;
  }
  
  .nav a:hover {
    background: var(--surface);
  }

  .nav[aria-expanded='true'] {
    display: flex;
  }

  .nav-toggle {
    display: inline-block;
  }
}

/* Hero */
.hero {
  padding: 3rem 0;
}

.hero-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-wrap {
    grid-template-columns: 1fr;
  }
}

.kicker {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 2.6vw + 1rem, 3.2rem);
  line-height: 1.1;
  margin: 0.4rem 0 0.6rem;
}

h2 {
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
}

.hero p {
  max-width: 65ch;
  color: var(--muted);
}

.cta {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn,
.btn-ghost {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
  text-decoration: none;
}

.btn-ghost {
  border-color: #cbd5e1;
  background: #fff;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface);
  text-decoration: none;
}

.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.hero-card ul {
  margin: 0.5rem 0 0 1rem;
}

/* Sections */
.section {
  margin-top: 2.25rem;
}

.section h2 {
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
}

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

/* Services preview */
.services-preview {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  stroke: var(--brand2);
  fill: none;
  stroke-width: 2;
}

.icon.fill {
  fill: var(--brand2);
  stroke: none;
}

/* Trust & Areas */
.trust {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  color: #334155;
  margin-top: 2rem;
}

.trust-inner {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.areas {
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.areas .wrap {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.badge {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  box-shadow: var(--shadow);
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  padding: 1.2rem 0;
  margin-top: 2rem;
}

.cta-band .row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.cta-band .btn-ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  background: transparent;
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Services Grid (detailed page) */
.services-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.05);
  padding: 1.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.service-item .icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

.service-content h3 {
  margin: 0 0 0.3rem;
  color: var(--text);
  font-size: 1.15rem;
}

.service-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

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

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

/* Portfolio */
.portfolio-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.portfolio-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portfolio-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-content h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.portfolio-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--surface);
  color: var(--brand2);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: 2rem;
}

footer .inner {
  padding: 1rem 0;
  color: #64748b;
  text-align: center;
}

/* Page header (for internal pages) */
.page-header {
  padding: 2rem 0 1rem;
}

.page-header h1 {
  margin: 0.5rem 0 1rem;
  font-size: 2.2rem;
}

.page-header p {
  max-width: 70ch;
  color: var(--muted);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}
