/* Markwright website. Dark, quiet and product-led: a near-black ground, soft white type, depth from
   lighter surface steps, and the real product and its real output doing the talking. */
:root {
  --bg: #060607;
  --s1: #0f1012;
  --s2: #17181b;
  --s3: #222428;
  --s4: #2c2e33;
  --ink: #f4f5f5;
  --muted: #9298a1;
  --dim: #6b7079;
  --accent: #c3edce;
  --white: #ffffff;

  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  --step-head: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem);
  --step-hero: clamp(2.75rem, 1.6rem + 4.4vw, 5.25rem);

  --m: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --r: 14px;
  --section: clamp(120px, 13vw, 200px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #0a0a0a; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--m)); margin: 0 auto; padding: 0 var(--m); }
section.block { margin-top: var(--section); }
.lede { color: var(--muted); font-size: var(--step-lead); line-height: 1.45; max-width: 46ch; }
.head h2 { font-size: var(--step-head); max-width: 16ch; }
.head .lede { margin-top: 20px; }

/* Buttons: pills, white primary and a surface secondary */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--white); color: #0a0a0a;
  font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s var(--ease-out), background-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn.dark { background: var(--s3); color: var(--ink); }
.btn.small { height: 38px; padding: 0 16px; font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #dfe2e2; }
  .btn.dark:hover { background: var(--s4); }
}
.more { color: var(--ink); text-decoration: none; font-weight: 500; }
.more span { display: inline-block; transition: transform .2s var(--ease-out); }
@media (hover: hover) { .more:hover span { transform: translateX(4px); } }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.1875rem; letter-spacing: -0.03em; }
.wordmark svg { width: 26px; height: 26px; }
.nav ul { list-style: none; display: flex; gap: 26px; margin: 0 0 0 auto; padding: 0; font-size: 0.9375rem; }
.nav ul a { text-decoration: none; color: var(--muted); transition: color .15s ease; }
.nav ul a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 112px); }
.hero h1 { font-size: var(--step-hero); max-width: 13ch; letter-spacing: -0.04em; line-height: 0.98; }
.hero .lede { margin-top: 28px; }
.hero .ctas { margin-top: 36px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero .note { margin-top: 18px; color: var(--muted); font-size: var(--step-small); }

/* The working product window */
.window { margin-top: clamp(56px, 7vw, 96px); background: var(--s1); border-radius: 18px; padding: 10px; }
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 10px; min-height: 540px; font: 400 14px/1.45 var(--font); letter-spacing: 0; }
.app h3 { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin: 0 0 10px; line-height: 1.3; }
.app .pane { background: var(--s2); border-radius: 12px; padding: 16px; min-width: 0; }
.app .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.app .top b { font-weight: 600; font-size: 15px; }
.app .pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--s4); color: var(--muted); }
.concept { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; width: 100%; padding: 8px; margin: 0 0 4px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: background-color .15s ease; }
.concept:hover { background: var(--s3); }
.concept[aria-pressed="true"] { background: var(--s4); }
.concept .t { height: 40px; border-radius: 8px; background: #f4f4ef; display: grid; place-items: center; }
.concept .t svg { max-width: 52px; max-height: 26px; }
.concept small { display: block; color: var(--muted); font-size: 12px; }
.swatches { display: flex; gap: 6px; margin-top: 18px; }
.swatches i { width: 28px; height: 28px; border-radius: 50%; }
.app .canvas { background: #0b0b0c; border-radius: 12px; display: grid; place-items: center; overflow: hidden; padding: 8px; }
.app .canvas > * { width: 100%; }
.app .canvas svg { width: 100%; height: auto; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: var(--s1); }
.seg button { border: 0; background: transparent; color: var(--muted); font: 500 13px var(--font); height: 30px; border-radius: 8px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--s4); color: var(--ink); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.app .found { margin-top: 22px; }
.app .fileline { margin-top: 22px; font-size: 13px; color: var(--muted); }
.app .fileline input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.app .fileline label { color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(40px) scale(.985); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
  .js .rise.is-in { opacity: 1; transform: none; }
}

/* ---------- three outcomes with their figures ---------- */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(64px, 7vw, 104px); }
.outcomes .fig { font-size: clamp(2.5rem, 1.6rem + 2.4vw, 4rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.outcomes .fig small { font-size: 0.42em; letter-spacing: -0.01em; color: var(--muted); margin-left: 6px; }
.outcomes h3 { font-size: var(--step-body); letter-spacing: -0.01em; margin-top: 18px; line-height: 1.3; }
.outcomes p { color: var(--muted); margin-top: 8px; max-width: 34ch; }

/* ---------- six tools: list beside a preview ---------- */
.tools { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: 56px; }
.toollist { list-style: none; margin: 0; padding: 0; }
.toollist button { display: block; width: 100%; border: 0; background: none; color: var(--muted); font: 500 clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem)/1.2 var(--font); letter-spacing: -0.02em; text-align: left; padding: 16px 0 12px; cursor: pointer; transition: color .2s ease; }
.toollist button:hover { color: var(--ink); }
.toollist li.on button { color: var(--ink); }
.toollist .desc { display: none; padding: 0 0 16px; color: var(--muted); max-width: 40ch; }
.toollist li.on .desc { display: block; }
.toollist .desc a { display: inline-block; margin-top: 12px; }
.toollist .bar { height: 3px; border-radius: 2px; background: var(--s2); overflow: hidden; }
.toollist .bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.toollist li.on .bar i { width: var(--p, 100%); }
.preview { position: sticky; top: 96px; margin: 0; background: var(--s1); border-radius: 18px; padding: 10px; }
.preview .frame { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #0b0b0c; }
.preview .frame > * { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.preview .frame > .on { opacity: 1; pointer-events: auto; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview figcaption { padding: 12px 6px 4px; color: var(--muted); font-size: var(--step-small); }
.ui-tree { display: grid; align-content: center; padding: 32px 40px; font: 400 clamp(14px, 1.45vw, 19px)/1.9 var(--font); overflow: hidden; }
.ui-tree .d { color: var(--ink); font-weight: 500; }
.ui-tree .f { color: var(--muted); padding-left: 18px; white-space: nowrap; }
.ui-tree .f b { color: var(--accent); font-weight: 500; }
.ui-hub { display: grid; place-content: center; gap: 16px; padding: 32px; font-size: 15px; }
.ui-hub .url { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--s2); border-radius: 999px; padding: 6px 6px 6px 20px; min-width: min(460px, 70vw); }
.ui-hub .opts { display: grid; gap: 10px; color: var(--muted); padding-left: 4px; }
.ui-hub .opts span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 10px; }

/* ---------- gallery: real output, slowly moving ---------- */
.gallery { margin-top: 56px; display: grid; gap: 12px; overflow: hidden; }
.gallery .row { display: flex; gap: 12px; width: max-content; }
.gallery figure { margin: 0; flex: none; height: clamp(170px, 17vw, 250px); border-radius: 12px; overflow: hidden; background: var(--s2); }
.gallery figure img { height: 100%; width: auto; }
@media (prefers-reduced-motion: no-preference) {
  .gallery .row { animation: drift 90s linear infinite; }
  .gallery .row.rev { animation-direction: reverse; animation-duration: 110s; }
  .gallery:hover .row { animation-play-state: paused; }
  @keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) { .gallery { overflow-x: auto; } }

/* ---------- principles ---------- */
.rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 48px); margin-top: 56px; }
.rules h3 { font-size: var(--step-body); letter-spacing: -0.01em; line-height: 1.3; }
.rules p { margin-top: 8px; color: var(--muted); }

/* ---------- where it runs ---------- */
.where { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: 56px; }
.where dl { margin: 0; display: grid; gap: 28px; }
.where dt { font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; }
.where dd { margin: 6px 0 0; color: var(--muted); }
.shot { margin: 0; background: var(--s1); border-radius: 18px; padding: 10px; }
.shot img { border-radius: 10px; width: 100%; height: auto; }

/* ---------- price ---------- */
.price { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.plan { background: var(--s1); border-radius: 18px; padding: clamp(28px, 4vw, 48px); }
.plan .name { font-weight: 500; font-size: var(--step-lead); margin-bottom: 26px; }
.plan .amount { display: flex; align-items: flex-end; gap: 12px; }
.plan .amount b { font-size: clamp(4.5rem, 3rem + 5vw, 7.5rem); font-weight: 500; letter-spacing: -0.05em; line-height: 0.85; }
.plan .amount span { color: var(--muted); padding-bottom: 8px; }
.plan ul { list-style: none; padding: 0; margin: 32px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.plan li { display: flex; gap: 12px; align-items: baseline; }
.plan li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.plan .fine { margin-top: 18px; color: var(--muted); font-size: var(--step-small); }

/* ---------- questions ---------- */
.faq { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq .head { position: sticky; top: 100px; }
.faq .list { display: grid; gap: 8px; }
.faq details { background: var(--s1); border-radius: var(--r); transition: background-color .2s ease; }
.faq details[open] { background: var(--s2); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; cursor: pointer; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq .plus { position: relative; width: 14px; height: 14px; flex: none; }
.faq .plus::before, .faq .plus::after { content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; border-radius: 1px; background: var(--muted); transition: transform .2s var(--ease-out); }
.faq .plus::after { transform: rotate(90deg); }
.faq details[open] .plus::after { transform: rotate(0); }
.faq details p { padding: 0 24px 22px; color: var(--muted); max-width: 62ch; }
.faq details a { color: var(--ink); }

/* ---------- closing sentence with a blank ---------- */
.close { text-align: center; }
.close form { font-size: clamp(2.25rem, 1.2rem + 3.2vw, 4.25rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.12; max-width: 18em; margin: 0 auto; }
.close input { font: inherit; letter-spacing: inherit; color: var(--ink); width: 6em; height: 1.1em; padding: 0 .35em; border: 0; border-radius: 999px; background: var(--s3); vertical-align: baseline; text-align: center; }
.close input::placeholder { color: var(--dim); }
.close button { font: inherit; letter-spacing: inherit; height: 1.1em; padding: 0 .4em; border: 0; border-radius: 999px; background: var(--white); color: #0a0a0a; cursor: pointer; vertical-align: baseline; transition: background-color .2s ease, transform .12s ease; }
.close button:hover { background: #dfe2e2; }
.close button:active { transform: scale(.98); }
.close .note { margin-top: 26px; color: var(--muted); }

/* ---------- footer ---------- */
footer.wrap { margin-top: var(--section); padding-bottom: 40px; }
.foot { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.foot p { color: var(--muted); max-width: 34ch; margin-top: 14px; font-size: var(--step-small); }
.foot h3 { font-size: var(--step-small); font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: 12px; line-height: 1.3; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--step-small); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; color: var(--muted); font-size: 0.875rem; }

/* ---------- entrances ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-in] > * { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .js [data-in].is-in > * { opacity: 1; transform: none; }
  .js [data-in].is-in > *:nth-child(2) { transition-delay: 80ms; }
  .js [data-in].is-in > *:nth-child(3) { transition-delay: 160ms; }
  .js [data-in].is-in > *:nth-child(4) { transition-delay: 240ms; }
  .js [data-in].is-in > *:nth-child(n+5) { transition-delay: 320ms; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); }
  .app .inspector { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .app .inspector .found, .app .inspector .fileline { margin-top: 0; }
  .rules { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav ul { display: none; }
  .nav .btn { margin-left: auto; }
  .hero h1 { font-size: 9.4vw; }
  .app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .app .canvas { order: 1; min-height: 220px; }
  .app .side { order: 2; }
  .app .inspector { order: 3; grid-template-columns: 1fr; }
  .outcomes, .tools, .where, .price, .faq { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; order: -1; }
  .rules { grid-template-columns: 1fr; }
  .plan ul { grid-template-columns: 1fr; }
  .faq .head { position: static; }
  .faq summary { padding: 18px 20px; }
  .faq details p { padding: 0 20px 20px; }
  .close form { font-size: 9.5vw; }
  .close input { display: block; width: 100%; margin: .12em 0; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}
