@font-face { font-family: "Mona Sans"; src: url(assets/fonts/Mona-Sans.woff2) format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url(assets/fonts/ClashDisplay-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }

/* Meridian BlueBase, values as served on optima.ai */
:root {
  --color-blue-base-000: #fff;
  --color-blue-base-100: #f0f6fc;
  --color-blue-base-200: #e1ecf7;
  --color-blue-base-700: #2e4b6b;
  --color-blue-base-800: #152940;
  --color-blue-base-900: #0a162b;
  --color-blue-base-1000: #000;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --frame-x: 60px;   /* Figma frame 227: 60px side margin */
  --frame-y: 24px;   /* Figma frame 227: 24px top/bottom margin */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--color-blue-base-000);
  color: var(--color-blue-base-900);
  font-family: "Mona Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- Header (optima.ai Header-module) ---------- */
.header {
  position: fixed; top: 20px; left: 0; right: 0; z-index: 95;
  display: flex; justify-content: center; padding: 0 24px;
  pointer-events: none;
}
.headPill {
  pointer-events: auto; isolation: isolate; position: relative; overflow: hidden;
  width: min(720px, 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.5) brightness(1.04);
  backdrop-filter: blur(20px) saturate(1.5) brightness(1.04);
  background: linear-gradient(135deg, #fff9 0%, #ffffff4d 45%, #f4f8fc75 100%);
  border: .5px solid #ffffffe6;
  border-radius: 30px;
  box-shadow: inset 0 .5px #ffffffbf, inset 0 -.5px #ffffff4d;
  transition: border-radius .46s var(--ease);
}
.headPill[data-menu-open="1"] { border-radius: 28px; }
.headFull {
  position: absolute; top: 0; left: 50%; transform: translate(-50%);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  width: min(720px, 100vw - 48px); height: 60px; padding: 0 12px 0 16px;
}
.menuBtn {
  justify-self: start; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: none; border-radius: 30px;
  background: none; color: var(--color-blue-base-900); cursor: pointer;
}
.menuLineTop, .menuLineBot { transform-box: fill-box; transform-origin: 50%; transition: transform .34s var(--ease); }
.headPill[data-menu-open="1"] .menuLineTop { transform: translateY(2.5px) rotate(45deg); }
.headPill[data-menu-open="1"] .menuLineBot { transform: translateY(-2.5px) rotate(-45deg); }
.logoLink { display: block; }
.logoImg { display: block; height: 26px; }
.headSpacer { height: 60px; }

.btn-desktop {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; outline: none; cursor: pointer; white-space: nowrap; text-decoration: none;
  font: 500 1rem/1.5rem "Mona Sans", sans-serif;
  transition: background-color .2s, border-color .2s;
}
.btn-desktop:focus-visible { outline: 2px solid var(--color-blue-base-1000); outline-offset: 2px; }
.btn-desktop:active { transform: scale(.98); }
.btn-desktop.primary {
  isolation: isolate; position: relative; overflow: hidden;
  background-color: var(--color-blue-base-900); color: var(--color-blue-base-100);
}
.btn-desktop.primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: radial-gradient(26.27% 100% at 50% 0%, var(--color-blue-base-800) 0%, var(--color-blue-base-900) 100%);
  transition: opacity .2s;
}
.btn-desktop.primary:hover::before { opacity: 1; }
.loginBtn { justify-self: end; height: 38px; padding: 0 22px; border-radius: 999px; }

.menuArea { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .46s var(--ease); }
.menuArea[data-open="1"] { grid-template-rows: 1fr; }
.menuClip { min-height: 0; overflow: hidden; }
.menuInner { padding: 2px 24px 26px; opacity: 0; transform: translateY(-6px); transition: opacity .22s var(--ease), transform .3s var(--ease); }
.menuArea[data-open="1"] .menuInner { opacity: 1; transform: none; transition: opacity .3s var(--ease) .14s, transform .38s var(--ease) .14s; }
.menuRule { height: 1px; margin-bottom: 16px; background: #d9d9d9b3; }
.menuCols { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.menuCol { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 86px; }
.menuLabel { font: 400 11px/15px "Mona Sans", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--color-blue-base-700); }
.menuLink { font: 400 12px/16px "Mona Sans", sans-serif; color: var(--color-blue-base-800); text-decoration: none; transition: color .16s var(--ease); }
.menuLink:hover { color: var(--color-blue-base-900); }
/* Desktop: same look, larger invisible hit area (12px gap between links is split between neighbours). */
.menuLink { padding: 6px 0; margin: -6px 0; }

/* Phones and touch screens: one column of full-width rows, each at least 44px tall. */
@media (max-width: 768px), (pointer: coarse) {
  .menuBtn { width: 44px; height: 44px; }
  /* Looks 38px like optima.ai; the transparent 3px border makes the tap area 44px. */
  .loginBtn { height: 44px; border: 3px solid transparent; background-clip: padding-box; margin-right: -3px; }
  .menuInner { padding: 2px 12px 12px; }
  .menuRule { margin: 0 4px 4px; }
  .menuCols { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
  .menuCol { gap: 0; width: 100%; align-items: stretch; }
  .menuLabel { padding: 12px 12px 4px; }
  .menuLink {
    display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0 12px;
    font-size: 15px; line-height: 20px;
    -webkit-tap-highlight-color: transparent;
  }
  .menuLink:active { background: var(--color-blue-base-100); color: var(--color-blue-base-900); }
}

/* ---------- Hero (Figma Brand-V1, frame 227) ---------- */
.page { height: 100vh; height: 100svh; padding: var(--frame-y) var(--frame-x); }
.hero { height: 100%; }
.heroFrame { position: relative; height: 100%; overflow: hidden; border-radius: 24px; background: var(--color-blue-base-000); } /* Figma: 24px */
.heroImg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%; display: block;
}
.pixelField { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pinch-zoom; } /* one finger drives the effect; two fingers can still zoom */
/* Canvas shows only once it has painted the photo; the <img> stays in the a11y tree. */
.pixelField { opacity: 0; }
.heroFrame.is-live .pixelField { opacity: 1; }
.heroFrame.is-live .heroImg { opacity: 0; }

.heroLockup {
  position: absolute; left: 0; right: 0; top: 22.7%; /* Figma frame 227: text top 228 − image top 24, of 899 */
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none; text-align: center;
}
.heroTag {
  margin: 0;
  max-width: 473px;
  font: 400 36px/44px "Clash Display", sans-serif;
  letter-spacing: .12em; text-transform: uppercase; color: var(--color-blue-base-1000);
}

@media (max-width: 768px) {
  :root { --frame-x: 16px; --frame-y: 16px; }
  .heroImg { object-position: 50% 50%; }
  .heroLockup { top: max(17%, 72px); padding: 0 8px; } /* short landscape phones: keep the line below the pill */
  /* As large as fits on two lines, up to 28px; 1.22 = Figma's 44/36 */
  .heroTag { font-size: min(28px, calc((100vw - 48px) / 13.2)); line-height: 1.22; }
}
