/* ==========================================================================
   CAD-Flow — inner pages
   ========================================================================== */

.skip {
  position: absolute;
  left: 50%; top: -100px;
  z-index: calc(var(--z-nav) + 1);
  transform: translateX(-50%);
  transition: top var(--fast) var(--ease);
}
.skip:focus-visible { top: 12px; }

/* --------------------------------------------------------------- page head */

.page-head {
  position: relative;
  padding-top: 148px;
  padding-bottom: var(--s-8);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-head .container { position: relative; }
.page-head h1 { margin-block: var(--s-4) var(--s-5); font-size: clamp(34px, 4.8vw, 58px); }
.page-head .lede { max-width: 60ch; }

/* ---------------------------------------------------------- feature rows */

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: center;
}
.frow + .frow { margin-top: clamp(var(--s-8), 8vw, var(--s-10)); }
.frow:nth-child(even) .frow-media { order: -1; }
.frow h2 { margin-block: var(--s-4) var(--s-4); font-size: clamp(26px, 2.8vw, 36px); }

.frow-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.frow-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--s-3);
  font-size: 15px;
  color: var(--ink-2);
}
.frow-list svg { width: 18px; height: 18px; margin-top: 3px; color: var(--blue); }

.frow-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 50% 40%, rgba(59, 158, 255, .09), transparent 65%),
    var(--bg-2);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.frow-media svg.art { width: 76%; height: auto; overflow: visible; }

/* linework that draws itself when the row scrolls in */
.art .draw {
  fill: none;
  stroke: #8FCBFF;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art .draw.warm { stroke: var(--amber); }
.art .fillsoft { fill: rgba(59, 158, 255, .07); stroke: none; }

.js .art .draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
[data-reveal].is-in .art .draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1600ms var(--ease) var(--dd, 0ms);
}

/* ------------------------------------------------------------ library grid */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}
.chip {
  padding: 8px 15px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--ink-2);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--blue); }
.chip[aria-pressed='true'] {
  background: var(--blue-soft);
  border-color: rgba(59, 158, 255, .5);
  color: var(--blue);
}

.assets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-4);
}

.asset {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
  overflow: hidden;
  transition: border-color var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.asset:hover { border-color: rgba(59, 158, 255, .45); transform: translateY(-3px); }
.asset[hidden] { display: none; }

.asset-art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 18px 18px,
    #0C1018;
}
.asset-art svg { width: 62%; height: auto; }
.asset-art svg * {
  fill: none;
  stroke: #8FCBFF;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: stroke var(--mid) var(--ease);
}
/* hover = "render it" — the whole site's blue→amber move, one more time */
.asset:hover .asset-art svg * { stroke: var(--amber); }

.asset-art::after {
  content: 'RENDER';
  position: absolute;
  inset: auto 0 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--amber);
  opacity: 0;
  transition: opacity var(--mid) var(--ease);
}
.asset:hover .asset-art::after { opacity: .9; }

.asset-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
}
.asset-name { font-size: 13.5px; font-weight: 500; }
.asset-kind {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
  white-space: nowrap;
}

.lib-note {
  margin-top: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}

/* ----------------------------------------------------------------- pricing */

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); align-items: start; }

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.plan.is-featured {
  border-color: rgba(59, 158, 255, .45);
  box-shadow: 0 28px 70px -34px rgba(37, 99, 235, .6);
}
.plan-flag {
  position: absolute;
  top: -1px; right: var(--s-5);
  padding: 4px 11px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: var(--blue);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
}
.plan-name { font-size: 17px; font-weight: 600; }
.plan-price {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
}
.plan-price small { font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
.plan-desc { font-size: 14px; color: var(--ink-2); min-height: 42px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.plan li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
}
.plan li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--blue); }
.plan .btn { margin-top: auto; }

/* honest placeholder marker — Greg has not given real tiers yet */
.tbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px dashed rgba(255, 159, 69, .5);
  border-radius: 4px;
  background: var(--amber-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--amber);
  vertical-align: middle;
}
.notice {
  display: flex;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border: 1px dashed rgba(255, 159, 69, .45);
  border-radius: var(--r-md);
  background: var(--amber-soft);
  font-size: 14px;
  color: var(--ink-2);
}
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--amber); }

/* -------------------------------------------------------------------- docs */

.docs { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-8); align-items: start; }

.toc { position: sticky; top: 96px; display: grid; gap: var(--s-1); }
.toc a {
  padding: 8px 12px;
  border-left: 2px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
  transition: all var(--fast) var(--ease);
}
.toc a:hover { color: var(--ink); border-left-color: var(--blue); }

.doc-body { display: grid; gap: var(--s-8); max-width: 72ch; }
.doc-body h2 { font-size: clamp(23px, 2.4vw, 30px); scroll-margin-top: 96px; }
.doc-body h3 { margin-top: var(--s-5); font-size: 17px; }
.doc-body p, .doc-body li { color: var(--ink-2); font-size: 15.5px; }
.doc-body p + p { margin-top: var(--s-4); }
.doc-body ul, .doc-body ol { margin: var(--s-4) 0 0; padding-left: var(--s-5); display: grid; gap: 10px; }
.doc-body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .07);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}
.doc-body pre {
  margin: var(--s-4) 0 0;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #0C1018;
  overflow-x: auto;
}
.doc-body pre code { background: none; padding: 0; color: var(--blue); }

.spec { width: 100%; border-collapse: collapse; margin-top: var(--s-4); }
.spec th, .spec td {
  padding: 11px var(--s-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14.5px;
}
.spec th { color: var(--ink); font-weight: 600; width: 38%; }
.spec td { color: var(--ink-2); font-family: var(--mono); font-size: 13px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 20px;
  color: var(--blue);
  transition: transform var(--mid) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s-5); color: var(--ink-2); font-size: 15px; max-width: 68ch; }

/* ------------------------------------------------------------------- about */

.about-lead { max-width: 68ch; display: grid; gap: var(--s-5); }
.about-lead p { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.about-lead strong { color: var(--ink); font-weight: 600; }

.values { margin-top: var(--s-9); }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .frow { grid-template-columns: 1fr; gap: var(--s-6); }
  .frow:nth-child(even) .frow-media { order: 0; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; gap: var(--s-6); }
  .toc { position: static; grid-auto-flow: column; overflow-x: auto; }
  .toc a { border-left: 0; border-bottom: 2px solid var(--line); white-space: nowrap; }
}

@media (max-width: 768px) {
  .page-head { padding-top: 112px; }
  .assets { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .plans { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .field-row { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- billing toggle */

.billing {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s-6);
}
.billing-in {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.billing button {
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.billing button:hover { color: var(--ink); }
.billing button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.billing .save {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--amber);
  padding-right: 14px;
  padding-left: 6px;
  white-space: nowrap;
}

.plan-price .per { font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
.plan-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  margin-top: 2px;
  min-height: 17px;
}
.plan-free { color: var(--blue); }

/* ---------------------------------------------------------------- forms */

.field { display: grid; gap: 7px; margin-bottom: var(--s-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field .req { color: var(--amber); }
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
textarea.input { min-height: 140px; resize: vertical; line-height: 1.6; }
select.input { appearance: none; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-msg {
  display: none;
  gap: var(--s-3);
  margin-top: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.55;
}
.form-msg.is-on { display: flex; }
.form-msg.is-ok {
  border: 1px solid rgba(59, 158, 255, .4);
  background: var(--blue-soft);
  color: var(--ink);
}
.form-msg.is-bad {
  border: 1px dashed rgba(255, 159, 69, .5);
  background: var(--amber-soft);
  color: var(--ink-2);
}
.btn[data-busy="1"] { opacity: .6; pointer-events: none; }

.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s-8); align-items: start; }
.contact-aside { display: grid; gap: var(--s-5); }
.contact-card {
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.contact-card h3 { font-size: 15px; margin-bottom: 6px; }
.contact-card p { font-size: 14px; color: var(--ink-2); }
.contact-card a { color: var(--blue); }

/* ---------------------------------------------------------------- modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  background: rgba(5, 8, 14, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal.is-open { display: flex; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: var(--s-6);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
}
.modal-card h2 { font-size: 21px; margin-bottom: 6px; }
.modal-card .lede { font-size: 14px; color: var(--ink-2); margin-bottom: var(--s-5); }
.modal-x {
  position: absolute;
  top: var(--s-4); right: var(--s-4);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-3);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { color: var(--ink); border-color: var(--line-strong); }
