@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700&display=swap');

/* Phase 3: universal box-sizing reset hoisted to infwave-public.css under
   body.ifw-v9-page scope. The legacy ad-hoc `body { margin: 0; background:
   #fbfcfe; color: #111827; }` rule was a stale global override; body color
   / background / margin are now governed by body.ifw-public-page (light
   theme) + body.ifw-v9-page.ifw-page-home (home gradient). */

/* Phase 2: home-specific overrides only. Token system lives in
   body.ifw-v9-page (infwave-public.css). Home only owns its unique
   background gradient overlay.
   Phase 4: scope to :not(.ifw-theme-dark) so dark mode bg (in public.css
   V9 scope) is not shadowed by this rule's later source order. */
body.ifw-v9-page.ifw-page-home:not(.ifw-theme-dark) {
  background:
    radial-gradient(circle at 16% 16%, rgba(222,96,35,0.08), transparent 32%),
    radial-gradient(circle at 82% 9%, rgba(71,107,255,0.08), transparent 30%),
    linear-gradient(180deg, #fbfcfe 0%, #fff 45%, #f6f8fb 100%);
}

body.ifw-v9-page.ifw-page-home::before {
  content: none;
  display: none;
}

.ifw-wide-nav,
.ifw-wide-hero,
.ifw-wide-strip,
.ifw-wide-workflow,
.ifw-wide-trust,
.ifw-wide-footer {
  width: min(100%, var(--ifw-frame-max));
  margin: 0 auto;
  padding-left: var(--ifw-page-pad);
  padding-right: var(--ifw-page-pad);
}

.ifw-wide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding-top: var(--ifw-nav-pad-top);
  padding-bottom: var(--ifw-nav-pad-bottom);
  background: transparent;
  backdrop-filter: none;
}

.ifw-wide-brand,
.ifw-wide-links,
.ifw-wide-actions,
.ifw-hero-actions,
.ifw-card-top,
.ifw-console-top,
.ifw-console-tabs,
.ifw-console-metrics,
.ifw-wide-footer nav {
  display: flex;
  align-items: center;
}

.ifw-wide-brand {
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', 'IBM Plex Sans', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.ifw-wide-brand img {
  display: block;
}

.ifw-wide-links {
  gap: 28px;
  flex: 0 1 auto;
  justify-content: flex-start;
  margin-left: 28px;
}

.ifw-wide-links a,
.ifw-lang-switch,
.ifw-wide-footer a {
  color: var(--ink-700);
  text-decoration: none;
  font-size: 17px;
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: 0.005em;
}

.ifw-wide-links a:hover,
.ifw-wide-footer a:hover {
  color: var(--brand);
}

.ifw-wide-links a.is-market {
  position: relative;
  color: var(--ink);
  font-weight: 500;
}

.ifw-wide-links a.is-market::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--brand);
}

.ifw-wide-actions {
  gap: 18px;
  margin-left: auto;
}

.ifw-v9-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 9px 18px;
  border: 1px solid var(--ink-900);
  border-radius: 6px;
  background: var(--ink-900);
  color: #fff !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.ifw-v9-button:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
}

.ifw-v9-button.is-ghost {
  background: rgba(255,255,255,0.72);
  color: var(--ink) !important;
  border-color: var(--line);
}

.ifw-v9-button.is-ghost:hover {
  background: #fff;
  border-color: var(--ink-900);
  color: var(--ink) !important;
  text-decoration: none;
  transform: none;
}

.ifw-lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: auto;
  color: var(--ink-700) !important;
  font-family: 'IBM Plex Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  font-size: 15px !important;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ifw-lang-switch::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  opacity: 0.78;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.ifw-lang-switch:hover {
  color: var(--ink-900) !important;
}

.ifw-lang-switch:hover::before {
  opacity: 1;
}

.ifw-v9-button.is-large {
  min-height: 42px;
  padding: 0 20px;
  font-size: 14px;
}

.ifw-wide-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 36px;
  padding-top: 34px;
  padding-bottom: 36px;
}

.ifw-hero-copy {
  max-width: 660px;
}

.ifw-hero-copy h1 {
  margin: 0;
  font-family: inherit;
  font-size: var(--ifw-h1);
  line-height: 1.12;
  letter-spacing: -0.012em;
  font-weight: 600;
  color: var(--ink);
}

.ifw-hero-copy p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--ifw-body);
  line-height: 1.66;
}

.ifw-hero-actions {
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.ifw-hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  max-width: 650px;
}

.ifw-hero-proof span {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 16px 38px rgba(17,24,39,0.04);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ifw-hero-proof span:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15,23,48,0.055);
}

.ifw-hero-proof b {
  display: block;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ifw-console-panel {
  width: 100%;
  max-width: 540px;
  justify-self: stretch;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, #0f172a 0%, #080c18 100%);
  color: #e5e7eb;
  box-shadow: 0 24px 56px -20px rgba(15,23,48,0.25), 0 4px 12px -4px rgba(15,23,48,0.1);
  overflow: hidden;
}

.ifw-console-top {
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ifw-console-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34,197,94,0.7);
}

.ifw-console-title,
.ifw-console-state,
.ifw-console-tabs button,
.ifw-console-body,
.ifw-console-metrics,
.ifw-market-sidebar button,
.ifw-market-sidebar a,
.ifw-model-card dl,
.ifw-workflow-grid small,
.ifw-workflow-grid code {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

.ifw-console-title {
  color: #cbd5e1;
  font-size: 13px;
}

.ifw-console-state {
  margin-left: auto;
  color: #86efac;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ifw-console-tabs {
  gap: 8px;
  padding: 14px 18px 0;
}

.ifw-console-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px 8px 0 0;
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
  cursor: pointer;
}

.ifw-console-tabs button.is-active {
  border-color: rgba(222,96,35,0.42);
  background: rgba(222,96,35,0.13);
  color: #fff;
}

.ifw-console-body {
  min-height: 0;
  padding: 20px 22px;
  font-size: 13px;
  line-height: 1.72;
  overflow: auto;
}

.ifw-console-body pre {
  display: none;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.ifw-v9-page.ifw-page-home .ifw-console-body pre,
body.ifw-v9-page.ifw-page-home .ifw-console-body code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #e5e7eb !important;
  font-size: inherit;
  line-height: inherit;
}

.ifw-console-body pre.is-active {
  display: block;
}

.ifw-console-metrics {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}

.ifw-console-metrics span {
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
  font-size: 11px;
}

.ifw-console-metrics b {
  display: block;
  color: #fff;
  font-size: 12px;
  margin-bottom: 3px;
}

.ifw-wide-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
  margin-bottom: 58px;
}

.ifw-wide-strip article {
  min-width: 0;
  padding: 14px 16px;
  background: rgba(255,255,255,0.86);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.ifw-wide-strip article:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--brand), 0 18px 42px rgba(15,23,48,0.04);
}

.ifw-wide-strip b,
.ifw-model-card b,
.ifw-workflow-grid h3,
.ifw-trust-board b,
.ifw-wide-footer b {
  color: var(--ink);
}

.ifw-wide-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.58;
}

.ifw-wide-workflow,
.ifw-wide-trust {
  padding-top: 0;
  padding-bottom: 58px;
}

.ifw-section-heading {
  max-width: 860px;
  margin-bottom: 18px;
}

.ifw-section-heading span {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ifw-section-heading h2 {
  margin: 0;
  font-size: var(--ifw-h2);
  line-height: 1.18;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.ifw-section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--ifw-body);
  line-height: 1.68;
}

.ifw-market-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ifw-market-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
}

.ifw-market-sidebar button,
.ifw-market-sidebar a {
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  text-align: left;
  padding: 0 12px;
  font-size: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ifw-market-sidebar button.is-active {
  background: rgba(222,96,35,0.09);
  border-color: rgba(222,96,35,0.26);
  color: var(--brand-dark);
}

.ifw-model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ifw-model-card {
  min-width: 0;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 44px rgba(17,24,39,0.045);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ifw-model-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(15,23,48,0.07);
}

.ifw-model-card.is-hidden {
  display: none;
}

.ifw-card-top {
  gap: 12px;
  margin-bottom: 12px;
}

.ifw-model-mark {
  width: 32px;
  height: 32px;
  min-width: 32px;
  aspect-ratio: 1 / 1;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.ifw-model-mark img {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 6px;
}

.ifw-model-mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.ifw-model-mark.is-gemini {
  color: #8e75b2;
}

.ifw-model-mark.is-deepseek {
  color: #5786fe;
}

.ifw-model-mark.is-seedance {
  color: #3c8cff;
}

.ifw-model-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.56;
}

.ifw-model-card dl {
  display: grid;
  gap: 7px;
  margin: auto 0 0;
  padding-top: 12px;
  font-size: 11px;
}

.ifw-model-card dl div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
}

.ifw-model-card dt {
  color: #98a2b3;
}

.ifw-model-card dd {
  margin: 0;
  color: #344054;
  overflow-wrap: anywhere;
}

.ifw-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ifw-trust-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ifw-workflow-grid article,
.ifw-trust-board article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  transition: border-color .2s, transform .2s, box-shadow .2s, background .2s;
}

.ifw-workflow-grid article:hover,
.ifw-trust-board article:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15,23,48,0.055);
}

.ifw-workflow-grid small {
  color: var(--brand);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.ifw-workflow-grid h3 {
  margin: 12px 0 8px;
  font-size: var(--ifw-h3);
}

.ifw-workflow-grid p,
.ifw-trust-board p,
.ifw-wide-footer span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.56;
}

.ifw-workflow-grid a,
.ifw-trust-board a {
  display: inline;
  margin-top: 0;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
}

.ifw-trust-board a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ifw-workflow-grid code {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: #344054;
  font-size: 12px;
}

.ifw-trust-board b {
  font-size: var(--ifw-h3);
}

.ifw-wide-footer {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 38px;
  border-top: 1px solid var(--line);
}

.ifw-wide-footer div {
  display: grid;
  gap: 6px;
}

.ifw-wide-footer nav {
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

@media (max-width: 1180px) {
  .ifw-wide-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .ifw-console-panel {
    max-width: 820px;
  }
  .ifw-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body.ifw-v9-page.ifw-page-home {
    --ifw-page-pad: 20px;
    --ifw-h1: 24px;
    --ifw-h2: 18px;
  }
  .ifw-wide-nav,
  .ifw-wide-hero,
  .ifw-wide-strip,
  .ifw-wide-workflow,
  .ifw-wide-trust,
  .ifw-wide-footer {
    width: min(100% - 32px, 1440px);
    padding-left: 0;
    padding-right: 0;
  }
  .ifw-wide-nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ifw-wide-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 4px;
  }
  .ifw-wide-hero {
    padding-top: 36px;
  }
  .ifw-hero-proof,
  .ifw-wide-strip,
  .ifw-workflow-grid,
  .ifw-trust-board,
  .ifw-console-metrics {
    grid-template-columns: 1fr;
  }
  .ifw-market-shell {
    display: block;
  }
  .ifw-model-grid {
    grid-template-columns: 1fr;
  }
  .ifw-wide-footer {
    display: grid;
  }
  .ifw-wide-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .ifw-wide-actions {
    width: auto;
  }
  .ifw-wide-actions .ifw-v9-button,
  .ifw-hero-actions .ifw-v9-button {
    flex: 0 0 auto;
  }
  .ifw-hero-copy h1 {
    font-size: var(--ifw-h1);
  }
  .ifw-console-body {
    min-height: 0;
    padding: 20px;
    font-size: 12px;
  }
}
