/* ============================================================
   Hubris Network — professional light theme
   Brand: slate #708090 (display only — 4.4:1 on white, never body text)
          tan   #e5aa70 (accents/chips/hover, with dark --on-tan text)
   Contrast rules: body text uses --slate-deep (>=5:1 on white);
   --tan is for large text, decorative rules, or backgrounds
   paired with --on-tan. Body --text on --surface is ~12:1.
   ============================================================ */

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

:root {
  /* Brand */
  --slate:        #708090;   /* display/accents only */
  --slate-deep:   #5a6b7c;   /* links, buttons, body text */
  --slate-soft:   #4a5560;   /* headings */
  --tan:          #e5aa70;   /* accent chips, hover, thin rules */
  --tan-deep:     #c98a4e;   /* tan hover */
  --on-tan:       #3d2f1e;   /* dark text on tan */

  /* Neutrals */
  --bg:           #f7f8f9;
  --bg-alt:       #eef0f2;
  --surface:      #ffffff;
  --border:       #d9dee3;
  --text:         #2f363d;
  --text-muted:   #5c6670;

  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-sm: 0 1px 2px rgba(47, 54, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(47, 54, 61, 0.08);
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle grid pattern (nod to the old theme) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(112, 128, 144, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 128, 144, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--slate-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
}
.skip-link:focus { left: 0; }

a { color: var(--slate-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--slate-soft); }

:focus-visible {
  outline: 2px solid var(--slate-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-soft);
}
.brand img {
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 1px;
}
.brand-dot { color: var(--tan-deep); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--slate-soft); }
.nav-cta {
  background: var(--tan);
  color: var(--on-tan) !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--tan-deep); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 8px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--slate-deep);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--slate-soft); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--slate-deep);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--slate); background: var(--bg-alt); }
.btn-tan {
  background: var(--tan);
  color: var(--on-tan);
}
.btn-tan:hover { background: var(--tan-deep); transform: translateY(-1px); }

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

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 80px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 3px;
  color: var(--tan-deep);
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid var(--tan);
  border-radius: 999px;
  background: rgba(229, 170, 112, 0.08);
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--slate-soft);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--slate); }
.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Logo card with subtle ring motion */
.hero-visual { display: flex; justify-content: center; }
.logo-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 20px;
  max-width: 460px;
  width: 100%;
}
.logo-card img { width: 100%; height: auto; display: block; border-radius: 8px; }
.rings { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 16px; }
.ring {
  position: absolute;
  border: 1px solid rgba(112, 128, 144, 0.14);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  width: 120%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  animation: ringspin 40s linear infinite;
}
.ring.r2 { width: 88%; animation-duration: 30s; animation-direction: reverse; }
.ring.r3 { width: 56%; animation-duration: 20s; }
@keyframes ringspin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------------------------------------------------------- */
/* Specs strip                                                 */
/* ---------------------------------------------------------- */

.specs-section { padding: 8px 0 72px; }
.specs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.spec-item {
  padding: 26px 30px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.spec-item:last-child { border-right: none; }
.spec-item .value {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--slate-deep);
}
.spec-item .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ---------------------------------------------------------- */
/* Sections (services / projects / about)                      */
/* ---------------------------------------------------------- */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 3px;
  color: var(--tan-deep);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--slate-soft);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 44px;
  font-size: 1.02rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--tan);
  box-shadow: var(--shadow-md);
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(229, 170, 112, 0.14);
  color: var(--tan-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--slate-soft);
  margin-bottom: 8px;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.services-note {
  text-align: center;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.services-note::before, .services-note::after { content: ' — '; color: var(--tan-deep); }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--slate);
  box-shadow: var(--shadow-md);
}
.project-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(112, 128, 144, 0.12);
  color: var(--slate-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.project-icon svg { width: 24px; height: 24px; }
.project-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--slate-soft);
  margin-bottom: 8px;
}
.project-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
}
.about-text p:last-child { margin-bottom: 0; }
.diagram-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.diagram-card pre {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate-deep);
  line-height: 1.35;
}

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

.contact-band {
  background: var(--slate-deep);
  color: #fff;
  text-align: center;
  padding: 72px 0;
}
.contact-band h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.contact-band p { color: rgba(255, 255, 255, 0.75); margin-bottom: 28px; }

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

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-inner img { display: block; }
footer p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
footer a { color: var(--slate-deep); }
footer a:hover { color: var(--slate-soft); }

/* ---------------------------------------------------------- */
/* Responsive + reduced motion                                 */
/* ---------------------------------------------------------- */

@media (max-width: 768px) {
  .nav-inner { flex-direction: column; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
  .nav-links { gap: 18px; flex-wrap: wrap; }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .logo-card { max-width: 300px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .spec-item:nth-child(2) { border-right: none; }
  .spec-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 520px) {
  .specs { grid-template-columns: 1fr; }
  .spec-item { border-right: none; border-bottom: 1px solid var(--border); }
  .spec-item:last-child { border-bottom: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring { animation: none; }
  .service-card, .project-card, .btn { transition: none; }
}
