/* ============================================================================
   Larik SQL Studio — landing page styles
   Hand-written, no build step. Dark by default, light via prefers-color-scheme.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  /* brand, dark theme (default) */
  --page: #161618;
  --panel: #1c1c1e;
  --elevated: #232326;
  --text: #f5f5f7;
  --secondary: rgba(255, 255, 255, 0.72);
  --accent: #6366f1;
  --accent-hover: #818cf8;   /* button hover + small accent text in dark */
  --accent-strong: #818cf8; /* accent used as text/icon colour, AA-safe */
  --success: #22c55e;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --hover-fill: rgba(255, 255, 255, 0.06);
  --tint: rgba(99, 102, 241, 0.16); /* accent wash for active tab, rows, icon chips */
  --btn-text: #161618;             /* text on accent fills */
  --focus-ring: #818cf8;
  --shadow-window: 0 40px 96px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);

  /* app-preview surfaces */
  --ap-chrome: #1e1e21;
  --ap-editor: #161618;
  --ap-results: #1c1c1e;
  --ap-headrow: #232326;
  --ap-code-text: #e8e8ec;
  --code-key: #c792ea;
  --code-str: #7ee787;
  --code-comment: rgba(245, 245, 247, 0.45);
  --code-num: #e0af68;
  --code-ln: rgba(245, 245, 247, 0.3);
  --dot-ring: rgba(245, 245, 247, 0.55);

  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

/* Light variant — values kept in step with /privacy/ so the pages read as one site. */
@media (prefers-color-scheme: light) {
  :root {
    --page: #fbfbfd;
    --panel: #ffffff;
    --elevated: #f2f2f6;
    --text: #16161a;
    --secondary: rgba(22, 22, 26, 0.72);
    --accent: #6366f1;          /* fills keep the brand accent in both themes */
    --accent-hover: #818cf8;    /* keeps #161618 text at AA on hover */
    --accent-strong: #4f46e5;   /* darker indigo so accent text passes AA on light */
    --success: #16a34a;
    --hairline: rgba(22, 22, 26, 0.12);
    --hairline-strong: rgba(22, 22, 26, 0.2);
    --hover-fill: rgba(22, 22, 26, 0.05);
    --tint: rgba(79, 70, 229, 0.1);
    --focus-ring: #4f46e5;
    --shadow-window: 0 40px 96px rgba(24, 24, 32, 0.18), 0 8px 24px rgba(24, 24, 32, 0.1);

    --ap-chrome: #f6f6f8;
    --ap-editor: #ffffff;
    --ap-results: #ffffff;
    --ap-headrow: #f0f0f3;
    --ap-code-text: #242428;
    --code-key: #8250df;
    --code-str: #116329;
    --code-comment: #6e7781;
    --code-num: #953800;
    --code-ln: rgba(22, 22, 26, 0.38);
    --dot-ring: rgba(22, 22, 26, 0.5);
  }
}

/* ---------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 { font-size: 1.05rem; letter-spacing: -0.005em; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

::selection { background: rgba(99, 102, 241, 0.35); }

kbd {
  font-family: var(--font-mono);
  font-size: 0.8em;
  line-height: 1;
  padding: 2px 6px 3px;
  border: 1px solid var(--hairline-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--elevated);
  color: var(--text);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   3. Layout primitives
   ------------------------------------------------------------------------- */
.container { width: min(100% - 3rem, 80rem); margin-inline: auto; }

.section { padding-block: clamp(4rem, 8vw, 6.5rem); }

.section-band {
  background: var(--panel);
  border-block: 1px solid var(--hairline);
}

section[id] { scroll-margin-top: 1.25rem; }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 0.85rem; color: var(--secondary); font-size: 1.02rem; }

/* Skip link: off-canvas until focused, still first in the tab order. */
.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  transform: translateY(-300%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* 19px/700 counts as large text under WCAG, where #161618 on #6366F1 passes AA. */
.btn-primary {
  background: var(--accent);
  color: var(--btn-text);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  padding: 13px 28px;
}
.btn-primary:not([disabled]):hover { background: var(--accent-hover); }
.btn-primary[disabled] { opacity: 0.55; cursor: default; }

.btn-ghost { border-color: var(--hairline-strong); color: var(--text); }
.btn-ghost:hover { background: var(--hover-fill); border-color: var(--accent-strong); }

.btn-compact { min-height: 44px; padding: 8px 16px; font-size: 0.925rem; }

/* Header CTA label swap — zero-JS short label on narrow screens. */
.label-short { display: none; }
@media (max-width: 599px) {
  .label-long { display: none; }
  .label-short { display: inline; }
}

/* ---------------------------------------------------------------------------
   5. Site header
   ------------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--hairline); }

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  min-height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand img { border-radius: 7px; }
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }

.site-nav { margin-left: auto; display: flex; gap: 2px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--secondary);
  font-size: 0.95rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--hover-fill); }

@media (max-width: 859px) {
  .site-nav { display: none; }
}

/* ---------------------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------------------- */
.hero { padding-block: clamp(3.25rem, 7vw, 6rem) clamp(3.5rem, 6vw, 5.5rem); }

.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }

.hero-copy { max-width: 34rem; }

.lede {
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  line-height: 1.65;
  color: var(--secondary);
}

.cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.hero-meta { margin-top: 1.5rem; font-size: 0.85rem; color: var(--secondary); }

/* The decorative window only appears where it has room. */
.hero-visual { display: none; }
@media (min-width: 900px) {
  .hero-visual { display: flex; justify-content: center; }
}
@media (min-width: 900px) and (max-width: 1279px) {
  .hero-copy { margin-inline: auto; }
}
@media (min-width: 1280px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 720px);
    align-items: center;
    gap: 3rem;
  }
}

/* ---------------------------------------------------------------------------
   7. Product shot
   ------------------------------------------------------------------------- */
.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-window);
}

/* ---------------------------------------------------------------------------
   8. Feature grid
   ------------------------------------------------------------------------- */
.card-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

.card {
  padding: clamp(1.25rem, 2vw, 1.6rem);
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--hairline-strong); transform: translateY(-2px); }

.card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--tint);
  color: var(--accent-strong);
}
.card-icon svg { width: 21px; height: 21px; }

.card p { margin-top: 0.5rem; font-size: 0.94rem; line-height: 1.6; color: var(--secondary); }

/* ---------------------------------------------------------------------------
   9. Built for Windows (split section)
   ------------------------------------------------------------------------- */
.split { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}

.split-copy p { margin-top: 1rem; max-width: 30rem; font-size: 1.05rem; color: var(--secondary); }

.fact-list {
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.fact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.98rem;
}
.fact-list li:last-child { border-bottom: none; }
.fact-check { flex: none; width: 17px; height: 17px; color: var(--success); }

/* ---------------------------------------------------------------------------
   10. Privacy strip
   ------------------------------------------------------------------------- */
.privacy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
.privacy-icon { margin-bottom: 0; flex: none; }
.privacy-copy { flex: 1 1 18rem; min-width: 240px; }
.privacy-copy h2 { font-size: 1.3rem; }
.privacy-copy p { margin-top: 0.45rem; font-size: 0.96rem; line-height: 1.6; color: var(--secondary); }
.privacy-strip .btn { margin-left: auto; flex: none; }

/* ---------------------------------------------------------------------------
   11. Get it
   ------------------------------------------------------------------------- */
.get-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 38rem;
  margin-inline: auto;
  text-align: center;
}
.get-logo { border-radius: 14px; margin-bottom: 1.4rem; }
.get-inner p { margin-top: 1.1rem; font-size: 1.02rem; color: var(--secondary); }
.get-inner .btn { margin-top: 1.9rem; }
.get-inner .get-note { margin-top: 0.9rem; font-size: 0.85rem; }

/* ---------------------------------------------------------------------------
   12. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  padding: 1.75rem 0 2.25rem;
  background: var(--panel);
  border-top: 1px solid var(--hairline);
}
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; }
.footer-brand img { border-radius: 6px; }
.footer-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.93rem; color: var(--secondary); }
.footer-links a:hover { color: var(--text); }
.footer-legal { margin-top: 0.5rem; font-size: 0.85rem; color: var(--secondary); }

/* ---------------------------------------------------------------------------
   13. Motion preferences
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ap-caret { animation: none; }
  .btn, .site-nav a, .card { transition: none; }
  .card:hover { transform: none; }
}
