﻿/* Matilda Migration — main.css */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --bg: #060e18;
  --surface: #0d1a26;
  --surface2: #112030;
  --text: #e8eaf0;
  --text-muted: #8892a4;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --gap: 3em;
  --sidebar-w: 0px;
  --funding-bar-h: 0px;
  --nav-height: 4.5em;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg) !important;
  color: var(--text);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #38bdf8; }

img { max-width: 100%; height: auto; display: block; }
.img-wrap { overflow: hidden; width: 100%; }
.img-wrap img { width: 100%; object-fit: cover; }

ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: 3.6rem; font-weight: 700; line-height: 1.1; color: #ffffff; }
h2 { font-size: 2.5rem; font-weight: 700; line-height: 1.3; color: #ffffff; }
h3 { font-size: 1.6rem; font-weight: 600; line-height: 1.4; color: #ffffff; }
h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.5; color: #ffffff; }
p, li { font-size: 1.1rem; line-height: 1.9; }

.label, .tag, .meta { font-size: 0.9rem; }

/* Article typography */
.article-body, .post-content { max-width: 720px; margin: 0 auto; }
.article-body p, article p { margin-bottom: 1.4em; line-height: 1.9; }
.article-body h2, article h2 { margin-top: 2.2em; margin-bottom: 0.8em; font-size: 2.5rem; }
.article-body h3, article h3 { margin-top: 1.8em; margin-bottom: 0.6em; font-size: 1.6rem; }
.article-body ul, .article-body ol, article ul, article ol { margin-bottom: 1.4em; padding-left: 1.8em; }
.article-body li, article li { margin-bottom: 0.5em; line-height: 1.85; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2em; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 2em; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3em; align-items: center; }

.section { padding: 6em 0; }
.section-sm { padding: 4em 0; }
.section-header { text-align: center; margin-bottom: 3em; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 1em auto 0; font-size: 1.1rem; }

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* ============================================================
   FUNDING BAR
   ============================================================ */
#funding-bar { color: #fff !important; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#site-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 2.5em !important;
  position: fixed !important;
  top: var(--funding-bar-h, 0px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-height: var(--nav-height) !important;
  z-index: 9999 !important;
  background-color: rgba(6,14,24,0.97) !important;
  border-bottom: 1px solid var(--border) !important;
  box-sizing: border-box !important;
  transition: top 0.3s ease;
  backdrop-filter: blur(10px);
}

#site-nav .nav-logo {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
}

#site-nav .nav-menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  gap: 0 !important;
}

#site-nav .nav-menu li a {
  display: flex !important;
  align-items: center !important;
  height: var(--nav-height) !important;
  padding: 0 1.2em !important;
  color: rgba(255,255,255,0.72) !important;
  font-size: 15px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

#site-nav .nav-menu li a:hover,
#site-nav .nav-menu li.active a { color: #ffffff !important; }

#site-nav .nav-menu li.nav-cta a {
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  padding: 0.5em 1.4em !important;
  height: auto !important;
  margin: auto 0;
  font-weight: 600;
}

#page-wrapper { padding-top: var(--nav-height); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 680px;
  display: flex;
  align-items: center;
  background: var(--bg);
  background-image: url('../images/hero-main.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 6em 2em 5em;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,0,0,0.55) 0%, transparent 70%);
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 5em;
  align-items: center;
}

.hero-left .hero-label {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.4em;
  display: block;
}

.hero-left h1 {
  color: #ffffff;
  margin-bottom: 1em;
}

.hero-left .hero-tagline {
  color: rgba(255,255,255,0.65);
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 500px;
}

.hero-right .hero-desc {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 2.5em;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: flex-start;
}

/* Hero image overlay */
#hero-banner {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
  background: url('../images/hero-main.jpg') center/cover no-repeat var(--bg);
}
#hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6,14,24,0.72);
  z-index: 0;
  pointer-events: none;
}
#hero-banner > * { position: relative; z-index: 2; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.85em 2.2em;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.82);
  padding: 0.85em 2.2em;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3em 2em;
}
.stats-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2em;
  text-align: center;
}
.stat-item .stat-num {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3em;
}
.stat-item .stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2em;
  transition: border-color 0.25s, transform 0.25s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.feature-card .fc-icon {
  width: 52px;
  height: 52px;
  background: rgba(14,165,233,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2em;
}
.feature-card .fc-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.6em; }
.feature-card p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin: 0; }

/* ============================================================
   SERVICES TWO-COLUMN BLOCKS
   ============================================================ */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5em;
  align-items: center;
  padding: 4em 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }
.service-block.reverse { direction: rtl; }
.service-block.reverse > * { direction: ltr; }

.service-text .service-label {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.8em;
  display: block;
}
.service-text h2 { font-size: 2rem; margin-bottom: 1em; }
.service-text p { color: var(--text-muted); margin-bottom: 1.4em; }
.service-text ul { padding-left: 0; }
.service-text ul li {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.4em 0;
  padding-left: 1.6em;
  position: relative;
}
.service-text ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.service-visual {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.service-visual img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
.service-visual .svg-placeholder {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
}

/* ============================================================
   PROCESS STEPS
   ============================================================ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2em;
  margin-top: 3em;
}
.process-step {
  text-align: center;
  padding: 2em 1.5em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.process-step .step-num {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 auto 1.2em;
}
.process-step h4 { font-size: 1.1rem; margin-bottom: 0.6em; }
.process-step p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin: 0; }

/* ============================================================
   CLOUD PROVIDER LOGOS
   ============================================================ */
.cloud-logos {
  display: flex;
  gap: 2em;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2em;
}
.cloud-logo-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8em 1.8em;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ============================================================
   TESTIMONIAL
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5em;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2em;
}
.testimonial-card .quote {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
  font-style: italic;
  margin-bottom: 1.5em;
}
.testimonial-card .cite {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.testimonial-card .cite strong { color: var(--text); display: block; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, rgba(14,165,233,0.12) 0%, rgba(6,14,24,0) 60%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6em 2em;
  text-align: center;
}
.cta-section h2 { margin-bottom: 1em; }
.cta-section p { color: var(--text-muted); max-width: 540px; margin: 0 auto 2.5em; }
.cta-buttons { display: flex; gap: 1.2em; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.page-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 4em 2em 4em;
  position: relative;
  background: url('../images/about-hero.jpg') center/cover no-repeat var(--bg);
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6,14,24,0.7);
  z-index: 0;
}
.page-hero > * { position: relative; z-index: 2; }
.page-hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.page-hero h1 { font-size: 3rem; }

/* story section */
.spotlight-section { padding: 6em 2em; }
.spotlight-inner {
  display: flex;
  gap: 4em;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.story-img {
  flex-shrink: 0;
  width: 45%;
  border-radius: var(--radius);
  overflow: hidden;
}
.story-img img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.story-text { flex: 1; }
.story-text h2 { margin-bottom: 1em; }
.story-text p { color: var(--text-muted); margin-bottom: 1.2em; }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2em;
  margin-top: 3em;
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2em;
}
.value-card h4 { margin-bottom: 0.5em; }
.value-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Investors section */
#investors {
  padding: 5em 2em;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ============================================================
   TEAM PAGE
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5em;
  max-width: 1100px;
  margin: 0 auto;
}
.team-card { text-align: center; }
.team-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  margin: 0 auto 1.2em;
  border: 3px solid var(--border);
}
.team-card h3 { font-size: 1.3rem; margin-bottom: 0.25em; }
.team-card .title {
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8em;
}
.team-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5em;
  max-width: 1100px;
  margin: 0 auto;
}
.contact-info h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.5em;
  margin-top: 2em;
}
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { color: var(--text-muted); font-size: 1rem; line-height: 1.8; }
.contact-message h3 { font-size: 1.4rem; margin-bottom: 0.8em; color: #fff; }
.contact-message p { color: var(--text-muted); margin-bottom: 1.8em; }
.contact-map-placeholder {
  width: 100%;
  height: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2em;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   BLOG INDEX
   ============================================================ */
.blog-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 5em 2em 4em;
  text-align: center;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5em;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4em 2em;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.blog-card-img { width: 100%; height: 200px; object-fit: cover; background: var(--surface2); }
.blog-card-body { padding: 1.8em; }
.blog-card-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.6em; }
.blog-card-body h3 { font-size: 1.15rem; margin-bottom: 0.6em; line-height: 1.4; }
.blog-card-body p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1em; }
.blog-card-body a.read-more { font-size: 0.9rem; color: var(--accent); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  width: 100%;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
#footer .inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3em 4em;
  gap: 3em;
}
#footer h3 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 1em;
}
#footer h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 1em;
}
#footer p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5em;
}
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 0.6em; }
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }
.footer-copy {
  background: rgba(0,0,0,0.3);
  text-align: center;
  padding: 1.2em;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10003;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.2em 2em;
}
.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2em;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; }
.cookie-text strong { font-size: 1rem; color: var(--text); }
.cookie-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.4em 0 0;
  line-height: 1.6;
}
.cookie-text a { color: var(--accent); }
.cookie-buttons { display: flex; gap: 0.8em; flex-shrink: 0; }
#cookie-decline {
  padding: 0.6em 1.4em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
}
#cookie-accept {
  padding: 0.6em 1.4em;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ============================================================
   MOBILE HAMBURGER (simple)
   ============================================================ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5em;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  #site-nav .nav-menu { display: none !important; }
  .nav-toggle { display: block; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.3rem; }
  body { font-size: 16px; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5em; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .spotlight-inner { flex-direction: column; }
  .story-img { width: 100%; }
  .service-block { grid-template-columns: 1fr; gap: 2.5em; }
  .service-block.reverse { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; gap: 3em; }
  #footer .inner { grid-template-columns: 1fr; padding: 2em; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-ctas { flex-direction: column; }
}

/* article-card alias -- blog/index.html uses .article-card/.article-grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5em;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4em 2em;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.article-card--pinned { border: 1px solid var(--accent); }
.blog-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 4em 2em 4em;
  position: relative;
  background: url('../images/about-hero.jpg') center/cover no-repeat var(--bg);
}
