/* CloudWise — site-level styles
   Tokens are in tokens.css. This file = layout + shared component styles. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--fg-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* Focus ring */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Page transition */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageIn 400ms var(--ease-out); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Eyebrow */
.eyebrow {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--cw-sky-600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--cw-sky-500);
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur-base) var(--ease-standard);
  white-space: nowrap;
}
.btn-primary {
  background: var(--cw-sky-500);
  color: #fff;
  padding: 15px 28px;
  box-shadow: 0 0 0 0 rgba(31, 182, 255, 0);
}
.btn-primary:hover {
  background: var(--cw-sky-400);
  box-shadow: 0 0 0 8px rgba(31, 182, 255, 0.18);
  transform: translateY(-1px);
}
.btn-primary.lg { padding: 18px 34px; font-size: 17px; }
.btn-primary.sm { padding: 11px 20px; font-size: 14px; }

.btn-outline {
  background: transparent;
  color: var(--cw-navy-700);
  padding: 14px 27px;
  border: 1.5px solid var(--cw-navy-700);
}
.btn-outline:hover {
  background: var(--cw-navy-700);
  color: #fff;
}
.btn-outline.lg { padding: 17px 33px; font-size: 17px; }

.btn-ghost {
  background: transparent;
  color: var(--cw-sky-600);
  padding: 10px 0;
  font-weight: 600;
}
.btn-ghost:hover { color: var(--cw-sky-700); gap: 12px; }

.btn-light {
  background: #fff;
  color: var(--cw-navy-700);
  padding: 14px 26px;
}
.btn-light:hover { background: var(--cw-sky-50); }

/* Section spacing */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-sm { padding: clamp(48px, 6vw, 80px) 0; }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-base) var(--ease-standard);
}
.card:hover {
  border-color: var(--cw-sky-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Grid helpers */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Mobile nav */
.mobile-only { display: none; }
@media (max-width: 860px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex; }
}

/* Stack inline form field rows on small screens */
@media (max-width: 500px) {
  .field-row { grid-template-columns: 1fr !important; }
}

/* Sticky quote bar */
.quote-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  background: var(--cw-navy-700);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 14px 22px 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--dur-base) var(--ease-standard);
  transform: translateY(120%);
  opacity: 0;
}
.quote-bar.show { transform: translateY(0); opacity: 1; }
.quote-bar:hover {
  background: var(--cw-navy-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}
.quote-bar .pulse {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cw-sky-500);
  display: grid;
  place-items: center;
  position: relative;
}
.quote-bar .pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--cw-sky-500);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* Hero motion */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 15px); }
}

/* Marquee */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Service mega card hover */
.service-mega {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-standard);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.service-mega::after {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(31,182,255,0.18), transparent 70%);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}
.service-mega:hover {
  border-color: var(--cw-sky-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.service-mega:hover::after { opacity: 1; }
.service-mega .reveal-list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.service-mega:hover .reveal-list {
  max-height: 200px;
  opacity: 1;
}

/* Spinner / dots */
.dots { display: flex; gap: 6px; }
.dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cw-sky-500);
  animation: blink 1.4s infinite both;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

/* Form */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: 0.01em;
}
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--fg-1);
  transition: border-color 150ms;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--cw-sky-500);
  outline: none;
  box-shadow: 0 0 0 4px rgba(31,182,255,0.12);
}
.field textarea { resize: vertical; min-height: 110px; }

/* Tag chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cw-sky-700);
  background: var(--cw-sky-50);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Stat */
.stat-num {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cw-navy-700);
  line-height: 1;
}
.stat-label {
  font-size: 14px;
  color: var(--fg-3);
  margin-top: 8px;
}

/* Breadcrumb hero */
.bc-hero {
  position: relative;
  background: linear-gradient(135deg, var(--cw-navy-800) 0%, var(--cw-navy-700) 100%);
  color: #fff;
  padding: clamp(80px, 10vw, 140px) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
}
.bc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(31,182,255,0.25), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 70%, rgba(31,182,255,0.12), transparent 60%);
  pointer-events: none;
}
.bc-hero > .container { position: relative; z-index: 1; }
.bc-hero h1 { color: #fff; }
.bc-hero .crumb {
  font-size: 13px;
  color: var(--cw-sky-200);
  margin-bottom: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.bc-hero .crumb a { color: var(--cw-sky-200); text-decoration: none; }
.bc-hero .crumb a:hover { color: #fff; }

/* Decorative grid pattern */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}