/* Kips Template marketing homepage styles.
   Scope: homepage only. Does not style or import studio/editor internals. */
:root {
  color-scheme: light dark;
  --home-bg: #f7f8ff;
  --home-surface: rgba(255, 255, 255, 0.82);
  --home-surface-strong: #ffffff;
  --home-text: #131622;
  --home-muted: #5d6475;
  --home-line: rgba(92, 103, 138, 0.18);
  --home-brand: #6e5bff;
  --home-brand-2: #00c2ff;
  --home-brand-3: #b14bff;
  --home-shadow: 0 24px 70px rgba(31, 35, 68, 0.14);
  --home-radius-lg: 28px;
  --home-radius-md: 20px;
  --home-radius-sm: 14px;
  --home-container: min(1160px, calc(100vw - 32px));
  --home-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --home-bg: #070914;
    --home-surface: rgba(16, 19, 34, 0.78);
    --home-surface-strong: #101322;
    --home-text: #f3f6ff;
    --home-muted: #aab2ca;
    --home-line: rgba(190, 203, 255, 0.14);
    --home-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  }
}

html[data-marketing-theme="light"] {
  --home-bg: #f7f8ff;
  --home-surface: rgba(255, 255, 255, 0.82);
  --home-surface-strong: #ffffff;
  --home-text: #131622;
  --home-muted: #5d6475;
  --home-line: rgba(92, 103, 138, 0.18);
  --home-shadow: 0 24px 70px rgba(31, 35, 68, 0.14);
}

html[data-marketing-theme="dark"] {
  --home-bg: #070914;
  --home-surface: rgba(16, 19, 34, 0.78);
  --home-surface-strong: #101322;
  --home-text: #f3f6ff;
  --home-muted: #aab2ca;
  --home-line: rgba(190, 203, 255, 0.14);
  --home-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--home-font);
  color: var(--home-text);
  background:
    radial-gradient(circle at top left, rgba(110, 91, 255, 0.22), transparent 34vw),
    radial-gradient(circle at 88% 12%, rgba(0, 194, 255, 0.18), transparent 28vw),
    radial-gradient(circle at 50% 86%, rgba(177, 75, 255, 0.14), transparent 34vw),
    var(--home-bg);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.kips-skiplink {
  position: fixed;
  left: 16px;
  top: 12px;
  transform: translateY(-150%);
  z-index: 50;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--home-surface-strong);
  box-shadow: var(--home-shadow);
}
.kips-skiplink:focus { transform: translateY(0); }
.home-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-shell { overflow: hidden; }
.home-container { width: var(--home-container); margin-inline: auto; }

.home-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px);
  background: color-mix(in srgb, var(--home-bg) 78%, transparent);
  border-bottom: 1px solid var(--home-line);
}

.home-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.home-brand img { width: 38px; height: 38px; }
.home-brand span { font-size: clamp(1.02rem, 2vw, 1.2rem); }

.home-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  color: var(--home-muted);
  font-size: 0.95rem;
  font-weight: 700;
}
.home-links a:hover { color: var(--home-text); }

.home-actions { display: flex; align-items: center; gap: 10px; }
.home-menu-button {
  display: none;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--home-text);
  background: var(--home-surface);
  font-weight: 800;
}

.home-button,
.home-language select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: var(--home-surface);
  color: var(--home-text);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(31, 35, 68, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}
.home-button:hover,
.home-language select:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--home-brand) 48%, var(--home-line)); }
.home-button.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--home-brand), var(--home-brand-3));
  box-shadow: 0 16px 36px rgba(110, 91, 255, 0.28);
}
.home-button.ghost { background: transparent; }
.home-language { position: relative; display: inline-flex; }
.home-language select {
  width: 74px;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  text-align-last: center;
}

.home-hero {
  padding: clamp(48px, 8vw, 104px) 0 clamp(34px, 6vw, 74px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}
.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  color: var(--home-muted);
  background: var(--home-surface);
  font-size: 0.88rem;
  font-weight: 800;
}
.home-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--home-brand-2), var(--home-brand));
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.55rem, 8vw, 5.85rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}
.home-gradient {
  background: linear-gradient(135deg, var(--home-brand), var(--home-brand-2) 48%, var(--home-brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-lede {
  max-width: 68ch;
  margin: 22px 0 0;
  color: var(--home-muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.75;
}
.home-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
  max-width: 660px;
}
.home-trust span {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius-sm);
  color: var(--home-muted);
  background: var(--home-surface);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
}

.home-preview {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(320px, 40vw, 540px);
}
.home-preview-card {
  position: relative;
  width: 100%;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--home-surface-strong) 86%, transparent), var(--home-surface));
  box-shadow: var(--home-shadow);
}
.home-preview-card--video {
  padding: clamp(10px, 1.8vw, 16px);
  overflow: hidden;
}
.home-window-bar { display: flex; gap: 8px; margin-bottom: 18px; }
.home-window-bar i { width: 10px; height: 10px; border-radius: 99px; background: var(--home-line); }
.home-hero-video-shell {
  position: relative;
  aspect-ratio: 73 / 45;
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: clamp(18px, 2.4vw, 24px);
  background:
    radial-gradient(circle at 16% 12%, rgba(110, 91, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(0, 194, 255, 0.12), transparent 30%),
    var(--home-surface-strong);
}
.home-hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.home-template-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.home-mini-template {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 1px solid var(--home-line);
  background:
    linear-gradient(135deg, rgba(110,91,255,.18), transparent),
    linear-gradient(160deg, var(--home-surface-strong), var(--home-surface));
  padding: 12px;
  overflow: hidden;
}
.home-mini-template:nth-child(2) { aspect-ratio: 1 / 1; }
.home-mini-template:nth-child(3) { aspect-ratio: 16 / 10; grid-column: span 2; }
.home-mini-template b,
.home-mini-template span {
  display: block;
  height: 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--home-brand) 38%, var(--home-line));
  margin-bottom: 10px;
}
.home-mini-template span { width: 58%; background: var(--home-line); }
.home-floating-badge {
  position: absolute;
  right: clamp(10px, 3vw, 28px);
  bottom: clamp(10px, 3vw, 28px);
  max-width: min(280px, 76vw);
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #101322, #262c54);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  font-weight: 850;
}

.home-section { padding: clamp(42px, 7vw, 88px) 0; }
.home-section-heading { max-width: 760px; margin-bottom: 28px; }
.home-eyebrow { color: var(--home-brand); font-weight: 950; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.home-section h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.055em;
}
.home-section p { color: var(--home-muted); line-height: 1.7; }

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 14px;
}
.home-card {
  min-height: 188px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--home-line);
  border-radius: var(--home-radius-md);
  background: var(--home-surface);
  box-shadow: 0 10px 26px rgba(31,35,68,.06);
}
.home-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--home-brand) 16%, transparent);
  color: var(--home-brand);
  font-weight: 950;
}
.home-card h3 { margin: 18px 0 8px; font-size: 1.12rem; letter-spacing: -0.025em; }
.home-card p { margin: 0; }

.home-use-cases { display: flex; flex-wrap: wrap; gap: 10px; }
.home-pill {
  padding: 12px 16px;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: var(--home-surface);
  color: var(--home-muted);
  font-weight: 850;
}

.home-seo-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
}
.home-seo-link {
  padding: 18px;
  border-radius: var(--home-radius-sm);
  border: 1px solid var(--home-line);
  background: var(--home-surface);
  color: var(--home-muted);
  font-weight: 900;
}
.home-seo-link:hover { color: var(--home-text); border-color: color-mix(in srgb, var(--home-brand) 42%, var(--home-line)); }

.home-footer {
  border-top: 1px solid var(--home-line);
  padding: 34px 0;
  color: var(--home-muted);
}
.home-footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.home-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
}
.home-footer-links a:hover { color: var(--home-text); }
.home-footer-copy {
  margin: 6px 0 0;
  color: var(--home-muted);
  font-size: 0.95rem;
  font-weight: 750;
}

@media (max-width: 860px) {
  .home-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--home-line);
    border-radius: 22px;
    background: var(--home-surface-strong);
    box-shadow: var(--home-shadow);
  }
  .home-links[data-open="true"] { display: flex; }
  .home-menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .home-actions .home-button.ghost { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .home-preview { min-height: auto; }
  .home-preview-card { max-width: 760px; margin-inline: auto; }
  .home-trust { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  :root { --home-container: min(100vw - 24px, 1160px); }
  .home-nav { min-height: 66px; gap: 10px; }
  .home-brand { gap: 8px; }
  .home-brand img { width: 34px; height: 34px; }
  .home-brand span { max-width: 102px; line-height: 0.94; }
  .home-actions { gap: 8px; }
  .home-actions .theme-toggle { width: 46px; padding: 0; }
  .home-actions .theme-toggle [data-theme-label] { display: none; }
  .home-language select { width: 66px; padding-inline: 10px; }
  .home-cta-row .home-button { width: 100%; }
  .home-preview-card { border-radius: 22px; padding: 10px; }
  .home-window-bar { margin-bottom: 10px; }
  .home-window-bar i { width: 8px; height: 8px; }
  .home-hero-video-shell { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
