/* ============================================
   HubTech — Core Design System
   ============================================ */

:root {
  /* Brand colors (as specified) */
  --navy: #0D47A1;
  --blue: #1A73E8;
  --gold: #FFD700;
  --white: #FFFFFF;

  /* Extended palette for depth */
  --ink: #0A0E1A;          /* near-black for deep sections */
  --navy-deep: #081B3A;    /* darker navy for gradients */
  --slate: #5B6B85;        /* secondary text on light */
  --slate-light: #A8B5CC;  /* secondary text on dark */
  --surface: #F6F8FC;      /* light section background */
  --surface-card: #FFFFFF;
  --border-light: #E4E9F2;
  --border-dark: rgba(255,255,255,0.12);

  /* Gradients */
  --grad-hero: linear-gradient(160deg, var(--ink) 0%, var(--navy-deep) 45%, var(--navy) 100%);
  --grad-blue: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  --grad-gold: linear-gradient(135deg, #FFD700 0%, #FFB800 100%);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(13, 71, 161, 0.08);
  --shadow-md: 0 8px 30px rgba(13, 71, 161, 0.12);
  --shadow-lg: 0 20px 60px rgba(10, 14, 26, 0.18);
  --shadow-gold: 0 8px 24px rgba(255, 215, 0, 0.25);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.2s var(--ease);
  --t-med: 0.4s var(--ease);
  --t-slow: 0.7s var(--ease);

  --container: 1240px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

@media (max-width: 640px) {
  .container { padding: 0 var(--space-md); }
}

/* ============ Utility ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.section { padding: var(--space-2xl) 0; }
.section-tight { padding: var(--space-xl) 0; }

@media (max-width: 768px) {
  .section { padding: var(--space-xl) 0; }
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-xl);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: var(--space-sm);
  color: var(--ink);
}
.section-head p {
  color: var(--slate);
  font-size: 1.05rem;
}

.text-gold { color: var(--gold); }
.text-blue { color: var(--blue); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-gold);
  color: var(--ink);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,215,0,0.35); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-dark);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--gold); background: rgba(255,255,255,0.06); }

.btn-outline-dark {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--ink);
}
.btn-outline-dark:hover { border-color: var(--blue); color: var(--blue); background: rgba(26,115,232,0.05); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.7rem 1.4rem; font-size: 0.85rem; }

.btn[disabled], .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ Header / Nav ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.3rem 0;
  transition: background var(--t-med), padding var(--t-med), box-shadow var(--t-med);
}
.site-header.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.85rem 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--grad-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.logo span { color: var(--gold); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links {
  display: flex;
  gap: var(--space-md);
}
.nav-links a {
  color: var(--slate-light);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--t-fast);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 1100;
}
.nav-toggle span {
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    inset: 0;
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--t-med);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-links { flex-direction: column; align-items: center; gap: var(--space-md); }
  .nav-links a { font-size: 1.3rem; }
  .nav-actions { flex-direction: column; }
}

/* ============ Hero / Circuit Canvas ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--grad-hero);
  overflow: hidden;
  padding-top: 6rem;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}
.hero-glow {
  position: absolute;
  top: -10%; right: -10%;
  width: 50%; height: 70%;
  background: radial-gradient(circle, rgba(26,115,232,0.35) 0%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-dark);
  background: rgba(255,255,255,0.04);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: var(--space-md);
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--white);
  margin-bottom: var(--space-md);
}
.hero h1 .accent { color: var(--gold); }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--slate-light);
  max-width: 540px;
  margin-bottom: var(--space-lg);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

/* Inner page header (non-home hero) */
.page-banner {
  position: relative;
  background: var(--grad-hero);
  padding: 9.5rem 0 5rem;
  overflow: hidden;
}
.page-banner .hero-canvas { opacity: 0.4; }
.page-banner-content { position: relative; z-index: 2; max-width: 680px; }
.page-banner h1 { color: var(--white); font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin-bottom: var(--space-sm); }
.page-banner p { color: var(--slate-light); font-size: 1.05rem; }
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate-light);
  margin-bottom: var(--space-md);
  display: flex; align-items: center; gap: 0.5rem;
}
.breadcrumb .gold { color: var(--gold); }

/* ============ Cards ============ */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26,115,232,0.25);
}

.icon-tile {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--grad-blue);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

/* ============ Apps preview (home) ============ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}
.app-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med);
  display: flex;
  flex-direction: column;
}
.app-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.app-card-banner {
  background: var(--grad-blue);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  overflow: hidden;
}
.app-card-banner::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,215,0,0.25), transparent 70%);
}
.app-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--blue);
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.app-card-banner h3 { color: var(--white); font-size: 1.3rem; position: relative; z-index: 1; }
.app-card-banner .tag {
  display: inline-block;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative; z-index: 1;
}
.app-card-body { padding: var(--space-lg); flex: 1; display: flex; flex-direction: column; }
.app-card-body p { color: var(--slate); font-size: 0.95rem; flex: 1; margin-bottom: var(--space-md); }
.app-card-footer { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  background: var(--surface);
  border: 1px dashed var(--border-light);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
}

/* ============ Why HubTech ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}
.why-card { text-align: left; }
.why-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.why-card p { color: var(--slate); font-size: 0.92rem; }

/* ============ CTA band ============ */
.cta-band {
  background: var(--grad-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(255,215,0,0.18), transparent 70%);
}
.cta-band h2 { color: var(--white); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: var(--space-sm); position: relative; }
.cta-band p { color: var(--slate-light); max-width: 480px; margin: 0 auto var(--space-lg); position: relative; }
.cta-band .hero-actions { justify-content: center; position: relative; margin-bottom: 0; }

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  color: var(--slate-light);
  padding-top: var(--space-2xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-dark);
}
.footer-brand p { font-size: 0.9rem; margin: var(--space-sm) 0 var(--space-md); max-width: 280px; }
.footer-social { display: flex; gap: 0.7rem; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-dark);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.footer-social a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); transform: translateY(-3px); }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: var(--space-md);
}
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col ul li a { font-size: 0.9rem; transition: color var(--t-fast); }
.footer-col ul li a:hover { color: var(--gold); }

.footer-contact li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; margin-bottom: 0.9rem; }
.footer-contact li i { color: var(--gold); margin-top: 3px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-bottom-links { display: flex; gap: 1.2rem; }
.footer-bottom-links a:hover { color: var(--gold); }

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

/* ============ Forms ============ */
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color var(--t-fast), background var(--t-fast);
  font-size: 0.95rem;
  color: var(--ink);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-error { color: #D93025; font-size: 0.8rem; margin-top: 0.4rem; display: none; }
.form-hint { font-size: 0.78rem; color: var(--slate); margin-top: 0.4rem; }

.form-status {
  display: none;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}
.form-status.success { background: rgba(34,168,82,0.1); color: #1E8E3E; display: block; }
.form-status.error { background: rgba(217,48,37,0.1); color: #D93025; display: block; }

/* ============ Misc components ============ */
.divider { height: 1px; background: var(--border-light); margin: var(--space-xl) 0; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-gold);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--t-fast);
  z-index: 900;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

::selection { background: var(--gold); color: var(--ink); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--slate); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }
