/* sg5-biz-website shared styles
   Palette is the same as the current sg5.biz site and the InsightHub landing,
   so the new design feels visually continuous with what already exists. */

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

:root {
  --primary: #7fcbad;
  --primary-dark: #5fb893;
  --primary-light: #a8dcc6;
  --accent: #43baff;
  --text: #ffffff;
  --text-muted: #aeaacb;
  --bg: #111821;
  --bg-alt: #1b1d21;
  --bg-card: #1b2330;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 8px;
  --max-w: 1200px;
}

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, h4, .logo, .btn, .nav a {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  background: rgba(17, 24, 33, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

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

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

.nav {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.nav a:hover { color: var(--primary); }
.nav a.btn-outline:hover { color: var(--bg); }
.nav a.btn-primary:hover { color: var(--bg); }

@media (max-width: 720px) {
  .nav { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(127, 203, 173, 0.3);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

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

/* ---------- Layout primitives ---------- */

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

section {
  padding: 5rem 0;
}

section.alt { background: var(--bg-alt); }

.section-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid rgba(127, 203, 173, 0.3);
  border-radius: 100px;
  background: rgba(127, 203, 173, 0.08);
  letter-spacing: 0.02em;
}

/* ---------- Hero ---------- */

.hero {
  padding: 6rem 0 4rem;
  position: relative;
  isolation: isolate;
}

.hero.with-bg {
  padding: 6rem 0;
}

.hero.with-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("img/hero-bg.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  z-index: -2;
}

.hero.with-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.55) 0%, rgba(17, 24, 33, 0.85) 70%, var(--bg) 100%);
  z-index: -1;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  max-width: 920px;
}

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

.hero .sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 2rem;
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ---------- Cards & grids ---------- */

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

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(127, 203, 173, 0.4);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card .icon {
  width: 2rem;
  height: 2rem;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1rem;
}

.card .tag {
  display: inline-block;
  background: rgba(127, 203, 173, 0.12);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

/* Product card variant (slightly more prominent) */
.card.product {
  padding: 2rem;
  border-color: rgba(127, 203, 173, 0.25);
}

.card.product .product-title {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.card.product .product-meta {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.card.product .product-cta {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--primary);
}

.card.product .product-cta::after {
  content: "→";
  transition: transform 0.15s ease;
}

.card.product:hover .product-cta::after {
  transform: translateX(3px);
}

/* ---------- Portfolio strip ---------- */

.portfolio {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portfolio-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.portfolio-item h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.portfolio-item p { color: var(--text-muted); font-size: 0.85rem; }
.portfolio-item .stack { color: var(--primary); font-size: 0.75rem; margin-top: 0.5rem; font-weight: 600; }

/* ---------- Contact form ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 820px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
}

.contact-info h3 {
  font-size: 1.05rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 2.5rem 0 0.6rem;
}

.contact-info .lead {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-info a {
  color: var(--text);
}

.contact-info a:hover { color: var(--primary); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-form h3 {
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.radio-row label:hover {
  border-color: rgba(127, 203, 173, 0.4);
}

.radio-row input[type="radio"] {
  accent-color: var(--primary);
}

.radio-row input[type="radio"]:checked + span,
.radio-row label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(127, 203, 173, 0.1);
  color: var(--text);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------- Legal pages ---------- */

.legal-content {
  max-width: 760px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.legal-content strong { color: var(--text); }

.legal-content a { color: var(--primary); }

.legal-back {
  display: inline-block;
  margin-top: 2rem;
  color: var(--primary);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

/* ---------- Utility ---------- */

.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.center { text-align: center; }
