/* ibexdata — site styles (light theme)
   Mobile first: base rules target phones; min-width queries add layout
   for larger screens. Breakpoints: 600px (tablet), 900px (desktop nav,
   two-column layouts), 1000px (wide grids). */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --surface: #ffffff;
  --border: #e4e8ef;
  --text: #0f1729;
  --text-2: #475467;
  --muted: #7a8699;
  --accent: #1f5eff;
  --accent-hover: #1749d6;
  --accent-soft: #eef3ff;
  --good: #12a46b;
  --radius: 14px;
  --wrap: 1160px;
  --gutter: 16px;
  --nav-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 900px) { :root { --nav-h: 70px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 14px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
@media (min-width: 600px) { body { font-size: 17px; } }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
@media (hover: hover) { a:hover { text-decoration: underline; } }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons (min 44px tall for touch) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px;
  background: var(--accent); color: #fff;
  font: 600 0.98rem/1 var(--font);
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--accent); cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:active { background: var(--accent-hover); }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 0.9rem; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:active { background: var(--bg-soft); }
.btn svg { width: 18px; height: 18px; }
@media (hover: hover) {
  .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(31, 94, 255, .5); }
  .btn-ghost:hover { background: var(--bg-soft); border-color: #cfd6e1; box-shadow: none; }
}

.eyebrow {
  font: 500 0.75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 1.1em;
}
.lede { font-size: 1.08rem; color: var(--text-2); max-width: 58ch; }
.center { text-align: center; }
.center .lede, .center .section-lede { margin-left: auto; margin-right: auto; }
@media (min-width: 600px) { .lede { font-size: 1.18rem; } }

/* Nav — mobile menu by default, inline links from 900px */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; min-height: 44px; }
.brand:hover { text-decoration: none; }

.nav-toggle { display: block; background: none; border: 0; width: 44px; height: 44px; margin-right: -10px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .2s ease; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav-links {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  display: none; flex-direction: column; align-items: stretch;
  max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 4px max(var(--gutter), env(safe-area-inset-right)) 20px max(var(--gutter), env(safe-area-inset-left));
  box-shadow: 0 16px 30px -20px rgba(15, 23, 41, .25);
}
.nav-links.open { display: flex; }
.nav-links a:not(.btn) { display: flex; align-items: center; min-height: 52px; color: var(--text-2); font-size: 1rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .btn { margin-top: 16px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 30px;
    max-height: none; overflow: visible; background: none; border: 0; padding: 0; box-shadow: none;
  }
  .nav-links a:not(.btn) { min-height: 0; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
  .nav-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
  .nav-links .btn { margin-top: 0; }
}

/* Hero */
.hero { padding: 56px 0 52px; background: linear-gradient(180deg, var(--accent-soft) 0%, #fff 100%); }
.hero h1 { max-width: 20ch; }
.center h1 { margin-left: auto; margin-right: auto; }
.hero .big-stat { color: var(--accent); }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.hero-cta .btn { width: 100%; }
@media (min-width: 600px) {
  .hero { padding: 96px 0 88px; }
  .hero-cta { flex-direction: row; flex-wrap: wrap; margin-top: 32px; }
  .hero-cta .btn { width: auto; }
  .center .hero-cta { justify-content: center; }
}

/* Sections */
.section { padding: 64px 0; }
.section.flush-top { padding-top: 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lede { font-size: 1.02rem; color: var(--text-2); max-width: 62ch; margin-bottom: 32px; }
@media (min-width: 600px) {
  .section { padding: 96px 0; }
  .section-lede { font-size: 1.1rem; margin-bottom: 48px; }
}

/* Offering cards (landing) */
.offerings { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 8px; }
.offering {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 41, .04);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.offering .tag { font: 500 0.75rem/1 var(--mono); color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.offering h3 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 12px; }
.offering p { color: var(--text-2); font-size: 0.98rem; }
.offering ul { list-style: none; padding: 0; margin: 4px 0 24px; display: grid; gap: 10px; }
.offering li { color: var(--text-2); font-size: 0.95rem; padding-left: 26px; position: relative; }
.offering li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.offering .actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (hover: hover) {
  .offering:hover { border-color: #c8d5f5; box-shadow: 0 24px 48px -28px rgba(31, 94, 255, .35); transform: translateY(-3px); }
}
@media (min-width: 600px) {
  .offering { padding: 32px; }
  .offering h3 { font-size: 1.45rem; }
  .offering .tag { margin-bottom: 20px; }
  .offering ul { margin-bottom: 28px; }
  .offering .actions { display: flex; flex-wrap: wrap; }
}
@media (min-width: 1000px) { .offerings { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.icon-tile svg { width: 24px; height: 24px; }
@media (min-width: 600px) { .icon-tile { width: 52px; height: 52px; margin-bottom: 22px; } .icon-tile svg { width: 26px; height: 26px; } }

/* Stat strip */
.stats { display: grid; grid-template-columns: 1fr; gap: 28px; }
.stat { text-align: center; padding: 8px; }
.stat b { display: block; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; color: var(--text); }
.stat span { color: var(--text-2); font-size: 0.95rem; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* Video card */
.video-card {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; max-width: 960px; margin: 0 auto;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; padding: 0;
  background:
    radial-gradient(60% 80% at 20% 20%, rgba(31, 94, 255, .22), transparent 70%),
    radial-gradient(50% 70% at 90% 90%, rgba(18, 164, 107, .14), transparent 70%),
    linear-gradient(135deg, #f3f6ff, #ffffff);
  box-shadow: 0 30px 60px -36px rgba(15, 23, 41, .35);
  font: inherit; color: inherit; text-align: left;
}
.video-card .play {
  position: absolute; left: 0; right: 0; top: -22px; bottom: 0; margin: auto;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(31, 94, 255, .14);
  transition: transform .2s ease, box-shadow .2s ease;
}
.video-card .play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.video-card:active .play { transform: scale(.96); }
.video-card .caption { position: absolute; left: 16px; bottom: 12px; right: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.video-card .caption strong { font-size: 0.92rem; line-height: 1.3; }
.video-card .caption span { display: none; color: var(--text-2); font: 500 0.85rem var(--mono); white-space: nowrap; }
@media (hover: hover) {
  .video-card:hover .play { transform: scale(1.06); box-shadow: 0 0 0 18px rgba(31, 94, 255, .12); }
}
@media (min-width: 600px) {
  .video-card { border-radius: 20px; }
  .video-card .play { top: 0; width: 84px; height: 84px; box-shadow: 0 0 0 12px rgba(31, 94, 255, .14); }
  .video-card .play svg { width: 30px; height: 30px; margin-left: 4px; }
  .video-card .caption { left: 28px; bottom: 24px; right: 28px; }
  .video-card .caption strong { font-size: 1.15rem; }
  .video-card .caption span { display: inline; }
}

/* Video modal — full screen on phones, windowed from 900px */
.video-modal {
  border: 0; padding: 0; margin: 0; background: #0f1729;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
}
.video-modal[open] { display: grid; place-items: center; }
.video-modal::backdrop { background: rgba(15, 23, 41, .72); }
.video-modal .frame {
  position: relative; background: #0f1729; overflow: hidden;
  width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9;
}
.video-modal iframe, .video-modal video { width: 100%; height: 100%; border: 0; display: block; }
.video-modal .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 24px; }
.video-modal .placeholder p { color: #b9c3d3; margin: 6px 0 0; }
.video-modal .close {
  position: absolute; z-index: 2;
  top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  background: #fff; border: 0; border-radius: 999px;
  width: 44px; height: 44px; font-size: 24px; line-height: 1; cursor: pointer; color: var(--text);
}
/* Portrait phones get a 9:16 frame, which loads the portrait cut of our videos */
@media (orientation: portrait) and (max-width: 899px) {
  .video-modal .frame { width: min(100vw, calc(100dvh * 9 / 16)); aspect-ratio: 9 / 16; }
}
@media (min-width: 900px) and (min-height: 560px) {
  .video-modal { background: transparent; width: min(1000px, 92vw); height: fit-content; margin: auto; overflow: visible; }
  .video-modal[open] { display: block; }
  .video-modal .frame { width: 100%; border-radius: 14px; }
  .video-modal .close { top: -52px; right: 0; }
}

/* How it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 14px; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; position: relative; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.95rem; margin-bottom: 14px;
}
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--text-2); font-size: 0.95rem; margin: 0; }
.steps .step-wide { background: var(--accent-soft); border-color: #c8d5f5; }
@media (min-width: 600px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 20px; }
  .steps li { padding: 28px 24px; }
  .steps li::before { width: 36px; height: 36px; margin-bottom: 18px; }
  .steps .step-wide { grid-column: span 2; }
}
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Feature cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; }
.card p { color: var(--text-2); margin: 0; font-size: 0.97rem; }
@media (min-width: 600px) { .cards { gap: 20px; } .card { padding: 28px; } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #1f5eff 0%, #3a2fd8 100%);
  color: #fff; border-radius: 20px; padding: 32px 22px;
  display: flex; flex-direction: column; align-items: stretch; gap: 22px;
}
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 52ch; }
.cta-band .btn { width: 100%; background: #fff; color: var(--accent); border-color: #fff; }
.cta-band .btn:active { background: #eef3ff; }
@media (hover: hover) { .cta-band .btn:hover { background: #eef3ff; box-shadow: none; } }
@media (min-width: 600px) {
  .cta-band { border-radius: 24px; padding: 56px 48px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
  .cta-band .btn { width: auto; }
}

/* Sign-up */
.signup-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: start; }
.signup-grid > * { min-width: 0; }
@media (min-width: 900px) { .signup-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.perks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.perks li { padding-left: 30px; position: relative; color: var(--text-2); }
.perks li::before { content: ""; position: absolute; left: 2px; top: 0.4em; width: 14px; height: 8px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }

.form {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 24px 18px;
  display: grid; gap: 18px; box-shadow: 0 24px 60px -36px rgba(15, 23, 41, .3);
}
.form h2 { font-size: 1.4rem; margin: 0; }
.form .row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.form label { display: grid; gap: 7px; font-size: 0.9rem; font-weight: 500; color: var(--text); }
/* 16px+ inputs stop iOS from zooming on focus */
.form input, .form select, .form textarea {
  font: 400 1rem var(--font); color: var(--text); width: 100%; min-height: 48px;
  background: #fff; border: 1px solid #d3d9e3; border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form textarea { resize: vertical; min-height: 96px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31, 94, 255, .12); }
.form [aria-invalid="true"] { border-color: #d92d20; }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--text-2); }
.form .check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; }
.form .btn { width: 100%; }
.form-status { margin: 0; font-size: 0.92rem; min-height: 1.4em; color: var(--text-2); }
.form-status.error { color: #d92d20; }
.form-status.ok { color: var(--good); }
@media (min-width: 600px) {
  .form { padding: 36px; }
  .form h2 { font-size: 1.5rem; }
  .form .row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 44px 0 max(32px, env(safe-area-inset-bottom)); background: var(--bg-soft); margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.footer-grid > :first-child { grid-column: 1 / -1; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 8px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.footer ul a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text-2); font-size: 0.95rem; overflow-wrap: anywhere; }
.footer p { color: var(--text-2); font-size: 0.95rem; max-width: 36ch; margin-top: 12px; }
.footer .legal { max-width: none; border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: 0.88rem; }
@media (min-width: 700px) {
  .footer { padding-top: 56px; margin-top: 96px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer h4 { margin-bottom: 14px; }
  .footer ul { gap: 10px; }
  .footer ul a { min-height: 0; }
  .footer .legal { margin-top: 40px; padding-top: 24px; }
}
