/* ===========================================================
   IxMati — ixmatianalytics.com

   Mobile first: every rule below is written for a phone, and the
   few breakpoints at the bottom widen it for larger screens. That
   order matters -- most visitors arriving from a LinkedIn message
   or an email signature are on a phone.
   =========================================================== */

:root {
  --bg:        #0a0c10;
  --bg-raise:  #11141b;
  --line:      #1e232e;
  --text:      #e8eaed;
  --text-dim:  #8b94a3;
  --accent:    #1e96ff;   /* the azure of the tracking overlay */
  --accent-dim:#145e9e;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: 22px;
  --max:    1040px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* a faint grid, so the dark background reads as deliberate
   rather than merely empty */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .25;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

main, .nav, .foot { position: relative; z-index: 1; }

h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------ nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.wordmark {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.wordmark .mark { color: var(--accent); }

.lang { display: flex; gap: 2px; }

.lang button {
  background: none;
  border: 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: color .15s, background .15s;
}

.lang button:hover { color: var(--text); }

.lang button.is-active {
  color: var(--accent);
  background: rgba(30, 150, 255, .08);
}

/* ----------------------------------------------------------- hero */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

/* clamp() rather than breakpoints: the headline is the one element
   that should scale continuously between a narrow phone and a
   desktop, with no awkward jump in between */
.hero h1 {
  font-size: clamp(2rem, 8.5vw, 3.6rem);
  letter-spacing: -.03em;
  margin-bottom: 24px;
  max-width: 16ch;
}

.lede {
  color: var(--text-dim);
  font-size: clamp(1rem, 4.2vw, 1.15rem);
  max-width: 54ch;
  margin-bottom: 36px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: border-color .18s, background .18s, transform .18s;
}

.btn:hover { border-color: var(--text-dim); transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04070c;
  font-weight: 500;
}

.btn-primary:hover { background: #3aa5ff; border-color: #3aa5ff; }

.btn-mail { font-family: var(--mono); font-size: 13px; }

/* -------------------------------------------------------- section */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter);
  border-top: 1px solid var(--line);
}

.section-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 400;
  margin-bottom: 32px;
}

.statement {
  font-size: clamp(1.1rem, 4.6vw, 1.45rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -.01em;
  max-width: 42ch;
  margin-bottom: 32px;
}

.band { background: var(--bg-raise); max-width: none; }

.band > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------- cards */

.cards { display: grid; gap: 20px; }

.card {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 24px;
  transition: border-color .2s;
}

.card:hover { border-color: var(--accent-dim); }

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .1em;
}

.card h3 {
  font-size: 1.2rem;
  margin: 14px 0 12px;
  letter-spacing: -.01em;
}

.card p { color: var(--text-dim); font-size: .95rem; }

/* ---------------------------------------------------------- demos */

.demo { margin-bottom: 44px; }

.demo:last-child { margin-bottom: 0; }

/* the 16:9 box has to be set by aspect-ratio, not padding tricks,
   or the iframe collapses on iOS Safari */
.demo-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.demo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.demo-text h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}

.demo-text p { color: var(--text-dim); font-size: .95rem; max-width: 52ch; }

/* --------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.foot-brand { display: flex; flex-direction: column; gap: 4px; }

.foot-tag {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: .01em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

.foot-links a { transition: color .15s; }

.foot-links a:hover { color: var(--text); }

/* pages that do not exist yet: visible but plainly inactive, so the
   structure is announced without a broken link */
.foot-links a.is-soon { opacity: .4; cursor: default; }

.foot-links a.is-soon:hover { color: var(--text-dim); }

.foot-legal {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  opacity: .6;
}

/* ===================================================== breakpoints */

@media (min-width: 680px) {
  :root { --gutter: 40px; }

  .hero    { padding: 90px var(--gutter) 110px; }
  .section { padding: 80px var(--gutter); }

  .cards { grid-template-columns: 1fr 1fr; gap: 24px; }
  .card  { padding: 34px 30px; }

  /* side by side only once there is room for the video to stay
     legible next to its text */
  .demo {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 60px;
  }

  .demo-frame { margin-bottom: 0; }

  .demo-reverse .demo-frame { order: 2; }

  .foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }

  .foot-legal { margin-left: auto; }
}

@media (min-width: 1000px) {
  .hero h1 { max-width: 14ch; }
}

/* ======================================================= a11y etc. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* the design is dark by intent, so a light-mode override would
   fight it; this only keeps form controls from inverting */
@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}
