/* =========================================================
   CloudBridge Consulting: main stylesheet
   ========================================================= */

:root {
  --navy-900: #071326;
  --navy-800: #0b1b33;
  --navy-700: #13294b;
  --blue-600: #1f6feb;
  --blue-500: #2f80ff;
  --teal-400: #22c7c7;
  --ink: #0f1b2d;
  --body: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --white: #ffffff;

  --grad: linear-gradient(120deg, var(--blue-500), var(--teal-400));
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06), 0 2px 8px rgba(15, 27, 45, .04);
  --shadow: 0 10px 30px rgba(15, 27, 45, .08);
  --shadow-lg: 0 24px 60px rgba(7, 19, 38, .25);
  --container: 1180px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
address { font-style: normal; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 2px; border-radius: 6px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: .9rem;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(31, 111, 235, .35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(31, 111, 235, .45); }
.btn-ghost { color: var(--white); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-light { background: #fff; color: var(--navy-800); }
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  background: rgba(7, 19, 38, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; font-weight: 500; opacity: .75; margin-left: .3rem; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a:not(.btn) { color: rgba(255,255,255,.82); font-weight: 500; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: #fff; text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy-900);
  color: rgba(255,255,255,.78);
  padding: calc(var(--header-h) + 80px) 0 110px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 85% 10%, rgba(34,199,199,.22), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(47,128,255,.25), transparent 60%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--teal-400); }
.lead { font-size: 1.18rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 2rem 0 2.2rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: .92rem; }
.hero-points li { position: relative; padding-left: 22px; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad);
}

.hero-visual { position: relative; }
.bridge-card {
  background: rgba(19, 41, 75, .7);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.bc-head { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bc-head .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); }
.bc-head p { margin: 0 0 0 10px; font-size: .82rem; font-family: ui-monospace, "SF Mono", Consolas, monospace; color: rgba(255,255,255,.55); }
.bc-body { padding: 22px; display: grid; gap: 14px; }
.bc-row { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: rgba(255,255,255,.88); }
.bc-row b { margin-left: auto; font-weight: 500; font-size: .8rem; color: rgba(255,255,255,.5); }
.tag { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; flex: none; }
.tag-ok { background: rgba(34,199,199,.18); color: var(--teal-400); }
.tag-run { background: rgba(47,128,255,.2); color: var(--blue-500); animation: pulse 1.6s infinite; }
.tag-wait { background: rgba(255,255,255,.07); color: rgba(255,255,255,.4); }
.bc-bar { height: 6px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: -2px 0 2px 38px; }
.bc-bar span { display: block; height: 100%; background: var(--grad); border-radius: inherit; animation: load 2.4s ease-out both; }

.float-chip {
  position: absolute; background: #fff; color: var(--ink);
  font-size: .85rem; font-weight: 600; padding: .6rem 1rem; border-radius: 12px;
  box-shadow: var(--shadow-lg); white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip-1 { top: -18px; right: -10px; }
.chip-2 { bottom: -20px; left: -24px; animation-delay: -3s; }

@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes load { from { width: 0; } }

/* ---------- Platforms strip ---------- */
.strip { border-bottom: 1px solid var(--line); background: #fff; }
.strip-inner { display: flex; align-items: center; gap: 32px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; justify-content: center; }
.strip p { margin: 0; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 30px; justify-content: center; }
.strip li { font-weight: 700; color: #94a3b8; font-size: 1.02rem; letter-spacing: -0.01em; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(47,128,255,.12), rgba(34,199,199,.14));
}
.icon svg, .ci-icon svg {
  width: 26px; height: 26px; fill: none; stroke: var(--blue-600); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }
.step-num {
  display: inline-block; font-weight: 800; font-size: 2.2rem; line-height: 1; margin-bottom: 18px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 48px; right: -24px; width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--blue-500), transparent);
}

/* Why */
.why-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.why-list li { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); position: relative; }
.why-list li::before {
  content: ""; display: block; width: 34px; height: 4px; border-radius: 4px; background: var(--grad); margin-bottom: 16px;
}
.why-list p { margin: 0; color: var(--muted); font-size: .96rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 64px; align-items: center; }
.about-card {
  background: var(--navy-800); color: rgba(255,255,255,.8);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.about-card::before {
  content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,199,199,.35), transparent 70%);
}
.about-card h3 { color: #fff; margin-bottom: 1.2rem; position: relative; }
.about-card dl { margin: 0; display: grid; gap: 14px; position: relative; }
.about-card dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.about-card dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.about-card dt { font-size: .85rem; color: rgba(255,255,255,.5); }
.about-card dd { margin: 0; color: #fff; font-weight: 500; font-size: .96rem; }

/* CTA band */
.cta-band { background: var(--grad); color: rgba(255,255,255,.9); padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; font-size: 1.08rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list strong { display: block; color: var(--ink); font-size: .95rem; }
.contact-list a, .contact-list span, .contact-list address { font-size: .96rem; color: var(--muted); }
.ci-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--bg-alt); }
.ci-icon svg { width: 22px; height: 22px; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
  padding: .75rem .95rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 4px rgba(47,128,255,.15);
}
.field.invalid input, .field.invalid textarea { border-color: #e5484d; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 14px 0 0; font-size: .94rem; min-height: 1.4em; }
.form-status.ok { color: #0f9f6e; }
.form-status.err { color: #e5484d; }

/* Footer */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.6); padding: 72px 0 0; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-tag { margin-top: 14px; max-width: 280px; }
.site-footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; padding-bottom: 28px; font-size: .86rem;
}
.footer-bottom p { margin: 0; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Simple content pages (privacy, 404) */
.page-hero { background: var(--navy-900); color: rgba(255,255,255,.75); padding: calc(var(--header-h) + 60px) 0 60px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .why-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-900); padding: 12px 24px 24px;
    border-top: 1px solid rgba(255,255,255,.08);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .site-nav .btn { margin-top: 16px; }
  .site-header.menu-open { background: var(--navy-900); }

  .hero { padding: calc(var(--header-h) + 48px) 0 90px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .chip-1 { right: 8px; }
  .chip-2 { left: 8px; }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .cards, .steps, .why-list, .field-row { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
  .contact-form { padding: 26px 20px; }
  .about-card { padding: 28px 22px; }
  .about-card dl div { grid-template-columns: 1fr; gap: 2px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .cta-inner .btn { width: 100%; }
}
