/* ============================================
   Technovate Design System v3
   
   Inspired by Awwwards SOTD quality:
   - Immersive 3D backgrounds (not boxed sidebars)
   - Dark/light section contrast for drama
   - Large, confident typography
   - Glass-morphism and premium hover states
   - Golden ratio composition throughout
   - Color theory: 60-30-10 palette
   ============================================ */

:root {
  /* 60% — Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --dark: #060b18;

  /* 30% — Primary blue */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;

  /* 10% — Warm accent */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;

  /* Supporting */
  --teal: #0d9488;
  --teal-light: #14b8a6;

  /* Sectors */
  --sector-health: #34d399;
  --sector-finance: #fbbf24;
  --sector-education: #a78bfa;
  --sector-enterprise: #38bdf8;
  --sector-community: #f472b6;

  /* φ Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.5rem;
  --text-xl: 2rem;
  --text-2xl: 2.75rem;
  --text-3xl: 3.5rem;
  --text-hero: clamp(2.5rem, 6vw, 4.5rem);

  /* Fibonacci spacing */
  --sp-1: 8px;
  --sp-2: 13px;
  --sp-3: 21px;
  --sp-4: 34px;
  --sp-5: 55px;
  --sp-6: 89px;

  /* Layout */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-h: 80px;
  --container: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.618;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

/* ============================================
   HEADER — floating glass bar
   ============================================ */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  transition: background 0.3s;
}

/* Dark header when over dark sections */
.header--dark {
  background: rgba(6, 11, 24, 0.85);
  border-bottom-color: rgba(255,255,255,0.06);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Push logo right with golden-ratio spacer */
.header-spacer {
  width: clamp(20px, 4vw, 64px);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-right: auto;
}

.logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
  filter: invert(1);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-900);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

.nav a.active {
  color: var(--gray-900);
  font-weight: 600;
}

.nav a.nav-cta {
  background: var(--gray-900);
  color: var(--white);
  font-weight: 600;
  margin-left: 4px;
}

.nav a.nav-cta:hover {
  background: var(--blue-700);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
}

.burger span {
  width: 18px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 1px;
}

/* ============================================
   IMMERSIVE HERO — 3D scene fills the background
   Text floats on top with gradient overlay
   ============================================ */

.hero-immersive {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}

.hero-immersive .hero-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.hero-immersive .hero-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: calc(var(--header-h) + var(--sp-6)) 0 var(--sp-6);
}

.hero-overlay .container {
  max-width: 720px;
  margin: 0 auto;
  margin-left: calc((100% - var(--container)) / 2 + var(--sp-4));
}

.hero-overlay .hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-light);
  margin-bottom: var(--sp-2);
}

.hero-overlay .hero-title {
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: var(--sp-3);
}

.hero-overlay .hero-desc {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: var(--sp-4);
}

.hero-overlay .hero-ctas {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.hero-overlay .btn--fill {
  background: var(--white);
  color: var(--gray-900);
  font-weight: 700;
}

.hero-overlay .btn--fill:hover {
  background: var(--accent-light);
  color: var(--dark);
}

.hero-overlay .btn--outline {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
}

.hero-overlay .btn--outline:hover {
  border-color: var(--white);
  color: var(--white);
}

/* ============================================
   PAGE HEADER (inner pages) — 3D background, shorter
   ============================================ */

.page-header-immersive {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
}

.page-header-immersive .hero-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.6;
}

.page-header-immersive .hero-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.page-header-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: calc(var(--header-h) + var(--sp-5)) 0 var(--sp-5);
  background: linear-gradient(to top, rgba(6,11,24,0.9) 0%, rgba(6,11,24,0.4) 60%, transparent 100%);
}

.page-header-overlay .hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-light);
  margin-bottom: var(--sp-2);
}

.page-header-overlay .page-title {
  font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: var(--sp-2);
  max-width: 680px;
}

.page-header-overlay .page-lead {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  max-width: 560px;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: var(--sp-6) 0;
}

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

/* Dark sections for contrast */
.section--dark {
  background: var(--dark);
  color: var(--white);
}

.section--dark .section-title { color: var(--white); }
.section--dark .section-lead,
.section--dark .card p,
.section--dark .content-cols p,
.section--dark .value-item p { color: rgba(255,255,255,0.6); }
.section--dark .card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.section--dark .card:hover { border-color: rgba(255,255,255,0.15); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.section--dark .card h3 { color: var(--white); }
.section--dark .value-item { border-top-color: rgba(255,255,255,0.08); }
.section--dark .value-item h3 { color: var(--white); }

.section-title {
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: var(--sp-2);
}

.section-lead {
  font-size: var(--text-md);
  color: var(--gray-500);
  line-height: 1.75;
  max-width: 540px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.btn--fill {
  background: var(--gray-900);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.btn--fill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.btn--outline {
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}

.btn--outline:hover {
  border-color: var(--gray-900);
  color: var(--gray-900);
  transform: translateY(-1px);
}

/* ============================================
   CARDS — glass morphism on dark, clean on light
   ============================================ */

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.card {
  padding: var(--sp-4);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.35s var(--ease);
}

.card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  transform: translateY(-4px);
}

.card-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  margin-bottom: var(--sp-2);
}

.card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--sp-1);
}

.card p {
  font-size: var(--text-base);
  color: var(--gray-500);
  line-height: 1.65;
}

/* ============================================
   CONTENT BLOCKS — φ columns
   ============================================ */

.content-block { max-width: 920px; }

.content-cols {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}

.content-cols p {
  font-size: var(--text-base);
  color: var(--gray-500);
  line-height: 1.75;
  margin-bottom: var(--sp-2);
}

.content-cols p:last-child { margin-bottom: 0; }

/* ============================================
   VALUES GRID
   ============================================ */

.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}

.value-item {
  padding: var(--sp-3) 0;
  border-top: 2px solid var(--gray-200);
}

.value-item h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--sp-1);
}

.value-item p {
  font-size: var(--text-base);
  color: var(--gray-500);
  line-height: 1.65;
}

/* ============================================
   SECTORS — color-coded top borders
   ============================================ */

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.sector-card {
  padding: var(--sp-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  border-top: 3px solid transparent;
  transition: all 0.35s var(--ease);
}

.sector-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.12);
}

.sector-card--health   { border-top-color: var(--sector-health); }
.sector-card--finance  { border-top-color: var(--sector-finance); }
.sector-card--education{ border-top-color: var(--sector-education); }
.sector-card--enterprise{ border-top-color: var(--sector-enterprise); }
.sector-card--community{ border-top-color: var(--sector-community); }

.sector-icon { font-size: var(--text-xs); margin-bottom: var(--sp-1); }
.sector-card--health .sector-icon   { color: var(--sector-health); }
.sector-card--finance .sector-icon  { color: var(--sector-finance); }
.sector-card--education .sector-icon{ color: var(--sector-education); }
.sector-card--enterprise .sector-icon{ color: var(--sector-enterprise); }
.sector-card--community .sector-icon{ color: var(--sector-community); }

.sector-card h3 { font-size: var(--text-base); font-weight: 700; color: var(--white); margin-bottom: var(--sp-1); }
.sector-card p { font-size: var(--text-sm); color: rgba(255,255,255,0.55); line-height: 1.65; }

/* ============================================
   SOLUTION BLOCKS
   ============================================ */

.solution-block {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--gray-200);
}

.solution-block:last-child { border-bottom: none; }

.solution-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); margin-top: var(--sp-1); }

.solution-header--health .card-label   { color: var(--sector-health); }
.solution-header--finance .card-label  { color: var(--sector-finance); }
.solution-header--education .card-label{ color: var(--sector-education); }
.solution-header--enterprise .card-label{ color: var(--sector-enterprise); }
.solution-header--community .card-label{ color: var(--sector-community); }

.solution-body p { font-size: var(--text-base); color: var(--gray-500); line-height: 1.75; margin-bottom: var(--sp-2); }

/* ============================================
   CTA BANNER
   ============================================ */

.cta-banner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-banner h2 { font-size: var(--text-xl); font-weight: 800; color: inherit; margin-bottom: var(--sp-2); }
.cta-banner p { font-size: var(--text-md); color: inherit; opacity: 0.6; margin-bottom: var(--sp-3); }
.cta-banner .hero-ctas { justify-content: center; }

/* Dark CTA */
.section--dark .cta-banner .btn--fill { background: var(--white); color: var(--dark); }
.section--dark .cta-banner .btn--fill:hover { background: var(--accent-light); }
.section--dark .cta-banner .btn--outline { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.7); }
.section--dark .cta-banner .btn--outline:hover { border-color: var(--white); color: var(--white); }

/* ============================================
   CHECK LIST
   ============================================ */

.check-list { list-style: none; margin-top: var(--sp-3); }

.check-list li {
  font-size: var(--text-base);
  color: var(--gray-700);
  line-height: 1.65;
  padding: var(--sp-1) 0 var(--sp-1) var(--sp-3);
  position: relative;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: var(--sp-5);
  align-items: flex-start;
}

.contact-form-col .form { max-width: 100%; }
.contact-info-col .contact-details { margin-top: var(--sp-2); }
.contact-reasons { margin-top: var(--sp-4); }
.contact-reasons h3 { font-size: var(--text-base); font-weight: 700; color: var(--gray-900); margin-bottom: var(--sp-1); }

.contact-details {
  margin-top: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.contact-details strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.contact-details a { color: var(--blue-600); }
.contact-details a:hover { text-decoration: underline; }
.contact-details p { font-size: var(--text-base); color: var(--gray-900); }

/* ============================================
   FORMS
   ============================================ */

.form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form label { font-size: var(--text-sm); font-weight: 600; color: var(--gray-900); }

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 14px var(--sp-2);
  font-family: var(--font);
  font-size: var(--text-base);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  color: var(--gray-900);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}

.form textarea { resize: vertical; min-height: 120px; }
.form .btn { align-self: flex-start; }

.form select {
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: var(--sp-5) 0;
  background: var(--dark);
  color: var(--white);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-2);
}

.footer-logo img {
  height: 56px;
  object-fit: contain;
  /* on dark background, keep white logo as-is */
}

.footer p { font-size: var(--text-base); color: rgba(255,255,255,0.5); }
.footer strong { color: var(--white); }
.footer small { font-size: var(--text-sm); color: rgba(255,255,255,0.35); }

.footer-links {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a { font-size: var(--text-sm); color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ============================================
   VIEWPORT (standalone, for non-immersive use)
   ============================================ */

.viewport {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--dark);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: grab;
  position: relative;
  box-shadow: 0 4px 32px rgba(0,0,0,0.2);
}

.viewport:active { cursor: grabbing; }
.viewport canvas { display: block; width: 100% !important; height: 100% !important; }

.viewport-label {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: var(--sp-1);
  letter-spacing: 0.04em;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .nav a { font-size: var(--text-xs); padding: 6px 10px; }
  .cards-row { grid-template-columns: 1fr 1fr; }
  .sectors-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .cards-row,
  .content-cols,
  .values-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .solution-block { grid-template-columns: 1fr; gap: var(--sp-2); }
  .header-spacer { display: none; }

  .hero-overlay .container { margin-left: auto; margin-right: auto; }
  .page-header-immersive { min-height: 380px; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .burger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .logo-img { height: 44px; }
  .sectors-grid { grid-template-columns: 1fr; }
  .cards-row { grid-template-columns: 1fr; }
  .hero-immersive { min-height: 90vh; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }
  .section { padding: var(--sp-5) 0; }
}

/* Mobile nav */
.nav.open {
  display: flex !important;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--white);
  padding: var(--sp-3);
  z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.nav.open a {
  font-size: var(--text-md);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--gray-200);
  border-radius: 0;
  background: none;
  color: var(--gray-900);
}

.nav.open a.nav-cta {
  margin-top: var(--sp-2);
  border-bottom: none;
  background: var(--gray-900);
  color: var(--white);
  border-radius: 10px;
  text-align: center;
  padding: var(--sp-2);
}
