/* ============================================================
   DATOM Design System — global.css
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }

/* ── Variables ── */
:root {
  --text:         #0b0f14;
  --muted:        rgba(11, 15, 20, 0.62);
  --accent:       #06b6d4;
  --accent-hover: #0891b2;
  --accent-glow:  rgba(6, 182, 212, 0.35);
  --border:       rgba(15, 23, 42, 0.10);
  --card-bg:      rgba(255, 255, 255, 0.55);
  --card-hover:   rgba(255, 255, 255, 0.75);
  --radius:       16px;
  --radius-lg:    24px;
  --maxw:         1060px;
  --shadow:       0 8px 32px rgba(2, 6, 23, 0.07);
  --shadow-hover: 0 16px 48px rgba(2, 6, 23, 0.10);
  --mono:         ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans:         system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Body ── */
body {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(170deg,
      #eaf3ff  0%,
      #d0e8ff 25%,
      #add3fe 55%,
      #d0e8ff 80%,
      #eaf3ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  cursor: url('./Assets/cursor-cloud.png') 16 16, auto;
}
a, button, [role="button"], summary { cursor: url('./Assets/cursor-cloud-hover.png') 16 16, pointer; }

/* ── Click Ripple Animation ── */
.click-ripple {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  border-radius: 50%;
  border: 2px solid rgba(6, 182, 212, 0.6);
  animation: clickRippleOut 0.5s ease-out forwards;
}
.click-ripple::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(6, 182, 212, 0.3);
  animation: clickRippleOut 0.5s 0.06s ease-out forwards;
}
@keyframes clickRippleOut {
  0%   { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Typography ── */
h1, h2, h3, h4 { margin-top: 0; color: var(--text); font-weight: 700; letter-spacing: -0.03em; }

h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 20px;
}
h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  margin-bottom: 16px;
  line-height: 1.2;
}
h3 {
  font-size: 19px;
  margin-bottom: 10px;
}
p, li {
  font-size: 16px;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.65;
}
strong { color: var(--text); }
a { color: var(--accent); }

.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.55;
}

.text-gradient {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ── Header (Frosted Glass) ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(219, 234, 254, 0.88) 0%, rgba(191, 219, 254, 0.65) 70%, transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  padding-bottom: 28px;
  transition: box-shadow 0.3s;
}
header.scrolled {
  box-shadow: none;
}
.header-logo {
  height: 56px;
  width: auto;
}

/* ── Navigation ── */
nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: color 0.2s;
}
nav a:hover {
  color: var(--text);
}
nav a:not(.btn-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  border-radius: 1px;
}
nav a:not(.btn-cta):hover::after {
  width: 100%;
}

.btn-login {
  color: #fff;
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: all 0.25s;
  background: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-login:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
  color: #fff;
}
nav a.btn-login::after { display: none; }

.btn-cta {
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ── Main container ── */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 40px 120px;
}

/* ── Section spacing ── */
section { margin-bottom: 96px; }
section:last-child { margin-bottom: 0; }

/* ── Cards (Glassmorphic + Mouse Glow) ── */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.35s;
}
/* Mouse-tracking radial glow */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, -100%),
    rgba(6, 182, 212, 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 0;
}
.card > * { position: relative; z-index: 1; }

.card:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card:hover::before { opacity: 1; }

/* Card variants */
.card-accent {
  border-top: 3px solid var(--accent);
}
.card-flat {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.card-flat:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-secondary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Pills / Tags ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.18);
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Tables ── */
.table-glass {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.table-glass th {
  background: rgba(255, 255, 255, 0.5);
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}
.table-glass td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--muted);
}
.table-glass tr:last-child td { border-bottom: none; }
.table-glass tr:hover td { background: rgba(255, 255, 255, 0.3); }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0, 1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ── Scroll Hint ── */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(186, 214, 255, 0.35);
  animation: scrollBounce 2.4s ease-in-out infinite;
  white-space: nowrap;
  pointer-events: none;
}
.scroll-hint svg { width: 16px; height: 16px; }
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.35; }
  50%       { transform: translateX(-50%) translateY(7px); opacity: 0.65; }
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 48px 24px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive — Tablet ── */
@media (max-width: 1024px) {
  main { padding: 50px 28px 100px; }
  .hero-actions { flex-wrap: wrap; justify-content: center; }
}

/* ── Responsive — Mobile ── */
@media (max-width: 800px) {
  header { padding: 14px 20px; padding-bottom: 22px; }
  .header-logo { height: 42px; }
  main { padding: 32px 16px 80px; }
  section { margin-bottom: 56px; }

  h1 { font-size: 28px; letter-spacing: -0.02em; }
  h2 { font-size: 20px; }
  h3 { font-size: 17px; }
  .lede { font-size: 16px; }
  p, li { font-size: 15px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 20px; }

  .hero-actions { flex-direction: column; align-items: center; gap: 12px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; max-width: 300px; text-align: center; }

  .trust-bar { flex-direction: column; gap: 8px; align-items: center; }

  .diagram-flow { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .diagram-node { font-size: 13px; padding: 8px 14px; }
  .diagram-arrow { font-size: 16px; }

  .menu-toggle { display: block; }
  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.40);
    z-index: 1001;
  }
  nav.open { display: flex; }
  nav a { font-size: 15px; }
  nav .btn-cta, nav .btn-login { width: 100%; text-align: center; justify-content: center; }

  .table-glass { font-size: 13px; }
  .table-glass th, .table-glass td { padding: 10px 12px; }
  .table-glass { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  footer { padding: 24px 16px; font-size: 13px; }
}

/* ── Responsive — Small phones ── */
@media (max-width: 400px) {
  header { padding: 10px 12px; padding-bottom: 18px; }
  .header-logo { height: 30px; }
  main { padding: 24px 12px 60px; }
  h1 { font-size: 24px; }
  .card { padding: 16px; }
}
