/* ============================================================
   CloudLog — landing page styles
   Design language: deep purple gradient hero with subtle diagonal
   pattern, lavender sections, Open Sans, uppercase CTAs.
   Palette: #5a2d82 / #6b3fa0 purple, #f7f4fa lavender, #4a3b60 ink
   ============================================================ */

:root {
  --purple: #5a2d82;
  --purple-mid: #6b3fa0;
  --purple-deep: #40215f;
  --purple-darker: #33194d;
  --purple-soft: #efe9f6;
  --lav: #f7f4fa;
  --line: #e5e0ef;
  --ink: #4a3b60;
  --body: #5b5b6b;
  --muted: #71717f;
  --white: #fff;
  --error: #d64545;
  --warn: #b97d12;
  --ok: #2c8a5b;
  --shadow-sm: 0 1px 3px rgba(64, 33, 95, 0.08);
  --shadow-md: 0 6px 24px rgba(64, 33, 95, 0.12);
  --shadow-lg: 0 18px 60px rgba(38, 16, 61, 0.35);
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input { font: inherit; }
ul { list-style: none; }
.mono { font-family: var(--mono); }

.container { width: min(1160px, 92vw); margin: 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 4px;
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-white {
  background: var(--white);
  color: var(--purple);
  box-shadow: 0 2px 8px rgba(38, 16, 61, 0.25);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(38, 16, 61, 0.35); }
.btn-purple {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(90, 45, 130, 0.3);
}
.btn-purple:hover { background: var(--purple-mid); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }
.btn-sm { padding: 9px 18px; font-size: 0.74rem; }
.btn-lg { padding: 15px 32px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(90, 45, 130, 0.95), rgba(64, 33, 95, 0.98));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.nav-inner {
  display: flex; align-items: center; gap: 36px;
  height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  color: var(--white); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.14em;
}
.nav-links { display: flex; gap: 26px; margin-right: auto; }
.nav-links a {
  color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; font-weight: 600;
  transition: color 0.12s ease;
}
.nav-links a:hover { color: var(--white); }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.link-login {
  color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; font-weight: 600;
}
.link-login:hover { color: var(--white); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; margin-left: auto;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--white);
  border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 46px, rgba(255, 255, 255, 0.025) 46px 48px),
    linear-gradient(160deg, #5a2d82 0%, #4b2570 45%, #40215f 100%);
  color: var(--white);
  padding: 64px 0 84px;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 48px; align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.18;
}
.hero-sub {
  margin-top: 16px; font-size: 1.05rem; line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.signup-form { margin-top: 30px; }
.signup-field {
  display: flex; max-width: 480px;
  border-radius: 4px; overflow: hidden;
}
.signup-field input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  padding: 13px 16px; font-size: 0.95rem; color: var(--ink);
  background: var(--white);
}
.signup-field input::placeholder { color: #9a94ab; }
.signup-field .btn { border-radius: 0; box-shadow: none; flex: none; }
.form-error { color: #ffd9d9; font-size: 0.85rem; margin-top: 8px; }
.form-fineprint {
  margin-top: 12px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.6);
}
.form-fineprint a { text-decoration: underline; }
.form-fineprint a:hover { color: var(--white); }

/* Hero product mock — light UI like a real screenshot */
.hero-product { min-width: 0; }
.window {
  background: #fdfdfc;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.window-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: #efeef4; border-bottom: 1px solid #e2e0ea;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.window-title { margin-left: 10px; font-size: 0.74rem; color: #8a87a0; font-weight: 600; }

.explorer-search {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid #e9e7f0; background: #fff;
}
.explorer-search svg { width: 15px; height: 15px; flex: none; }
.explorer-search .mono { flex: 1; font-size: 0.78rem; color: var(--ink); }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.66rem; font-weight: 700; color: #1e7d4b;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: 1px solid #bfe6d0; background: #eefaf3;
  padding: 3px 9px; border-radius: 999px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #2c9c62;
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.explorer-grid { display: grid; grid-template-columns: 172px 1fr; }
.facets {
  border-right: 1px solid #e9e7f0; padding: 12px;
  background: #faf9fd;
}
.facet-group { margin-bottom: 16px; }
.facet-group h4 {
  font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: #8a87a0; margin-bottom: 7px; font-weight: 700;
}
.facet-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 3px 4px; font-size: 0.74rem;
}
.facet-count { color: #a49fb5; font-size: 0.68rem; }
.tag {
  color: var(--purple); background: var(--purple-soft);
  border-radius: 3px; padding: 1px 6px; font-size: 0.68rem; font-weight: 600;
}

.lvl { font-size: 0.64rem; font-weight: 700; border-radius: 3px; padding: 1px 6px; }
.lvl-error { color: #c0392b; background: #fdecea; }
.lvl-warn  { color: #9a6b0a; background: #fdf3dd; }
.lvl-info  { color: #2a6ea8; background: #e8f1fa; }
.lvl-debug { color: #6f6c85; background: #efedf5; }

.log-rows { padding: 10px 12px; font-size: 0.7rem; background: #fff; }
.log-row {
  display: grid;
  grid-template-columns: 86px 56px 1fr;
  gap: 10px; padding: 6px 4px;
  border-bottom: 1px solid #f2f0f7;
  white-space: nowrap;
}
.log-row:last-child { border-bottom: none; }
.log-row:hover { background: #faf8ff; }
.ts { color: #a49fb5; }
.msg { color: #4d4960; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Section scaffolding ---------- */
section { padding: 72px 0; }
.section-title {
  font-size: clamp(1.45rem, 2.8vw, 1.95rem); font-weight: 700;
  text-align: center; color: var(--ink);
  margin-bottom: 46px; letter-spacing: -0.01em;
}
.section-kicker {
  font-size: 0.86rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; text-align: center; color: var(--ink);
  margin-bottom: 38px;
}
.section-title-sm {
  font-size: 1.1rem; font-weight: 700; text-align: center;
  margin-bottom: 36px; color: var(--ink);
}
.center-note { text-align: center; margin-top: 26px; color: var(--muted); font-size: 0.9rem; }

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

/* ---------- Value props ---------- */
.value-props { background: var(--lav); padding: 64px 0; }
.vp-grid { max-width: 900px; margin: 0 auto; gap: 28px 48px; }
.vp-item { display: flex; gap: 18px; align-items: flex-start; }
.vp-icon {
  width: 44px; height: 44px; flex: none;
  color: var(--purple-mid);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  box-shadow: var(--shadow-sm);
}
.vp-item h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.vp-item p { font-size: 0.9rem; }

/* ---------- Features ---------- */
.features { background: var(--white); }
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
  padding: 40px 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--line); }
.feature-row.reverse .feature-mock { order: 2; }
.feature-text h3 {
  font-size: 1.3rem; font-weight: 700; color: var(--ink);
  margin-bottom: 16px;
}
.bullets li {
  position: relative; padding-left: 22px;
  margin-bottom: 10px; font-size: 0.95rem;
}
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple-mid);
}
.bullets strong { color: var(--ink); font-weight: 700; }

/* Mock UI cards inside feature rows */
.mock-card {
  background: #fdfdfc;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.mock-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; background: #efeef4;
  border-bottom: 1px solid #e2e0ea;
}
.mock-label { margin-left: 8px; font-size: 0.7rem; color: #8a87a0; font-weight: 600; }

.histogram {
  display: flex; align-items: flex-end; gap: 5px;
  height: 150px; padding: 20px 18px 8px;
}
.histogram span {
  flex: 1; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #8a5bc0, var(--purple-mid));
  min-height: 6%;
}
.histogram.short { height: 90px; }
.mock-axis {
  display: flex; justify-content: space-between;
  padding: 4px 18px 12px; font-size: 0.64rem; color: #a49fb5;
}

.tier-rows { padding: 18px; display: grid; gap: 16px; }
.tier-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; }
.tier-name { font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.tier-bar {
  height: 12px; background: #efedf5; border-radius: 999px; overflow: hidden;
}
.tier-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-mid), var(--purple));
}
.tier-fill.flex { background: linear-gradient(90deg, #9a7cc4, #7a55ae); }
.tier-fill.arch { background: linear-gradient(90deg, #c3b3d9, #a08ccb); }
.tier-meta { grid-column: 2; font-size: 0.72rem; color: var(--muted); margin-top: -6px; }

.mini-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 18px 4px; }
.mini-widget {
  background: var(--lav); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px 14px; position: relative; overflow: hidden;
}
.mini-val { display: block; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.mini-lbl { display: block; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.spark {
  position: absolute; right: 10px; bottom: 8px;
  width: 34px; height: 8px;
  background: linear-gradient(90deg, transparent 0 0, transparent);
  border-radius: 4px;
}
.spark::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: var(--p, 50%); height: 100%;
  background: linear-gradient(90deg, #b79ad8, var(--purple-mid));
  border-radius: 4px;
}

.usage-list { padding: 18px; display: grid; gap: 14px; }
.usage-row { display: grid; grid-template-columns: 150px 1fr 56px; gap: 10px; align-items: center; }
.usage-src { font-size: 0.76rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-gb { font-size: 0.72rem; color: var(--muted); text-align: right; font-weight: 600; }

.extra-features { margin-top: 48px; }
.extra-card {
  background: var(--lav);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 24px;
}
.extra-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.extra-card p { font-size: 0.9rem; }

/* ---------- Integrations ---------- */
.integrations { background: var(--lav); padding: 64px 0; }
.logo-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 920px; margin: 0 auto;
}
.logo-chip {
  padding: 10px 22px; border-radius: 6px;
  background: var(--white); border: 1px solid var(--line);
  font-weight: 700; font-size: 0.88rem; color: #6f6c85;
  box-shadow: var(--shadow-sm);
}
.logo-chip:hover { color: var(--ink); border-color: #cfc6e0; }

/* ---------- Final CTA ---------- */
.final-cta {
  background:
    repeating-linear-gradient(135deg,
      transparent 0 46px, rgba(255, 255, 255, 0.025) 46px 48px),
    linear-gradient(160deg, #5a2d82 0%, #45236a 55%, #3a1d56 100%);
  color: var(--white); text-align: center; padding: 84px 0;
}
.final-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700; letter-spacing: -0.01em;
}
.final-cta > .container > p { margin-top: 12px; color: rgba(255, 255, 255, 0.82); font-size: 1.02rem; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.cta-note { margin-top: 22px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- Footer ---------- */
.footer { background: var(--purple-darker); color: #b7a9cc; padding: 52px 0 30px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; align-items: start;
}
.footer-brand .brand-name {
  color: var(--white); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.14em;
}
.footer-brand p { font-size: 0.85rem; margin-top: 10px; color: #9c8bb8; }
.footer-col h4 {
  color: var(--white); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.footer-col a {
  display: block; font-size: 0.87rem; padding: 4px 0; color: #b7a9cc;
}
.footer-col a:hover { color: var(--white); }
.footer-legal {
  display: flex; justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 36px; padding-top: 22px;
  font-size: 0.8rem; color: #9c8bb8;
}

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(38, 16, 61, 0.55);
  backdrop-filter: blur(3px);
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative; width: min(460px, 100%);
  background: var(--white); border-radius: 10px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  font-size: 1.5rem; color: var(--muted);
  line-height: 1; padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { background: var(--lav); color: var(--ink); }
.modal h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.modal-sub { font-size: 0.9rem; margin-bottom: 18px; }
.steps li {
  position: relative; padding-left: 24px;
  font-size: 0.9rem; margin-bottom: 10px;
}
.steps li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--ok); font-weight: 700;
}
.steps { margin-bottom: 20px; }
.modal-form .form-row { margin-bottom: 12px; }
.modal-form input[type="email"],
.modal-form input[type="text"] {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 4px;
  outline: none; font-size: 0.95rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.modal-form input:focus {
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.12);
}
.modal-form .btn { margin-top: 8px; }
.modal-success { margin-top: 16px; font-size: 0.92rem; color: var(--ok); font-weight: 600; }
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.82rem; color: var(--muted); margin: 4px 0 10px;
}
.consent input { margin-top: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-product { max-width: 640px; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.reverse .feature-mock { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .nav-actions .link-login {
    display: none;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--purple-deep); flex-direction: column;
    padding: 18px 5vw 22px; gap: 14px;
    box-shadow: 0 12px 24px rgba(38, 16, 61, 0.35);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-actions { margin-left: auto; }
  .signup-field { flex-direction: column; }
  .signup-field .btn { width: 100%; padding: 13px; }
  .grid-2 { grid-template-columns: 1fr; }
  .explorer-grid { grid-template-columns: 1fr; }
  .facets { display: none; }
  .usage-row { grid-template-columns: 1fr 64px; }
  .usage-row .tier-bar { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-legal { flex-direction: column; gap: 6px; }
}
