/* ==========================================================================
   5sides.io — static site stylesheet
   Headings/labels: Titillium Web · Body: Libre Franklin (replaces Halyard)
   ========================================================================== */

:root {
  --ink: #111111;
  --text-mid: #555555;
  --text-dim: #888888;
  --text-faint: #aaaaaa;
  --border: #cccccc;
  --border-light: #dddddd;
  --bg: #ffffff;
  --bg-subtle: #f7f7f5;
  --max-width: 900px;
  --font-head: 'Titillium Web', sans-serif;
  --font-body: 'Libre Franklin', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4vw;
}

section[id] { scroll-margin-top: 140px; }

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

.site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}

.site-logo img { max-height: 105px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a:not(.btn) {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--ink);
}

.site-nav a:not(.btn):hover { color: var(--text-mid); }

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.03em;
  padding: 10px 20px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  border-radius: 0;
  cursor: pointer;
}

.btn:hover { background: #333; border-color: #333; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover { background: var(--ink); color: #fff; }

.site-nav .btn { font-size: 15px; padding: 10px 18px; }

/* Mobile nav toggle */
.nav-toggle-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 30;
}

.nav-toggle-icon {
  position: absolute;
  top: 19px;
  left: 8px;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: background 0.25s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle-icon::before { top: -8px; }
.nav-toggle-icon::after { top: 8px; }

.nav-toggle-btn[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle-btn[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle-btn[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

/* ---------- Section rhythm ---------- */

.page-section {
  padding: 16px 0;
}

.eyebrow {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 6px;
}

.section-heading {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 12px;
}

.section-intro {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 0 32px;
}

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

#hero {
  padding:36px 0;
  position: relative;
  overflow: hidden;
}

#hero canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#hero .wrap { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}

.hero-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 640px;
}

.hero-intro {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 32px;
}

/* ---------- Pillars (What we do) ---------- */

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-width: var(--max-width);
}

.pillar-card { background: #fff; padding: 28px 24px; }

.pillar-num {
  display: block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.pillar-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.3;
}

.pillar-card p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0;
}

/* ---------- Services ---------- */

.services-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.service-item { padding: 18px 24px; border-bottom: 1px solid var(--border-light); }
.service-item.last, .service-item:last-child { border-bottom: none; }

.service-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.service-body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ---------- Industries ---------- */

.industries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--max-width);
}

.col-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 12px;
}

.tag-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.tag-row {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-row.last, .tag-row:last-child { border-bottom: none; }

.tag-row::before { content: '\2013'; color: var(--text-faint); font-weight: 400; }

/* ---------- AI section ---------- */

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.ai-card { padding: 22px; }
.ai-yes { background: var(--bg-subtle); }
.ai-no { background: #fff; }

.ai-card-label {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ai-yes .ai-card-label { color: var(--ink); }
.ai-no .ai-card-label { color: var(--text-dim); }

.ai-card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.ai-card-body {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0;
}

.ai-pullquote {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  border-left: 3px solid var(--border);
  padding-left: 18px;
  margin-top: 8px;
}

/* ---------- Tech section ---------- */

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tech-cell { background: var(--bg-subtle); padding: 18px 20px; }

.tech-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.tech-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  margin: 0;
}

/* ---------- About ---------- */

.about-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  max-width: var(--max-width);
}

.about-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.about-text { flex: 1; min-width: 0; }

.about-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.about-title {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.about-bio {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
}

.contact-card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.contact-card-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.contact-embed { min-height: 100px; }

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

.site-footer {
  padding: 32px 0;
  text-align: center;
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 4px;
  color: var(--ink);
}

.footer-icon-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .pillars-grid,
  .ai-grid,
  .tech-grid,
  .industries-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-card { flex-direction: column; }

  .hero-heading { font-size: 34px; }
  .hero-intro { font-size: 16px; }

  .site-nav { gap: 16px; }

  .site-logo img { max-height: 44px; }

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

  .site-nav {
    position: fixed;
    inset: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 25;
  }

  .site-nav.nav-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a:not(.btn) { display: block; font-size: 22px; }

  .site-nav .btn { font-size: 16px; padding: 14px 28px; }

  body.nav-open-lock { overflow: hidden; }

  .page-section { padding: 16px 0; }
}

/* ---------- Motion & focus ---------- */

/* ---------- Scroll reveal animations ----------
   Ported from the Squarespace site's .preFade/.preScale behavior,
   confirmed element-by-element against the live dev site rather than
   assumed. Opt in per-element with class="reveal-fade" or
   class="reveal-scale" — add or remove the class to toggle it on any
   element, no other changes needed.
   Duration/easing pulled from the site's compiled CSS
   (--tweak-global-animations-animation-duration/-delay). */

.reveal-fade {
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.65s cubic-bezier(0.19, 1, 0.22, 1),
              transform 0.65s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Above-the-fold content (header, hero) gets the initial-load delay
   found in the site's global animation settings. Scroll-triggered
   sections reveal as soon as they enter view, no extra delay. */
.site-header .reveal-fade,
.site-header .reveal-scale,
#hero .reveal-fade,
#hero .reveal-scale {
  transition-delay: 0.6s;
}

.in-view.reveal-fade { opacity: 1; }

.in-view.reveal-scale {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-fade,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  html { scroll-behavior: auto; }
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
