/*
Theme Name: S3F Innovations
Theme URI: https://s3fparts-innovations.com
Author: S3F Parts Innovations
Description: Custom theme for S3F Parts Innovations — software services, industrial products, B2B directory.
Version: 1.0
Text Domain: s3f-innovations
*/

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ===== Tokens ===== */
:root {
  --navy-950: #060b14;
  --navy-900: #0b1220;
  --navy-800: #101a2e;
  --navy-700: #16223b;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;

  --font-heading: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --container: 1220px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-card-hover: 0 4px 10px rgba(15,23,42,.06), 0 16px 40px rgba(15,23,42,.10);
}

/* ===== Fonts (self-hosted) ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('assets/fonts/sora-var.woff2') format('woff2');
}

/* ===== Base ===== */
body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--gray-900);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; }
p { max-width: 62ch; }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .container { padding-inline: 32px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: #eef4ff;
  border: 1px solid #dbe6ff;
  padding: 6px 14px;
  border-radius: 999px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-500); }
.eyebrow.on-dark { color: var(--cyan-400); background: rgba(6,182,212,0.12); border-color: rgba(34,211,238,0.28); }

.section { padding: 72px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--gray-600); margin-top: 14px; font-size: 1.05rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.bg-light { background: var(--gray-50); }
.bg-navy { background: var(--navy-900); color: var(--gray-300); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Default icon size for any .icon wrapper — specific contexts below override this */
.icon svg { width: 24px; height: 24px; flex-shrink: 0; }
.btn-primary { background: var(--blue-600); color: var(--white); box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 12px 26px rgba(37,99,235,.34); }
.btn-amber { background: var(--amber-500); color: var(--navy-950); box-shadow: 0 8px 20px rgba(245,158,11,.28); }
.btn-amber:hover { background: var(--amber-400); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--gray-300); color: var(--gray-900); }
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-600); }
.btn-outline.on-dark { border-color: rgba(255,255,255,.28); color: var(--white); }
.btn-outline.on-dark:hover { border-color: var(--cyan-400); color: var(--cyan-400); }
.btn-sm { padding: 9px 18px; font-size: 0.86rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 1.18rem; color: var(--gray-900); }
.brand .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(37,99,235,.32);
}
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem; color: var(--gray-600); letter-spacing: 0.01em; }

.primary-nav { display: none; }
.primary-nav ul { display: flex; align-items: center; gap: 30px; }
.primary-nav a { font-weight: 600; font-size: 0.94rem; color: var(--gray-700); transition: color .15s ease; }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--blue-600); }
.header-cta { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200); background: var(--white);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 18px; height: 2px; background: var(--gray-900); position: relative; transition: all .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 20px 22px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav-list { display: contents; }
.mobile-nav-list li { list-style: none; }
.mobile-nav a { display: block; padding: 12px 6px; font-weight: 600; color: var(--gray-800); border-bottom: 1px solid var(--gray-100); }
.mobile-nav .btn { margin-top: 12px; }

@media (min-width: 960px) {
  .primary-nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  background: radial-gradient(1100px 480px at 82% -10%, rgba(37,99,235,.35), transparent 60%),
              radial-gradient(700px 400px at 8% 110%, rgba(6,182,212,.28), transparent 60%),
              var(--navy-900);
  color: var(--gray-300);
  overflow: hidden;
  padding: 76px 0 84px;
}
.hero::after {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
.hero .container { position: relative; display: grid; gap: 46px; align-items: center; }
.hero h1 { color: var(--white); margin: 18px 0 20px; }
.hero .lead { font-size: 1.12rem; color: var(--gray-300); max-width: 54ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 480px; }
.hero-stats .stat b { display: block; font-family: var(--font-heading); font-size: 1.5rem; color: var(--white); }
.hero-stats .stat span { font-size: 0.82rem; color: var(--gray-300); }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 20px 50px rgba(0,0,0,.35)); }

@media (min-width: 960px) {
  .hero { padding: 108px 0 120px; }
  .hero .container { grid-template-columns: 1.05fr 0.95fr; gap: 40px; }
}

/* ===== Service cards ===== */
.grid-3 { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  height: 100%;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: #dbe6ff; }
.card .icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eef4ff, #e5fbff);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--blue-600);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.96rem; color: var(--gray-600); flex: 1; }
.card .card-link { margin-top: 18px; font-weight: 700; font-size: 0.9rem; color: var(--blue-600); display: inline-flex; align-items: center; gap: 6px; }
.card .card-link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.card:hover .card-link svg { transform: translateX(3px); }

/* ===== Product teaser ===== */
.grid-2 { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 34px;
  color: var(--white);
  overflow: hidden;
  min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.product-card.a { background: linear-gradient(155deg, #0f2a55, #1746a3 60%, #2563eb); }
.product-card.b { background: linear-gradient(155deg, #063b42, #087f8c 60%, #06b6d4); }
.product-card .badge {
  align-self: flex-start; margin-bottom: auto;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  padding: 6px 12px; border-radius: 999px;
}
.product-card h3 { color: var(--white); font-size: 1.4rem; margin-bottom: 8px; }
.product-card p { color: rgba(255,255,255,.82); font-size: 0.95rem; margin-bottom: 20px; }
.product-card .deco { position: absolute; right: -30px; top: -30px; width: 220px; height: 220px; opacity: .18; }
.product-card .deco svg { width: 100%; height: 100%; }

/* ===== Value strip ===== */
.value-strip { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .value-strip { grid-template-columns: repeat(4, 1fr); } }
.value-item { display: flex; gap: 14px; align-items: flex-start; }
.value-item .icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; background: #eef4ff; color: var(--blue-600); display: flex; align-items: center; justify-content: center; }
.value-item .icon svg { width: 22px; height: 22px; }
.value-item h4 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 4px; color: var(--gray-900); }
.value-item p { font-size: 0.9rem; color: var(--gray-600); }

/* ===== CTA band ===== */
.cta-band {
  background: linear-gradient(120deg, var(--navy-900), #123063 60%, #0e5a68);
  border-radius: var(--radius-lg);
  padding: 52px 34px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: var(--white); margin-bottom: 14px; }
.cta-band p { color: var(--gray-300); max-width: 52ch; margin-inline: auto; margin-bottom: 30px; }
.cta-band .hero-actions { justify-content: center; margin-bottom: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-950); color: var(--gray-300); padding: 64px 0 28px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; margin-bottom: 48px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-grid .brand { color: var(--white); margin-bottom: 14px; }
.footer-grid p { color: var(--gray-300); font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-heading); color: var(--white); font-size: 0.86rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 0.92rem; color: var(--gray-300); transition: color .15s ease; }
.footer-col a:hover { color: var(--cyan-400); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 0.84rem; color: var(--gray-600); }

/* ===== Breadcrumb / page hero (inner pages) ===== */
.page-hero { background: var(--navy-900); color: var(--gray-300); padding: 56px 0 64px; position: relative; overflow: hidden; }
.page-hero .container { position: relative; }
.page-hero .crumb { font-size: 0.86rem; color: var(--gray-300); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.page-hero .crumb a { color: var(--cyan-400); }
.page-hero h1 { color: var(--white); }
.page-hero .lead { max-width: 62ch; margin-top: 14px; color: var(--gray-300); }

/* ===== About page ===== */
.about-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.stat-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 22px; text-align: center; }
.stat-card b { display: block; font-family: var(--font-heading); font-size: 1.7rem; color: var(--blue-600); }
.stat-card span { font-size: 0.82rem; color: var(--gray-600); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }

.pillar-list { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.pillar { display: flex; gap: 16px; }
.pillar .n { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--navy-900); color: var(--cyan-400); font-family: var(--font-heading); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.pillar h4 { font-family: var(--font-heading); font-size: 1.02rem; color: var(--gray-900); margin-bottom: 4px; }
.pillar p { font-size: 0.92rem; color: var(--gray-600); }

/* ===== Single service ===== */
.service-body { display: grid; gap: 44px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .service-body { grid-template-columns: 2fr 1fr; } }
.service-content h2 { margin-top: 36px; margin-bottom: 14px; font-size: 1.4rem; }
.service-content h2:first-child { margin-top: 0; }
.service-content ul { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.service-content li { display: flex; gap: 10px; font-size: 0.98rem; color: var(--gray-700); list-style: none; }
.service-content li svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--blue-600); margin-top: 2px; }
.service-content p { color: var(--gray-600); }
.service-side { display: flex; flex-direction: column; gap: 18px; }
.side-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 26px; }
.side-card h4 { font-family: var(--font-heading); margin-bottom: 10px; }
.side-card p { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 18px; }
.related-list { display: flex; flex-direction: column; gap: 4px; }
.related-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; font-weight: 600; font-size: 0.92rem; color: var(--gray-800); border-bottom: 1px solid var(--gray-200); }
.related-list a:hover { color: var(--blue-600); }
.related-list a svg { width: 16px; height: 16px; }

/* ===== Contact ===== */
.contact-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }
.contact-info-card { background: var(--navy-900); color: var(--gray-300); border-radius: var(--radius-lg); padding: 34px; }
.contact-info-card h3 { color: var(--white); margin-bottom: 8px; }
.contact-info-card p { color: var(--gray-300); font-size: 0.94rem; margin-bottom: 26px; }
.contact-channel { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.08); }
.contact-channel:first-of-type { border-top: none; }
.contact-channel .icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: var(--cyan-400); }
.contact-channel .icon svg { width: 20px; height: 20px; }
.contact-channel h4 { color: var(--white); font-size: 0.92rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 3px; }
.contact-channel a, .contact-channel span { font-size: 0.92rem; color: var(--gray-300); }
.contact-channel a:hover { color: var(--cyan-400); }

.form-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-card); }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 620px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 0.86rem; font-weight: 700; color: var(--gray-800); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--gray-50); font-size: 0.96rem; color: var(--gray-900);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-600); background: var(--white); }
.field textarea { resize: vertical; min-height: 120px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: 0.82rem; color: var(--gray-600); margin-top: 14px; }
.form-alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600; margin-bottom: 22px; }
.form-alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.form-alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ===== Products page ===== */
.roadmap-note { display: flex; gap: 14px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-md); padding: 20px 22px; margin-top: 48px; }
.roadmap-note svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--amber-500); margin-top: 2px; }
.roadmap-note p { font-size: 0.92rem; color: #9a3412; margin: 0; }

/* ===== Focus states ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}
.bg-navy a:focus-visible, .hero a:focus-visible, .cta-band a:focus-visible, .product-card:focus-visible, .contact-info-card a:focus-visible {
  outline-color: var(--cyan-400);
}

/* ===== Utilities ===== */
.mt-0 { margin-top: 0 !important; }
.text-center { text-align: center; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue-600); color: var(--white); padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 12px; top: 12px; }
