/* ffrreevvyy landing — clean light (Figma-Weave style) */
@font-face {
  font-family: 'Meridian Grotesk';
  src: url('fonts/null-meridian-grotesk-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #151616;
  --bg: #eef1f6;
  --bg-2: #e6eaf2;
  --card: #ffffff;
  --line: #d7dbe4;
  --dim: #86888b;
  --navlink: #787878;
  --accent: #3d7bff;
  --yellow: #f7ff9e;
  --yellow-ink: #353523;
  --bar: #0e0e13;
  --text-secondary: #656568;
  --ok: #25c26e;
  --bad: #ff5d5d;
  --font: 'Meridian Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius-card: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  color: var(--ink); display: flex; flex-direction: column; min-height: 100vh;
  font-family: var(--font); -webkit-font-smoothing: antialiased; line-height: 1.5;
  font-synthesis: none;
  background-color: #dbe2e7;
  background-image: linear-gradient(180deg, #dbe2e7 0%, #f5f5f3 50%, #cbd8cf 100%);
}
/* grid: #f5f5f3 lines, 16px cells, fading out by the middle (none on the bottom) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, #f5f5f3 0 1px, transparent 1px 16px),
    repeating-linear-gradient(0deg, #f5f5f3 0 1px, transparent 1px 16px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 18%, transparent 50%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 18%, transparent 50%);
}
img { max-width: 100%; display: block; }

/* ---------- hardware bar ---------- */
.hwbar {
  position: sticky; top: 0; z-index: 60; height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--bar); color: #d8d8de; font-size: 13.8px; letter-spacing: 0.02em;
  font-feature-settings: 'tnum'; padding: 0 16px; text-align: center;
}
.hw-logo { height: 0.72em; width: auto; display: block; flex: none; transform: scale(1.25); transform-origin: center; }
.hwbar.ok #hw-text { color: #7df0ad; }
.hwbar.bad #hw-text { color: #ff9a9a; }
.hwbar b { color: #fff; font-weight: 600; }

/* ---------- nav ---------- */
.nav {
  position: relative; z-index: 55;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 14px 224px 14px 14px;
}
.brand { position: fixed; top: 48px; left: 0; z-index: 57; display: flex; align-items: flex-start; text-decoration: none; }
.brand img { display: block; width: auto; height: 40px; transform-origin: top left; }
.nav-right { display: flex; align-items: center; gap: 6px; position: relative; top: -2px; }
.nav-link { color: #241c18; text-decoration: none; font-size: clamp(9px, 0.7vw, 11px); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 12px; border-radius: 8px; transition: background 0.18s var(--ease), color 0.18s var(--ease); }
.nav-link:hover { background: #252525; color: #f2f2ef; }

/* hover info popovers */
.nav-item { position: relative; display: flex; }
.nav-pop {
  position: absolute; top: calc(100% + 9px); right: 0; width: 290px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: 0 14px 34px rgba(40, 50, 90, 0.16); padding: 16px 18px;
  text-transform: none; letter-spacing: normal; z-index: 58; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s var(--ease);
}
.nav-item:hover .nav-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-pop h4 { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 7px; }
.nav-pop p { font-size: 12.5px; line-height: 1.5; color: #737678; }
.pop-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.pop-pills span { font-size: 10.5px; color: #4a4c4f; background: #f1f2ee; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }

/* flush top-right yellow block */
.btn-start.corner {
  position: fixed; top: 48px; right: 0; z-index: 56;
  height: 90px; width: 200px; border: 1px solid var(--yellow);
  border-radius: 0 0 0 18px; padding: 0 0 13.2px 17.5px;
  background: var(--yellow); color: var(--yellow-ink); cursor: pointer; text-align: left;
  font-family: var(--font); font-weight: 700; letter-spacing: 0.005em;
  font-size: 41px; line-height: 1; white-space: nowrap;
  display: flex; align-items: flex-end; justify-content: flex-start;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-start.corner:hover { background: #252525; border-color: #252525; color: #fff; }
.btn-start {
  background: var(--yellow); color: var(--ink); border: none; border-radius: 8px;
  padding: 11px 22px; font-family: var(--font); font-weight: 600; font-size: 15px; cursor: pointer;
  letter-spacing: 0.02em; transition: transform 0.25s var(--ease);
}
.btn-start.full { width: 100%; margin-top: 18px; border-radius: 8px; }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; max-width: 1440px; margin: 0 auto; padding: 82px 48px 0; }
.hero-head { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
.htxt { font-size: clamp(57px, 6.6vw, 96px); font-weight: 400; letter-spacing: -0.005em; line-height: 1.0; color: var(--ink); margin: 0; }
.t-left { grid-column: 1; grid-row: 1; }
.t-right { grid-column: 2; grid-row: 1; text-align: right; }
.hero-sub { grid-column: 1; grid-row: 2; margin-top: 22px; max-width: 460px; font-size: clamp(13.2px, 1.05vw, 15.4px); color: #737678; line-height: 1.18; }

/* ---------- node graph showcase ---------- */
.graph {
  position: relative; height: 308px; margin-top: auto; margin-bottom: 22px;
  width: 100%; display: flex; justify-content: space-between; align-items: flex-start;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.wires path { fill: none; stroke: #9aa2b0; stroke-width: 1.2; opacity: 0.8; }
.gnode { position: relative; }
.gn-label { display: flex; align-items: baseline; gap: 9px; margin-bottom: 9px; padding-left: 2px; }
.gn-label b { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: #4a4c4f; text-transform: uppercase; }
.gn-label span { font-size: 10px; letter-spacing: 0.14em; color: #9a9c9f; text-transform: uppercase; }
.gn-shape {
  position: relative; width: 100%; height: calc(100% - 28px);
  background: #b9c2c9; border-radius: var(--radius-card);
}
.gnode.text .gn-shape {
  background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; padding: 16px 14px;
}
.gn-shape .ln { height: 6px; width: 100%; background: #e4e4dd; border-radius: 3px; }
.gn-shape .ln.sh { width: 52%; }
.gn-img, .gn-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-card); display: block; }
.gn-prompt { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 10px; line-height: 1.5; color: #6b6d70; overflow: hidden; }
.port {
  position: absolute; top: 50%; transform: translateY(-50%); width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 1.5px solid #9aa3ad; z-index: 2;
}
.port.in { left: -5px; }
.port.out { right: -5px; }

/* ---------- sections ---------- */
.section-title { font-size: clamp(28px, 4vw, 48px); font-weight: 600; letter-spacing: -0.03em; }
.section-sub { margin-top: 14px; max-width: 620px; color: var(--dim); font-size: clamp(15px, 1.6vw, 18px); }
.local, .models { max-width: 1280px; margin: 0 auto; padding: 80px 36px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 6px 22px rgba(40,50,90,0.06); }
.fic { font-size: 26px; margin-bottom: 14px; color: var(--accent); }
.feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--dim); line-height: 1.55; }
.models { text-align: center; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
.pills span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 500; box-shadow: 0 3px 12px rgba(40,50,90,0.05); }

/* ---------- cta / footer ---------- */
.cta { text-align: center; padding: 90px 36px 40px; }
.cta-title { font-size: clamp(28px, 4.5vw, 56px); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 30px; }
.foot { max-width: 1280px; margin: 70px auto 0; padding-top: 26px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-meta { font-size: 13px; color: var(--dim); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; background: rgba(12,12,14,0.5); backdrop-filter: blur(4px); padding: 24px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 34px; box-shadow: 0 30px 80px rgba(20,30,60,0.3); }
.modal-x { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 15px; cursor: pointer; color: var(--dim); }
.modal-title { font-size: 26px; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 8px; }
.modal-sub { font-size: 14px; color: var(--dim); margin-bottom: 22px; }
.modal-card { max-width: 540px; }
.deps { background: #f5f6f2; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.deps-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 10px; }
.dep-list { list-style: none; margin: 0; padding: 0; }
.dep-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; font-size: 13px; border-bottom: 1px solid #e7e8e2; }
.dep-list li:last-child { border-bottom: none; }
.dep-list li b { color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.deps-note { font-size: 12px; color: var(--text-secondary); line-height: 1.45; margin-top: 11px; }
.step { margin-bottom: 18px; }
#install-dir { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline: none; }
#install-dir:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 123, 255, 0.15); }
.loc-hint { font-size: 12px; color: var(--text-secondary); line-height: 1.45; margin-top: 7px; }
.install-label { font-size: 13px; margin: 12px 0 8px; }
.cmd { display: flex; align-items: center; gap: 10px; background: #0c0c0e; color: #e8e8ec; padding: 12px 14px; border-radius: 8px; }
.cmd code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; flex: 1; overflow-x: auto; }
.copy { background: #fff; color: var(--ink); border: none; padding: 6px 12px; border-radius: 6px; font-family: var(--font); font-size: 12px; cursor: pointer; }

/* model picker */
.model-total { font-size: 12px; font-weight: 400; color: var(--dim); margin-left: 6px; }
.model-list { display: flex; flex-direction: column; gap: 2px; max-height: 184px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 5px; background: #fff; }
.model-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); }
.model-row:hover { background: #f5f6f2; }
.model-row input { margin: 0; accent-color: var(--ink); cursor: pointer; }
.model-row .m-name { flex: 1; }
.model-row .m-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #4a4c4f; background: #f1f2ee; border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.model-row .m-size { color: var(--text-secondary); font-variant-numeric: tabular-nums; min-width: 50px; text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  html, body { overflow: visible; height: auto; }
  body { min-height: 100vh; }

  .hwbar { position: sticky; height: auto; min-height: 46px; padding: 9px 14px; font-size: 12px; line-height: 1.35; }
  .hw-logo { transform: scale(1.1); }

  .nav { position: relative; padding: 10px 14px; justify-content: space-between; align-items: center; }
  .nav-right { display: none; }
  .brand { position: static; }
  .brand img { height: 30px; }

  /* Start Now → small inline yellow button in the nav (top-right) */
  .btn-start.corner {
    position: static; top: auto; right: auto; width: auto; height: auto;
    padding: 11px 18px; border: 1px solid var(--yellow); border-radius: 8px;
    align-items: center; justify-content: center; text-align: center;
    font-size: 16px; box-shadow: none;
  }
  .btn-start.corner .sn { font-size: 16px; }

  .hero { display: block; padding: 28px 18px 48px; }
  .hero-head { display: block; }
  .htxt { font-size: clamp(52px, 16vw, 88px); line-height: 0.96; display: block; }
  .t-left { text-align: left; }
  .t-right { text-align: right; margin-top: 22px; }
  .hero-sub { max-width: 100%; margin-top: 18px; font-size: 14.5px; line-height: 1.45; }

  /* node graph → vertical stack, no wires */
  .graph { position: static; width: auto; left: auto; transform: none; height: auto; margin: 34px 0 0; display: flex; flex-direction: column; gap: 26px; }
  #wires { display: none; }
  .gnode { position: static !important; inset: auto !important; width: 100% !important; height: auto !important; }
  .gn-shape { height: 210px; }
  .gnode.text .gn-shape { height: auto; }
  .port { display: none; }
}
