:root {
  color-scheme: light;
  --ink: #0b2545;
  --muted: #52616f;
  --soft: #eef6ff;
  --line: #d9e8ff;
  --blue: #004bc4;
  --blue-strong: #0b5ed7;
  --white: #ffffff;
  --shadow: 0 24px 80px rgb(11 37 69 / 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--white);
  font-family: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--blue);
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: clip;
}

.background-image {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  pointer-events: none;
}

.page-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.82), rgb(255 255 255 / 0.94) 54%, rgb(255 255 255 / 0.98)),
    radial-gradient(circle at 50% 12%, rgb(217 232 255 / 0.6), transparent 34rem);
  pointer-events: none;
}

/* ── Header (edge-to-edge, sticky) ─────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  padding-inline: max(16px, calc((100% - 1120px) / 2));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 232, 255, 0.55);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.header-nav a {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  background: var(--soft);
  color: var(--blue);
}

/* ── Shared content width ───────────────────────────────────────── */

.site-footer,
.home-main,
.content-page {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand span {
  color: var(--blue);
  font-family: "Exo 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.brand img {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 18px;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--blue);
}

.home-main {
  padding: 56px 0 32px;
}

.hero {
  display: grid;
  justify-items: center;
  max-width: 780px;
  min-height: 54vh;
  margin-inline: auto;
  padding: 36px 0 72px;
  text-align: center;
}

.hero-mark {
  width: clamp(136px, 21vw, 224px);
  height: clamp(136px, 21vw, 224px);
  object-fit: contain;
  transform: scale(1.08);
}

.eyebrow {
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
.logo-heading {
  margin: 0;
  color: var(--blue);
  font-family: "Exo 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 0.95;
}

.lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
}

.supporting {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.primary-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.78);
  box-shadow: 0 10px 30px rgb(0 75 196 / 0.08);
  color: var(--blue-strong);
  font-weight: 700;
  padding: 12px 18px;
  text-decoration: none;
}

.primary-link:hover {
  border-color: var(--blue-strong);
  background: var(--soft);
}

.product-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-block: 18px 48px;
}

.product-summary article {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.82);
  box-shadow: var(--shadow);
  padding: 24px;
}

.product-summary h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.05rem;
}

.product-summary p,
.content-page p,
.content-page li {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgb(217 232 255 / 0.84);
  padding: 28px 0 34px;
  text-align: center;
}

.site-footer nav {
  justify-content: center;
  margin-bottom: 18px;
}

.site-footer p {
  margin: 4px 0;
  color: #6b7a88;
  font-size: 0.88rem;
}

.content-page {
  max-width: 860px;
  padding: 42px 0 72px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.9);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 52px);
}

.content-card header {
  margin-bottom: 28px;
}

.content-card h1 {
  font-family: Montserrat, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
}

.content-card h2 {
  margin: 34px 0 10px;
  color: var(--ink);
  font-size: 1.05rem;
}

.content-card p,
.content-card li {
  font-size: 1rem;
}

.content-card ul {
  padding-left: 1.3rem;
}

.updated {
  margin: 10px 0 0;
  color: #6b7a88;
  font-size: 0.92rem;
}

/* ── Portfolio bridge (home page, between hero and cards) ───────── */

.portfolio-bridge {
  display: flex;
  justify-content: center;
  padding: 4px 0 32px;
}

.portfolio-bridge a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgb(0 75 196 / 0.06);
  color: var(--blue-strong);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.portfolio-bridge a:hover {
  border-color: var(--blue-strong);
  background: var(--soft);
}

/* ── Portfolio page ─────────────────────────────────────────────── */

.portfolio-wrap {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
  padding-bottom: 64px;
}

.portfolio-hero {
  padding: 56px 0 40px;
  text-align: center;
}

.portfolio-hero h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.portfolio-hero p {
  margin: 16px auto 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Product section */
.product-section {
  border-top: 1px solid var(--line);
  padding: 56px 0 0;
}

.product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.product-header-text {
  flex: 1;
  min-width: 0;
}

.product-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.product-header-text h2 {
  margin: 0 0 8px;
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.product-header-text p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 560px;
}

.product-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: flex-start;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 16px rgb(0 75 196 / 0.06);
  color: var(--blue-strong);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.product-cta:hover {
  border-color: var(--blue-strong);
  background: var(--soft);
}

.product-cta.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Browser frame + iframe preview */
.browser-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgb(11 37 69 / 0.12);
  margin-bottom: 56px;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f4f7fb;
  border-bottom: 1px solid var(--line);
}

.chrome-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chrome-url {
  flex: 1;
  background: #fff;
  border: 1px solid #dde8f5;
  border-radius: 5px;
  padding: 4px 12px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
  color: #6b7a88;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scaled iframe container */
.preview-wrap {
  --scale: 0.72;
  position: relative;
  width: 100%;
  height: calc(680px * var(--scale)); /* ~490px */
  overflow: hidden;
  background: #f8faff;
}

.preview-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / var(--scale));
  height: 680px;
  transform: scale(var(--scale));
  transform-origin: top left;
  border: 0;
  pointer-events: none;
}

/* Internal product card (no iframe) */
.internal-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 48px;
  text-align: center;
  margin-bottom: 56px;
}

.internal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #713f12;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.internal-card p {
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto;
}

/* Portfolio contact */
.portfolio-contact {
  border-top: 1px solid var(--line);
  padding: 64px 0 0;
  text-align: center;
}

.portfolio-contact h2 {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
  margin: 0 0 10px;
}

.portfolio-contact p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 28px;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .home-main {
    padding-top: 24px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 48px;
  }

  .product-summary {
    grid-template-columns: 1fr;
  }

  .preview-wrap {
    --scale: 0.45;
    height: calc(680px * var(--scale));
  }

  .product-header {
    flex-direction: column;
    gap: 16px;
  }

  .product-cta {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  .site-footer,
  .home-main,
  .content-page,
  .portfolio-wrap {
    width: min(100% - 24px, 1120px);
  }

  .site-footer nav {
    gap: 8px 14px;
  }

  .lead {
    font-size: 1.35rem;
  }

  .supporting {
    font-size: 1rem;
  }

  .preview-wrap {
    --scale: 0.35;
    height: calc(680px * var(--scale));
  }

  .internal-card {
    padding: 32px 24px;
  }
}
